CN109814915A - Method for parameter configuration, device, medium and electronic equipment based on lua - Google Patents
Method for parameter configuration, device, medium and electronic equipment based on lua Download PDFInfo
- Publication number
- CN109814915A CN109814915A CN201811639888.8A CN201811639888A CN109814915A CN 109814915 A CN109814915 A CN 109814915A CN 201811639888 A CN201811639888 A CN 201811639888A CN 109814915 A CN109814915 A CN 109814915A
- Authority
- CN
- China
- Prior art keywords
- formatted data
- application program
- lua
- protobuf
- return value
- 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
Links
Abstract
Present disclose provides a kind of method for parameter configuration based on lua, device, medium and electronic equipments, this method comprises: identification and response application PROGRAMMED REQUESTS;All critical fielies in the application program are traversed, execute the lua code script in each critical field, and generate return value;Corresponding formatted data is formed based on the return value assembly, the formatted data is returned into the application program.For this method by the corresponding functional application of lua code scripting editing, client can call directly relevant parameter, directly can meet all configuration needs for judging to issue according to various conditions in client modification.After configuring interrelated logic on web console, it can come into force within 1 minute, not need to issue the online cumbersome process of project again, improve work efficiency, reduce human cost.
Description
Technical field
This disclosure relates to field of computer technology, in particular to a kind of method for parameter configuration based on lua, device,
Medium and electronic equipment.
Background technique
With the development of development of Mobile Internet technology, the application of various App is also more more and more universal, is applying per a App
Cheng Zhong may have different regions, different crowd etc. different setting demands.Therefore, it is often needed when client is developed
Some functions of configuring and pull are used, for example obtain whether user can see some module, whether user uses some most
New resource packet, whether user can experience beta editions functions, advertisement shows relevant configured parameter of how many second etc..Server-side needs
Judge according to each attribute of user, such as system type, program version number, the address user ip etc. then each parameter
Return value is how many.
Since configuration parameter can be frequently necessary to modify, server end needs to rewrite back-end code, then issues online.
One big client may modules be all it is independent, the respective parameter of separate configurations is needed, currently, all clients are opened
Demand must be informed the engineer of rear end exploitation by sending out engineer all, made corresponding modification by rear end Developmental Engineer, modified program
It is cumbersome.
Summary of the invention
The disclosure is designed to provide a kind of method for parameter configuration based on lua, device, medium and electronic equipment, energy
Enough solve at least one technical problem mentioned above.Concrete scheme is as follows:
According to the specific embodiment of the disclosure, in a first aspect, the disclosure provides a kind of parameter configuration side based on lua
Method is applied to server-side, comprising: identifies simultaneously response application PROGRAMMED REQUESTS;All critical fielies in the application program are traversed,
The lua code script in each critical field is executed, and generates return value;It is formed accordingly based on the return value assembly
The formatted data is returned to the application program by formatted data.
Optionally, the identification and response application PROGRAMMED REQUESTS, comprising: judge whether the application program includes identity letter
Breath and version information;If so, responding successfully;If it is not, then responding failure.
Optionally, described that corresponding formatted data is formed based on the return value assembly, the formatted data is returned to
The application program, comprising: json formatted data is formed based on the return value assembly;If with the application requests format
Data Matching then returns to the json formatted data;Otherwise protobuf formatted data is converted by the json formatted data,
Return to protobuf formatted data.
Optionally, described otherwise to convert protobuf formatted data for the json formatted data, return to protobuf
Formatted data, comprising: if being mismatched with the application requests formatted data;It is corresponding to obtain the application version
The corresponding description information of the message body of protobuf;The example of a newly-built protobuf message body, then dynamic gives assignment, raw
At protobuf formatted data, protobuf formatted data is returned.
According to the specific embodiment of the disclosure, second aspect, the present invention provides a kind of parameter configuration side based on lua
Method is applied to client, comprising: creates and determine the version information of application program;Edit critical field in the application program
Under the code script based on lua, the code script of the lua is used for according to user's request and the return value of configuration parameter;If
Setting the critical field is state of activation.
Optionally, the version information of the creation and determining application program, comprising: if creation application program is initial version
This, then be set as initial version application program;If creating application program is to connect version, it is set as compatibility connecting version and answers
Use program.
According to the specific embodiment of the disclosure, the third aspect, the present invention provides a kind of parameter configuration dress based on lua
It sets, is applied to server-side, comprising: response unit, for identification and response application PROGRAMMED REQUESTS;Execution unit, for traversing
All critical fielies in application program are stated, execute the lua code script in each critical field, and generate return value;
The formatted data is returned to described answer for forming corresponding formatted data based on the return value assembly by return unit
Use program.
According to the specific embodiment of the disclosure, fourth aspect, the present invention provides a kind of parameter configuration dress based on lua
It sets, is applied to client, comprising: creating unit, for creating and determining the version information of application program;Edit cell is used for
The code script based on lua in the application program under critical field is edited, the code script of the lua is used for according to user
It requests and the return value of configuration parameter;Unit is activated, is state of activation for the critical field to be arranged.
According to the specific embodiment of the disclosure, the 5th aspect, the disclosure provides a kind of computer readable storage medium,
On be stored with computer program, when described program is executed by processor realize as above described in any item methods.
According to the specific embodiment of the disclosure, the 6th aspect, the disclosure provides a kind of electronic equipment, comprising: one or
Multiple processors;Storage device, for storing one or more programs, when one or more of programs are by one or more
When a processor executes, so that one or more of processors realize as above described in any item methods.
The above scheme of the embodiment of the present disclosure compared with prior art, at least has the advantages that the disclosure passes through
A kind of method for parameter configuration based on lua is constructed, this method passes through the corresponding functional application of lua code scripting editing, client
Relevant parameter can be called directly, directly can meet all configurations for judging to issue according to various conditions in client modification
Demand.It after configuring interrelated logic on web console, can come into force within 1 minute, not need to issue online cumbersome of project again
Process improves work efficiency, and reduces human cost.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.It should be evident that the accompanying drawings in the following description is only the disclosure
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 shows the method for parameter configuration server-side schematic diagram based on lua according to the embodiment of the present disclosure;
Fig. 2 shows the method for parameter configuration server-side flow diagrams based on lua according to the embodiment of the present disclosure;
Fig. 3 shows the method for parameter configuration client schematic diagram based on lua according to the embodiment of the present disclosure;
Fig. 4 shows the method for parameter configuration client flow diagram based on lua according to the embodiment of the present disclosure;
Fig. 5 shows the parameter configuration device server-side structural schematic diagram based on lua according to the embodiment of the present disclosure;
Fig. 6 shows the parameter configuration device client terminal structure schematic diagram based on lua according to the embodiment of the present disclosure;
Fig. 7 shows electronic equipment attachment structure schematic diagram according to an embodiment of the present disclosure.
Specific embodiment
In order to keep the purposes, technical schemes and advantages of the disclosure clearer, below in conjunction with attached drawing to the disclosure make into
It is described in detail to one step, it is clear that described embodiment is only disclosure a part of the embodiment, rather than whole implementation
Example.It is obtained by those of ordinary skill in the art without making creative efforts based on the embodiment in the disclosure
All other embodiment belongs to the range of disclosure protection.
The term used in the embodiments of the present disclosure is only to be not intended to be limiting merely for for the purpose of describing particular embodiments
The disclosure.In the embodiment of the present disclosure and the "an" of singular used in the attached claims, " described " and "the"
It is also intended to including most forms, unless the context clearly indicates other meaning, " a variety of " generally comprise at least two.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, indicate
There may be three kinds of relationships, for example, A and/or B, can indicate: individualism A, exist simultaneously A and B, individualism B these three
Situation.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
It will be appreciated that though may be described in the embodiments of the present disclosure using term first, second, third, etc..,
But these ... it should not necessarily be limited by these terms.These terms be only used to by ... distinguish.For example, implementing not departing from the disclosure
In the case where example range, first ... can also be referred to as second ..., and similarly, second ... can also be referred to as the
One ....
Depending on context, word as used in this " if ", " if " can be construed to " ... when " or
" when ... " or " in response to determination " or " in response to detection ".Similarly, context is depended on, phrase " if it is determined that " or " such as
Fruit detection (condition or event of statement) " can be construed to " when determining " or " in response to determination " or " when detection (statement
Condition or event) when " or " in response to detection (condition or event of statement) ".
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Include, so that commodity or device including a series of elements not only include those elements, but also including not clear
The other element listed, or further include for this commodity or the intrinsic element of device.In the feelings not limited more
Under condition, the element that is limited by sentence "including a ...", it is not excluded that in the commodity or device for including the element also
There are other identical elements.
The alternative embodiment of the disclosure is described in detail with reference to the accompanying drawing.
Embodiment 1
As shown in Figs. 1-2, according to the specific embodiment of the disclosure, in a first aspect, the disclosure provide it is a kind of based on lua's
Method for parameter configuration is applied to server-side, includes the following steps:
S102: identifying and response application PROGRAMMED REQUESTS;
Optionally, the identification and response application PROGRAMMED REQUESTS, comprising: judge whether the application program includes identity letter
Breath and version information;If so, responding successfully;If it is not, then responding failure.
Specifically, server-side is received as shown in Fig. 2, get mode can be used for client or post mode goes to pull configuration
To after corresponding request, application program is identified.Server-side reading client passes to AppID and Version editions of backstage
This number.After reading the identity information AppID and version information Version of application program, then identifies success, begin to respond to visitor
The request at family end.When the identity information AppID and version information Version of application program only read one of them or one
It does not read, then recognition failures, is not responding to the request of client.
S104: traversing all critical fielies in the application program, executes the lua code in each critical field
Script, and generate return value;
Specifically, as shown in Fig. 2, client Developmental Engineer is defeated manually by logentry login application program first
Enter corresponding field, the fields such as including but not limited to ID, key, remarks, state, type, responsible person, modification time, operation.Clothes
Business device reads this App and corresponds to all field configuration information under version number (such as Lark 1.0).Find corresponding client request
Field, such as key key field reads the key field under the key field, such as Lark 1.0 under all versions respectively,
Key field under Lark 2.0, the key field etc. under Lark 3.0, executes the lua code of all key fields.Asking for user
The lua code of parameter and user configuration is asked to be dropped into lua interpreter to go to execute and take and return the result.It is described to return the result for example,
10,20,30 etc. number sets the title of corresponding critical field to return the result value accordingly, such as key1=10,
Key2=20, key3=30 etc..Complicated lua code is thus converted into the corresponding number of return according to the demand of client
Value.
S106: forming corresponding formatted data based on the return value assembly, and the formatted data is returned to described answer
Use program.
Optionally, described that corresponding formatted data is formed based on the return value assembly, the formatted data is returned to
The application program, comprising: json formatted data is formed based on the return value assembly;If with the application requests format
Data Matching then returns to the json formatted data;Otherwise protobuf formatted data is converted by the json formatted data,
Return to protobuf formatted data.Wherein json formatted data is the format number that above-mentioned return value is arranged in order to acquisition
According to, such as [10 20 30].And if customer demand is not json formatted data, json formatted data is converted to separately
A kind of protobuf formatted data return.
Optionally, described otherwise to convert protobuf formatted data for the json formatted data, return to protobuf
Formatted data, comprising: if being mismatched with the application requests formatted data;It is corresponding to obtain the application version
The corresponding description information of the message body of protobuf;The example of a newly-built protobuf message body, then dynamic gives assignment, raw
At protobuf formatted data, protobuf formatted data is returned.
The disclosure passes through lua code script by constructing a kind of method for parameter configuration based on lua applied to server-side
Corresponding functional application is edited, server-side can directly return to relevant parameter, can directly meet in client modification all
The configuration needs issued are judged according to various conditions.After configuring interrelated logic on web console, it can come into force within 1 minute, no
It needs to issue the online cumbersome process of project again, improves work efficiency, reduce human cost.
Embodiment 2
As shown in Figure 3-4, according to the specific embodiment of the disclosure, second aspect, the present invention provides a kind of based on lua's
Method for parameter configuration is applied to client, includes the following steps:
S202: create and determine the version information of application program;
Optionally, the version information of the creation and determining application program, including two kinds of situations: one is the applications of creation
Program is initial version, then it is arranged as initial version application program;The application program created when another situation is to connect version
This, i.e., be not initial version application program, then is set as compatibility and connects version application program, such as 2.0 editions, 3.0 editions.
The formatted data of all versions before connecting version at this time is compatible in data format.
S204: the code script based on lua in the application program under critical field, the code foot of the lua are edited
This is for the return value of configuration parameter according to user's request;
Specifically, as shown in Fig. 2, client Developmental Engineer is defeated manually by logentry login application program first
Enter corresponding field, including but not limited to id field, critical field key, memo field, mode field, type field, responsible person
Field, modification time field, operation field etc. can according to need any required field of addition, may need difference
For the purpose of display, wherein type field includes number, character string, array, four seed type data of dictionary.After the completion of editor, start
The lua code script under respective field is edited, to meet easily modification demand, while it is json that the corresponding format that returns, which is arranged,
Format or protobuf format.
As shown in figure 4, at this time can according to the needs of client, the file of derived key word section or other fields, for
Client Developmental Engineer reads and checks.
S206: it is state of activation that the critical field, which is arranged,.
At this point, the field for needing return value is open state, used when modifying parameter for client, it can also be for clothes
End routine call be engaged in return to required value.
The disclosure passes through lua generation by constructing a kind of method for parameter configuration based on lua applied to client, this method
The code corresponding functional application of scripting editing, client can call directly relevant parameter, can directly meet in client modification
All judges the configuration needs issued according to various conditions.After configuring interrelated logic on web console, 1 minute
It comes into force, does not need to issue the online cumbersome process of project again, improve work efficiency, reduce human cost.
Embodiment 3
As shown in figure 5, the third aspect, the present invention provides a kind of ginseng based on lua according to the specific embodiment of the disclosure
Number configuration device, is applied to server-side, including response unit 502, execution unit 504 and return unit 506, the unit can
It programs and realizes in the form of using software code, can also be built using hardware circuit, any restrictions are not done to this.Specifically
:
Response unit 302, for identification and response application PROGRAMMED REQUESTS;
Optionally, the identification and response application PROGRAMMED REQUESTS, comprising: judge whether the application program includes identity letter
Breath and version information;If so, responding successfully;If it is not, then responding failure.
Specifically, server-side is received as shown in Fig. 2, get mode can be used for client or post mode goes to pull configuration
To after corresponding request, application program is identified.Server-side reading client passes to AppID and Version editions of backstage
This number.After reading the identity information AppID and version information Version of application program, then identifies success, begin to respond to visitor
The request at family end.When the identity information AppID and version information Version of application program only read one of them or one
It does not read, then recognition failures, is not responding to the request of client.
Execution unit 504 executes each critical field for traversing all critical fielies in the application program
In lua code script, and generate return value;
Specifically, as shown in Fig. 2, client Developmental Engineer is defeated manually by logentry login application program first
Enter corresponding field, the fields such as including but not limited to ID, key, remarks, state, type, responsible person, modification time, operation.Clothes
Business device reads this App and corresponds to all field configuration information under version number (such as Lark 1.0).Find corresponding client request
Field, such as key key field reads the key field under the key field, such as Lark 1.0 under all versions respectively,
Key field under Lark 2.0, the key field etc. under Lark 3.0, executes the lua code of all key fields.Asking for user
The lua code of parameter and user configuration is asked to be dropped into lua interpreter to go to execute and take and return the result.It is described to return the result for example,
10,20,30 etc. number sets the title of corresponding critical field to return the result value accordingly, such as key1=10,
Key2=20, key3=30 etc..Complicated lua code is thus converted into the corresponding number of return according to the demand of client
Value.
Return unit 506 returns the formatted data for forming corresponding formatted data based on the return value assembly
Back to the application program.
Optionally, described that corresponding formatted data is formed based on the return value assembly, the formatted data is returned to
The application program, comprising: json formatted data is formed based on the return value assembly;If with the application requests format
Data Matching then returns to the json formatted data;Otherwise protobuf formatted data is converted by the json formatted data,
Return to protobuf formatted data.Wherein json formatted data is the format number that above-mentioned return value is arranged in order to acquisition
According to, such as [10 20 30].And if customer demand is not json formatted data, json formatted data is converted to separately
A kind of protobuf formatted data return.
Optionally, described otherwise to convert protobuf formatted data for the json formatted data, return to protobuf
Formatted data, comprising: if being mismatched with the application requests formatted data;It is corresponding to obtain the application version
The corresponding Descriptor of the message of proto;A pb.message is created, then dynamic gives assignment, generates protobuf
Formatted data returns to protobuf formatted data.
The disclosure passes through lua code script by constructing a kind of parameter configuration device based on lua applied to server-side
Corresponding functional application is edited, customer in response end calls directly relevant parameter, directly can meet institute in client modification
Some judges the configuration needs issued according to various conditions.After configuring interrelated logic on web console, it can give birth within 1 minute
Effect, does not need to issue the online cumbersome process of project again, improves work efficiency, reduce human cost.
Embodiment 4
As shown in fig. 6, fourth aspect, the present invention provides a kind of ginseng based on lua according to the specific embodiment of the disclosure
Number configuration device is applied to client, including creating unit 602, edit cell 604 and activation unit 606, and the unit can
It programs and realizes in the form of using software code, can also be built using hardware circuit, any restrictions are not done to this.Specifically
:
Creating unit 602, for creating and determining the version information of application program;
Optionally, the version information of the creation and determining application program, including two kinds of situations: one is the applications of creation
Program is initial version, then it is arranged as initial version application program;The application program created when another situation is to connect version
This, i.e., be not initial version application program, then is set as compatibility and connects version application program, such as 2.0 editions, 3.0 editions.
The formatted data of all versions before connecting version at this time is compatible in data format.
Edit cell 604, it is described for editing the code script based on lua in the application program under critical field
The code script of lua is used for according to user's request and the return value of configuration parameter;
Specifically, client Developmental Engineer is manually entered corresponding word by logentry login application program first
Section, including but not limited to id field, critical field key, memo field, mode field, type field, responsible person's field, modification
Time field, operation field etc. can according to need any required field of addition, difference may be needed to be shown as mesh
, wherein type field includes number, character string, array, four seed type data of dictionary.After the completion of editor, it is corresponding to start editor
Lua code script under field, to meet easily modification demand, while be arranged it is corresponding return format be json format or
Protobuf format.
As shown in figure 4, at this time can according to the needs of client, the file of derived key word section or other fields, for
Client Developmental Engineer reads and checks.
Unit 606 is activated, is state of activation for the critical field to be arranged.
At this point, the field for needing return value is open state, used when modifying parameter for client, it can also be for clothes
End routine call be engaged in return to required value.
The disclosure passes through lua generation by constructing a kind of parameter configuration device based on lua applied to client, this method
The code corresponding functional application of scripting editing, client can call directly relevant parameter, can directly meet in client modification
All judges the configuration needs issued according to various conditions.After configuring interrelated logic on web console, 1 minute
It comes into force, does not need to issue the online cumbersome process of project again, improve work efficiency, reduce human cost.
Embodiment 5
As shown in fig. 7, the equipment is used for a kind of parameter configuration side based on lua the present embodiment provides a kind of electronic equipment
Method, the electronic equipment, comprising: at least one processor;And the storage being connect at least one described processor communication
Device;Wherein,
The memory is stored with the instruction that can be executed by one processor, and described instruction is by described at least one
It manages device to execute, so that at least one described processor is able to carry out such as embodiment 1, method as described in example 2.
Embodiment 6
The embodiment of the present disclosure provides a kind of nonvolatile computer storage media, and the computer storage medium is stored with
The method in above-mentioned any means embodiment can be performed in computer executable instructions, the computer executable instructions.
Embodiment 7
Below with reference to Fig. 7, it illustrates the structural representations for the electronic equipment 700 for being suitable for being used to realize the embodiment of the present disclosure
Figure.Terminal device in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, digital broadcasting and connect
Receive device, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle
Carry navigation terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.Electricity shown in Fig. 7
Sub- equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in fig. 7, electronic equipment 700 may include processing unit (such as central processing unit, graphics processor etc.)
701, random access can be loaded into according to the program being stored in read-only memory (ROM) 702 or from storage device 708
Program in memory (RAM) 703 and execute various movements appropriate and processing.In RAM 703, it is also stored with electronic equipment
Various programs and data needed for 700 operations.Processing unit 701, ROM 702 and RAM 703 pass through the phase each other of bus 704
Even.Input/output (I/O) interface 705 is also connected to bus 704.
In general, following device can connect to I/O interface 705: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 706 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration
The output device 707 of dynamic device etc.;Storage device 708 including such as tape, hard disk etc.;And communication device 709.Communication device
709, which can permit electronic equipment 700, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 7 shows tool
There is the electronic equipment 700 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with
Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 709, or from storage device 708
It is mounted, or is mounted from ROM 702.When the computer program is executed by processing unit 701, the embodiment of the present disclosure is executed
Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,
In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to
Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit
Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned
Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity
When sub- equipment executes, so that the electronic equipment: obtaining at least two internet protocol addresses;Send to Node evaluation equipment includes institute
State the Node evaluation request of at least two internet protocol addresses, wherein the Node evaluation equipment is internet from described at least two
In protocol address, chooses internet protocol address and return;Receive the internet protocol address that the Node evaluation equipment returns;Its
In, the fringe node in acquired internet protocol address instruction content distributing network.
Alternatively, above-mentioned computer-readable medium carries one or more program, when said one or multiple programs
When being executed by the electronic equipment, so that the electronic equipment: receiving the Node evaluation including at least two internet protocol addresses and request;
From at least two internet protocol address, internet protocol address is chosen;Return to the internet protocol address selected;Wherein,
The fringe node in internet protocol address instruction content distributing network received.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof
Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+
+, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can
Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package,
Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part.
In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN)
Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service
Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the
One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Claims (10)
1. a kind of method for parameter configuration based on lua is applied to server-side characterized by comprising
Identify simultaneously response application PROGRAMMED REQUESTS;
All critical fielies in the application program are traversed, execute the lua code script in each critical field, and raw
At return value;
Corresponding formatted data is formed based on the return value assembly, the formatted data is returned into the application program.
2. the method according to claim 1, wherein the identification and response application PROGRAMMED REQUESTS, comprising:
Judge whether the application program includes identity information and version information;
If so, responding successfully;If it is not, then responding failure.
3. the method according to claim 1, wherein described form corresponding format based on the return value assembly
The formatted data is returned to the application program by data, comprising:
Json formatted data is formed based on the return value assembly;
If matching with the application requests formatted data, the json formatted data is returned;
Otherwise protobuf formatted data is converted by the json formatted data, returns to protobuf formatted data.
4. according to the method described in claim 3, it is characterized in that, otherwise described convert the json formatted data to
Protobuf formatted data returns to protobuf formatted data, comprising:
If being mismatched with the application requests formatted data;
Obtain the corresponding description information of message body of the corresponding protobuf of the application version;
The example of a newly-built protobuf message body, then dynamic gives assignment, generates protobuf formatted data, returns
Protobuf formatted data.
5. a kind of method for parameter configuration based on lua is applied to client characterized by comprising
Create and determine the version information of application program;
The code script based on lua in the application program under critical field is edited, the code script of the lua is used for basis
User requests and the return value of configuration parameter;
It is state of activation that the critical field, which is arranged,.
6. according to the method described in claim 5, it is characterized in that, the version information of the creation and determining application program, packet
It includes:
If creation application program is initial version, it is set as initial version application program;
If creating application program is to connect version, it is set as compatibility and connects version application program.
7. a kind of parameter configuration device based on lua is applied to server-side characterized by comprising
Response unit, for identification and response application PROGRAMMED REQUESTS;
Execution unit executes the lua in each critical field for traversing all critical fielies in the application program
Code script, and generate return value;
The formatted data is returned to institute for forming corresponding formatted data based on the return value assembly by return unit
State application program.
8. a kind of parameter configuration device based on lua is applied to client characterized by comprising
Creating unit, for creating and determining the version information of application program;
Edit cell, for editing the code script based on lua in the application program under critical field, the generation of the lua
Code script is used for according to user's request and the return value of configuration parameter;
Unit is activated, is state of activation for the critical field to be arranged.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is by processor
Such as method described in any one of claims 1 to 6 is realized when execution.
10. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing
When device executes, so that one or more of processors realize such as method described in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811639888.8A CN109814915B (en) | 2018-12-29 | 2018-12-29 | Parameter configuration method, device, medium and electronic equipment based on lua |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811639888.8A CN109814915B (en) | 2018-12-29 | 2018-12-29 | Parameter configuration method, device, medium and electronic equipment based on lua |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109814915A true CN109814915A (en) | 2019-05-28 |
CN109814915B CN109814915B (en) | 2022-07-22 |
Family
ID=66603098
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811639888.8A Active CN109814915B (en) | 2018-12-29 | 2018-12-29 | Parameter configuration method, device, medium and electronic equipment based on lua |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109814915B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111937366A (en) * | 2020-04-09 | 2020-11-13 | 焦旭 | Web request processing method and device |
CN112148273A (en) * | 2020-10-28 | 2020-12-29 | 太仓市同维电子有限公司 | Automation script modular design method based on Robot Framework |
CN112911024A (en) * | 2021-05-07 | 2021-06-04 | 浙江简捷物联科技有限公司 | Method and system for collecting data of Internet of things, electronic device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335155A (en) * | 2015-10-20 | 2016-02-17 | 华东师范大学 | Method for realizing different IoT (Internet of Things) applications by only needing to configure cloud-end script |
CN105824944A (en) * | 2016-03-21 | 2016-08-03 | 上海斐讯数据通信技术有限公司 | XML (X Extensible Markup Language) configuration data maintenance method and system based on scripting language |
EP3057291A1 (en) * | 2015-02-13 | 2016-08-17 | Nosto Solutions, Ltd. | Method for providing a third party service associated with a network-accessible site |
CN106155729A (en) * | 2015-04-21 | 2016-11-23 | 阿里巴巴集团控股有限公司 | The hot update method of Lua script, Apparatus and system |
CN106406844A (en) * | 2015-08-03 | 2017-02-15 | 腾讯科技(深圳)有限公司 | A method and a device for realizing a communication interaction platform official account menu |
CN107479878A (en) * | 2017-07-26 | 2017-12-15 | 北京供销科技有限公司 | A kind of lua Modular development methods and Development Framework based on openresty |
-
2018
- 2018-12-29 CN CN201811639888.8A patent/CN109814915B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3057291A1 (en) * | 2015-02-13 | 2016-08-17 | Nosto Solutions, Ltd. | Method for providing a third party service associated with a network-accessible site |
CN106155729A (en) * | 2015-04-21 | 2016-11-23 | 阿里巴巴集团控股有限公司 | The hot update method of Lua script, Apparatus and system |
CN106406844A (en) * | 2015-08-03 | 2017-02-15 | 腾讯科技(深圳)有限公司 | A method and a device for realizing a communication interaction platform official account menu |
CN105335155A (en) * | 2015-10-20 | 2016-02-17 | 华东师范大学 | Method for realizing different IoT (Internet of Things) applications by only needing to configure cloud-end script |
CN105824944A (en) * | 2016-03-21 | 2016-08-03 | 上海斐讯数据通信技术有限公司 | XML (X Extensible Markup Language) configuration data maintenance method and system based on scripting language |
CN107479878A (en) * | 2017-07-26 | 2017-12-15 | 北京供销科技有限公司 | A kind of lua Modular development methods and Development Framework based on openresty |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111937366A (en) * | 2020-04-09 | 2020-11-13 | 焦旭 | Web request processing method and device |
CN111937366B (en) * | 2020-04-09 | 2023-08-01 | 北京微动数联科技有限公司 | Web request processing method and device |
CN112148273A (en) * | 2020-10-28 | 2020-12-29 | 太仓市同维电子有限公司 | Automation script modular design method based on Robot Framework |
CN112911024A (en) * | 2021-05-07 | 2021-06-04 | 浙江简捷物联科技有限公司 | Method and system for collecting data of Internet of things, electronic device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109814915B (en) | 2022-07-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108449418A (en) | A kind of mixed cloud platform management system and method | |
CN109308266A (en) | Construction method, test method, device, equipment and the medium of test case | |
CN110716783A (en) | Front-end page generation and deployment method and device, storage medium and equipment | |
CN109814915A (en) | Method for parameter configuration, device, medium and electronic equipment based on lua | |
CN109710333A (en) | Processing method, equipment and the computer readable storage medium of boarding application | |
CN108768730A (en) | Method and apparatus for operating intelligent network adapter | |
CN109992732A (en) | Information sharing method, device, electronic equipment and storage medium | |
US20180210768A1 (en) | Api-based service command invocation | |
CN109714332A (en) | The method for converting protocol and device parsed based on Thrift and syntax tree | |
CN110097341A (en) | A kind of automation O&M management-control method, device, medium and electronic equipment | |
CN110134737A (en) | Data variation monitor method and device, electronic equipment and computer readable storage medium | |
CN110134869A (en) | A kind of information-pushing method, device, equipment and storage medium | |
CN115795211A (en) | Page display method, device, system, equipment and storage medium | |
CN110377273A (en) | A kind of method, apparatus of data processing, medium and electronic equipment | |
CN110188782A (en) | Image similarity determines method, apparatus, electronic equipment and readable storage medium storing program for executing | |
CN110489326A (en) | HTTPAPI adjustment method device, medium and equipment based on IDS | |
CN111427576A (en) | Method, device, storage medium and terminal for configuring application program interface | |
CN113507529B (en) | Method for realizing file downloading based on Web application | |
CN108810105A (en) | For pushed information, the method and apparatus for showing information | |
CN111736807B (en) | Tenant function customization method and device and tenant-based office system | |
CN109614598A (en) | Characters method and device | |
CN111930352A (en) | Bank financial product online method and device | |
CN110489180A (en) | One kind burying a report method, device, medium and electronic equipment | |
CN109710070A (en) | Information interacting method, device, electronic equipment and computer readable storage medium | |
CN112688863B (en) | Gateway data processing method and device and electronic equipment |
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 |