CN103823676B - display control method, device and client - Google Patents
display control method, device and client Download PDFInfo
- Publication number
- CN103823676B CN103823676B CN201410052081.XA CN201410052081A CN103823676B CN 103823676 B CN103823676 B CN 103823676B CN 201410052081 A CN201410052081 A CN 201410052081A CN 103823676 B CN103823676 B CN 103823676B
- Authority
- CN
- China
- Prior art keywords
- display control
- display
- variable
- control file
- property parameters
- 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
Links
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The present invention proposes a kind of display control method, device and client, is dynamic load display elements, effectively lifts display elements loading efficiency and invents.The display control method comprises the following steps:Display control file is obtained, the property parameters of display elements are included in display control file, and at least one property parameters are configured as regulated variable in display control file;Display control file is parsed, parameter value corresponding to the property parameters of regulated variable is configured to obtain;According to the result loaded and displayed element of parsing, corresponding display is generated.The present invention can be used in display control technology.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of display control method, device and client.
Background technology
At present, when software interface is developed, in order to be changed in software outer interface display control file, convenience, one
Aspect, XML (Extensible Markup Language, extensible markup language), HTML (Hypertext can be passed through
Markup Language, HTML) the methods of all controls and its attribute in interface are write, with generation
Display control file, and then software interface is loaded according to display control file.On the other hand, static JSON can also be passed through
(JavaScript Object Notation, JavaScript object notation) data interchange format writes display control file.
In addition, it can also be checked by analytical tool, change display control file.
During the present invention is realized, inventor has found problems with the prior art at least be present:Existing display
After control method, control and its attribute are described by constant in interface, and display control file is established, if
Need to modify to the attribute of control or control, then need to update display control file, considerably increase exploit person
The workload of member, and display control method is single;In addition, after display control file modification, user needs to reload entirely
Display control file, interface loading efficiency is low, poor user experience.
The content of the invention
It is contemplated that at least solves one of above-mentioned technical problem.
Therefore, first purpose of the present invention is to propose a kind of display control method.This method need not update aobvious
Show that the dynamic load to display elements can be achieved in control file, more flexibly, conveniently, substantially increase the loading of display elements
Efficiency.
Second object of the present invention is to propose a kind of display control unit.
Third object of the present invention is to propose a kind of client.
To achieve these goals, the display control method of first aspect present invention embodiment, including:Obtain display control
File, the property parameters of display elements are included in the display control file, and at least one in the display control file
The individual property parameters are configured as regulated variable;The display control file is parsed, so that be configured to described in acquisition can
Preset parameter value corresponding to the property parameters of modulation amount;The display elements are loaded according to the result of the parsing, generation is corresponding
Display.
The display control method of the embodiment of the present invention, at least one property parameters comprising display elements can be configured as
The display control file of regulated variable is parsed, and parameter preset corresponding to the property parameters of regulated variable is configured to obtain
Value, and according to the result loaded and displayed element of parsing, so as to according to adjustable property parameters dynamic load display elements, and nothing
Display control file need to be updated, the control loaded to display elements more flexibly, conveniently, substantially increases display elements
Loading efficiency.
To achieve these goals, the display control unit of second aspect of the present invention embodiment, including:Acquisition module, use
In obtaining display control file, the property parameters of display elements are included in the display control file, and in the display control
At least one property parameters are configured as regulated variable in file processed;Parsing module, for the display control file
Parsed, to be configured to preset parameter value corresponding to the property parameters of regulated variable described in acquisition;And load-on module, it is used for
The display elements are loaded according to the result of the parsing, generate corresponding display.
The display control unit of the embodiment of the present invention, at least one property parameters comprising display elements can be configured as
The display control file of regulated variable is parsed, and parameter preset corresponding to the property parameters of regulated variable is configured to obtain
Value, and according to the result loaded and displayed element of parsing, so as to according to adjustable property parameters dynamic load display elements, and nothing
Display control file need to be updated, the control loaded to display elements more flexibly, conveniently, substantially increases display elements
Loading efficiency.
To achieve these goals, the client of third aspect present invention embodiment, including:Shell, display, circuit board
And processor, wherein, the circuit board is placed in the interior volume that the shell surrounds, and the display is outside the shell
Portion, and be connected with the circuit board, the processor is arranged on the circuit board;The processor is used for processing data,
And specifically for performing following steps:Display control file is obtained, the category of display elements is included in the display control file
Property parameter, and at least one property parameters are configured as regulated variable in the display control file;To the display
Control file is parsed, to be configured to preset parameter value corresponding to the property parameters of regulated variable described in acquisition;According to described
The result of parsing loads the display elements, generates corresponding display.
The client of the embodiment of the present invention, at least one property parameters comprising display elements can be configured as can modulation
The display control file of amount is parsed, and preset parameter value corresponding to the property parameters of regulated variable, and root are configured to obtain
According to the result loaded and displayed element of parsing, so as to according to adjustable property parameters dynamic load display elements, without again
Display control file is edited, the control loaded to display elements more flexibly, conveniently, substantially increases the loading effect of display elements
Rate.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments
Substantially and it is readily appreciated that, wherein, Fig. 1 is the flow chart according to the display control method of one embodiment of the invention;
Fig. 2 is the schematic diagram according to the display control file of one embodiment of the invention;
Fig. 3 is the flow chart according to the display control method of another embodiment of the present invention;
Fig. 4 is the flow chart according to the display control method of a specific embodiment of the invention;
Fig. 5 is the flow chart according to the display control method of another specific embodiment of the invention;
Fig. 6 is the structural representation according to the display control unit of one embodiment of the invention;
Fig. 7 is the structural representation according to the display control unit of another embodiment of the present invention;
Fig. 8 is the structural representation according to the display control unit of a specific embodiment of the invention.
Embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
The embodiment of figure description is exemplary, is only used for explaining the present invention, and is not considered as limiting the invention.On the contrary, this
All changes that the embodiment of invention includes falling into the range of the spirit and intension of attached claims, modification and equivalent
Thing.
In the description of the invention, it is to be understood that term " first ", " second " etc. are only used for describing purpose, without
It is understood that to indicate or implying relative importance.In the description of the invention, it is necessary to which explanation, is provided unless otherwise clear and definite
And restriction, term " connected ", " connection " should be interpreted broadly, for example, it may be fixedly connected or be detachably connected,
Or it is integrally connected;Can be mechanical connection or electrical connection;Can be joined directly together, intermediary can also be passed through
It is indirectly connected.For the ordinary skill in the art, the tool of above-mentioned term in the present invention can be understood with concrete condition
Body implication.In addition, in the description of the invention, unless otherwise indicated, " multiple " are meant that two or more.
Any process or method described otherwise above description in flow chart or herein is construed as, and represents to include
Module, fragment or the portion of the code of the executable instruction of one or more the step of being used to realize specific logical function or process
Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable
Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
Below with reference to the accompanying drawings display control method according to embodiments of the present invention, device and client are described.
It is low in order to solve the inconvenience of display control file edit-modify, display elements loading efficiency when display elements show
Problem, the present invention propose a kind of display control method.
Fig. 1 is the flow chart according to the display control method of one embodiment of the invention.As shown in figure 1, the display control
Method includes:
S101, display control file is obtained, wherein, display control file includes the property parameters of display elements, and
At least one property parameters are configured as regulated variable in display control file.
In a preferred embodiment of the invention, display control file can be JSON (JavaScript Object
Notation, JavaScript object notation) file, wherein, JSON for it is a kind of based on JavaScript (one kind based on object and
Event driven client-side scripting language) data interchange format.In JSON files, it may include multiple display elements and its category
Property parameter, wherein, at least one property parameters are configured as regulated variable, and JSON files may also include for parsing display control
The JavaScript code of file, such as JavaScript eval () method, to be parsed to JSON files, and to parsing after
Result loaded.
Specifically, as shown in Fig. 2 multiple display elements are the control of display, each display elements are deposited in the form of array
In JSON files, wherein, the attribute of control includes control size, color, position, content of text or picture material etc..
In embodiments of the invention, at least one property parameters of the display elements in display control file, i.e. the property value of control is
Adjustable, to cause in display control file resolving, the parameter value by obtaining property parameters changes control property, and
Other controls need not be adjusted, improve interface loading efficiency.
S102, display control file is parsed, be configured to preset corresponding to the property parameters of regulated variable to obtain
Parameter value.
In one embodiment of the invention, display control file can be carried out by JavaScript eval () methods
Parsing.It is not the display elements of regulated variable for property parameters in display control file, its property parameters value can be controlled from display
Directly obtained in file processed;, can be according to the object that regulated variable is pointed to (such as the display elements that property parameters are regulated variable
Numerical value, array, display control file etc.) obtain in advance as the preset parameter value of regulated variable setting.And then according to display control
Display elements and its property parameters generation interface spanning tree in file, wherein, node and display control in the spanning tree of interface
Display elements in file correspond.
S103, according to the result loaded and displayed element of parsing, generate corresponding display.
Specifically, can be loaded according to the parameter value of the property parameters of each display elements, for example, in corresponding position
Each display elements are loaded according to the parameter value of the property parameters such as size, color, word content, picture material, it is corresponding to generate
Display interface.
The display control method of the embodiment of the present invention, at least one property parameters comprising display elements can be configured as
The display control file of regulated variable is parsed, and parameter preset corresponding to the property parameters of regulated variable is configured to obtain
Value, and according to the result loaded and displayed element of parsing, so as to according to adjustable property parameters dynamic load display elements, and nothing
Display control file need to be updated, the control loaded to display elements more flexibly, conveniently, substantially increases display elements
Loading efficiency.
Fig. 3 is the flow chart according to another embodiment of the present invention display control method.In an embodiment of the present invention, may be used
The property parameters of display elements are adjusted according to display loading instruction, and adjusting parameter is verified.Specifically, as schemed
Shown in 3, the display control method includes:
S301, display control file is obtained, wherein, display control file includes the property parameters of display elements, and
At least one property parameters are configured as regulated variable in display control file.
S302, display control file is parsed, be configured to preset corresponding to the property parameters of regulated variable to obtain
Parameter value.
S303, display loading instruction is received, wherein, display loading instruction includes at least one regulated variable of being configured to
Adjusting parameter corresponding to property parameters.
In one embodiment of the invention, display loading instruction can be clicking operation, the response message of control of user
Deng.Wherein, the different corresponding different adjusting parameter of display loading instruction, i.e., can basis when receiving display loading instruction
Display loading instruction determines corresponding adjusting parameter.Become big after being clicked such as a certain control, then the adjustment ginseng that clicking operation includes
Number is the length value and width value for adjusting the control size;Such as when cursor placement is when on a certain control, the control changes
Color, the then adjusting parameter that cursor response message includes are the color value for adjusting the control color.
S304, validation verification is carried out to adjusting parameter.
In one embodiment of the invention, the validation verification may include to verify that adjusting parameter whether there is;It can also wrap
Checking adjusting parameter is included whether within default parameter area, above two can also be verified simultaneously.Work as adjusting parameter
When verifying invalid, the result of parsing can be loaded according to preset parameter value, i.e., display elements are not adjusted.
S305, the result of parsing is updated according to adjusting parameter after being verified.
S306, according to the result loaded and displayed element of parsing, generate corresponding display.
The display control method of the embodiment of the present invention, the property parameters of display elements can be carried out according to display loading instruction
Adjustment, and adjusting parameter is verified, while ensure that the display effect of adjustment, make display control method more various
Change, prompted to adjust the regulated efficiency of display effect.
Fig. 4 is the flow chart according to the display control method of a specific embodiment of the invention.In the reality of the present invention
To apply in example, the property parameters that regulated variable is configured in display control file can be variable expression, wherein, the variable expression
Include at least one variable.Specifically, as shown in figure 4, the display control method includes:
S401, display control file is obtained, wherein, display control file includes the property parameters of display elements, and
At least one property parameters are configured as regulated variable in display control file.
In one embodiment of the invention, the adjustable parameter of display elements is variable expression in display control file,
Wherein, the variable expression can be the expression formula that is made up of one or more variables, or one or more variables and one or
The expression formula of multiple constant compositions.Specifically, as shown in Fig. 2 the parameter value of " src " property parameters of node " image " is change
Measure expression formula resPath+ " 1F_1.png " result of calculation, wherein, resPath be point to picture store path variable, " 1F_
1.png " is picture name.Thus, when the store path of picture is modified, without changing display control file, only need to change
ResPath value, you can the parameter value of " src " property parameters of node " image " is obtained, to realize display control file
Normal load.
S402, obtain the variable expression in display control file.
S403, determine the value of at least one variable in variable expression.
S404, the parameter value according to corresponding to the value of at least one variable and variable operation rule determine variable expression.
For example, if having changed display picture store path, the store path after change can be assigned to
ResPath, so as to obtain the currently stored path of display picture, and the picture name " 1F_ in variable expression
1.png " can obtain picture in currently stored path.
S405, according to the result loaded and displayed element of parsing, generate corresponding display.
The display control method of the embodiment of the present invention, it can lead to and determine display member to obtaining parameter value corresponding to variable expression
The parameter value of element, thus, can be by carrying out assignment realization display in loading procedure is parsed to the variable expression of display elements
The dynamic load of element, without changing display control file, more flexibly, conveniently, further increase the loading of display elements
Efficiency.
Fig. 5 is the flow chart according to the display control method of another specific embodiment of the invention.At one of the present invention
The property parameters that regulated variable is configured in embodiment, in display control file can be function pointer, wherein, function pointer tool
There is function parameter.Specifically, as shown in figure 5, the display control method includes:
S501, display control file is obtained, wherein, display control file includes the property parameters of display elements, and
At least one property parameters are configured as regulated variable in display control file.
In one embodiment of the invention, the adjustable parameter of display elements is function pointer in display control file, its
In, the function pointer has function parameter, and different function parameters can be function pointer and point to different objects.Wherein, function
The object that pointer points to can be CSS (Cascading Style Sheet, Cascading Style Sheet), control, plug-in unit, interface typesetting, mould
The display control file of plate etc..Specifically, as shown in Fig. 2 " kd-call " attribute of node " id " is a closure, i.e., one section
Function function (1, n)::CreateLoadingUI(n);, this section of function can point to not according to different function parameter n
Same object.Thus, function parameter n can be changed as needed, and the function pointer is pointed to different objects, when to interface text
When part is parsed and loaded, can current interface continue loading function pointer pointed by CSS, control, plug-in unit or to work as
Front interface carries out typesetting again, renewal interface template etc..
S502, obtain the function pointer in display control file.
S503, the function pointer in pointer function determines the object that function pointer points to, and object is parsed
To obtain the parameter value of pointer function.
In one embodiment of the invention, element array can be generated according to function pointer, for pair after storing and resolving
As.Element array is the object solution pointed to available for storage function pointer with JSON document analysis storage format identical arrays
Data after analysis.For example, for control configuration file, it can be parsed, to obtain the value of each attribute of control, and will
Analysis result is preserved into element array.And then it can be adjusted by the node and the corresponding relation of display elements in the spanning tree of interface
With element array, the object after parsing is added to corresponding node.
S504, according to the result loaded and displayed element of parsing, generate corresponding display.
The display control method of the embodiment of the present invention, the object that can be pointed to by determining function pointer, and the object is entered
Row parsing calls the respective nodes into interface spanning tree to obtain the parameter value of pointer function, thus, can pass through pointer letter
Several function parameters carries out dynamic load to display elements, such as changes control, template, typesetting, without changing display control text
Part, more flexibly, conveniently, further increase the loading efficiency of display elements.
It should be appreciated that in other embodiments of the invention, there is the multiple aobvious of adjustable parameter in display control file
Show element may be either variable expression, or function pointer, i.e., in display control file, can include having variable simultaneously
The display elements of expression formula and the display elements with function pointer.
In order to realize above-described embodiment, the present invention also proposes a kind of display control unit.
Fig. 6 is the structural representation according to the display control unit of one embodiment of the invention.As shown in fig. 6, the display
Control device includes acquisition module 100, parsing module 200 and load-on module 300.
Specifically, acquisition module 100 is used to obtain display control file, wherein, display control file includes display member
The property parameters of element, and at least one property parameters are configured as regulated variable in display control file.The one of the present invention
In individual preferred embodiment, display control file can be JSON (JavaScript Object Notation, JavaScript object
Symbol) file, wherein, JSON is a kind of (a kind of to be based on object and event driven client script language based on JavaScript
Speech) data interchange format.In JSON files, it may include multiple display elements and its property parameters, wherein, at least one category
Property parameter is configured as regulated variable, and JSON files may also include the JavaScript code for parsing display control file,
Such as JavaScript eval () method, to be parsed to JSON files, and the result after parsing is loaded.
More specifically, as shown in Fig. 2 multiple display elements are the control of display, each display elements are in the form of array
It is present in JSON files, wherein, the attribute of control includes control size, color, position, content of text or picture material etc..
In an embodiment of the present invention, the property value of at least one property parameters, i.e. control of the display elements in display control file
It is adjustable, to cause in display control file resolving, control property is changed by the parameter value for obtaining property parameters,
Without adjusting other controls, interface loading efficiency is improved.
Parsing module 200 is used to parse display control file, to obtain the property parameters for being configured to regulated variable
Corresponding preset parameter value.In one embodiment of the invention, display can be controlled by JavaScript eval () methods
File processed is parsed.It is not the display elements of regulated variable, its property parameters value for property parameters in display control file
Can directly it be obtained from display control file;For the display elements that property parameters are regulated variable, can be referred to according to regulated variable
To object (such as numerical value, array, display control file) obtain in advance for regulated variable setting preset parameter value.And then
Display elements and its property parameters generation interface spanning tree in display control file, wherein, the section in the spanning tree of interface
Point corresponds with the display elements in display control file.
Load-on module 300 is used for the result loaded and displayed element according to parsing, generates corresponding display.More specifically, can
Loaded according to the parameter value of the property parameters of each display elements, for example, in corresponding position according to size, color, text
The parameter value of the property parameters such as word content, picture material loads each display elements, to generate corresponding display interface.
The display control unit of the embodiment of the present invention, at least one property parameters comprising display elements can be configured as
The display control file of regulated variable is parsed, and parameter preset corresponding to the property parameters of regulated variable is configured to obtain
Value, and according to the result loaded and displayed element of parsing, so as to according to adjustable property parameters dynamic load display elements, and nothing
Display control file need to be updated, the control loaded to display elements more flexibly, conveniently, substantially increases display elements
Loading efficiency.
Fig. 7 is the structural representation according to the display control unit of another embodiment of the present invention.In the present embodiment, such as
Shown in Fig. 7, the display control unit includes acquisition module 100, parsing module 200, load-on module 300, receiving module 400 and tested
Demonstrate,prove module 500.
Specifically, receiving module 400 is used to receive display loading instruction, wherein, display loading instruction includes at least one
It is individual to be configured to adjusting parameter corresponding to the property parameters of regulated variable, and the result parsed is updated according to adjusting parameter.In this hair
In bright one embodiment, display loading instruction can be the clicking operation of user, the response message etc. of control.Wherein, it is different
The corresponding different adjusting parameter of display loading instruction, i.e., can be true according to display loading instruction when receiving display loading instruction
Fixed corresponding adjusting parameter.Become big after being clicked such as a certain control, then the adjusting parameter that clicking operation includes is for adjusting this
The length value and width value of control size;Such as when cursor placement is when on a certain control, the control changes color, then cursor responds
The adjusting parameter that message includes is the color value for adjusting the control color.
Authentication module 500 is used to carry out validation verification to adjusting parameter.In one embodiment of the invention, this is effective
Property checking may include verify adjusting parameter whether there is;May also include checking adjusting parameter whether default parameter area it
It is interior, above two can also be verified simultaneously.
Load-on module 300 is additionally operable to load the result of parsing according to preset parameter value when verifying that adjusting parameter is invalid.I.e.
Display elements are not adjusted.
The display control unit of the embodiment of the present invention, the property parameters of display elements can be carried out according to display loading instruction
Adjustment, and adjusting parameter is verified, while ensure that the display effect of adjustment, make display control method more various
Change, prompted to adjust the regulated efficiency of display effect.
Fig. 8 is the structural representation according to the display control unit of a specific embodiment of the invention.In the present embodiment,
As shown in figure 8, the display control unit, which includes acquisition module 100, parsing module 200, load-on module 300, first, obtains submodule
Block 210, the first determination sub-module 220, the second determination sub-module 230, the second acquisition submodule 240 and the 3rd determination sub-module
250.Wherein, parsing module 200 further comprises that the first acquisition submodule 210, the first determination sub-module 220, second determine son
Module 230, the second acquisition submodule 240 and the 3rd determination sub-module 250.
In this example it is shown that the adjustable parameter for controlling display elements in file is variable expression, wherein, the variable
Expression formula includes at least one variable, can be the expression formula that is made up of one or more variables, or one or more variables
With the expression formula of one or more constants composition.Specifically, as shown in Fig. 2 the property value of " src " attribute of node " image "
For variable expression resPath+ " 1F_1.png ", wherein, resPath is the variable for pointing to picture store path, " 1F_
1.png " is picture name.Thus, when the store path of picture is modified, without changing display control file, only need to change
ResPath value, you can realize the normal load of display control file.
Specifically, the first acquisition submodule 210 is used to obtain the variable expression in display control file.
First determination sub-module 220 is used for the value for determining at least one variable in variable expression.
Second determination sub-module 230 is used to determine that argument table reaches according to the value and variable operation rule of at least one variable
Parameter value corresponding to formula.For example, can be by the store path assignment after change if having changed display picture store path
To resPath, so as to obtain the currently stored path of display picture, and the picture name " 1F_ in variable expression
1.png " can obtain picture in currently stored path.
In one embodiment of the invention, the adjustable parameter of display elements is function pointer in display control file, its
In, the function pointer has function parameter, and different function parameters can be function pointer and point to different objects.Wherein, function
The object that pointer points to can be CSS (Cascading Style Sheet, Cascading Style Sheet), control, plug-in unit, interface typesetting, mould
The display control file of plate etc..Specifically, as shown in Fig. 2 " kd-call " attribute of node " id " is a closure, i.e., one section
Function function (1, n)::CreateLoadingUI(n);, this section of function can point to not according to different function parameter n
Same object.Thus, function parameter n can be changed as needed, and the function pointer is pointed to different objects, when to interface text
When part is parsed and loaded, can current interface continue loading function pointer pointed by CSS, control, plug-in unit or to work as
Front interface carries out typesetting again, renewal interface template etc..
Second acquisition submodule 240 is used to obtain the function pointer in display control file.
The function pointer that 3rd determination sub-module 250 is used in pointer function determines the object that function pointer points to,
And object is parsed to obtain the parameter value of pointer function.In one embodiment of the invention, can be according to function pointer
Element array is generated, for the object after storing and resolving.Element array be with JSON document analysis storage format identical arrays,
Data after the analysis of object pointed to available for storage function pointer.For example, for control configuration file, it can be solved
Analysis, to obtain the value of each attribute of control, and analysis result is preserved into element array.And then it can be generated by interface
The corresponding relation of node and display elements in tree, element array is called, the object after parsing is added to corresponding node.
It should be appreciated that in an embodiment of the present invention, the parsing module 200 of display control unit can only include first and obtain
Submodule 210, the first determination sub-module 220 and the second determination sub-module 230, or only include the second acquisition submodule 240 and the
Three determination sub-modules 250, it can also include the first acquisition submodule 210 simultaneously, the first determination sub-module 220, second determines submodule
Block 230, the second acquisition submodule 240 and the 3rd determination sub-module 250.I.e. in display control file, can concurrently or separately it wrap
Include the display elements with variable expression and the display elements with function pointer.
The display control unit of the embodiment of the present invention, it can lead to obtaining parameter value corresponding to variable expression or pointer function
The parameter value of display elements is determined, thus, can be by being assigned in loading procedure is parsed to the variable expression of display elements
Parameter value corresponding to the object that value or pointer function point to, the dynamic load of display elements is realized, without changing display control text
Part, more flexibly, conveniently, further increase the loading efficiency of display elements.
In order to realize above-described embodiment, the present invention also proposes a kind of client.
The client of the embodiment of the present invention includes:Shell, display, circuit board and processor, wherein, the circuit board peace
The interior volume surrounded in the shell is put, the display is connected in the housing exterior, and with the circuit board, described
Processor is arranged on the circuit board;
The processor is used for processing data, and specifically for performing following steps:
S101, display control file is obtained, wherein, display control file includes the property parameters of display elements, and
At least one property parameters are configured as regulated variable in display control file.
In a preferred embodiment of the invention, display control file can be JSON (JavaScript Object
Notation, JavaScript object notation) file, wherein, JSON for it is a kind of based on JavaScript (one kind based on object and
Event driven client-side scripting language) data interchange format.In JSON files, it may include multiple display elements and its category
Property parameter, wherein, at least one property parameters are configured as regulated variable, and JSON files may also include for parsing display control
The JavaScript code of file, such as JavaScript eval () method, to be parsed to JSON files, and to parsing after
Result loaded.
Specifically, as shown in Fig. 2 multiple display elements are the control of display, each display elements are deposited in the form of array
In JSON files, wherein, the attribute of control includes control size, color, position, content of text or picture material etc..
In embodiments of the invention, at least one property parameters of the display elements in display control file, i.e. the property value of control is
Adjustable, to cause in display control file resolving, the parameter value by obtaining property parameters changes control property, and
Other controls need not be adjusted, improve interface loading efficiency.
S102, display control file is parsed, be configured to preset corresponding to the property parameters of regulated variable to obtain
Parameter value.
In one embodiment of the invention, display control file can be carried out by JavaScript eval () methods
Parsing.It is not the display elements of regulated variable for property parameters in display control file, its property parameters value can be controlled from display
Directly obtained in file processed;, can be according to the object that regulated variable is pointed to (such as the display elements that property parameters are regulated variable
Numerical value, array, display control file etc.) obtain in advance as the preset parameter value of regulated variable setting.And then according to display control
Display elements and its property parameters generation interface spanning tree in file, wherein, node and display control in the spanning tree of interface
Display elements in file correspond.
S103, according to the result loaded and displayed element of parsing, generate corresponding display.
Specifically, can be loaded according to the parameter value of the property parameters of each display elements, for example, in corresponding position
Each display elements are loaded according to the parameter value of the property parameters such as size, color, word content, picture material, it is corresponding to generate
Display interface.
The client at the interface of the embodiment of the present invention, at least one property parameters comprising display elements can be configured as
The display control file of regulated variable is parsed, and parameter preset corresponding to the property parameters of regulated variable is configured to obtain
Value, and according to the result loaded and displayed element of parsing, so as to according to adjustable property parameters dynamic load display elements, and nothing
Display control file need to be updated, the control loaded to display elements more flexibly, conveniently, substantially increases display elements
Loading efficiency.
In one embodiment of the invention, display loading can be received after display control file is parsed to refer to
Order, wherein, display loading instruction includes at least one being configured to adjusting parameter corresponding to the property parameters of regulated variable, and root
According to the result of adjusting parameter renewal parsing.
In another embodiment of the present invention, after display loading instruction is received, can also have to adjusting parameter
The checking of effect property.The validation verification may include to verify that adjusting parameter whether there is;Checking adjusting parameter be may also include whether pre-
If parameter area within, also can to above two simultaneously verify., can be according to default ginseng when adjusting parameter checking is invalid
The result of numerical value loading parsing, i.e., be not adjusted to display elements.
In one embodiment of the invention, the adjustable parameter of display elements is variable expression in display control file,
Wherein, the variable expression can be the expression formula that is made up of one or more variables, or one or more variables and one or
The expression formula of multiple constant compositions.Specifically, as shown in Fig. 2 the parameter value of " src " property parameters of node " image " is change
Measure expression formula resPath+ " 1F_1.png " result of calculation, wherein, resPath be point to picture store path variable, " 1F_
1.png " is picture name.Thus, when the store path of picture is modified, without changing display control file, only need to change
ResPath value, you can the parameter value of " src " property parameters of node " image " is obtained, to realize display control file
Normal load.Now, processor can obtain the variable expression in display control file, determine at least one in variable expression
The value of individual variable, and value according at least one variable and variable operation rule determine variable expression corresponding to parameter
Value.For example, if having changed display picture store path, the store path after change can be assigned to resPath, from
And the currently stored path of display picture can be obtained, and the picture name " 1F_1.png " in variable expression can be current
Picture is obtained in store path.
In another embodiment of the present invention, the adjustable parameter of display elements is function pointer in display control file,
Wherein, the function pointer has function parameter, and different function parameters can be function pointer and point to different objects.Wherein, letter
Number pointers point to object can be CSS (Cascading Style Sheet, Cascading Style Sheet), control, plug-in unit, interface typesetting,
The display control file of template etc..Specifically, as shown in Fig. 2 " kd-call " attribute of node " id " is a closure, i.e., one
Section function function (1, n)::CreateLoadingUI(n);, this section of function can point to according to different function parameter n
Different objects.Thus, function parameter n can be changed as needed, and the function pointer is pointed to different objects, when to interface
, can be in the CSS pointed by current interface continuation loading function pointer, control, plug-in unit or right when file is parsed and loaded
Current interface carries out typesetting again, renewal interface template etc..Now, the function that processor can be obtained in display control file refers to
Pin, and the function pointer in pointer function determines the object that function pointer points to, and object is parsed and referred to obtaining
The parameter value of pin function.In one embodiment of the invention, element array can be generated according to function pointer, for storing and resolving
Object afterwards.Element array be with JSON document analysis storage format identical arrays, available for storage function pointer point to
Data after analysis of object.For example, for control configuration file, it can be parsed, to obtain each attribute of control
Value, and analysis result is preserved into element array.And then can be corresponding with display elements by the node in the spanning tree of interface
Relation, element array is called, the object after parsing is added to corresponding node.
It should be appreciated that in other embodiments of the invention, there is the multiple aobvious of adjustable parameter in display control file
Show element may be either variable expression, or function pointer, i.e., in display control file, can include having variable simultaneously
The display elements of expression formula and the display elements with function pointer.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned
In embodiment, software that multiple steps or method can be performed in memory and by suitable instruction execution system with storage
Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware
Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal
Discrete logic, have suitable combinational logic gate circuit application specific integrated circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description
Point is contained at least one embodiment or example of the present invention.In this manual, to the schematic representation of above-mentioned term not
Necessarily refer to identical embodiment or example.Moreover, specific features, structure, material or the feature of description can be any
One or more embodiments or example in combine in an appropriate manner.
Although an embodiment of the present invention has been shown and described, it will be understood by those skilled in the art that:Not
In the case of departing from the principle and objective of the present invention a variety of change, modification, replacement and modification can be carried out to these embodiments, this
The scope of invention is limited by claim and its equivalent.
Claims (30)
1. a kind of display control method, it is characterised in that comprise the following steps:
Display control file is obtained, the property parameters of display elements are included in the display control file, and in the display
At least one property parameters are configured as regulated variable in control file;
The display control file is parsed, to be configured to preset ginseng corresponding to the property parameters of regulated variable described in acquisition
Numerical value, wherein, for property parameters in the display control file be regulated variable display elements, its property parameters value from
Directly obtained in the display control file, for the display elements that property parameters are regulated variable, according to the regulated variable
The object acquisition of sensing is in advance the preset parameter value of regulated variable setting, according to the display elements in the display control file
And its property parameters generation interface spanning tree, wherein, the display in node and display control file in the interface spanning tree
Element corresponds;
Receive display loading instruction, wherein, it is described display loading instruction include it is at least one described in be configured to regulated variable
Adjusting parameter corresponding to property parameters, and according to the result of the adjusting parameter renewal parsing;
The display elements are loaded according to the result of the parsing, generate corresponding display.
2. the method as described in claim 1, it is characterised in that after the reception display loading instruction, in addition to:
Validation verification is carried out to the adjusting parameter.
3. method as claimed in claim 2, it is characterised in that the validation verification includes whether verifying the adjusting parameter
In the presence of.
4. method as claimed in claim 2, it is characterised in that the validation verification includes whether verifying the adjusting parameter
Within default parameter area.
5. method as claimed in claim 2, it is characterised in that also include:
If verifying, the adjusting parameter is invalid, and the result of the parsing is loaded according to the preset parameter value.
6. the method as described in claim 1, it is characterised in that the property parameters for being configured to regulated variable reach for argument table
Formula, wherein, the variable expression includes at least one variable and/or variable operation rule.
7. method as claimed in claim 6, it is characterised in that described to carry out parsing specific bag to the display control file
Include:
Obtain the variable expression in the display control file;
Determine the value of at least one variable described in the variable expression;And
The parameter according to corresponding to the value of at least one variable and the variable operation rule determine the variable expression
Value.
8. the method as described in claim 1, it is characterised in that the property parameters for being configured to regulated variable refer to for function
Pin, wherein, the function pointer has function parameter.
9. method as claimed in claim 8, it is characterised in that it is described the display control file parse specifically also wrap
Include:
Obtain the function pointer in the display control file;
Function pointer in pointer function determines the object that the function pointer points to, and the object is parsed with
Obtain the parameter value of the pointer function.
10. method as claimed in claim 8, it is characterised in that the object that the function pointer points to is control configuration file,
One or more in plug-in card configuration file, template profile.
11. the method as described in claim any one of 1-10, it is characterised in that the display control file is JSON files;
The display control file is parsed by script JavaScript, and loads the display elements.
A kind of 12. display control unit, it is characterised in that including:
Acquisition module, for obtaining display control file, the property parameters of display elements are included in the display control file,
And at least one property parameters are configured as regulated variable in the display control file;
Parsing module, for being parsed to the display control file, to be configured to the attribute of regulated variable ginseng described in acquisition
Preset parameter value corresponding to number, wherein, it is not the display elements of regulated variable for property parameters in the display control file,
Its property parameters value directly obtains from the display control file, for the display elements that property parameters are regulated variable, root
The object acquisition pointed to according to the regulated variable is in advance the preset parameter value of regulated variable setting, according to display control text
Display elements and its property parameters generation interface spanning tree in part, wherein, the node in the interface spanning tree is controlled with display
Display elements in file processed correspond;
Receiving module, loading instruction is shown for receiving, wherein, the display loading instruction includes at least one configuration
For adjusting parameter corresponding to the property parameters of regulated variable, and update according to the adjusting parameter result of the parsing;And
Load-on module, for loading the display elements according to the result of the parsing, generate corresponding display.
13. device as claimed in claim 12, it is characterised in that also include:
Authentication module, for carrying out validation verification to the adjusting parameter.
14. device as claimed in claim 13, it is characterised in that the validation verification includes verifying that the adjusting parameter is
No presence.
15. device as claimed in claim 13, it is characterised in that the validation verification includes verifying that the adjusting parameter is
It is no within default parameter area.
16. device as claimed in claim 12, it is characterised in that
The load-on module is additionally operable to load the parsing according to the preset parameter value when verifying that the adjusting parameter is invalid
Result.
17. device as claimed in claim 12, it is characterised in that the property parameters for being configured to regulated variable are argument table
Up to formula, wherein, the variable expression includes at least one variable and/or variable operation rule.
18. device as claimed in claim 17, it is characterised in that the parsing module further comprises:
First acquisition submodule, for obtaining the variable expression in the display control file;
First determination sub-module, for determining the value of at least one variable described in the variable expression;And
Second determination sub-module, the change is determined for the value according at least one variable and the variable operation rule
Measure parameter value corresponding to expression formula.
19. device as claimed in claim 12, it is characterised in that the property parameters for being configured to regulated variable refer to for function
Pin, wherein, the function pointer has function parameter.
20. device as claimed in claim 19, it is characterised in that the parsing module further comprises:
Second acquisition submodule, for obtaining the function pointer in the display control file;
3rd determination sub-module, the object of the function pointer sensing is determined for the function pointer in pointer function, and
The object is parsed to obtain the parameter value of the pointer function.
21. device as claimed in claim 19, it is characterised in that the object that the function pointer points to is control configuration text
One or more in part, plug-in card configuration file, template profile.
22. the device as described in claim any one of 12-21, it is characterised in that
The display control file is JSON files;
The parsing module is parsed by script JavaScript to the display control file;
The load-on module loads the display elements by the script JavaScript.
A kind of 23. client, it is characterised in that including:Shell, display, circuit board and processor, wherein, the circuit board
The interior volume that the shell surrounds is placed in, the display is connected in the housing exterior, and with the circuit board, institute
Processor is stated to be arranged on the circuit board;
The processor is used for processing data, and specifically for performing following steps:
Display control file is obtained, the property parameters of display elements are included in the display control file, and in the display
At least one property parameters are configured as regulated variable in control file;
The display control file is parsed, to be configured to preset ginseng corresponding to the property parameters of regulated variable described in acquisition
Numerical value, wherein, for property parameters in the display control file be regulated variable display elements, its property parameters value from
Directly obtained in the display control file, for the display elements that property parameters are regulated variable, according to the regulated variable
The object acquisition of sensing is in advance the preset parameter value of regulated variable setting, according to the display elements in the display control file
And its property parameters generation interface spanning tree, wherein, the display in node and display control file in the interface spanning tree
Element corresponds;
Receive display loading instruction, wherein, it is described display loading instruction include it is at least one described in be configured to regulated variable
Adjusting parameter corresponding to property parameters, and according to the result of the adjusting parameter renewal parsing;
The display elements are loaded according to the result of the parsing, generate corresponding display.
24. client as claimed in claim 23, it is characterised in that the processor is additionally operable to:
Validation verification is carried out to the adjusting parameter, wherein, the validation verification includes whether verifying the adjusting parameter
In the presence of and/or the checking adjusting parameter whether within default parameter area;
If verifying, the adjusting parameter is invalid, and the result of the parsing is loaded according to the preset parameter value.
25. client as claimed in claim 23, it is characterised in that the property parameters for being configured to regulated variable are variable
Expression formula, wherein, the variable expression includes at least one variable and/or variable operation rule.
26. client as claimed in claim 25, it is characterised in that the processor is specifically used for:
Obtain the variable expression in the display control file;
Determine the value of at least one variable described in the variable expression;And
The parameter according to corresponding to the value of at least one variable and the variable operation rule determine the variable expression
Value.
27. client as claimed in claim 23, it is characterised in that the property parameters for being configured to regulated variable are function
Pointer, wherein, the function pointer has function parameter.
28. client as claimed in claim 27, it is characterised in that the processor is specifically used for:
Obtain the function pointer in the display control file;
Function pointer in the pointer function determines the object that the function pointer points to, and the object is solved
Analyse to obtain the parameter value of the pointer function.
29. client as claimed in claim 27, it is characterised in that the object that the function pointer points to is control configuration text
One or more in part, plug-in card configuration file, template profile.
30. the client as described in claim any one of 23-29, it is characterised in that
The display control file is JSON files;
The processor is parsed by script JavaScript to the display control file, and loads the display
Element.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410052081.XA CN103823676B (en) | 2014-02-14 | 2014-02-14 | display control method, device and client |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410052081.XA CN103823676B (en) | 2014-02-14 | 2014-02-14 | display control method, device and client |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103823676A CN103823676A (en) | 2014-05-28 |
CN103823676B true CN103823676B (en) | 2018-01-30 |
Family
ID=50758762
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410052081.XA Active CN103823676B (en) | 2014-02-14 | 2014-02-14 | display control method, device and client |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103823676B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105760148A (en) * | 2014-12-17 | 2016-07-13 | 北京北方微电子基地设备工艺研究中心有限责任公司 | Interface control attribute configuration method and device |
CN106325846B (en) * | 2015-07-01 | 2021-04-30 | 北京京东尚科信息技术有限公司 | Method and device for adding functional module of application program |
CN105488128A (en) * | 2015-11-24 | 2016-04-13 | 北京中电普华信息技术有限公司 | Tree structure display method and system |
CN105354067B (en) * | 2015-12-02 | 2019-05-17 | Oppo广东移动通信有限公司 | A kind of interface configuration method and device |
CN106502702A (en) * | 2016-11-04 | 2017-03-15 | 重庆兆洲科技发展有限公司 | A kind of interface display method, system and industrial instruments |
CN108132780B (en) * | 2017-12-13 | 2021-05-07 | 苏州长风航空电子有限公司 | Aviation display control method based on custom script |
CN111367597A (en) * | 2018-12-26 | 2020-07-03 | 杭州海康威视系统技术有限公司 | Color switching method and device and electronic equipment |
CN112015497B (en) * | 2019-05-13 | 2022-04-29 | 华为技术有限公司 | Skin changing method and device |
CN110162305A (en) * | 2019-05-31 | 2019-08-23 | 广州华多网络科技有限公司 | A kind of method and client at configuration activities interface |
CN111192336B (en) * | 2019-12-20 | 2023-04-28 | 福建天泉教育科技有限公司 | Method and terminal for restoring linear gradual change of background title shadows in PPTX |
CN114253644B (en) * | 2021-11-25 | 2024-06-07 | 沈阳鼓风机集团自动控制系统工程有限公司 | Method and device for outputting attribute parameters of lower computer equipment |
CN115328539B (en) * | 2022-08-05 | 2023-06-02 | 广州斯必得电子科技有限公司 | File control method and system capable of being controlled in programmable manner |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1417561A4 (en) * | 2001-08-16 | 2008-01-23 | Nokia Corp | Skins for mobile communication devices |
CN101266544A (en) * | 2008-03-12 | 2008-09-17 | 浪潮集团山东通用软件有限公司 | Agile setting human-machine interactive interface accomplishing method |
CN101477461A (en) * | 2009-02-10 | 2009-07-08 | 腾讯科技(深圳)有限公司 | Dynamic generation apparatus and method for application program interface |
CN101582860A (en) * | 2009-06-16 | 2009-11-18 | 中兴通讯股份有限公司 | Method for replacing user interface skins of different communication equipment |
CN101714095A (en) * | 2009-12-18 | 2010-05-26 | 康佳集团股份有限公司 | Method, terminal and server for replacing skin of embedded user interface system |
CN101751252A (en) * | 2008-11-28 | 2010-06-23 | 方正国际软件(北京)有限公司 | Interface generating device and interface generating method for dynamically changing skins |
EP2224332A1 (en) * | 2009-02-27 | 2010-09-01 | Research In Motion Limited | Communications system providing changeable mobile wireless communications device application skins based upon bidding and related methods |
CN103164210A (en) * | 2011-12-13 | 2013-06-19 | 北京千橡网景科技发展有限公司 | Method and device of changing surface of application program interface |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10351351B4 (en) * | 2003-11-04 | 2007-03-22 | Siemens Ag | Method and system for the dynamic generation of user interfaces |
-
2014
- 2014-02-14 CN CN201410052081.XA patent/CN103823676B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1417561A4 (en) * | 2001-08-16 | 2008-01-23 | Nokia Corp | Skins for mobile communication devices |
CN101266544A (en) * | 2008-03-12 | 2008-09-17 | 浪潮集团山东通用软件有限公司 | Agile setting human-machine interactive interface accomplishing method |
CN101751252A (en) * | 2008-11-28 | 2010-06-23 | 方正国际软件(北京)有限公司 | Interface generating device and interface generating method for dynamically changing skins |
CN101477461A (en) * | 2009-02-10 | 2009-07-08 | 腾讯科技(深圳)有限公司 | Dynamic generation apparatus and method for application program interface |
EP2224332A1 (en) * | 2009-02-27 | 2010-09-01 | Research In Motion Limited | Communications system providing changeable mobile wireless communications device application skins based upon bidding and related methods |
CN101582860A (en) * | 2009-06-16 | 2009-11-18 | 中兴通讯股份有限公司 | Method for replacing user interface skins of different communication equipment |
CN101714095A (en) * | 2009-12-18 | 2010-05-26 | 康佳集团股份有限公司 | Method, terminal and server for replacing skin of embedded user interface system |
CN103164210A (en) * | 2011-12-13 | 2013-06-19 | 北京千橡网景科技发展有限公司 | Method and device of changing surface of application program interface |
Also Published As
Publication number | Publication date |
---|---|
CN103823676A (en) | 2014-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103823676B (en) | display control method, device and client | |
US9218269B2 (en) | Testing multiple target platforms | |
EP3026565B1 (en) | Automated testing of web-based applications | |
US10284705B2 (en) | Method and apparatus for controlling smart device, and computer storage medium | |
CN102760139A (en) | Webpage processing method and webpage processing system | |
US9959200B2 (en) | User interface for composing test scenarios | |
US20120066590A1 (en) | Systems and Methods for Enhanced Font Management | |
CN108388515A (en) | Test data generating method, device, equipment and computer readable storage medium | |
US20200272558A1 (en) | Automated layout testing for mobile device applications | |
CN107704393B (en) | Data test method, apparatus and electronic equipment | |
CN111200545B (en) | Intelligent device access method and device | |
CN105630524B (en) | Web page text analytic method, device and mobile terminal | |
US20150020045A1 (en) | Method, device and computer-readable storage medium for closure testing | |
US20170346702A1 (en) | Computer implemented method for displaying a user interface | |
CN109408092A (en) | Method and device, storage medium and the electronic equipment of front end version publication | |
WO2016122508A1 (en) | Test generation for browser-based user interface | |
JP2007264810A (en) | Load test program | |
US20160283225A1 (en) | Increasing accuracy of traceability links and structured data | |
EP2592507A2 (en) | Method and apparatus for the display of multiple errors on a human-machine interface | |
CN110413279B (en) | Data loading method and device | |
CN111324845A (en) | Method and system for constructing dial plate object | |
US9111014B1 (en) | Rule builder for data processing | |
CN107085578B (en) | Webpage editing method and device | |
CN113971251A (en) | Webpage output method, system and computer readable storage medium | |
CN113254008B (en) | Data processing method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20181211 Address after: 519030 Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province Patentee after: Zhuhai Seal Interest Technology Co., Ltd. Address before: 519070, six level 601F, 10 main building, science and technology road, Tangjia Bay Town, Zhuhai, Guangdong. Patentee before: Zhuhai Juntian Electronic Technology Co.,Ltd. |
|
TR01 | Transfer of patent right |