CN112256346A - Control display method and device and electronic equipment - Google Patents

Control display method and device and electronic equipment Download PDF

Info

Publication number
CN112256346A
CN112256346A CN202011097562.4A CN202011097562A CN112256346A CN 112256346 A CN112256346 A CN 112256346A CN 202011097562 A CN202011097562 A CN 202011097562A CN 112256346 A CN112256346 A CN 112256346A
Authority
CN
China
Prior art keywords
instance object
target
cache
control
target instance
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.)
Pending
Application number
CN202011097562.4A
Other languages
Chinese (zh)
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.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network 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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202011097562.4A priority Critical patent/CN112256346A/en
Publication of CN112256346A publication Critical patent/CN112256346A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the disclosure discloses a control display method and device and electronic equipment. One embodiment of the method comprises: determining a target instance object for drawing the preset control from the cache, wherein the target instance object comprises the attribute and the attribute value of the preset control; setting the attribute value of the target attribute contained in the target instance object as a target attribute value; responding to the condition that the drawing of the preset control is met, and drawing the preset control based on the target instance object after the target attribute value is set; displaying the drawn predetermined control. The implementation mode realizes the change of the target attribute of the preset control by utilizing the caching mechanism of the system to the instance object.

Description

Control display method and device and electronic equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a control display method and device and electronic equipment.
Background
A terminal device of a user can install various applications (apps). The pages exposed by these APPs may contain one or more controls.
In practice, a control may have one or more properties, depending on the needs of the APP. Therefore, the control with the corresponding style can be drawn.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides a control display method, a control display device and electronic equipment, which change the target attribute of a preset control by utilizing a cache mechanism of a system for an instance object.
In a first aspect, an embodiment of the present disclosure provides a control display method, where the method includes: determining a target instance object for drawing the preset control from the cache, wherein the target instance object comprises the attribute and the attribute value of the preset control; setting the attribute value of the target attribute contained in the target instance object as a target attribute value; responding to the condition that the drawing of the preset control is met, and drawing the preset control based on the target instance object after the target attribute value is set; displaying the drawn predetermined control.
In a second aspect, an embodiment of the present disclosure provides a control display apparatus, including: the first determining unit is used for determining a target instance object used for drawing the preset control from the cache, wherein the target instance object contains the attribute and the attribute value of the preset control; a setting unit, configured to set an attribute value of a target attribute included in the target instance object as a target attribute value; the drawing unit is used for responding to the condition that the drawing of the preset control is met and drawing the preset control based on the target instance object after the target attribute value is set; and the display unit is used for displaying the drawn preset control.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the control display method according to the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the control display method according to the first aspect.
According to the control display method and device and the electronic equipment, the target instance object used for drawing the preset control can be determined from the cache. In practice, the target instance object contains the properties and property values of the predetermined control. Further, the attribute value of the target attribute contained in the target instance object is set as the target attribute value. And further, in response to the preset control drawing condition being met, drawing the preset control based on the target instance object after the target attribute value is set. Finally, the drawn predetermined control is displayed. Therefore, the target attribute of the preset control is changed by utilizing the caching mechanism of the system to the instance object. Therefore, the target attribute of the preset control can be changed without being influenced by the system version. Therefore, the application range of changing the target property of the preset control is widened.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram of some embodiments of a control display method according to the present disclosure;
FIG. 2 is a schematic diagram of one application scenario of a control display method according to the present disclosure;
FIG. 3 is a flow diagram of still further embodiments of a control display method according to the present disclosure;
FIG. 4 is a schematic structural diagram of some embodiments of a control display apparatus according to the present disclosure;
FIG. 5 is an exemplary system architecture to which the control display methods of some embodiments of the present disclosure may be applied;
fig. 6 is a schematic diagram of a basic structure of an electronic device provided in accordance with some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to fig. 1, a flow diagram of some embodiments of a control display method according to the present disclosure is shown. As shown in fig. 1, the control display method includes the following steps:
step 101, determining a target instance object for drawing a preset control from a cache.
In this embodiment, an execution subject of the control display method (for example, the terminal devices 501 and 502 shown in fig. 5) may determine a target instance object for drawing a predetermined control from the cache.
It will be appreciated that the target instance object may be an instance object for drawing a predetermined control. In practice, the target instance object may be stored in a cache.
The target instance object comprises the attribute and the attribute value of the preset control. Therefore, the preset control can be drawn through the target instance object.
In some scenarios, the execution subject may determine, from the cache, an instance object whose attribute and attribute value are consistent with those of the predetermined control, as the target instance object.
Step 102, setting the attribute value of the target attribute contained in the target instance object as the target attribute value.
In this embodiment, the execution agent may set an attribute value of a target attribute included in the target instance object as a target attribute value.
The target property may be a property of the predetermined control, the property value of which needs to be reset. Accordingly, the target attribute value may be an attribute value at which the target attribute is reset.
In some scenarios, the target attribute value may be an attribute value that is randomly generated by the execution subject as described above. Further, the execution agent may set an attribute value of a target attribute contained in the target instance object as a target attribute value.
And 103, responding to the preset control drawing condition, and drawing the preset control based on the target instance object after the target attribute value is set.
In this embodiment, the execution subject may detect whether a drawing condition of a predetermined control is satisfied through a built-in detection program.
It will be appreciated that the rendering condition may be a condition for rendering a predetermined control.
In some scenarios, the rendering conditions may include: the time length of setting the attribute value of the target attribute to be the target attribute value is larger than or equal to the preset time length. That is, if the duration in which the attribute value of the target attribute is set as the target attribute value is greater than or equal to the preset duration, the execution subject may determine that the drawing condition of the predetermined control is satisfied.
In this embodiment, in response to that the drawing condition of the predetermined control is satisfied, the execution subject may draw the predetermined control based on the target instance object after the target attribute value is set.
In some scenarios, the execution subject may analyze the target instance object after the target attribute value is set through a built-in rendering program, so as to render a predetermined control.
And 104, displaying the drawn preset control.
In this embodiment, the execution body may display the drawn predetermined control.
At present, in order to change a certain attribute of a control, in the related art, a reflection mechanism of a system is utilized to determine an attribute value of an attribute of the control, and change the attribute value of the attribute of the control. And further, drawing and displaying the control through the changed attribute value. Thereby, the property of the control is changed. In practice, different versions of the system have different API (Application Programming Interface) for implementing the reflection mechanism. Therefore, the properties of the control are changed through the reflection mechanism of the system, and the system cannot adapt to multiple versions of the system. Thus, the application range of the property of the change control is limited.
In this embodiment, a cache mechanism of the instance object by the system is utilized, and a target instance object for drawing the predetermined control is stored in the cache. Specifically, first, a target instance object for drawing a predetermined control is determined from a cache. Further, the attribute value of the target attribute contained in the target instance object is set as the target attribute value. And further, in response to the preset control drawing condition being met, drawing the preset control based on the target instance object after the target attribute value is set. And finally, changing the target attribute of the preset control by displaying the drawn preset control. Since the caching mechanism of the system on the instance object is not influenced by the system version, the change of the target property of the preset control can be realized in a plurality of versions of the system. Therefore, the application range of changing the target attribute of the preset control is widened.
In some embodiments, the drawing conditions may include: and detecting a triggering operation of drawing a preset control.
Therefore, if the trigger operation of drawing the preset control is detected, the execution body can draw the preset control based on the target instance object after the target attribute value is set.
In some scenarios, the predetermined control may be an icon. Accordingly, the trigger operation of drawing the predetermined control may be a single click, a double click, a slide, or the like operation performed on the icon by the user.
In some scenarios, the predetermined control may be an input box control. Accordingly, the trigger operation of drawing the predetermined control can be a single click, a double click, a sliding operation and the like performed by the user on the input box control.
In some embodiments, the predetermined control is an input box control. In practice, the input box control may contain a cursor therein.
Accordingly, the target attribute includes: the color and/or size of the input box control; or the color and/or size of the cursor in the input box control. In some scenarios, resetting the color and/or size of the input box control in the target instance object may be accomplished by setting the property values of the target properties contained in the target instance object to the target property values. Further, based on the target instance object after the target attribute value is set, a predetermined control is drawn, and the change of the color and the size of the input box control can be realized.
In other scenarios, resetting the color and/or size of the cursor contained in the input box control in the target instance object may be accomplished by setting the property value of the target property contained in the target instance object to the target property value. Further, based on the target instance object after the target attribute value is set, a predetermined control is drawn, and the change of the color and/or size of the cursor contained in the input box control can be realized.
It should be noted that the target attribute may also include other attributes besides color and size according to actual requirements, and is not listed here. In some embodiments, the target attribute values are obtained from a server (e.g., server 504 shown in FIG. 5).
Therefore, the preset control is drawn based on the target instance object after the target attribute value is set, and the target attribute of the preset control can be changed through the target attribute value acquired from the server.
Referring to fig. 2, an application scenario of a control display method according to an embodiment of the present disclosure is shown. As shown in fig. 2, the terminal device 202 may determine a target instance object 203 for drawing the predetermined control 201 from the cache. In practice, the properties and property values of the predefined control 201 are contained in the target instance object 203. Further, the terminal device 202 may set an attribute value 205 of the target attribute 204 contained in the target instance object 203 to a target attribute value 206. It will be understood that the target instance object 203 includes target attributes 204 and attribute values 205 therein. Still further, in response to meeting the drawing condition 207 of the predetermined control 201, the terminal device 202 may draw the predetermined control 201 based on the target instance object 203 after setting the target property value 206. Finally, the terminal device 202 may display the drawn predetermined control 201. Thus, by displaying the predefined control 201, a change to the target property 204 of the predefined control 201 can be achieved.
Continuing to refer to FIG. 3, a flow of still further embodiments of a control display method according to the present disclosure is shown. As shown in fig. 3, the control display method includes the following steps:
step 301, determine whether there is a target instance object in the cache.
In this embodiment, an execution subject of the control display method (for example, terminal devices 501 and 502 shown in fig. 5) may determine whether a target instance object exists in the cache. In some scenarios, for each instance object stored in the cache, the execution body may determine whether the instance object is a target instance object for drawing a predetermined control. Thus, it is determined whether a target instance object for drawing a predetermined control exists in the cache.
The instance object stored in the cache has identification information of the corresponding predetermined control.
Step 302, in response to that the target instance object does not exist in the cache, creating the target instance object in the cache based on the description file of the predetermined control.
In this embodiment, in response to that the target instance object does not exist in the cache, the execution subject may create the target instance object in the cache based on the description file of the predetermined control.
The description file may be a code file for describing a predetermined control. In practice, the description file contains the attributes and attribute values of the predetermined control.
Referring to the foregoing analysis, the target instance object may also contain the properties and property values of the predetermined control. In practice, the properties and property values of the predetermined control are described in different forms in the target instance object and the above description file. In other words, the description file represents the description mode of the predetermined control in the code. The target instance object is embodied by the description mode of the preset control in the cache.
In some scenarios, the execution body may compile the description file, thereby creating a target instance object for drawing a predetermined control in a cache.
Step 303, determining a target instance object for drawing the predetermined control from the cache.
Step 304, setting the attribute value of the target attribute contained in the target instance object as the target attribute value.
And 305, in response to the preset control drawing condition being met, drawing the preset control based on the target instance object after the target attribute value is set.
Step 306, displaying the drawn preset control.
Step 303, step 304, step 305, and step 306 may be performed in a similar manner as step 101, step 102, step 103, and step 104 in the embodiment shown in fig. 1, and the above description for step 101, step 102, step 103, and step 104 also applies to step 303, step 304, step 305, and step 306, and is not repeated here.
In some scenarios, the system may delete data stored in the cache in order to prevent the data from being too large. That is, the target instance object stored in the cache may be deleted by the system. It is understood that if the target instance object stored in the cache is deleted by the system, the predetermined control may not be drawn.
In this embodiment, before the predetermined control is drawn, it is determined whether a target instance object for drawing the predetermined control exists in the cache. Further, in response to the target instance object for drawing the predetermined control not existing in the cache, the target instance object is created in the cache based on the description file of the predetermined control. Therefore, if the target instance object stored in the cache is deleted by the system, the target instance object is recreated in the cache. Thus, the drawing of the predetermined control can be smoothly realized.
In some embodiments, the index information generated based on the file name of the description file and the instance object created based on the description file are stored in a cache in an associated manner. In practice, the instance object created based on the description file can be determined from the cache through the index information.
In some scenarios, the index information may be a file name of the description file.
At this time, the execution main body may execute the above step 301 through steps S1 and S2 as shown below.
Step S1, it is determined whether there is an instance object stored in association with the index information in the cache.
Step S2, in response to the existence of the instance object stored in association with the index information in the cache, determines that the target instance object exists in the cache.
Therefore, whether a target instance object used for drawing the preset control exists in the cache or not is determined by inquiring whether the instance object stored in association with the index information exists in the cache or not. Further, if an instance object stored in association with the index information exists in the cache, it may be determined that a target instance object for drawing a predetermined control exists in the cache.
In some embodiments, the executing agent may execute step 303 as follows.
Specifically, the instance object stored in association with the above index information is determined as a target instance object.
As can be seen, in the cache, the instance object stored in association with the index information is a target instance object for drawing the input box control.
In some embodiments, the step 301 may further include a step S3 as shown below.
Step S3, in response to the absence of an instance object stored in association with the index information in the cache, determines that a target instance object does not exist in the cache.
Therefore, if the instance object stored in association with the index information does not exist in the cache, it can be determined that the target instance object for drawing the predetermined control does not exist in the cache.
In some embodiments, the index information is generated by encoding a file name of the description file.
In practice, the index information generated by the encoding includes at least one of: number, letter.
Therefore, index information is generated by encoding the file name of the description file of the preset control, and the index information and the target instance object used for drawing the preset control are stored in the cache in an associated mode.
In some embodiments, the description file is determined based on a layout file of a predetermined control, wherein the description file is referenced in the layout file.
The layout file may be a code file for laying out attributes of a predetermined control.
In some scenarios, the reference of the description file by the layout file is implemented by setting a storage path of the description file in the layout file. Therefore, the description file of the preset control can be determined through the storage path set in the layout file.
In some embodiments, the executing body may execute the step 301 as follows.
Specifically, whether the target instance object exists in the cache or not is determined in response to an opening operation of a page or an interface for showing a predetermined control.
The opening operation may be an operation of opening a page or an interface for presenting a predetermined control by a user.
Therefore, if the user opens a page or an interface for showing the predetermined control, the execution main body can be triggered to further determine whether a target instance object for drawing the predetermined control exists in the cache.
In some embodiments, the description file uses extensible markup language (XML). Thus, the properties of the predetermined control are described by XML.
In some scenarios, a target instance object for drawing a predetermined control is created by compiling a description file in XML format.
With further reference to fig. 4, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides some embodiments of a control display apparatus, where the apparatus embodiments correspond to the method embodiments shown in fig. 1, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 4, the control display device of the present embodiment includes: a first determination unit 401, a setting unit 402, a drawing unit 403, and a display unit 404. The first determination unit 401 is configured to: and determining a target instance object for drawing the preset control from the cache, wherein the target instance object contains the attribute and the attribute value of the preset control. The setting unit 402 is configured to: and setting the attribute value of the target attribute contained in the target instance object as the target attribute value. The rendering unit 403 is configured to: and responding to the condition that the drawing condition of the preset control is met, and drawing the preset control based on the target instance object after the target attribute value is set. The display unit 404 is configured to: displaying the drawn predetermined control.
In this embodiment, specific processing of the first determining unit 401, the setting unit 402, the drawing unit 403, and the display unit 404 of the control display apparatus and technical effects thereof may refer to related descriptions of step 101, step 102, step 103, and step 104 in the corresponding embodiment of fig. 1, which are not described herein again.
In some embodiments, the control display apparatus may further include a second determination unit (not shown in fig. 4) and a creation unit (not shown in fig. 4). The second determination unit is configured to: it is determined whether a target instance object exists in the cache. The creation unit is configured to: and in response to the target instance object not existing in the cache, creating the target instance object in the cache based on a description file of the predetermined control, wherein the description file contains the attribute and the attribute value of the predetermined control.
In some embodiments, the index information generated based on the file name of the description file and the instance object created based on the description file are stored in a cache in an associated manner. The second determination unit is further configured to: determining whether an instance object stored in association with the index information exists in a cache; and determining that the target instance object exists in the cache in response to the instance object stored in association with the index information existing in the cache.
In some embodiments, the first determination unit is further configured to: and determining the instance object stored in association with the index information as a target instance object.
In some embodiments, the second determination unit is further configured to: and determining that the target instance object does not exist in the cache in response to the fact that the instance object stored in association with the index information does not exist in the cache.
In some embodiments, the index information is generated by encoding a file name of the description file.
In some embodiments, the description file is determined based on a layout file of a predetermined control, wherein the description file is referenced in the layout file.
In some embodiments, the second determining unit is further configured to: and responding to the opening operation of the page or the interface for showing the preset control, and determining whether the target instance object exists in the cache.
In some embodiments, the description file is in extensible markup language.
In some embodiments, the rendering conditions include: and detecting a triggering operation of drawing a preset control.
In some embodiments, the predetermined control is an input box control. The target attributes include: the color and/or size of the input box control; or the color and/or size of a cursor contained in the input box control. In some embodiments, the target attribute value is obtained from a server. Therefore, the target property of the preset control can be changed through the target property value provided by the server.
With further reference to fig. 5, fig. 5 illustrates an exemplary system architecture in which the control display methods of some embodiments of the present disclosure may be applied.
As shown in fig. 5, the system architecture may include terminal devices 501, 502, a network 503, and a server 504. The network 503 is the medium used to provide communication links between the terminal devices 501, 502 and the server 504. Network 503 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 501, 502 may interact with a server 504 via a network 503. Various client applications may be installed on the terminal devices 501, 502. For example, the terminal devices 501, 502 may have a shopping-type application, a search-type application, a social-type application, etc. installed thereon.
In some scenarios, the terminal device 501, 502 may determine a target instance object from a cache for drawing a predetermined control. In practice, the target instance object contains the properties and property values of the predetermined control. Further, the terminal devices 501, 502 may set the attribute value of the target attribute contained in the target instance object to the target attribute value. Still further, in response to meeting the drawing condition of the predetermined control, the terminal device 501, 502 may draw the predetermined control based on the target instance object after the target attribute value is set. Finally, the terminal device 501, 502 may display the drawn predetermined control.
The terminal devices 501 and 502 may be hardware or software. When the terminal devices 501 and 502 are hardware, they may be various electronic devices having a display screen and supporting information interaction, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal devices 501 and 502 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules, or as a single piece of software or software module. And is not particularly limited herein.
The server 504 may be a server that provides various services. In some scenarios, the server 504 may issue target attribute values to the terminal devices 501, 502. Thus, the terminal devices 501 and 502 can set the attribute value of the target attribute of the predetermined control as the target attribute value issued by the server in the target instance object. Therefore, the terminal devices 501 and 502 can change the target attribute of the predetermined control according to the target attribute value sent by the server 504 by drawing the predetermined control based on the target instance object after the target attribute value is set.
The server 504 may be hardware or software. When the server 504 is hardware, it can be implemented as a distributed server cluster composed of a plurality of servers, or as a single server. When the server 504 is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
In some scenarios, the terminal device 501, 502 may obtain the target attribute value locally. At this point, the system architecture shown in FIG. 5 may not include server 504.
It should be noted that the control display method provided by the embodiment of the present disclosure may be executed by the terminal devices 501 and 502, and accordingly, the control display apparatus may be disposed in the terminal devices 501 and 502.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to fig. 6, shown is a schematic diagram of an electronic device (e.g., the terminal device of fig. 5) suitable for use in implementing some embodiments of the present disclosure. The terminal device in some 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-mounted terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 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. The electronic device shown in fig. 6 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. 6, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 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. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing 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 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, 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 described in some embodiments of the present disclosure may 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 some embodiments of the 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 some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also 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.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be included in the electronic device or may exist separately without being incorporated in the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determining a target instance object for drawing the preset control from the cache, wherein the target instance object comprises the attribute and the attribute value of the preset control; setting the attribute value of the target attribute contained in the target instance object as a target attribute value; responding to the condition that the drawing of the preset control is met, and drawing the preset control based on the target instance object after the target attribute value is set; displaying the drawn predetermined control.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including but not limited to 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 which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. Where the names of the cells do not in some cases constitute a limitation on the cell itself, for example, a display cell may also be described as a cell of "displaying a drawn predetermined control".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure in the embodiments of the present disclosure is not limited to the particular combination of the above-described features, but also encompasses other embodiments in which any combination of the above-described features or their equivalents is possible without departing from the scope of the present disclosure. For example, the above features may be interchanged with other features disclosed in this disclosure (but not limited to) those having similar functions.

