CN106951288A - A kind of exploitation, application process and the device of heat more resource - Google Patents

A kind of exploitation, application process and the device of heat more resource Download PDF

Info

Publication number
CN106951288A
CN106951288A CN201710166724.7A CN201710166724A CN106951288A CN 106951288 A CN106951288 A CN 106951288A CN 201710166724 A CN201710166724 A CN 201710166724A CN 106951288 A CN106951288 A CN 106951288A
Authority
CN
China
Prior art keywords
lua
function
hot
script
language
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
CN201710166724.7A
Other languages
Chinese (zh)
Other versions
CN106951288B (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 CN201710166724.7A priority Critical patent/CN106951288B/en
Publication of CN106951288A publication Critical patent/CN106951288A/en
Application granted granted Critical
Publication of CN106951288B publication Critical patent/CN106951288B/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/60Software deployment
    • G06F8/65Updates

Abstract

This application provides a kind of development approach of hot more resource, the application process of device and hot more resource, device, the development approach of hot more resource includes:Based on the development mode of the framework according to intended application, the view layer of obtained hot more development of resources framework is built, the hot more interface of intended application is determined;Incidence relation based on view layer with the hot more controller layer of development of resources framework, it is determined that controlling script with the Lua that the hot more interface of intended application is associated;Incidence relation based on controller layer with the hot more model layer of development of resources framework, it is determined that controlling the data processing script of script association with Lua;The Lua control scripts that associates by the hot more interface of the intended application of determination, with the hot more interface of intended application and with it is any one or more in the data processing script of Lua control script associations, be used as the heat more resource of intended application.In this application, by shortening the whole development time of hot more resource with upper type, the Efficient Development of hot more resource is realized.

Description

A kind of exploitation, application process and the device of heat more resource
Technical field
The application is related to the exploitation of resource, application field, more particularly to a kind of exploitation, application process and the dress of hot more resource Put.
Background technology
With the development and popularization of network, network application (such as online game) is also developed rapidly.In network application hair After cloth, produced problem during network application operation is found and solved in time, is operation enterprise concern emphatically.
At present, the effective means of produced problem is during solution network application operation:Carry out network application renewal.And When network application updates, if network application installation kit is larger and the whole resources of network application are repacked into issue, it can cause The download for running client is big, causes renewal speed slow.In order to improve renewal speed, the heat renewal of download can be reduced (referred to as:Heat more) technology application and give birth to.Hot more technology is only to update the partial data in network application, it is not necessary to by network application Whole resources repack issue, so as to realize the renewal that objective network application is completed with less download.
In order that network application support heat more, the mode that can be used at present for:Realize that resource in network application can be with By heat more, but how efficiently to develop hot more resource turns into problem.
The content of the invention
In order to solve the above technical problems, the embodiment of the present application provides a kind of exploitation, application process and the device of hot more resource, To reach the whole development time for shortening hot more resource, the purpose of the Efficient Development of hot more resource is realized, technical scheme is as follows:
A kind of development approach of heat more resource, including:
Based on the development mode of the framework according to intended application, the view layer of obtained hot more development of resources framework is built, Determine the hot more interface of the intended application;
Incidence relation based on the view layer with the hot more controller layer of development of resources framework, it is determined that with the mesh The Lua control scripts of the hot more interface association of mark application;
Incidence relation based on the controller layer with the hot more model layer of development of resources framework, it is determined that with it is described Lua controls the data processing script of script association;
The Lua associated by the hot more interface of the intended application of determination, with the hot more interface of the intended application is controlled Script and with the Lua control script association data processing script in it is any one or more, be used as the intended application Hot more resource.
A kind of application process of heat more resource, including:
Hot more resource is treated in acquisition, described to treat that heat more interface, Lua that hot more resource is intended application are controlled at script and data Manage any one or more in script;
The hot more interface of the intended application is the view layer based on hot more development of resources framework, builds obtained Re Geng circle Face, the heat more development of resources framework includes:Model layer, view layer and controller layer, the view layer and the controller layer Association, the controller layer is associated with the model layer;
The Lua control script be the incidence relation based on the view layer Yu the controller layer, determine with institute State the control script of the hot more interface association of intended application;
The data processing script is the incidence relation based on the controller layer and the model layer, the data determined Handle script;
Treat that hot more resource is updated to intended application using what is got.
A kind of development device of heat more resource, including:
First development module, for the development mode of the framework according to intended application, builds obtained hot more development of resources The view layer of framework, determines the hot more interface of the intended application;
Second development module, for associating based on the view layer and the hot more controller layer of development of resources framework Relation, it is determined that controlling script with the Lua that the hot more interface of the intended application is associated;
3rd development module, for the association based on the controller layer and the hot more model layer of development of resources framework Relation, it is determined that controlling the data processing script of script association with the Lua;
Determining module, for the hot more interface by the hot more interface of the intended application of determination, with the intended application Association Lua control script and with the Lua control script association data processing script in it is any one or more, as The hot more resource of the intended application.
A kind of application apparatus of heat more resource, including:
Acquisition module, hot more resource is treated for obtaining, the hot more interface for treating hot more resource for intended application, Lua controls It is any one or more in script processed and data processing script;
The hot more interface of the intended application is the view layer based on hot more development of resources framework, builds obtained Re Geng circle Face, the heat more development of resources framework includes:Model layer, view layer and controller layer, the view layer and the controller layer Association, the controller layer is associated with the model layer;
The Lua control script be the incidence relation based on the view layer Yu the controller layer, determine with institute State the control script of the hot more interface association of intended application;
The data processing script is the incidence relation based on the controller layer and the model layer, the data determined Handle script;
Update module, for treating that hot more resource is updated to intended application using what is got.
Compared with prior art, the application has the beneficial effect that:
In this application, the development mode of the framework of intended application is first according to, hot more development of resources framework is built, then Hot more development of resources framework based on structure, the hot more resource of exploitation.
Due to the development mode that hot more development of resources framework is the framework according to intended application, obtained framework is built, because This hot more development of resources framework is frame structure known to developer, and developer antipyretic more resource need not open again The framework content of framework is sent out, the exploitation that hot more development of resources framework carries out hot more resource can be directly based upon, it is to avoid early stage The process of framework is practised, so as to shorten the whole development time of hot more resource, the Efficient Development of hot more resource is realized.
Brief description of the drawings
, below will be to make needed for embodiment description in order to illustrate more clearly of the technical scheme in the embodiment of the present application Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present application, for For those of ordinary skill in the art, without having to pay creative labor, it can also be obtained according to these accompanying drawings His accompanying drawing.
Fig. 1 is the structured flowchart of the development system of hot more resource provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of the development approach of hot more resource provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of hot more development of resources framework provided in an embodiment of the present invention;
Fig. 4 is a kind of sub-process figure of the development approach of hot more resource provided in an embodiment of the present invention;
Fig. 5 is the mapping relations schematic diagram that self-defined associated script provided in an embodiment of the present invention controls script with Lua;
Fig. 6 is another sub-process figure of the development approach of hot more resource provided in an embodiment of the present invention;
Fig. 7 is another flow chart of the development approach of hot more resource provided in an embodiment of the present invention;
Fig. 8 is the structured flowchart of the application system of hot more resource provided in an embodiment of the present invention;
Fig. 9 is a kind of flow chart of the application process of hot more resource provided in an embodiment of the present invention;
Figure 10 is another flow chart of the application process of hot more resource provided in an embodiment of the present invention;
Figure 11 is the execution signaling diagram that Lua controls script;
Figure 12 is another flow chart of the application process of hot more resource provided in an embodiment of the present invention;
Figure 13 is a kind of logical construction schematic diagram of the development device of hot more resource provided in an embodiment of the present invention;
Figure 14 is another logical construction schematic diagram of the development device of hot more resource provided in an embodiment of the present invention;
Figure 15 is the hardware structure diagram of the development equipment of hot more resource provided in an embodiment of the present invention;
Figure 16 is a kind of logical construction schematic diagram of the application apparatus of hot more resource provided in an embodiment of the present invention;
Figure 17 is another logical construction schematic diagram of the application apparatus of hot more resource provided in an embodiment of the present invention;
Figure 18 is another logical construction schematic diagram of the application apparatus of hot more resource provided in an embodiment of the present invention;
Figure 19 is the hardware structure diagram of the application apparatus of hot more resource provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear, complete Site preparation is described, it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on Embodiment in the application, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of the application protection.
Embodiment one
Fig. 1 is the structured flowchart of the development system of hot more resource provided in an embodiment of the present invention, and reference picture 1, the heat is more provided The development system in source can include:Development equipment 11 and test equipment 12.
Development equipment 11, for completing the exploitation to intended application, and in particular to the exploitation of the hot more resource of intended application. Development equipment 11 makes intended application support heat more, so as to realize in mesh after the exploitation to the hot more resource of intended application is completed After the version change for marking application, it is ensured that the terminal of intended application operation completes the renewal of intended application with minimum download.
The server farm that development equipment 11 can be realized by single server or multiple servers are constituted.
Test equipment 12, carries out testing results, specifically for right for developing the intended application completed to development equipment 11 The hot more mode for the intended application that the exploitation of development equipment 11 is completed carries out testing results.Test equipment 12 is original firstly the need of downloading The intended application of version, runs the intended application of prototype version, is changed in the hot more resource part of intended application, other moneys In the case that source part is not changed, test equipment 12 obtains the hot more resource of intended application, and the current heat of intended application is more provided Source replaces with the hot more resource of the intended application got, reruns intended application, equipment is developed according to operation result The assessment of the 11 hot more resources completed.
Development equipment 11 and test equipment 12 can be each independent equipment, and certainly, both can also be integrated into one In equipment, while completing exploitation and testing.
Because Lua codes can easily realize heat more, therefore to realize that intended application supports heat more, the realization side of use Formula can be:The content of heat more is needed to be realized using Lua codes intended application.Wherein, Lua is a compact script language Speech.It is Rio de Daneiro, BRA Catholic University of America (Pontifical Catholic University of Rio de Janeiro) inner a research group, by Roberto Ierusalimschy, Waldemar Celes and Luiz Henrique de Figueiredo are constituted and developed in 1993.Its purpose of design be in order to be embedded in application program, from And provide flexible extension and customization function for application program.Lua is write by standard C and formed, almost in all operating systems and It can compile, run on platform.
And need the content of heat more to be realized using Lua codes intended application, it is necessary first to build hot more development of resources frame Frame (e.g., Lua frameworks).Hot more development of resources framework based on structure, using Lua language write intended application need heat more in Hold.
, can be in the exploitation of the hot more resource of follow-up progress, directly using after hot more development of resources framework is built The hot more development of resources framework of structure, it is not necessary in the exploitation of the hot more resource of each progress, rebuild once heat and more provide Source Development Framework.
Certainly, when exploration project has framework to rebuild demand, the hot more development of resources framework built can be entered Row adjustment redesigns hot more development of resources framework, and the hot more development of resources framework rebuild is used as hot more resource The exploitation guiding support of exploitation.
In this method embodiment, it is preferred that use build the mode of hot more development of resources framework for:According to intended application Framework development mode, build hot more development of resources framework.The hot more development of resources framework constructed is familiar with for developer Framework, the application of convenient development goal needs the content of heat more.
In this method embodiment, the framework mode of the hot more development of resources framework constructed is MVC (models (model)-view (view)-controller (controller)).Using framework moulds of the MVC as hot more development of resources framework Formula, it is possible to achieve based on the hot more service logic for the program that development of resources Development of Framework goes out, data, interface display separation, by industry Business logic gathers an inside components, while improvement and personalized customization interface and user mutual, it is not necessary to compile again Write service logic.
The hot more development of resources framework constructed includes:Model layer, view layer and controller layer, the view layer pass through certainly Define associated script to associate with the controller layer, the controller layer is associated with the model layer.
The development environment and running environment of intended application may not support calling for Lua codes, in order to which evading target should Development environment and running environment do not support the problem of calling of Lua codes, therefore, and self-defined association is associated on view layer Script, self-defined associated script is the script being adapted to the development environment and running environment of intended application, the exploitation of intended application Environment and running environment support calling for self-defined associated script, then self-defined associated script is associated with controller layer, it is ensured that Self-defined associated script is called first, then calls by self-defined associated script the Lua scripts of controller layer, then by controller layer Lua scripts perform the Lua scripts of model layer, so as to realize that the development environment and running environment of intended application support Lua generations indirectly Code call.
From the angle of the development equipment in the development system of the hot more resource shown in Fig. 1, to the exploitation side of hot more resource Method is illustrated, and refers to Fig. 2, and it illustrates a kind of flow of the development approach of hot more resource provided in an embodiment of the present invention Figure, may comprise steps of:
Step S101:Based on the development mode of the framework according to intended application, obtained hot more development of resources framework is built View layer, determine the hot more interface of the intended application.
Step S102:Incidence relation based on the view layer with the hot more controller layer of development of resources framework, really The fixed Lua associated with the hot more interface of the intended application controls script.
The incidence relation of view layer and controller layer refers specifically to the function calling relationship between view layer and controller layer.Its In, the function calling relationship between view layer and controller layer is more specifically:Each interface in view layer can bind one All operations are handed to controller layer and handled by the base class script of individual development of games instrument, base class script.
Step S103:Incidence relation based on the controller layer with the hot more model layer of development of resources framework, really The fixed data processing script with Lua control script associations.
Controller layer and the incidence relation of model layer specifically refer to the function calling relationship of controller layer and model layer.Its In, the function calling relationship of controller layer and model layer is more specifically:The correlation function of controller layer meeting calling model layer comes Some functions are realized, some events (such as Refresh Data, network replies) can be handed down to controller layer by model layer, to notify control Device layer processed carries out next step operation.
The data that data processing script is used for the hot more interface association to intended application interact processing, specifically, number Control the hot more interface of script and intended application to set up by Lua according to processing script to contact, at the hot more interface with intended application Set up after contact, the data to the hot more interface management of intended application interact processing.
Step S104:Associated by the hot more interface of the intended application of determination, with the hot more interface of the intended application Lua control script and with the Lua control script association data processing script in it is any one or more, as described The hot more resource of intended application.
Because of the difference of hot more development of resources task, identified heat more resource is different, such as:Appoint in hot more development of resources During the display elements exploitation in itself for being engaged in only carrying out the hot more interface of intended application, the hot more interface for only determining intended application is Can;Display elements exploitation in itself and intended application in hot more development of resources task for the hot more interface that carries out intended application During the exploitation of the display processing mode of the display elements at hot more interface, it is determined that the hot more interface of intended application and Lua control pin This.
According to the development task of hot more resource, using the hot more development of resources framework, Re Geng circle of intended application is determined It is any one or more in face, Lua control scripts and data processing script, the hot more interface for the intended application determined, Lua controls the hot more resource of any one or more as intended applications in script and data processing script.
It should be noted that hot more development of resources task is corresponding with hot more resource updates task, i.e., intended application needs Content of the content of renewal to the hot more resource in requisition for exploitation.Specifically, needing to need the content of renewal according to intended application (i.e. hot more resource updates task) determines to need the content (i.e. heat more development of resources task) of hot more resource developed.
In this application, the development mode of the framework of intended application is first according to, hot more development of resources framework is built, then Hot more development of resources framework based on structure, the hot more resource of exploitation.
Due to the development mode that hot more development of resources framework is the framework according to intended application, obtained framework is built, because This hot more development of resources framework is frame structure known to developer, and developer antipyretic more resource need not open again The framework content of framework is sent out, the exploitation that hot more development of resources framework carries out hot more resource can be directly based upon, it is to avoid early stage The process of framework is practised, so as to shorten the whole development time of hot more resource, the Efficient Development of hot more resource is realized.
In the present embodiment, the hot more development of resources framework constructed specifically can with but be not limited to the frame shown in Fig. 3 Frame, as shown in figure 3, view layer be interface Prefab, controller layer be xxxPane and UIPanel, model layer be LuaSysMgr, XxxSys, IInitializealble, IUpdateable etc. are that common data handles class.Interface Prefab is intended application The overall resource of hot more resource, LuaBehaviour is self-defined associated script, and xxxPanel is to be closed with self-defined associated script The Lua control scripts of connection, UIPanel is that public Lua controls class, and xxxSys is data processing script, and LuaSysMgr is xxxSys Manage Scripts, IInitializealble, IUpdateable etc. handle class for common data, and LuaEnent is event.
LuaBehaviour carries are on the Prefab of interface, and LuaBehaviour is associated with xxxPanel, realize interface Prefab carries xxxPanel.XxxPanel is Lua codes, can be by heat more, so as to realize that interface Prefab can be by warm more.
XxxPanel is inherited from UIPanel, and the interface function that xxxPanel can be defined by xxxSys is closed with xxxSys Connection, certain xxxPanel can also be associated by LuaEnent with xxxSys.
XxxSys is inherited from IInitializealble, IUpdateable etc. and handles class for common data.
In the present embodiment, view layer is associated especially by self-defined associated script and controller layer.And show in Fig. 3 On the basis of the hot more development of resources framework gone out, self-defined associated script can specifically include:Re Geng circle of the intended application The corresponding all non-Lua action-functions in face, the non-Lua action-functions are used to call the self-defined associated script association Lua action-functions.
Non- Lua action-functions are the action-function write using non-Lua language (such as C# language), and Lua action-functions are to adopt The action-function write with Lua language.
Specifically included in self-defined associated script:The corresponding all non-Lua behaviors letters in hot more interface of the intended application In the case of number, the incidence relation based on the view layer Yu the controller layer, it is determined that Re Geng circle with the intended application The detailed process of the Lua control scripts of face association may refer to Fig. 4, may comprise steps of:
Step S11:Incidence relation based on the view layer Yu the controller layer, by the self-defined associated script Each non-Lua action-function each map out a Lua action-function, obtain Lua action-function groups.
Each non-Lua behavior in each non-Lua action-function and self-defined associated script in self-defined associated script The Lua action-functions that function is each mapped out may refer to Fig. 5, as shown in figure 5, each non-Lua in self-defined associated script Action-function is each required to map out a Lua action-function.
Although being that obtained all Lua action-functions are mapped from self-defined associated script in Lua action-function groups, Behavior can be set to switch each Lua action-function in Lua action-function groups according to specific exploitation demand, will be current The behavior switch of the Lua action-functions used required for exploitation demand is set on, it is not necessary to the row of the Lua action-functions used It is set to off for switch.
The Lua action-functions that behavior switch is set on can be performed, and behavior switchs the Lua action-functions for being set to pipe It is not carried out.
Step S12:Write each Lua action-function to be used in the Lua action-functions group respectively, obtain with it is described The Lua control scripts of the hot more interface association of intended application.
Lua action-functions to be used are the Lua action-functions that behavior switch is set on.
In this method embodiment, each Lua action-function to be used in the Lua action-functions group is write respectively Detailed process can be:
To write be used in each Lua action-function to be used in the Lua action-functions group calls C language to export function C language code interaction function;
The C language exports function, for finding the C exported with the C language in function in C language code space Language function identifies corresponding C language function, and obtains from Lua code spaces the C language letter in the C language export function The corresponding parameter of number description, the C language function that the C language is exported in function describes the incoming described and C languages of corresponding parameter In the corresponding C language function of C language function identification in speech export function, and call the C language in the C language export function The corresponding C language function of function identification.
Wherein, C language specifically can with but be not limited to C#.C language in being described below equally can with but be not limited to For C#.
Because the hot more resource in intended application is realized by Lua code developments, and non-thermal in intended application is more provided Source is to be developed to realize by non-Lua codes (such as C language code), therefore needs more to provide with non-thermal in the hot more resource of intended application When source is interacted, in order to ensure that Lua codes can be interacted with C language code, function is interacted come real by C language code Existing Lua codes are interacted with C language code.
In this method embodiment, the C language code interaction function write out is used to call C language to export function, passes through C Language export function carries out calling for C language function.Because C language export function is derived shared interface, to different C When language function is called, it is no longer necessary to carry out export to each C language function and recall, therefore reduce to each C languages Say that function carries out derived code space consumption.
Wherein, by taking C# as an example, C language export function to write principle as follows:
First, using customized C# data types description rule, the C# functions that needs are called are described, and With ">" separate (be above return value, behind be parameter) function call return value and parameter, obtain the word for representing C# functions Symbol string.
Customized C# data types description rule is as shown in table 1:
Table 1
Parameter Explanation
b Correspondence C# types SByte, Boolean (sbyte, bool)
B Correspondence C# type Bs yte (byte)
u Correspondence C# types Int16 (short)
U Correspondence C# types UInt16 (ushort)
i Correspondence C# types Int32 (int)
I Correspondence C# types UInt32 (uint)
l Correspondence C# types Int64 (long)
L Correspondence C# types UInt64 (ulong)
f Correspondence C# types Single (float)
d Correspondence C# types Double (double)
s Correspondence C# types String (string)
o Correspondence C# types Object (object)
For example, using customized C# data types description rule, being carried out to C# function void func (int a, intb) Description, and with ">" separating function call return value and parameter, the character string for obtaining representing void func (int a, intb) is " >ii"。
Secondly, the deriving method provided by uLua will be exported for the corresponding C# functions of character string for representing C# functions, Obtain the C# performed in script being controlled to export function in Lua.
For example, the corresponding C# export function of above-mentioned void func (int a, int b) is: CSharpFunctionWraper.CallFunc (1, ">Ii ", arg0, arg1).Digital " 1 " is the C# letters generated in export Number mark (i.e. id values), it is convenient that C# functions are searched in C# code spaces;">Ii " describes for C# functions, arg0, and arg1 is C# letters The corresponding parameter of number description.
Each C# export function identifies the corresponding mode that (i.e. id values) exports function with C# with C function, stores simultaneously In C# code spaces.
Using C# export function as:CSharpFunctionWraper.CallFunc (1, ">Ii ", arg0, arg1) exemplified by, C# codes interaction function is illustrated, C# codes interaction function is function func (arg0, arg1)
CSharpFunctionWraper.CallFunc (1, " > ii ", arg0, arg1) end
By taking above-mentioned C# codes interaction function as an example, to controlling to call the process of C# functions to illustrate in script in Lua, have Body process is:It is function func (arg0, arg1) that C# codes interaction function is performed in Lua control scripts, calls C# to lead Go out function CSharpFunctionWraper.CallFunc (1, ">Ii ", arg0, arg1), so as to call C# functions void func(int a,int b)。
On the basis of the hot more development of resources framework shown in Fig. 3, the pass based on the controller layer and the model layer Connection relation, it is determined that the detailed process for controlling the data processing script of script association with the Lua may refer to Fig. 6, can include Following steps:
Step S21:Incidence relation based on the controller layer and the model layer, builds and controls script with the Lua The data processing function group of association.
Controller layer and model layer can be associated by event correlation, or by interface function.
The relation associated based on controller layer with model layer by the relation of event correlation or by interface function, build with The data processing function group of Lua control script associations includes:
Build and control data processing function group of the script by event correlation with the Lua;
And/or, build the data processing function group for controlling script to be associated by interface function with the Lua.
Wherein, build in the obtained data processing function group for controlling script to pass through event correlation with the Lua and include thing Part initiates to include action listener code in code, Lua control scripts.Event initiates code, for initiating to carry Lua data Event.Action listener code, the event initiated for monitoring the event to initiate after code is performed.
Interface function is included in data processing function group.
Step S22:Each data processing function in the data processing function group is write, data processing script is obtained.
It may include various types of data processing functions in data processing function group, such as it is network interaction function, local Data processing function and server data processing function.
For writing for the server data processing function in data processing function group, it is specially:Write data processing letter Server data processing function in array;
The server data handles function, for being handed in the server data for listening to the intended application user interface Mutually during request, the network interaction function is called, sets up and communicates with server, the server count is obtained from the server According to the corresponding data of interaction request, and call for the corresponding data of the server data interaction request to be converted into Lua numbers According to preset data form transfer function, obtain Lua data, and send the Lua data.
Preset data form transfer function is realized is converted to Lua data by server data.
Wherein, because server data is to be transmitted in the form of binary data on network, therefore from server On the corresponding data of server data interaction request that get be binary data, preset data form transfer function is substantially For the binary data of expression server data to be converted into Lua data, specific transfer process is:Retouched using Lua data Field is stated, the binary data got is described, Lua data are obtained.
Lua data description fields are as shown in table 2:
Table 2
The generating process of Lua data description fields is:
Server data is described into (i.e. to the description of server data) and is converted to the description of Lua data;
The Lua data being converted to are described to arrange, Lua data description fields are obtained.
Now illustrate and illustrated to server data description is converted into the description of Lua data, for example, being in server data During C# data, server data is described as follows:
The description of above-mentioned server data is converted into the description of Lua data, obtained Lua data are described as:
The exploitation side of another hot more resource is expanded on the basis of the development approach of the hot more resource shown in Fig. 2 Method, refers to Fig. 7, further comprising the steps of on the basis of the development approach of the hot more resource shown in Fig. 2:
Step S105:More identified for the hot unique heat of more resource addition of the intended application.
It is hot more resource that unique heat, which is more identified for identifying resource,.
After the hot unique heat of the more resource addition more mark of intended application, institute of the packing program from intended application can be facilitated Having selected in resource hot more resource, and the hot more resource selected is packaged, and obtains hot more resource bag.
Embodiment two
Fig. 8 is the structured flowchart of the application system of hot more resource provided in an embodiment of the present invention, and reference picture 8, the heat is more provided The application system in source can include:Server 21 and terminal 22.
Server 21 is the background server of intended application, for obtaining the mesh that the development equipment 11 shown in Fig. 2 is developed The hot more resource of mark application, and the hot more resource of intended application is issued.
Server 21 and development equipment 11 can be integrated into an equipment.
The server farm that server 21 can be realized by single server or multiple servers are constituted.
Terminal 22 is the equipment that intended application is run, such as smart mobile phone, panel computer, notebook computer user equipment. Terminal 22 obtains the hot more resource for the intended application newly issued from server 21, and completes the renewal of intended application.
From the angle of the terminal in the application system of the hot more resource shown in Fig. 8, the application process of hot more resource is entered Row is illustrated, refers to Fig. 9, can it illustrates a kind of flow chart of the application process of hot more resource provided in an embodiment of the present invention To comprise the following steps:
Step S201:Hot more resource, the hot more interface for treating hot more resource for intended application, Lua control pin are treated in acquisition Originally it is any one or more and in data processing script.
The hot more interface of the intended application is the view layer based on hot more development of resources framework, builds obtained Re Geng circle Face, the heat more development of resources framework includes:Model layer, view layer and controller layer, the view layer and the controller layer Association, the controller layer is associated with the model layer.
The Lua control script be the incidence relation based on the view layer Yu the controller layer, determine with institute State the control script of the hot more interface association of intended application.
The data processing script is the incidence relation based on the controller layer and the model layer, the data determined Handle script.
Step S202:Treat that hot more resource is updated to intended application using what is got.
Step S201 to step S202 can be performed when intended application starts, and to be realized and complete mesh when intended application starts The renewal of application is marked, it is to avoid be updated in intended application running, so as to influence the bandwidth and effect that intended application is run Rate.
In this method embodiment, the view layer is associated by self-defined associated script with the controller layer, Self-defined associated script specifically includes the corresponding all non-Lua action-functions in hot more interface of the intended application, the non-Lua Action-function is used for the Lua action-functions for calling the self-defined associated script association;
Then, it is the incidence relation based on the view layer Yu the controller layer that the Lua, which controls script, is made by oneself described Each non-Lua action-function in adopted associated script each maps out a Lua action-function, obtains Lua action-function groups, and Each Lua action-function to be used in the Lua action-functions group is write respectively, obtains Re Geng circle with the intended application The Lua control scripts of face association.
If described treat that hot more resource is that the Lua controls script, the renewal of script is controlled in the Lua for completing intended application Afterwards, when intended application is run, operation treats that the detailed process of hot more resource may refer to Figure 10, and as shown in Figure 10, then Fig. 9 is shown The application process of hot more resource can also comprise the following steps:
Step S203:The self-defined associated script of the hot more interface association of the intended application is controlled into pin with the Lua This progress dynamic binding.
Step S204:If receiving operation requests on the hot more interface of the intended application, in the self-defined pass The corresponding non-Lua action-functions of the operation requests are called in connection script, procedure below is performed:
The corresponding Lua behaviors letter of the corresponding non-Lua action-functions of the operation requests is called in Lua control scripts Number, the corresponding operation of the corresponding Lua action-functions of execution.
Step S203 to step S204 is to perform the process that Lua controls script.
The execution signaling diagram of Lua control scripts refers to Figure 11, as shown in figure 11, the hot more interface applied in performance objective Opening operation when, self-defined associated script and Lua control script carry out dynamic binding, and Lua control scripts are initialized, just After beginningization, start to perform a series of Lua action-functions such as Awake, Start.
Wherein, the corresponding Lua of the corresponding non-Lua action-functions of the operation requests is called in Lua control scripts The detailed process of action-function can be:
The corresponding Lua behaviors letter of the corresponding non-Lua action-functions of the operation requests is called in Lua control scripts C language code interaction function in number, performs procedure below:Call C language to export function, perform procedure below:
C languages corresponding with the C language function identification in C language export function are found in C language code space Function is sayed, and the C language function obtained from Lua code spaces in the C language export function describes corresponding parameter, by institute State the C language function in C language export function and describe the incoming C language letter exported with C language in function of corresponding parameter In the corresponding C language function of number mark, and call the corresponding C language letter of C language function identification in the C language export function Number.
In this method embodiment, data processing script is specially the control based on the hot more development of resources framework The incidence relation of device layer and model layer, builds the data processing function group that script association is controlled with the Lua, and write the number According to each data processing function in processing group of functions, obtained data processing script.
If described treat that hot more resource is the data processing script, in the renewal for the data processing script for completing intended application Afterwards, when intended application is run, operation treats that the detailed process of hot more resource may refer to Figure 12, and as shown in figure 12, then Fig. 9 is shown The application process of hot more resource can also comprise the following steps:
Step S205:When listening to the server data interaction request of the intended application user interface, network is called Interaction function, performs and sets up the process communicated with server.
Step S206:The corresponding data of the server data interaction request are obtained from the server, and are called pre- If Data Format Transform function, the process that the corresponding data of the server data interaction request are converted to Lua data is performed.
Step S207:Send the Lua data.
Step S205 to step S207 is the process for performing data processing script.
In the present embodiment, the concrete mode factor data processing script for sending the Lua data controls the pass of script with Lua Connection mode is different and different, wherein:
When data processing script and Lua control script by event correlation, the detailed process of the Lua data is sent For:
Execution event initiates code, initiates to carry the event of the Lua data, to be controlled in script by the Lua Action listener code monitors the event that the event is initiated to initiate after code is performed, and by the Lua data in the event listened to The user interface of the incoming intended application.
When data processing script is associated with the Lua interface functions for controlling script to be provided by data processing script, send The detailed process of the Lua data is:
If receiving the interface function call request of the Lua controls script triggering, the data processing script is called In interface function, perform procedure below:
The Lua data are sent to the user interface of the intended application.
Embodiment three
It is corresponding with embodiment of the method one, a kind of development device of hot more resource is present embodiments provided, Figure 13 is referred to, The development device of hot more resource includes:First development module 31, the second development module 32, the 3rd development module 33 and determining module 34。
First development module, for the development mode of the framework according to intended application, builds obtained hot more development of resources The view layer of framework, determines the hot more interface of the intended application.
Second development module, for associating based on the view layer and the hot more controller layer of development of resources framework Relation, it is determined that controlling script with the Lua that the hot more interface of the intended application is associated.
3rd development module, for the association based on the controller layer and the hot more model layer of development of resources framework Relation, it is determined that controlling the data processing script of script association with the Lua.
Determining module, for the hot more interface by the hot more interface of the intended application of determination, with the intended application Association Lua control script and with the Lua control script association data processing script in it is any one or more, as The hot more resource of the intended application.
It is associated in the view layer by self-defined associated script with the controller layer, the self-defined association pin This includes the corresponding all non-Lua action-functions in hot more interface of the intended application, and the non-Lua action-functions are used to call In the case of the Lua action-functions of the self-defined associated script association, second development module includes:Map unit and One writes unit.
Map unit, for the pass associated based on the view layer by self-defined associated script with the controller layer System, each maps out a Lua action-function by each non-Lua action-function in the self-defined associated script, obtains Lua Action-function group.
First writes unit, for writing each Lua action-function to be used in the Lua action-functions group respectively, Obtain controlling script with the Lua that the hot more interface of the intended application is associated.
First, which writes unit, can specifically include:
First writes subelement, for writing in each Lua action-function to be used in the Lua action-functions group C language code interacts function;
The C language code interacts function, for calling C language to export function;
The C language exports function, for finding the C exported with the C language in function in C language code space Language function identifies corresponding C language function, and obtains from Lua code spaces the C language letter in the C language export function The corresponding parameter of number description, the C language function that the C language is exported in function describes the incoming described and C languages of corresponding parameter In the corresponding C language function of C language function identification in speech export function, and call the C language in the C language export function The corresponding C language function of function identification.
3rd development module can specifically include:Construction unit and second writes unit.
Construction unit, for the incidence relation based on the controller layer and the model layer, builds and is controlled with the Lua The data processing function group of script association.
Construction unit can specifically include:First builds subelement, and/or, second builds subelement.
Described first builds subelement, and data processing letter of the script by event correlation is controlled with the Lua for building Array.
Second builds subelement, for building the data processing letter for controlling script to be associated by interface function with the Lua Array.
Second writes unit, for writing each data processing function in the data processing function group, obtains data Handle script.
Second, which writes unit, can specifically include:Second writes subelement, for writing in the data processing function group Server data processing function;
The server data handles function, for being handed in the server data for listening to the intended application user interface Mutually during request, the network interaction function is called, sets up and communicates with server, the server count is obtained from the server According to the corresponding data of interaction request, and preset data form transfer function is called, obtain Lua data, and send the Lua numbers According to;
The preset data form transfer function, for the corresponding data of the server data interaction request to be converted to Lua data.
The development device of hot more resource shown in Figure 13 can also include:Add module 35, as shown in figure 14.
Add module 35, for more being identified for the hot unique heat of more resource addition of the intended application, unique heat is more It is hot more resource to identify for identifying resource.
Present apparatus embodiment additionally provides a kind of development equipment of hot more resource, and the development equipment of the heat more resource can be wrapped The development equipment of above-mentioned hot more resource is included, the development equipment of hot more resource can be the exploitation for the hot more resource for being deployed in network side Server, refers to Figure 15, it illustrates the hardware configuration of the development equipment of hot more resource, and the development equipment of hot more resource can be with Including:Processor 1, communication interface 2, memory 3 and communication bus 4;
Wherein processor 1, communication interface 2, memory 3 complete mutual communication by communication bus 4;
Optionally, communication interface 2 can be the interface of communication module, the interface of such as gsm module;
Processor 1, for configuration processor;
Memory 3, for depositing program;
Program can include program code, and described program code includes computer-managed instruction;
Processor 1 is probably a central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.
Memory 3 may include high-speed RAM memory, it is also possible to also including nonvolatile memory (non-volatile Memory), for example, at least one magnetic disk storage.
Wherein, program can be specifically for:Based on the development mode of the framework according to intended application, build obtained heat and more provide The view layer of source Development Framework, determines the hot more interface of the intended application;
Incidence relation based on the view layer with the hot more controller layer of development of resources framework, it is determined that with the mesh The Lua control scripts of the hot more interface association of mark application;
Incidence relation based on the controller layer with the hot more model layer of development of resources framework, it is determined that with it is described Lua controls the data processing script of script association;
The Lua associated by the hot more interface of the intended application of determination, with the hot more interface of the intended application is controlled Script and with the Lua control script association data processing script in it is any one or more, be used as the intended application Hot more resource.
Example IV
It is corresponding with embodiment of the method two, a kind of application apparatus of hot more resource is present embodiments provided, Figure 16 is referred to, The application apparatus of hot more resource includes:Acquisition module 41 and update module 42.
Acquisition module 41, hot more resource is treated for obtaining, the hot more interface for treating hot more resource for intended application, Lua Control any one or more in script and data processing script.
The hot more interface of the intended application is the view layer based on hot more development of resources framework, builds obtained Re Geng circle Face, the heat more development of resources framework includes:Model layer, view layer and controller layer, the view layer and the controller layer Association, the controller layer is associated with the model layer.
The Lua control script be the incidence relation based on the view layer Yu the controller layer, determine with institute State the control script of the hot more interface association of intended application.
The data processing script is the incidence relation based on the controller layer and the model layer, the data determined Handle script.
Update module 42, for treating that hot more resource is updated to intended application using what is got.
It is associated in the view layer by self-defined associated script with the controller layer, the self-defined association pin This includes the corresponding all non-Lua action-functions in hot more interface of the intended application, and the non-Lua action-functions are used to call The Lua action-functions of the self-defined associated script association;It is self-defined to be passed through based on the view layer that the Lua controls script The relation that associated script is associated with the controller layer, each non-Lua action-function in the self-defined associated script is each From a Lua action-function is mapped out, Lua action-function groups are obtained, and write each in the Lua action-functions group respectively Lua action-functions to be used, are obtained in the case of controlling script with the Lua that the hot more interface of the intended application is associated, if institute Stating the application apparatus for the hot more resource for treating that hot more resource is that the Lua controls script, shown in Figure 16 also includes:The He of binding module 43 First calling module 44, as shown in figure 17.
Binding module 43, for the self-defined associated script for associating the hot more interface of the intended application and the Lua Script is controlled to carry out dynamic binding.
First calling module 44, if for receiving operation requests on the hot more interface of the intended application, in institute State and the corresponding non-Lua action-functions of the operation requests are called in self-defined associated script, perform procedure below:
The corresponding Lua behaviors letter of the corresponding non-Lua action-functions of the operation requests is called in Lua control scripts Number, the corresponding operation of the corresponding Lua action-functions of execution.
First calling module can specifically include:
First call unit, if for receiving operation requests on the hot more interface of the intended application, described The corresponding non-Lua action-functions of the operation requests are called in self-defined associated script, procedure below is performed:
The corresponding Lua behaviors letter of the corresponding non-Lua action-functions of the operation requests is called in Lua control scripts C language code interaction function in number, performs procedure below:Call C language to export function, perform procedure below:
C languages corresponding with the C language function identification in C language export function are found in C language code space Function is sayed, and the C language function obtained from Lua code spaces in the C language export function describes corresponding parameter, by institute State the C language function in C language export function and describe the incoming C language letter exported with C language in function of corresponding parameter In the corresponding C language function of number mark, and call the corresponding C language letter of C language function identification in the C language export function Number.
It is the incidence relation based on the controller layer and model layer in the data processing script, builds and the Lua The data processing function group of script association is controlled, and writes each data processing function in the data processing function group, is obtained In the case of the data processing script arrived, if described treat that hot more resource is the data processing script, the heat shown in Figure 16 is more provided The application apparatus in source also includes:Second calling module 45, the 3rd calling module 46 and sending module 47, as shown in figure 18.
Second calling module 45, for listening to the server data interaction request of the intended application user interface When, network interaction function is called, performs and sets up the process communicated with server.
3rd calling module 46, for obtaining the corresponding number of the server data interaction request from the server According to, and preset data form transfer function is called, the corresponding data of the server data interaction request are converted to Lua by execution The process of data.
Sending module 47, for sending the Lua data.
In present apparatus embodiment, sending module 47 can specifically include:Execution unit or the second call unit.
Execution unit, code is initiated for performing event, initiates to carry the event of the Lua data, with by the Lua Action listener code in control script monitors the event that the event is initiated to initiate after code is performed, and by the event listened to In the incoming intended application of Lua data user interface.
Second call unit, if the interface function call request for receiving the Lua controls script triggering, is called Interface function in the data processing script, performs procedure below:
The Lua data are sent to the user interface of the intended application.
Present apparatus embodiment additionally provides a kind of application apparatus of hot more resource, and the application apparatus of the heat more resource can be wrapped The application apparatus of above-mentioned hot more resource is included, Figure 19 is referred to, it illustrates the hardware configuration of the application apparatus of hot more resource, heat is more The application apparatus of resource can include:Processor 5, communication interface 6, memory 7 and communication bus 8;
Wherein processor 5, communication interface 6, memory 7 complete mutual communication by communication bus 8;
Optionally, communication interface 6 can be the interface of communication module, the interface of such as gsm module;
Processor 5, for configuration processor;
Memory 7, for depositing program;
Program can include program code, and described program code includes computer-managed instruction;
Processor 5 is probably a central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.
Memory 7 may include high-speed RAM memory, it is also possible to also including nonvolatile memory (non-volatile Memory), for example, at least one magnetic disk storage.
Wherein, program can be specifically for:Hot more resource, Re Geng circle for treating that hot more resource is intended application are treated in acquisition It is any one or more in face, Lua control scripts and data processing script;
The hot more interface of the intended application is the view layer based on hot more development of resources framework, builds obtained Re Geng circle Face, the heat more development of resources framework includes:Model layer, view layer and controller layer, the view layer and the controller layer Association, the controller layer is associated with the model layer;
It is the relation that is associated based on the view layer with the controller layer that the Lua, which controls script, determine with institute State the control script of the hot more interface association of intended application;
The data processing script is the incidence relation based on the controller layer and the model layer, the data determined Handle script;
Treat that hot more resource is updated to intended application using what is got.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight Point explanation be all between difference with other embodiment, each embodiment identical similar part mutually referring to. For device class embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is joined See the part explanation of embodiment of the method.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between there is any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or equipment including a series of key elements not only include that A little key elements, but also other key elements including being not expressly set out, or also include be this process, method, article or The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arranged Except also there is other identical element in the process including the key element, method, article or equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented The function of each unit can be realized in same or multiple softwares and/or hardware during application.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can Realized by the mode of software plus required general hardware platform.Understood based on such, the technical scheme essence of the application On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are to cause a computer equipment (can be personal computer, server, or network equipment etc.) performs some of each embodiment of the application or embodiment Method described in part.
Exploitation, application process and the device of a kind of hot more resource provided herein are described in detail above, Specific case used herein is set forth to the principle and embodiment of the application, and the explanation of above example is to use Understand the present processes and its core concept in help;Simultaneously for those of ordinary skill in the art, according to the application's Thought, will change in specific embodiments and applications, in summary, and this specification content should not be construed as Limitation to the application.

Claims (14)

1. a kind of development approach of heat more resource, it is characterised in that including:
Based on the development mode of the framework according to intended application, the view layer of obtained hot more development of resources framework is built, it is determined that The hot more interface of the intended application;
Incidence relation based on the view layer with the hot more controller layer of development of resources framework, it is determined that should with the target The Lua control scripts of hot more interface association;
Incidence relation based on the controller layer with the hot more model layer of development of resources framework, it is determined that being controlled with the Lua The data processing script of script association processed;
The Lua associated by the hot more interface of the intended application of determination, with the hot more interface of the intended application controls script With with the Lua control script association data processing script in it is any one or more, be used as the heat of the intended application More resource.
2. according to the method described in claim 1, it is characterised in that the view layer passes through self-defined associated script and the control Device layer processed is associated, and the self-defined associated script includes the corresponding all non-Lua rows in hot more interface of the intended application For function, the non-Lua action-functions are used for the Lua action-functions for calling the self-defined associated script association;
Incidence relation based on the view layer with the hot more controller layer of development of resources framework, it is determined that should with the target The Lua control scripts of hot more interface association, including:
The relation associated based on the view layer by self-defined associated script with the controller layer, by the self-defined association Each non-Lua action-function in script each maps out a Lua action-function, obtains Lua action-function groups;
Each Lua action-function to be used in the Lua action-functions group is write respectively, obtains the heat with the intended application The Lua control scripts of more interface association;
Wherein, each Lua action-function to be used in the Lua action-functions group is write respectively, including:
Write the C for being used to call C language to export function in each Lua action-function to be used in the Lua action-functions group Language codes interact function;
The C language exports function, for finding the C language exported with the C language in function in C language code space The corresponding C language function of function identification, and the C language function obtained from Lua code spaces in the C language export function retouches Corresponding parameter is stated, the C language function that the C language is exported in function describes that corresponding parameter is incoming described to be led with C language Go out in the corresponding C language function of the C language function identification in function, and call the C language function in the C language export function Identify corresponding C language function.
3. according to the method described in claim 1, it is characterised in that the association based on the controller layer and the model layer is closed System, it is determined that the data processing script of script association is controlled with the Lua, including:
Incidence relation based on the controller layer and the model layer, builds at the data that script association is controlled with the Lua Manage group of functions;
Each data processing function in the data processing function group is write, data processing script is obtained;
Wherein, the data processing function group that script association is controlled with the Lua is built, including:
Build and control data processing function group of the script by event correlation with the Lua;
And/or, build the data processing function group for controlling script to be associated by interface function with the Lua;
And, each data processing function in the data processing function group is write, including:
Write the server data processing function in the data processing function group;
The server data handles function, please for being interacted in the server data for listening to the intended application user interface When asking, the network interaction function is called, sets up and communicates with server, the server data is obtained from the server and is handed over Corresponding data are mutually asked, and are called for the corresponding data of the server data interaction request to be converted into Lua data Preset data form transfer function, obtains Lua data, and send the Lua data.
4. according to the method described in claim 1, it is characterised in that methods described also includes:
More identified for the hot unique heat of more resource addition of the intended application, it is heat that unique heat, which is more identified for identifying resource, More resource.
5. a kind of application process of heat more resource, it is characterised in that including:
Hot more resource is treated in acquisition, described to treat that hot more resource is the hot more interface of intended application, Lua control scripts and data processing pin It is any one or more in this;
The hot more interface of the intended application is the view layer based on hot more development of resources framework, builds obtained hot more interface, The heat more development of resources framework includes:Model layer, view layer and controller layer, the view layer are closed with the controller layer Connection, the controller layer is associated with the model layer;
It is the incidence relation based on the view layer Yu the controller layer that the Lua, which controls script, determining with the mesh The control script of the hot more interface association of mark application;
The data processing script is the incidence relation based on the controller layer and the model layer, the data processing determined Script;
Treat that hot more resource is updated to intended application using what is got.
6. method according to claim 5, it is characterised in that the view layer passes through self-defined associated script and the control Device layer processed is associated, and the self-defined associated script includes the corresponding all non-Lua rows in hot more interface of the intended application For function, the non-Lua action-functions are used for the Lua action-functions for calling the self-defined associated script association;
It is the incidence relation based on the view layer Yu the controller layer that the Lua, which controls script, by the self-defined association Each non-Lua action-function in script each maps out a Lua action-function, obtains Lua action-function groups, and compile respectively Each Lua action-function to be used in the Lua action-functions group is write, obtains associating with the hot more interface of the intended application Lua control script;
If described treat that hot more resource is that the Lua controls script, methods described also includes:
The self-defined associated script of the hot more interface association of the intended application is entered into Mobile state with Lua control scripts to tie up It is fixed;
If receiving operation requests on the hot more interface of the intended application, institute is called in the self-defined associated script The corresponding non-Lua action-functions of operation requests are stated, procedure below is performed:
The corresponding Lua action-functions of the corresponding non-Lua action-functions of the operation requests are called in Lua control scripts, Perform the corresponding operation of corresponding Lua action-functions;
Wherein, the corresponding Lua behaviors of the corresponding non-Lua action-functions of the operation requests are called in Lua control scripts Function, including:
Called in Lua control scripts in the corresponding Lua action-functions of the corresponding non-Lua action-functions of the operation requests C language code interaction function, perform procedure below:Call C language to export function, perform procedure below:
C language letter corresponding with the C language function identification in C language export function is found in C language code space Number, and the C language function obtained from Lua code spaces in the C language export function describes corresponding parameter, by the C C language function in language export function describes the incoming C language function mark exported with C language in function of corresponding parameter Know in corresponding C language function, and call the corresponding C language function of C language function identification in the C language export function.
7. method according to claim 5, it is characterised in that the data processing script is to be opened based on the hot more resource The controller layer of framework and the incidence relation of model layer are sent out, the data processing letter that script association is controlled with the Lua is built Array, and write each data processing function in the data processing function group, obtained data processing script;
If described treat that hot more resource is the data processing script, methods described also includes:
When listening to the server data interaction request of the intended application user interface, network interaction function is called, is performed The process communicated is set up with server;
The corresponding data of the server data interaction request are obtained from the server, and call preset data form to change Function, performs the process that the corresponding data of the server data interaction request are converted to Lua data;
Send the Lua data;
Wherein, the Lua data are sent, including:
Execution event initiates code, initiates to carry the event of the Lua data, to control the event in script by the Lua Monitor code and monitor the event that the event is initiated to initiate after code is performed, and the Lua data in the event listened to are incoming The user interface of the intended application;
If or, receiving the interface function call request of the Lua controls script triggering, calling in the data processing script Interface function, perform procedure below:
The Lua data are sent to the user interface of the intended application.
8. a kind of development device of heat more resource, it is characterised in that including:
First development module, for the development mode of the framework according to intended application, builds obtained hot more development of resources framework View layer, determine the hot more interface of the intended application;
Second development module, for associating based on the view layer and the hot more controller layer of development of resources framework System, it is determined that controlling script with the Lua that the hot more interface of the intended application is associated;
3rd development module, is closed for the association based on the controller layer and the hot more model layer of development of resources framework System, it is determined that controlling the data processing script of script association with the Lua;
Determining module, for being associated by the hot more interface of the intended application of determination, with the hot more interface of the intended application Lua control script and with the Lua control script association data processing script in it is any one or more, as described The hot more resource of intended application.
9. device according to claim 8, it is characterised in that the view layer by self-defined associated script with it is described Controller layer is associated, and the self-defined associated script includes the corresponding all non-Lua in hot more interface of the intended application Action-function, the non-Lua action-functions are used for the situation for calling the Lua action-functions of the self-defined associated script association Under, second development module includes:
Map unit, will for the relation associated based on the view layer by self-defined associated script with the controller layer Each non-Lua action-function in the self-defined associated script each maps out a Lua action-function, obtains Lua behaviors Group of functions;
First writes unit, for writing each Lua action-function to be used in the Lua action-functions group respectively, obtains The Lua associated with the hot more interface of the intended application controls script;
Described first, which writes unit, includes:
First writes subelement, for writing the C languages in each Lua action-function to be used in the Lua action-functions group Say code interaction function;
The C language code interacts function, for calling C language to export function;
The C language exports function, for finding the C language exported with the C language in function in C language code space The corresponding C language function of function identification, and the C language function obtained from Lua code spaces in the C language export function retouches Corresponding parameter is stated, the C language function that the C language is exported in function describes that corresponding parameter is incoming described to be led with C language Go out in the corresponding C language function of the C language function identification in function, and call the C language function in the C language export function Identify corresponding C language function.
10. device according to claim 8, it is characterised in that the 3rd development module includes:
Construction unit, for the incidence relation based on the controller layer and the model layer, builds and controls script with the Lua The data processing function group of association;
Second writes unit, for writing each data processing function in the data processing function group, obtains data processing Script;
Wherein, the construction unit includes:First builds subelement, and/or, second builds subelement;
Described first builds subelement, and data processing function group of the script by event correlation is controlled with the Lua for building;
Second builds subelement, for building the data processing function group for controlling script to be associated by interface function with the Lua;
Described second, which writes unit, includes:
Second writes subelement, for writing the processing function of the server data in the data processing function group;
The server data handles function, please for being interacted in the server data for listening to the intended application user interface When asking, the network interaction function is called, sets up and communicates with server, the server data is obtained from the server and is handed over Corresponding data are mutually asked, and call preset data form transfer function, Lua data are obtained, and send the Lua data;
The preset data form transfer function, for the corresponding data of the server data interaction request to be converted into Lua Data.
11. device according to claim 8, it is characterised in that described device also includes:
Add module, for more being identified for the hot unique heat of more resource addition of the intended application, unique heat more mark is used It is hot more resource in identifying resource.
12. a kind of application apparatus of heat more resource, it is characterised in that including:
Acquisition module, hot more resource is treated for obtaining, the hot more interface for treating hot more resource for intended application, Lua control pin Originally it is any one or more and in data processing script;
The hot more interface of the intended application is the view layer based on hot more development of resources framework, builds obtained hot more interface, The heat more development of resources framework includes:Model layer, view layer and controller layer, the view layer are closed with the controller layer Connection, the controller layer is associated with the model layer;
It is the incidence relation based on the view layer Yu the controller layer that the Lua, which controls script, determining with the mesh The control script of the hot more interface association of mark application;
The data processing script is the incidence relation based on the controller layer and the model layer, the data processing determined Script;
Update module, for treating that hot more resource is updated to intended application using what is got.
13. device according to claim 12, it is characterised in that pass through self-defined associated script and institute in the view layer State controller layer to be associated, the hot more interface that the self-defined associated script includes the intended application is corresponding all non- Lua action-functions, the non-Lua action-functions are used for the Lua action-functions for calling the self-defined associated script association;It is described It is the relation associated based on the view layer by self-defined associated script with the controller layer that Lua, which controls script, will be described Each non-Lua action-function in self-defined associated script each maps out a Lua action-function, obtains Lua action-functions Group, and each Lua action-function to be used in the Lua action-functions group is write respectively, obtain and the intended application In the case of the Lua control scripts of hot more interface association, if described treat that hot more resource is that the Lua controls script, described device Also include:
Binding module, for the self-defined associated script of the hot more interface association of the intended application to be controlled into pin with the Lua This progress dynamic binding;
First calling module, if for receiving operation requests on the hot more interface of the intended application, being made by oneself described The corresponding non-Lua action-functions of the operation requests are called in adopted associated script, procedure below is performed:
The corresponding Lua action-functions of the corresponding non-Lua action-functions of the operation requests are called in Lua control scripts, Perform the corresponding operation of corresponding Lua action-functions;
Wherein, first calling module includes:
First call unit, if for receiving operation requests on the hot more interface of the intended application, being made by oneself described The corresponding non-Lua action-functions of the operation requests are called in adopted associated script, procedure below is performed:
Called in Lua control scripts in the corresponding Lua action-functions of the corresponding non-Lua action-functions of the operation requests C language code interaction function, perform procedure below:Call C language to export function, perform procedure below:
C language letter corresponding with the C language function identification in C language export function is found in C language code space Number, and the C language function obtained from Lua code spaces in the C language export function describes corresponding parameter, by the C C language function in language export function describes the incoming C language function mark exported with C language in function of corresponding parameter Know in corresponding C language function, and call the corresponding C language function of C language function identification in the C language export function.
14. device according to claim 13, it is characterised in that in the data processing script for based on the controller The incidence relation of layer and model layer, builds the data processing function group that script association is controlled with the Lua, and write the data In the case of handling each data processing function in group of functions, obtained data processing script, if described treat that hot more resource is The data processing script, described device also includes:
Second calling module, for when listening to the server data interaction request of the intended application user interface, calling Network interaction function, performs and sets up the process communicated with server;
3rd calling module, for obtaining the corresponding data of the server data interaction request from the server, and is adjusted Preset data form transfer function is used, the corresponding data of the server data interaction request are converted to Lua data by execution Process;
Sending module, for sending the Lua data;
Wherein, the sending module includes:
Execution unit, code is initiated for performing event, initiates to carry the event of the Lua data, to be controlled by the Lua Action listener code in script monitors the event that the event is initiated to initiate after code is performed, and by the event listened to The user interface of the incoming intended application of Lua data;
Or, the second call unit, if the interface function call request for receiving the Lua controls script triggering, is called Interface function in the data processing script, performs procedure below:
The Lua data are sent to the user interface of the intended application.
CN201710166724.7A 2017-03-20 2017-03-20 Development and application method and device of hot upgrade resource Active CN106951288B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710166724.7A CN106951288B (en) 2017-03-20 2017-03-20 Development and application method and device of hot upgrade resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710166724.7A CN106951288B (en) 2017-03-20 2017-03-20 Development and application method and device of hot upgrade resource

Publications (2)

Publication Number Publication Date
CN106951288A true CN106951288A (en) 2017-07-14
CN106951288B CN106951288B (en) 2020-04-28

Family

ID=59473354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710166724.7A Active CN106951288B (en) 2017-03-20 2017-03-20 Development and application method and device of hot upgrade resource

Country Status (1)

Country Link
CN (1) CN106951288B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874376A (en) * 2018-06-19 2018-11-23 北京智明星通科技股份有限公司 Function and the deriving method and device of class, terminal and computer readable storage medium
CN109783072A (en) * 2019-01-23 2019-05-21 深圳智链物联科技有限公司 Method for processing business, device, terminal device and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150113429A1 (en) * 2013-10-21 2015-04-23 NQ Mobile Inc. Real-time dynamic content display layer and system
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150113429A1 (en) * 2013-10-21 2015-04-23 NQ Mobile Inc. Real-time dynamic content display layer and system
CN105630472A (en) * 2014-11-03 2016-06-01 中国科学院沈阳自动化研究所 Quick client development frame for manufacturing execution system and software development method for frame

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874376A (en) * 2018-06-19 2018-11-23 北京智明星通科技股份有限公司 Function and the deriving method and device of class, terminal and computer readable storage medium
CN108874376B (en) * 2018-06-19 2021-09-07 北京智明星通科技股份有限公司 Method and device for exporting functions and classes, terminal and computer-readable storage medium
CN109783072A (en) * 2019-01-23 2019-05-21 深圳智链物联科技有限公司 Method for processing business, device, terminal device and computer readable storage medium

Also Published As

Publication number Publication date
CN106951288B (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN109739604B (en) Page rendering method, device, server and storage medium
CN109597661B (en) Service function configuration method and device
CN106569856B (en) A kind of loading method and device of application view resource file
EP3011442A1 (en) Method and apparatus for customized software development kit (sdk) generation
CN109543200A (en) A kind of text interpretation method and device
CN103618699B (en) A kind of method and device of invocation component
WO2019085290A1 (en) Test preparation method and apparatus, terminal device, and storage medium
CN110018765A (en) Page display method, device, terminal and storage medium
CN110168496A (en) The method and system presented for application
CN108563951A (en) Method for detecting virus and device
CN106873970A (en) The installation method and device of a kind of operating system
CN106951288A (en) A kind of exploitation, application process and the device of heat more resource
CN107678741A (en) Implementation method, device, readable storage medium storing program for executing and the equipment of List View
CN110851211A (en) Method, apparatus, electronic device, and medium for displaying application information
CN109669678A (en) Template engine integration method, device, electronic equipment and storage medium
FI20195472A1 (en) Method and system for integration testing
CN109740302B (en) Simulation method and device of neural network
CN116483707A (en) Test method, test device, test apparatus, test program, and test program
CN107273102A (en) The generation method and device of mobile applications
CN109815455A (en) Item file treating method and apparatus
CN115202907A (en) Application program interface operation method, system, computer equipment and medium
CN111488286B (en) Method and device for independently developing Android modules
CN114356379A (en) Backup-based service upgrading method, device, equipment and storage medium
CN112612474A (en) Product transplanting method and device, storage medium and electronic equipment
Hu et al. An empirical study of mobile/handheld app development using android platforms

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
GR01 Patent grant
GR01 Patent grant