CN109814915B - Parameter configuration method, device, medium and electronic equipment based on lua - Google Patents

Parameter configuration method, device, medium and electronic equipment based on lua Download PDF

Info

Publication number
CN109814915B
CN109814915B CN201811639888.8A CN201811639888A CN109814915B CN 109814915 B CN109814915 B CN 109814915B CN 201811639888 A CN201811639888 A CN 201811639888A CN 109814915 B CN109814915 B CN 109814915B
Authority
CN
China
Prior art keywords
application program
format data
lua
client
returning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811639888.8A
Other languages
Chinese (zh)
Other versions
CN109814915A (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.)
Tianjin ByteDance Technology Co Ltd
Original Assignee
Tianjin ByteDance Technology 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 Tianjin ByteDance Technology Co Ltd filed Critical Tianjin ByteDance Technology Co Ltd
Priority to CN201811639888.8A priority Critical patent/CN109814915B/en
Publication of CN109814915A publication Critical patent/CN109814915A/en
Application granted granted Critical
Publication of CN109814915B publication Critical patent/CN109814915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a parameter configuration method, device, medium and electronic device based on lua, the method comprising: identifying and responding to application requests; traversing all key fields in the application program, executing the lua code script in each key field, and generating a return value; and assembling and forming corresponding format data based on the return values, and returning the format data to the application program. According to the method, the corresponding function application is edited through the lua code script, the client can directly call the relevant parameters, and all the configuration requirements issued according to various condition judgment can be met by directly modifying the relevant parameters at the client. After the relevant logic is configured on the web console, the operation can be performed in 1 minute, the complicated process of on-line of the project does not need to be released again, the working efficiency is improved, and the labor cost is reduced.

Description