Claims (15)

1. A control display method is characterized by comprising the following steps:
determining a target instance object for drawing a preset control from a cache, wherein the target instance object comprises the attribute and the attribute value of the preset control;
setting an attribute value of a target attribute contained in the target instance object as a target attribute value;
in response to the preset control drawing condition being met, drawing the preset control based on the target instance object after the target attribute value is set;
displaying the drawn predetermined control.
2. The method of claim 1, wherein prior to said determining from the cache a target instance object for drawing a predetermined control, the method further comprises:
determining whether the target instance object exists in the cache;
and in response to the target instance object not existing in the cache, creating the target instance object in the cache based on a description file of the predetermined control, wherein the description file contains the attribute and the attribute value of the predetermined control.
3. The method according to claim 2, wherein index information generated based on the file name of the description file and the instance object created based on the description file are stored in the cache in an associated manner; and
the determining whether the target instance object exists in the cache comprises:
determining whether an instance object stored in association with the index information exists in the cache;
and determining that the target instance object exists in the cache in response to the instance object stored in association with the index information existing in the cache.
4. The method of claim 3, wherein determining the target instance object from the cache for drawing the predetermined control comprises:
and determining the instance object stored in association with the index information as the target instance object.
5. The method of claim 3, wherein the determining whether the target instance object exists in the cache further comprises:
in response to the cache not having an instance object stored in association with the index information, determining that the target instance object is not present in the cache.
6. The method of claim 2, wherein the index information is generated by encoding a file name of the description file.
7. The method of claim 2, wherein the description file is determined based on a layout file of the predetermined control, wherein the description file is referenced in the layout file.
8. The method of claim 2, wherein the determining whether the target instance object exists in the cache comprises:
and responding to the opening operation of a page or an interface for showing the preset control, and determining whether the target instance object exists in the cache.
9. The method of claim 2, wherein the description file is in extensible markup language.
10. The method according to any one of claims 1 to 9, wherein the drawing conditions include: and detecting a trigger operation of drawing the preset control.
11. The method according to any one of claims 1-9, wherein the predetermined control is an input box control;
the target attributes include:
a color and/or size of the input box control; or
A color and/or size of a cursor in the input box control.
12. The method of any of claims 1-9, wherein the target property value is obtained from a server.
13. A control display apparatus, comprising:
the device comprises a first determining unit, a second determining unit and a control unit, wherein the first determining unit is used for determining a target instance object used for drawing a preset control from a cache, and the target instance object comprises the attribute and the attribute value of the preset control;
a setting unit, configured to set an attribute value of a target attribute included in the target instance object as a target attribute value;
the drawing unit is used for responding to the condition that the drawing of the preset control is met, and drawing the preset control based on the target instance object after the target attribute value is set;
and the display unit is used for displaying the drawn preset control.
14. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-12.
15. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-12.
CN202011097562.4A 2020-10-14 2020-10-14 Control display method and device and electronic equipment Pending CN112256346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011097562.4A CN112256346A (en) 2020-10-14 2020-10-14 Control display method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011097562.4A CN112256346A (en) 2020-10-14 2020-10-14 Control display method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112256346A true CN112256346A (en) 2021-01-22