Parameter configuration method, device, medium and electronic equipment based on lua
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a parameter configuration method, apparatus, medium, and electronic device based on lua.
Background
With the development of mobile internet technology, various apps are more and more popular in application, and each App can meet different setting requirements for different regions, different crowds and the like in the application process. Therefore, when the client develops, some functions of configuration pull are often needed, such as obtaining relevant configuration parameters of whether a user is visible to a certain module, whether the user uses a certain latest resource package, whether the user can experience a beta version function, how many seconds an advertisement is displayed, and the like. The server needs to determine what the return value of each parameter is according to various attributes of the user, such as system type, program version number, user ip address, and the like.
Since the configuration parameters often need to be modified, the server side needs to rewrite the back-end code and then release the back-end code to be online. At present, all client development engineers must inform the requirements to back-end development engineers, and the back-end development engineers make corresponding modifications, so that the modification procedure is complicated.
Disclosure of Invention
An object of the present disclosure is to provide a parameter configuration method, apparatus, medium, and electronic device based on lua, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a parameter configuration method based on lua, applied to a server, including: identifying and responding to application requests; traversing all key fields in the application program, executing the lua code script in each key field, and generating a return value; and assembling the return values to form corresponding format data, and returning the format data to the application program.
Optionally, the identifying and responding to the application request includes: judging whether the application program contains identity information and version information; if yes, response is successful; if not, the response fails.
Optionally, the assembling based on the return value forms corresponding format data, and the returning of the format data to the application program includes: based on the return values, data in a json format are formed in an assembling mode; if the json format data is matched with the format data requested by the application program, returning the json format data; otherwise, converting the json format data into protobuf format data, and returning the protobuf format data.
Optionally, if not, converting the json format data into protobuf format data, and returning the protobuf format data includes: if the format data does not match the application program request format data; obtaining description information corresponding to a protobuf message body corresponding to the application program version; and creating an instance of the protobuf message body, then dynamically assigning values to generate protobuf format data, and returning the protobuf format data.
According to a specific embodiment of the present disclosure, in a second aspect, the present invention provides a parameter configuration method based on lua, applied to a client, including: creating and determining version information of an application program; editing a lua-based code script under a key field in the application program, wherein the lua-based code script is used for configuring a return value of a parameter according to a user request; and setting the key field to be in an activated state.
Optionally, the creating and determining version information of the application includes: if the created application program is the initial version, the created application program is set as the application program of the initial version; and if the created application program is the continuous version, setting the created application program as a compatible continuous version application program.
According to a specific embodiment of the present disclosure, in a third aspect, the present invention provides a parameter configuration apparatus based on lua, applied to a server, including: a response unit for identifying and responding to the application program request; the execution unit is used for traversing all key fields in the application program, executing the lua code script in each key field and generating a return value; and the return unit is used for splicing and forming corresponding format data based on the return values and returning the format data to the application program.
According to a fourth aspect of the present disclosure, a parameter configuration apparatus based on lua is provided, which is applied to a client, and includes: a creating unit for creating and determining version information of an application program; the editing unit is used for editing the lua-based code script under the key field in the application program, and the lua-based code script is used for configuring the return value of the parameter according to the request of a user; and the activation unit is used for setting the key field to be in an activation state.
According to a fifth aspect thereof, the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of the above.
According to a sixth aspect thereof, the present disclosure provides an electronic device, comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any preceding claim.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects: according to the method, the corresponding function application is edited through the lua code script, the client can directly call the relevant parameters, and all the configuration requirements which are judged and issued according to various conditions can be met by directly modifying the relevant parameters at the client. After the relevant logic is configured on the web console, the operation can be performed in 1 minute, the complicated process of on-line of the project does not need to be released again, the working efficiency is improved, and the labor cost is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure. It should be apparent that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived by those of ordinary skill in the art without inventive effort. In the drawings:
FIG. 1 shows a service-side schematic diagram of a parameter configuration method based on lua according to an embodiment of the disclosure;
FIG. 2 shows a server-side flow diagram of a parameter configuration method based on lua according to an embodiment of the disclosure;
FIG. 3 illustrates a client-side schematic diagram of a lua-based parameter configuration method according to an embodiment of the disclosure;
FIG. 4 shows a client flow diagram of a method for lua-based parameter configuration according to an embodiment of the disclosure;
FIG. 5 shows a schematic diagram of a server-side structure of a device for configuring parameters based on lua according to an embodiment of the present disclosure;
FIG. 6 shows a schematic illustration of a client architecture of a parameter configuration apparatus based on lua according to an embodiment of the present disclosure;
fig. 7 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the present disclosure will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, rather than all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The terminology used in the embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in the disclosed embodiments and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in embodiments of the present disclosure, these … … should not be limited to these terms. These terms are used only to distinguish … …. For example, the first … … can also be referred to as the second … … and, similarly, the second … … can also be referred to as the first … … without departing from the scope of embodiments of the present disclosure.
The words "if", as used herein, may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (a stated condition or event)" may be interpreted as "upon determining" or "in response to determining" or "upon detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of additional like elements in the article or device in which the element is contained.
Alternative embodiments of the present disclosure are described in detail below with reference to the drawings.
Example 1
As shown in fig. 1-2, according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a parameter configuration method based on lua, applied to a server, including the following steps:
s102: identifying and responding to application requests;
optionally, the identifying and responding to the application request includes: judging whether the application program contains identity information and version information; if yes, the response is successful; if not, the response fails.
Specifically, as shown in fig. 2, the client may use a get mode or a post mode to pull the configuration, and the server identifies the application after receiving the corresponding request. And the server reads the AppID and Version number transmitted to the background by the client. And when the identity information AppID and the Version information Version of the application program are read, the identification is successful, and the request of the client side is responded. When one or none of the identity information AppID and the Version information Version of the application program is read, the identification fails and the request of the client is not responded.
S104: traversing all key fields in the application program, executing the lua code script in each key field, and generating a return value;
specifically, as shown in fig. 2, first, the client development engineer logs in the application program through the login portal, and manually inputs corresponding fields, including but not limited to ID, key, remark, status, type, person in charge, modification time, operation, and the like. The server reads all field configuration information under the corresponding version number (such as Lark 1.0) of the App. Finding the corresponding fields of the client request, such as key fields, respectively reading the key fields under all versions, such as the key field under Lark 1.0, the key field under Lark 2.0, the key field under Lark 3.0, and the like, and executing the lua codes of all the key fields. The user's request parameters and the user-configured lua code are dropped to the lua interpreter to perform the bring-back result. The returned result is, for example, a number of 10, 20, 30, etc., and the name of the corresponding key field is set to the corresponding returned result value, for example, key1 ═ 10, key2 ═ 20, key3 ═ 30, etc. This translates the complex lua code into returning a corresponding value according to the requirements of the client.
S106: and assembling the return values to form corresponding format data, and returning the format data to the application program.
Optionally, the assembling based on the return value forms corresponding format data, and the returning of the format data to the application program includes: based on the return values, data in a json format are formed in an assembling mode; if the json format data is matched with the format data requested by the application program, returning the json format data; otherwise, converting the json format data into protobuf format data, and returning the protobuf format data. Wherein the json format data is format data obtained by arranging the above-mentioned return values in order, for example [ 102030 ]. And if the client requires data in a json format, converting the json format data into data in another protobuf format and returning the data.
Optionally, if the json format data is not converted into protobuf format data, returning the protobuf format data, including: if the format data does not match the application program request format data; obtaining description information corresponding to a protobuf message body corresponding to the application program version; and creating an instance of the protobuf message body, then dynamically assigning values to generate protobuf format data, and returning the protobuf format data.
According to the method, the corresponding function application is edited through the lua code script, the server side can directly return the related parameters, and all the configuration requirements issued according to various condition judgment can be met by directly modifying the parameters at the client side. After the relevant logic is configured on the web console, the business can be achieved within 1 minute, the complicated process of on-line of the project does not need to be released again, the working efficiency is improved, and the labor cost is reduced.
Example 2
As shown in fig. 3 to 4, according to a specific embodiment of the present disclosure, in a second aspect, the present invention provides a parameter configuration method based on lua, applied to a client, including the following steps:
s202: creating and determining version information of an application program;
optionally, the creating and determining version information of the application includes two cases: if the created application program is an initial version, setting the created application program as an initial version application program; in another case, the created application is a subsequent version, that is, the application is not an initial version, and is set as a compatible subsequent version application, such as version 2.0, version 3.0, and the like. The subsequent version at this time is compatible in data format with the format data of all previous versions.
S204: editing a lua-based code script under a key field in the application program, wherein the lua-based code script is used for configuring a return value of a parameter according to a user request;
specifically, as shown in fig. 2, first, a client development engineer logs in an application program through a login entry, manually inputs corresponding fields including, but not limited to, an ID field, a key field, a remark field, a status field, a type field, a person in charge field, a modification time field, an operation field, and the like, and may add any required field as needed to display differently as may be required, where the type field includes four types of data, i.e., a number, a character string, an array, and a dictionary. And after the editing is finished, starting to edit the lua code script under the corresponding field so as to meet the convenient modification requirement, and setting whether the corresponding return format is the json format or the protobuf format.
As shown in fig. 4, at this time, the files of the key fields or other fields can be exported for the client development engineer to read and view according to the needs of the client.
S206: and setting the key field to be in an activated state.
At this time, the field needing to return the value is in an open state, and is used when the client modifies the parameter, and can also be called by the server program to return the required value.
According to the method, the corresponding function application is edited through the lua code script, the client can directly call the related parameters, and all the configuration requirements issued according to various condition judgment can be met by directly modifying the parameters at the client. After the relevant logic is configured on the web console, the operation can be performed in 1 minute, the complicated process of on-line of the project does not need to be released again, the working efficiency is improved, and the labor cost is reduced.
Example 3
As shown in fig. 5, according to a specific embodiment of the present disclosure, in a third aspect, the present invention provides a parameter configuration apparatus based on lua, which is applied to a server, and includes a response unit 502, an execution unit 504, and a return unit 506, where the units may be implemented by programming in a software code form, or may be built by using a hardware circuit, and no limitation is imposed on the units. Specifically, the method comprises the following steps:
a response unit 302 for identifying and responding to application requests;
optionally, the identifying and responding to the application request includes: judging whether the application program contains identity information and version information; if yes, response is successful; if not, the response fails.
Specifically, as shown in fig. 2, the client may use a get mode or a post mode to pull the configuration, and the server identifies the application program after receiving the corresponding request. And the server reads the AppID and Version number transmitted to the background by the client. And when the identity information AppID and the Version information Version of the application program are read, the identification is successful, and the request of the client side is responded. When one or none of the identity information AppID and the Version information Version of the application program is read, the identification fails, and the request of the client is not responded.
An execution unit 504, configured to traverse all key fields in the application program, execute the lua code script in each key field, and generate a return value;
specifically, as shown in fig. 2, first, a client development engineer logs in an application program through a login entry, and manually inputs corresponding fields, including but not limited to ID, key, remark, status, type, person in charge, modification time, operation, and the like. The server reads all field configuration information under the corresponding version number (such as Lark 1.0) of the App. Finding the corresponding fields of the client request, such as key fields, respectively reading the key fields under all versions, such as the key field under Lark 1.0, the key field under Lark 2.0, the key field under Lark 3.0, and the like, and executing the lua codes of all the key fields. The user's request parameters and the user-configured lua code are dropped to the lua interpreter to perform the bring-back result. The returned result is, for example, a number of 10, 20, 30, etc., and the name of the corresponding key field is set to the corresponding returned result value, for example, key1 ═ 10, key2 ═ 20, key3 ═ 30, etc. Thus, the complex lua code is converted into a corresponding value according to the requirement of the client.
A returning unit 506, configured to assemble corresponding format data based on the return values to form the format data, and return the format data to the application program.
Optionally, the assembling based on the return value forms corresponding format data, and the returning of the format data to the application program includes: based on the return values, data in a json format are formed in an assembling mode; if the json format data is matched with the format data requested by the application program, returning the json format data; otherwise, converting the json format data into protobuf format data, and returning the protobuf format data. Wherein the json format data is format data obtained by arranging the above-mentioned return values in order, for example [ 102030 ]. And if the client requires data in a json format, converting the json format data into data in another protobuf format and returning the data.
Optionally, if the json format data is not converted into protobuf format data, returning the protobuf format data, including: if the format data does not match the application program request format data; acquiring a Descriptor corresponding to the message of proto corresponding to the application program version; creating a pb message, then dynamically assigning a value to generate protobuf format data, and returning the protobuf format data.
The method and the device can meet all configuration requirements which are judged and issued according to various conditions by constructing the parameter configuration device based on the lua applied to the server, editing corresponding functional application through the lua code script, responding to the direct calling of the client to the related parameters and directly modifying the client. After the relevant logic is configured on the web console, the business can be achieved within 1 minute, the complicated process of on-line of the project does not need to be released again, the working efficiency is improved, and the labor cost is reduced.
Example 4
As shown in fig. 6, according to a fourth aspect of the present disclosure, the present invention provides a parameter configuration apparatus based on lua, which is applied to a client, and includes a creating unit 602, an editing unit 604, and an activating unit 606, where the units may be implemented by programming in a software code form, or may be built by using a hardware circuit, and no limitation is imposed on the units. Specifically, the method comprises the following steps:
a creating unit 602, configured to create and determine version information of an application;
optionally, the creating and determining version information of the application program includes two cases: if the created application program is an initial version, setting the created application program as an initial version application program; in another case, the created application is a subsequent version, that is, the application is not an initial version, and is set as a compatible subsequent version application, such as version 2.0, version 3.0, and the like. The subsequent version at this time is compatible in data format with all previous versions of format data.
An editing unit 604, configured to edit a lua-based code script under a key field in the application, where the lua-based code script is used to configure a return value of a parameter according to a user request;
specifically, firstly, a client development engineer logs in an application program through a login entrance, manually inputs corresponding fields including but not limited to an ID field, a key field, a remark field, a state field, a type field, a leader field, a modification time field, an operation field and the like, and can add any required field according to requirements to achieve the purpose of displaying different types of data possibly required, wherein the type field includes four types of data including numbers, character strings, arrays and dictionaries. And after the editing is finished, starting to edit the lua code script under the corresponding field so as to meet the convenient modification requirement, and setting whether the corresponding return format is the json format or the protobuf format.
As shown in fig. 4, at this time, the files of the key fields or other fields can be exported for the client development engineer to read and view according to the needs of the client.
An activation unit 606, configured to set the key field to an activated state.
At this time, the field needing to return the value is in an open state, and is used when the client modifies the parameter, and can also be called by the server program to return the needed value.
According to the method, the corresponding function application is edited through the lua code script, the client can directly call the related parameters, and all the configuration requirements issued according to various condition judgment can be met by directly modifying the parameters at the client. After the relevant logic is configured on the web console, the business can be achieved within 1 minute, the complicated process of on-line of the project does not need to be released again, the working efficiency is improved, and the labor cost is reduced.
Example 5
As shown in fig. 7, the present embodiment provides an electronic device, where the electronic device is used in a parameter configuration method based on lua, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method of embodiments 1, 2.
Example 6
Embodiments of the present disclosure provide a non-transitory computer storage medium having stored thereon computer-executable instructions that may perform a method in any of the method embodiments described above.
Example 7
Referring now to FIG. 7, shown is a schematic diagram of an electronic device 700 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, electronic device 700 may include a processing means (e.g., central processing unit, graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from storage 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, or the like; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708, including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 700 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may be separate and not incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".

Claims (10)

1. A parameter configuration method based on lua is applied to a server side, and is characterized by comprising the following steps:
identifying and responding to application requests;
traversing all key fields in the application program, executing the lua code script in each key field, and generating a return value, wherein the return value is generated by the lua code script in the key fields according to the configuration of a user request;
and assembling and forming corresponding format data based on the return values, and returning the format data to the application program.
2. The method of claim 1, wherein identifying and responding to application requests comprises:
judging whether the application program contains identity information and version information;
if yes, response is successful; if not, the response fails.
3. The method of claim 1, wherein the assembling the corresponding format data based on the return values, and returning the format data to the application program comprises:
based on the return values, data in a json format are formed in an assembling mode;
if the json format data is matched with the format data requested by the application program, returning the json format data;
otherwise, converting the json format data into protobuf format data, and returning the protobuf format data.
4. The method according to claim 3, wherein said otherwise converting said json format data into protobuf format data and returning said protobuf format data comprises:
if the format data does not match the application program request format data;
acquiring description information corresponding to a protobuf message body corresponding to the application program version;
and creating an instance of the protobuf message body, then dynamically assigning values to generate protobuf format data, and returning the protobuf format data.
5. A parameter configuration method based on lua is applied to a client, and is characterized by comprising the following steps:
creating and determining version information of an application program;
editing a lua-based code script under a key field in the application program, wherein the lua-based code script is used for configuring a return value of a parameter according to a user request;
and setting the key field to be in an activated state for the client to use when modifying the parameters.
6. The method of claim 5, wherein creating and determining version information for an application comprises:
if the created application program is the initial version, the created application program is set as the application program of the initial version;
and if the created application program is the continuing version, setting the application program as the compatible continuing version application program.
7. A parameter configuration device based on lua is applied to a server side, and is characterized by comprising:
a response unit for identifying and responding to the application request;
the execution unit is used for traversing all key fields in the application program, executing the lua code script in each key field and generating a return value; the return value is generated by a lua code script in the key field according to user request configuration;
and the return unit is used for splicing and forming corresponding format data based on the return values and returning the format data to the application program.
8. A parameter configuration device based on lua is applied to a client, and is characterized by comprising:
the creating unit is used for creating and determining the version information of the application program;
an editing unit, configured to edit a lua-based code script under a key field in the application program, where the lua-based code script is used to configure a return value of a parameter according to a user request;
and the activation unit is used for setting the key field to be in an activation state for the client to use when modifying the parameters.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 6.
CN201811639888.8A 2018-12-29 2018-12-29 Parameter configuration method, device, medium and electronic equipment based on lua Active CN109814915B (en)

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 CN109814915A (en) 2019-05-28
CN109814915B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021203343A1 (en) * 2020-04-09 2021-10-14 北京微动数联科技有限公司 Web request processing method and apparatus
CN112148273A (en) * 2020-10-28 2020-12-29 太仓市同维电子有限公司 Automation script modular design method based on Robot Framework
CN112911024B (en) * 2021-05-07 2021-08-06 浙江简捷物联科技有限公司 Method and system for collecting data of Internet of things, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406844B (en) * 2015-08-03 2020-12-01 腾讯科技(深圳)有限公司 Method and device for realizing public number menu of communication interaction platform
CN105824944B (en) * 2016-03-21 2019-10-22 上海斐讯数据通信技术有限公司 A kind of XML configuration data maintaining method and system based on scripting language
CN107479878B (en) * 2017-07-26 2021-02-05 北京供销科技有限公司 Lua modularization development method and development framework based on openness

Patent Citations (3)

* Cited by examiner, † Cited by third party
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
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

Also Published As

Publication number Publication date
CN109814915A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN109918040B (en) Voice instruction distribution method and device, electronic equipment and computer readable medium
CN109460233B (en) Method, device, terminal equipment and medium for updating native interface display of page
US20140195663A1 (en) Method and System for Providing Cloud-Based Common Distribution Applications
CN109814915B (en) Parameter configuration method, device, medium and electronic equipment based on lua
CN109408481B (en) Log collection rule updating method and device, electronic equipment and readable medium
CN113900721A (en) Operating system starting method and device and electronic equipment
CN110865846B (en) Application management method, device, terminal, system and storage medium
CN110851211A (en) Method, apparatus, electronic device, and medium for displaying application information
US20220215482A1 (en) User information processing method, apparatus, electronic device, and computer storage medium
CN110442416B (en) Method, electronic device and computer-readable medium for presenting information
CN110069186B (en) Method and equipment for displaying operation interface of application
CN110134477B (en) Method, device, medium and electronic equipment for dynamically laying out user pages
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN111382039A (en) Method, device, electronic equipment and storage medium for reporting user behavior event
CN111241368B (en) Data processing method, device, medium and equipment
CN109669679B (en) Service detection and processing method and device and electronic equipment
CN109669720B (en) Chain type asynchronous request processing method and device based on Promise and electronic equipment
CN110086880B (en) Method and apparatus for creating instances of network requests
CN111382038B (en) Method, device, electronic equipment and storage medium for reporting service data
CN110618772B (en) View adding method, device, equipment and storage medium
CN112306469A (en) Barrier-free component construction method, device, equipment and storage medium
CN113220293B (en) Page display method, page display device, electronic equipment and computer readable medium
CN110618849A (en) Notification bar setting method, device, equipment and storage medium
CN111641692B (en) Session data processing method and device and electronic equipment
CN114489902A (en) Interface display method, device, equipment and medium

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