Family

ID=74242158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011097562.4A Pending CN112256346A (en) 2020-10-14 2020-10-14 Control display method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112256346A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334728A (en) * 2008-07-28 2008-12-31 北京航空航天大学 Interface creating method and platform based on XML document description
CN101364236A (en) * 2008-09-18 2009-02-11 中兴通讯股份有限公司 Data processing apparatus and processing method of WEB page
CN101876917A (en) * 2010-07-02 2010-11-03 深圳市迅雷网络技术有限公司 Control development method and device
CN103440127A (en) * 2013-08-19 2013-12-11 中国电子科技集团公司第十五研究所 Software graphical interface drawing method and system
CN108427590A (en) * 2018-02-09 2018-08-21 福建星网锐捷通讯股份有限公司 A kind of implementation method of UI Dynamic Distributions
CN108829885A (en) * 2018-06-27 2018-11-16 珠海市君天电子科技有限公司 Page generation method, device, server, electronic equipment and storage medium
CN109242936A (en) * 2018-08-29 2019-01-18 广州优视网络科技有限公司 Draw method, apparatus, storage medium and the electronic equipment of object content data
CN109634598A (en) * 2018-12-14 2019-04-16 北京字节跳动网络技术有限公司 A kind of page display method, device, equipment and storage medium
CN111124412A (en) * 2020-01-02 2020-05-08 腾讯科技(深圳)有限公司 Game page drawing method, device, equipment and storage medium
CN111596991A (en) * 2020-04-28 2020-08-28 北京字节跳动网络技术有限公司 Interactive operation execution method and device and electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334728A (en) * 2008-07-28 2008-12-31 北京航空航天大学 Interface creating method and platform based on XML document description
CN101364236A (en) * 2008-09-18 2009-02-11 中兴通讯股份有限公司 Data processing apparatus and processing method of WEB page
CN101876917A (en) * 2010-07-02 2010-11-03 深圳市迅雷网络技术有限公司 Control development method and device
CN103440127A (en) * 2013-08-19 2013-12-11 中国电子科技集团公司第十五研究所 Software graphical interface drawing method and system
CN108427590A (en) * 2018-02-09 2018-08-21 福建星网锐捷通讯股份有限公司 A kind of implementation method of UI Dynamic Distributions
CN108829885A (en) * 2018-06-27 2018-11-16 珠海市君天电子科技有限公司 Page generation method, device, server, electronic equipment and storage medium
CN109242936A (en) * 2018-08-29 2019-01-18 广州优视网络科技有限公司 Draw method, apparatus, storage medium and the electronic equipment of object content data
CN109634598A (en) * 2018-12-14 2019-04-16 北京字节跳动网络技术有限公司 A kind of page display method, device, equipment and storage medium
CN111124412A (en) * 2020-01-02 2020-05-08 腾讯科技(深圳)有限公司 Game page drawing method, device, equipment and storage medium
CN111596991A (en) * 2020-04-28 2020-08-28 北京字节跳动网络技术有限公司 Interactive operation execution method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN111163324B (en) Information processing method and device and electronic equipment
CN111596991A (en) Interactive operation execution method and device and electronic equipment
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN111459364A (en) Icon updating method and device and electronic equipment
CN111273830A (en) Data display method and device, electronic equipment and computer readable medium
CN111782329A (en) Node dragging method, device, equipment and computer readable medium
CN109697034B (en) Data writing method and device, electronic equipment and storage medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN113032172A (en) Abnormity detection method and device and electronic equipment
CN111259291B (en) View display method and device and electronic equipment
CN110069186B (en) Method and equipment for displaying operation interface of application
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN111273884A (en) Image display method and device and electronic equipment
CN110717126A (en) Page browsing method and device, electronic equipment and computer readable storage medium
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN111274513B (en) Window display method, device, terminal and storage medium
CN112256346A (en) Control display method and device and electronic equipment
CN114089891A (en) Display control method and device and electronic equipment
CN112380819A (en) Document editing method and device and electronic equipment
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN112905090A (en) Spreadsheet processing method, device, terminal and storage medium
CN112835671A (en) Application page scene switching method, device and equipment
CN112333462A (en) Live broadcast room page jumping method, returning device and electronic equipment
CN112306317A (en) Unread message notification method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination