CN110841285B - Interface element display method and device, computer equipment and storage medium - Google Patents

Interface element display method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110841285B
CN110841285B CN201911100448.XA CN201911100448A CN110841285B CN 110841285 B CN110841285 B CN 110841285B CN 201911100448 A CN201911100448 A CN 201911100448A CN 110841285 B CN110841285 B CN 110841285B
Authority
CN
China
Prior art keywords
interface element
display
interface
file
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911100448.XA
Other languages
Chinese (zh)
Other versions
CN110841285A (en
Inventor
梁超
刘智洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911100448.XA priority Critical patent/CN110841285B/en
Publication of CN110841285A publication Critical patent/CN110841285A/en
Application granted granted Critical
Publication of CN110841285B publication Critical patent/CN110841285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/837Shooting of targets
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
    • A63F2300/308Details of the user interface
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8076Shooting

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a display method and device of interface elements, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps of acquiring at least one resource identifier corresponding to at least one interface element in a target interface when a display instruction of the target interface is received, inquiring a code file of the target interface based on the at least one resource identifier, when the code file is determined to be missed through query, querying an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier, and in a target interface, and displaying each interface element, wherein in the display process of the interface elements, the configuration information corresponding to the resource identifier can be read from the configuration file based on the resource identifier without format conversion of the configuration file, so that the reading speed of the configuration information is increased, and the loading and display efficiency of the interface elements can be improved.

Description

Interface element display method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for displaying an interface element, a computer device, and a storage medium.
Background
With the development of computer technology and the diversification of terminal functions, more and more network games are beginning to face users. The game interface often includes a large number of visual resources, such as button icons, status display icons, and the like, and when the game interface is loaded, it is necessary to obtain performance information of each resource, including position coordinates, transparency, and the like of each resource, from the resource configuration table, and display each resource in the game interface based on the obtained performance information.
In the display mode of the interface elements, the performance information of each interface element is stored in the resource configuration table, when the interface elements are loaded and displayed, the resource configuration table needs to be analyzed into files in other formats to read the performance information of the interface elements, and the time consumption for reading and analyzing the resource configuration table is long, so that the loading and displaying speed of the interface elements is slow, and therefore how to optimize the resource configuration mode to improve the loading and displaying efficiency of the interface elements is an important research direction at present.
Disclosure of Invention
The embodiment of the application provides a display method and device of an interface element, computer equipment and a storage medium, and can solve the problems of low loading and display efficiency of the interface element in the related technology. The technical scheme is as follows:
in one aspect, a method for displaying an interface element is provided, and the method includes:
when a display instruction of a target interface is received, acquiring at least one resource identifier corresponding to at least one interface element in the target interface;
querying a code file of the target interface based on the at least one resource identifier;
when the code file is determined to be missed through query, querying an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier;
and displaying the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
In one aspect, there is provided a display device for an interface element, the device including:
the identification acquisition module is used for acquiring at least one resource identification corresponding to at least one interface element in a target interface when a display instruction of the target interface is received;
the query module is used for querying the code file of the target interface based on the at least one resource identifier;
the information acquisition module is used for inquiring the application configuration file based on the at least one resource identifier when the code file is determined to be missed through inquiry, and obtaining the configuration information corresponding to the at least one resource identifier;
and the display module is used for displaying the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
In one possible implementation, the display module is further configured to:
and when the triggering condition of the interface element is met, adjusting the transparency of the interface element to the minimum value.
In one possible implementation, the configuration information includes: at least one of the position coordinates of the interface element, the display type of the interface element, the displacement reference point, the transparency and the rotation angle.
In one possible implementation, the configuration file is of a target file type.
In one aspect, a computer device is provided that includes one or more processors and one or more memories having at least one program code stored therein, the at least one program code being loaded and executed by the one or more processors to implement operations performed by a display method of the interface element.
In one aspect, a computer-readable storage medium having at least one program code stored therein is loaded and executed by a processor to implement operations performed by a display method of the interface element.
According to the technical scheme provided by the embodiment of the application, when a display instruction of a target interface is received, at least one resource identifier corresponding to at least one interface element in the target interface is obtained, a code file of the target interface is inquired based on the at least one resource identifier, when the code file is determined to be not hit through inquiry, an application configuration file is inquired based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier, the at least one interface element is displayed in the target interface based on the configuration information corresponding to the at least one resource identifier, the configuration information of resources can be respectively obtained from the code file and the configuration file in the display process of the interface element, the configuration information corresponding to the resource identifier can be read from the configuration file based on the resource identifier without carrying out format conversion on the configuration file, the reading speed of the configuration information is improved, and the loading and displaying efficiency of the interface elements can be further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment of a display method of an interface element according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for displaying an interface element according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a configuration file provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a specific form of a target interface provided by an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a display manner of an interface element according to an embodiment of the present disclosure;
FIG. 6 is a flow chart of interface element creation and display provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of a configuration page provided by an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a display device of an interface element according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the following will describe embodiments of the present application in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in this application are used for distinguishing between similar items and items that have substantially the same function or similar functionality, and it should be understood that "first," "second," and "nth" do not have any logical or temporal dependency or limitation on the number or order of execution.
In order to facilitate understanding of the technical processes of the embodiments of the present application, some terms referred to in the embodiments of the present application are explained below:
virtual scene: is a virtual scene that is displayed (or provided) by an application program when the application program runs on a terminal. The virtual scene may be a simulation environment of a real world, a semi-simulation semi-fictional virtual environment, or a pure fictional virtual environment. The virtual scene may be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, and a three-dimensional virtual scene, which is not limited in this application. For example, a virtual scene may include sky, land, ocean, etc., the land may include environmental elements such as deserts, cities, etc., and a user may control a virtual object to move in the virtual scene.
Intra-office UI (User Interface): that is, the local user interface, for example, a game application, may display a virtual scene, a function button, and other visual elements corresponding to a game in the user interface of the game.
Fig. 1 is a schematic diagram of an implementation environment of a display method of an interface element provided in an embodiment of the present application, and referring to fig. 1, the implementation environment includes: computer device 101, computer device 102, and server 103.
The computer device 101 may be a development-side device, configured to develop an application program and package and distribute resources required for running the application program, the computer device 102 may be a user-side device, the application program is installed in the computer device 102, and when the application program is run, the computer device 102 may obtain and load at least one resource package of the application program and display each interface element in an interface. The computer device 101 may be a laptop computer, a desktop computer, or the like, and the computer device 102 may be a smart phone, a tablet computer, an MP4(Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a desktop computer, or the like, which is not limited in this embodiment of the present invention.
The server 103 may include at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center, and the server 103 is configured to provide a background service for the application. Computer devices 101 and 102 may be connected to server 103 via a wired network or a wireless network to ensure that data may be transferred between the respective computer devices and server 103. For example, after a technician uses the computer device 101 to develop an application or update an application, the resource package of the application may be distributed to the server 103 through the network, and the computer device 102 may access the server 103 through the network, obtain the distributed resource package from the server 103, and load each resource in the resource package.
Those skilled in the art will appreciate that the number of computer devices described above may be greater or fewer. For example, the number of the computer devices may be only one, or several tens or hundreds, or more. The number and the type of the computer devices are not limited in the embodiments of the present application.
Fig. 2 is a flowchart of a method for displaying an interface element according to an embodiment of the present application, and referring to fig. 2, the method may specifically include the following steps:
201. when the computer equipment receives a display instruction of a target interface, at least one resource identifier corresponding to at least one interface element in the target interface is obtained.
The computer device may be a computer device used by any user, a target application may be installed and run on the computer device, and the target application may be a Game application, for example, a shooting Game (STG), a Multiplayer Online Battle sports Game (MOBA), a Multiplayer gunfight survival Game, and the like.
In a possible implementation manner, the display instruction of the target interface may be triggered by operations such as starting of the target application program, switching pages, and the like. Taking the target interface as a game scene interface as an example, when a user requests to start a game, a display instruction of the target interface may be triggered, in a possible implementation manner, the display instruction of the target interface may carry an interface identifier of the target interface, the computer device may query and analyze resource data corresponding to the target interface based on the interface identifier, the resource data may be a code file of the target interface, and the like, the computer device may determine at least one interface element associated with the target interface based on the queried resource data, and obtain resource identifiers corresponding to the interface elements, where one interface identifier may be used to uniquely indicate one interface and one resource identifier may be used to uniquely indicate one interface element.
202. The computer device queries a code file of the target interface based on the at least one resource identification.
The code file of the target page may be a code file locally stored in the computer device, or may also be a code file stored in a server, which is not specifically limited in this embodiment of the present application, and the server may provide a background service for the running of the target application program.
In a possible implementation manner, the computer device may traverse the code file of the target interface based on the at least one resource identifier, obtain at least one section of program code including the at least one resource identifier, when any section of program code includes configuration information, the computer device may determine that an interface element corresponding to any section of program code hits in the code file, obtain the configuration information included in any section of program code as the configuration information of the interface element, when any section of program code does not include the configuration information, determine that an interface element corresponding to any section of program code misses in the code file, and the computer device continues to perform step 203.
203. When the code file is determined to be missed through query, the computer equipment queries an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier.
In a possible implementation manner, the configuration file may be a JSON (JavaScript Object Notation) format file, the configuration information of each interface element may be stored by applying the lightweight JSON format file, flexible configuration of the interface element may be achieved, and the configuration mode of the JSON format file is simple and easy to be read by a computer device. In one possible implementation, the configuration information may include: at least one of the position coordinates of the interface element, the display type of the interface element, the displacement reference point, the transparency, and the rotation angle, of course, the configuration information may further include information such as the size of the interface element, which is not specifically limited in this embodiment of the application. Referring to fig. 3, fig. 3 is a schematic diagram of a configuration file provided in an embodiment of the present application, the configuration file may include a plurality of sets of configuration information, one set of configuration information may be used to indicate a display state of an interface element, taking a set of configuration information 301 as an example, the set of configuration information 301 may be used to indicate a display state of "second fire button", including a display size of the "second fire button", such as "Scale", "defaultscreen", "MaxScale", "MinScale", and the like, a display position of the second fire button in the target interface, such as "xPos", "yPos", "zPos", and the like, and a transparency, a rotation angle, a displacement reference point "Anchor" and the like of the second fire button, wherein the displacement reference point "Anchor" is used to indicate which point in the reference interface element is to be shifted, for example, a displacement of the second fire button is set as "right reference point", namely, the bottom and the right side, the position coordinates are set to (-100, -110), the position of the second firing button is deviated from the bottom and the right side of the target interface, and the X-axis coordinate and the Y-axis coordinate are both 1.
The configuration file is applied to configure the display state of each interface element, the configuration information of each interface element is stored in the same configuration file, the display state of each interface element can be managed and modified conveniently, and when the display state of each interface element is modified, a developer can only modify the configuration file without modifying the code file of the target interface.
Before loading the configuration file, the computer device needs to determine whether the content of the configuration file is updated, that is, whether the configuration file locally stored in the computer device is the same as the version of the configuration file stored in the server. In a possible implementation manner, the computer device may compare the information digest value of the resource package of the application with the information digest value of the target resource package in the server, and if the two information digest values are different, the computer device may obtain a resource update list, and if the resource update list includes the file identifier of the configuration file, obtain the configuration file in the target resource package, and if the resource update list does not include the file identifier of the configuration file, the configuration file does not need to be updated. Specifically, the computer device may send a request to the server, obtain an information Digest value configuration file of the target resource package in the server, that is, an MD5(Message Digest Algorithm MD 5) code configuration file, compare the MD5 code configuration file in the server with an MD5 code configuration file stored locally, count a file list of inconsistent MD5 codes one by one for each MD5 code of each file, that is, obtain a resource update list, and download and update files included in the list from the server based on the resource update list.
204. The computer device displays the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
The computer device may display the at least one interface element based on the code file of the target interface and the configuration information acquired from the configuration file, see fig. 4, where fig. 4 is a schematic diagram of a specific form of a target interface provided in an embodiment of the present application, and a plurality of interface elements 402 may be displayed in the target interface 401.
In the embodiment of the application, some interface elements are displayed on the target interface only when the trigger condition is reached, and the interface elements are in a hidden state when the trigger condition is not reached. In a possible implementation manner, the computer device may determine a display type of any interface element based on the configuration information of the interface element, set the interface element in a hidden state when the display type of any resource is a triggered display, and display the interface element based on the configuration information when the display type of any resource is a resident display, for example, when the configuration information of any interface element includes a target statement, the display type of the interface element is a triggered display, and when the target statement is not included, the display type of any interface element is a resident display, where the target statement may be set by a developer, and in a possible implementation manner, the target statement may be set to "CanHideBtn: true ", when the configuration information of the interface element contains" CanHideBtn: and when true', the display type of the interface element is trigger display.
In a possible implementation manner, for an interface element whose display type is trigger display, the display state of the interface element may be adjusted by adjusting transparency, specifically, when any interface element is trigger display, the computer device may adjust the transparency of the interface element to a maximum value, that is, when the target interface is loaded, the interface element is displayed in a transparent state, and when a trigger condition of the interface element is met, the computer device may adjust the transparency of the interface element to a minimum value, where the trigger condition may be set by a developer, which is not specifically limited in this embodiment of the present application. Referring to fig. 5, fig. 5 is a schematic view of a display manner of an interface element provided in an embodiment of the present application, for example, an interface element 501 shown in (a) in fig. 5 is in a normal display state, and when a trigger condition of the interface element 501 is not met, as shown in (b) in fig. 5, the interface element 501 is in a hidden state.
In the display process of the interface element, the interface element is hidden by modifying the transparency, when the interface element needs to be displayed under the triggering condition, the transparency of the interface element can be modified again, and by applying the display mode of the interface element, when the display state of the interface element is changed, the interface of an application program does not need to be refreshed, so that the performance consumption of the computer equipment can be effectively reduced.
According to the technical scheme provided by the embodiment of the application, when a display instruction of a target interface is received, at least one resource identifier corresponding to at least one interface element in the target interface is obtained, a code file of the target interface is inquired based on the at least one resource identifier, when the code file is determined to be not hit through inquiry, an application configuration file is inquired based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier, the at least one interface element is displayed in the target interface based on the configuration information corresponding to the at least one resource identifier, the configuration information of resources can be respectively obtained from the code file and the configuration file in the display process of the interface element, the configuration information corresponding to the resource identifier can be read from the configuration file based on the resource identifier without carrying out format conversion on the configuration file, the reading speed of the configuration information is improved, and the loading and displaying efficiency of the interface elements can be further improved.
In the embodiment of the present application, each element in the target interface, whether it is a page function button, a user operation button, or an information display element, needs to individually correspond to a resource file, for example, a still picture file, a dynamic picture file, etc., when being created, each element needs to support individual setting of its display position, size, etc., after the display content in the target interface is divided into a plurality of independent interface elements, configuration information may be added to each interface element in the configuration file, an interface is reserved in the code file of the target page, and when the target interface is displayed, the configuration information of each interface element may be read through the interface. Fig. 6 is a flowchart of interface element creation and display provided in an embodiment of the present application, and referring to fig. 6, in a possible implementation manner, after a new interface element is created, that is, after a visual resource corresponding to the interface element is created, a developer may determine, based on a display state modification requirement of the interface element, whether configuration information of the interface element is stored in a configuration file, specifically, when the display state of the interface element does not need to be modified, the configuration information of the interface element may be stored in a code file of the target interface, when the display state modification requirement of the interface element is higher, the configuration information of the interface element may be stored in the configuration file, and when the code file of the target page is generated, the configuration information of the interface element is not added. Referring to fig. 7, fig. 7 is a schematic diagram of a configuration page provided in an embodiment of the present application, a configuration page 701 of a Unity development engine may include multiple configuration items, each configuration item may be used to set a display state of an interface element, when configuration information of the interface element needs to be stored in a configuration file, each configuration item does not need to be modified, that is, content corresponding to each configuration item is in a zeroing state, only configuration information of the interface element needs to be edited in the configuration file, and when a certain interface element does not need to modify the display state, each configuration item may be directly set. When the interface element is set, the computer device needs to reload the configuration information of the interface element, when the interface element is loaded, the computer device can firstly judge whether the interface element is resident for display, if so, the interface element can be displayed, and if not, the interface element is displayed when the display logic of the interface element is reached.
In the interface element configuration process, the configuration information of each interface element can be stored respectively based on the display state modification requirement of the interface element, the interface elements without the need of modifying the display state are directly configured on the configuration page of the resource file, the configuration file does not need to be read when the interface elements are displayed, and the configuration information is independently added in the configuration file for the interface elements with the need of modifying the display state, so that the display state of each interface element can be modified conveniently. In game application programs, because the updating requirement of visual elements in the local UI (User Interface) is large, when the configuration mode is applied to modify the visual elements in the Interface, the modification of bottom codes in a large range can be avoided, and the resource iteration efficiency is improved.
Fig. 8 is a schematic structural diagram of a display device of an interface element according to an embodiment of the present application, and referring to fig. 8, the display device includes:
an identifier obtaining module 801, configured to obtain, when a display instruction of a target interface is received, at least one resource identifier corresponding to at least one interface element in the target interface;
a query module 802, configured to query a code file of the target interface based on the at least one resource identifier;
an information obtaining module 803, configured to, when it is determined through querying that the code file is not hit, query an application configuration file based on the at least one resource identifier, and obtain configuration information corresponding to the at least one resource identifier;
a display module 804, configured to display the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
In one possible implementation, the query module 802 is configured to:
traversing the code file of the target interface based on the at least one resource identifier;
and acquiring at least one section of program code containing the at least one resource identifier, and determining that the interface element corresponding to any section of program code misses the code file when any section of program code does not contain configuration information.
In one possible implementation, the apparatus further includes:
the comparison module is used for comparing the information abstract value of the applied resource packet with the information abstract value of the target resource packet in the server;
the list acquisition module is used for acquiring a resource updating list if the two information abstract values are different;
and the configuration file acquisition module is used for acquiring the configuration file in the target resource package if the resource update list comprises the file identifier of the configuration file.
In one possible implementation, the display module 804 is configured to:
determining the display type of any resource based on the configuration information of any resource;
when the display type of any interface element is trigger display, setting the interface element into a hidden state;
and when the display type of any interface element is resident display, displaying the interface element based on the configuration information.
In one possible implementation, the display module 804 is configured to:
and when any interface element is in trigger display, adjusting the transparency of the interface element to the maximum value.
In one possible implementation, the display module 804 is further configured to:
and when the triggering condition of the interface element is met, adjusting the transparency of the interface element to the minimum value.
In one possible implementation, the configuration information includes: at least one of the position coordinates of the interface element, the display type of the interface element, the displacement reference point, the transparency and the rotation angle.
In one possible implementation, the configuration file is of a target file type.
The device provided by the embodiment of the application, when receiving a display instruction of a target interface, obtains at least one resource identifier corresponding to at least one interface element in the target interface, queries a code file of the target interface based on the at least one resource identifier, queries an application configuration file based on the at least one resource identifier when determining that the code file is not hit through querying, obtains configuration information corresponding to the at least one resource identifier, displays the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier, and applies the display device of the interface element, so that the configuration information of the resource can be obtained from the code file and the configuration file respectively, and the configuration information corresponding to the resource identifier can be read from the configuration file based on the resource identifier without performing format conversion on the configuration file, the reading speed of the configuration information is improved, and the loading and displaying efficiency of the interface elements can be further improved.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
It should be noted that: in the display device of the interface element provided in the above embodiment, when the interface element is displayed, only the division of each function module is illustrated, and in practical applications, the function distribution may be completed by different function modules according to needs, that is, the internal structure of the device is divided into different function modules, so as to complete all or part of the functions described above. In addition, the display apparatus of the interface element and the display method of the interface element provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The computer device provided by the above technical solution can be implemented as a terminal, for example, fig. 9 is a schematic structural diagram of a terminal provided in the embodiment of the present application. The terminal 900 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 900 may also be referred to by other names such as user equipment, portable terminals, laptop terminals, desktop terminals, and the like.
In general, terminal 900 includes: one or more processors 901 and one or more memories 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 901 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 901 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 902 is used for storing at least one program code for execution by the processor 901 to implement the display method of the interface element provided by the method embodiments in the present application.
In some embodiments, terminal 900 can also optionally include: a peripheral interface 903 and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, a positioning assembly 908, and a power supply 909.
The peripheral interface 903 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902 and the peripheral interface 903 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 904 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 904 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 904 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 904 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 904 may also include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to capture touch signals on or over the surface of the display screen 905. The touch signal may be input to the processor 901 as a control signal for processing. At this point, the display 905 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 905 may be one, providing the front panel of the terminal 900; in other embodiments, the number of the display panels 905 may be at least two, and each of the display panels is disposed on a different surface of the terminal 900 or is in a foldable design; in some embodiments, the display 905 may be a flexible display disposed on a curved surface or a folded surface of the terminal 900. Even more, the display screen 905 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display panel 905 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 906 is used to capture images or video. Optionally, camera assembly 906 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 906 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuit 907 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 901 for processing, or inputting the electric signals to the radio frequency circuit 904 for realizing voice communication. For stereo sound acquisition or noise reduction purposes, the microphones may be multiple and disposed at different locations of the terminal 900. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 901 or the radio frequency circuit 904 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuit 907 may also include a headphone jack.
The positioning component 908 is used to locate the current geographic Location of the terminal 900 for navigation or LBS (Location Based Service). The Positioning component 908 may be a Positioning component based on the GPS (Global Positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 909 is used to provide power to the various components in terminal 900. The power source 909 may be alternating current, direct current, disposable or rechargeable. When power source 909 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 900 can also include one or more sensors 910. The one or more sensors 910 include, but are not limited to: acceleration sensor 911, gyro sensor 912, pressure sensor 913, fingerprint sensor 914, optical sensor 915, and proximity sensor 916.
The acceleration sensor 911 can detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 900. For example, the acceleration sensor 911 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 911. The acceleration sensor 911 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 912 may detect a body direction and a rotation angle of the terminal 900, and the gyro sensor 912 may cooperate with the acceleration sensor 911 to acquire a 3D motion of the user on the terminal 900. The processor 901 can implement the following functions according to the data collected by the gyro sensor 912: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 913 may be disposed on a side bezel of the terminal 900 and/or underneath the display 905. When the pressure sensor 913 is disposed on the side frame of the terminal 900, the user's holding signal of the terminal 900 may be detected, and the processor 901 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 913. When the pressure sensor 913 is disposed at a lower layer of the display screen 905, the processor 901 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 905. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 914 is used for collecting a fingerprint of the user, and the processor 901 identifies the user according to the fingerprint collected by the fingerprint sensor 914, or the fingerprint sensor 914 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, processor 901 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 914 may be disposed on the front, back, or side of the terminal 900. When a physical key or vendor Logo is provided on the terminal 900, the fingerprint sensor 914 may be integrated with the physical key or vendor Logo.
The optical sensor 915 is used to collect ambient light intensity. In one embodiment, the processor 901 may control the display brightness of the display screen 905 based on the ambient light intensity collected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is reduced. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 915.
Proximity sensor 916, also known as a distance sensor, is typically disposed on the front panel of terminal 900. The proximity sensor 916 is used to collect the distance between the user and the front face of the terminal 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front face of the terminal 900 gradually decreases, the processor 901 controls the display 905 to switch from the bright screen state to the dark screen state; when the proximity sensor 916 detects that the distance between the user and the front surface of the terminal 900 gradually becomes larger, the display 905 is controlled by the processor 901 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 9 does not constitute a limitation of terminal 900, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
Fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 1000 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 1001 and one or more memories 1002, where the one or more memories 1002 store at least one program code, and the at least one program code is loaded and executed by the one or more processors 1001 to implement the methods provided by the foregoing method embodiments. Of course, the server 1000 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 1000 may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a computer readable storage medium, such as a memory including at least one program code executable by a processor to perform the method of displaying an interface element in the above embodiments. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps of implementing the above embodiments may be implemented by hardware, or implemented by at least one program code associated with hardware, where the program code is stored in a computer readable storage medium, such as a read only memory, a magnetic or optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (13)

1. A method for displaying an interface element, the method comprising:
when a display instruction of a target interface is received, acquiring at least one resource identifier corresponding to at least one interface element in the target interface;
traversing a code file of the target interface based on the at least one resource identifier;
acquiring at least one section of program code containing the at least one resource identifier, and determining that an interface element corresponding to any section of program code misses the code file when any section of program code does not contain configuration information;
when the code file is determined to be missed, inquiring an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier;
and displaying the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier.
2. The method of claim 1, wherein before querying an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier when it is determined that the code file is not hit, the method further comprises:
comparing the information abstract value of the applied resource packet with the information abstract value of a target resource packet in the server;
if the two information abstract values are different, a resource updating list is obtained;
and if the resource updating list comprises the file identification of the configuration file, acquiring the configuration file in the target resource packet.
3. The method according to claim 1, wherein the displaying the at least one interface element in the target interface based on the configuration information corresponding to the at least one resource identifier comprises:
determining the display type of any interface element based on the configuration information of any interface element;
when the display type of any interface element is trigger display, setting the interface element to be in a hidden state;
and when the display type of any interface element is resident display, displaying the interface element based on the configuration information.
4. The method according to claim 3, wherein when the display type of any interface element is a trigger display, the setting the interface element to the hidden state comprises:
and when any interface element is in trigger display, adjusting the transparency of the interface element to the maximum value.
5. The method of claim 4, wherein after adjusting the transparency of the interface element to a maximum value, the method further comprises:
and when the triggering condition of the interface element is met, adjusting the transparency of the interface element to the minimum value.
6. The method of claim 1, wherein the configuration information comprises: at least one of the position coordinates of the interface element, the display type of the interface element, the displacement reference point, the transparency and the rotation angle.
7. The method of claim 1, wherein the configuration file is of a target file type.
8. An apparatus for displaying interface elements, the apparatus comprising:
the identification acquisition module is used for acquiring at least one resource identification corresponding to at least one interface element in a target interface when a display instruction of the target interface is received;
the query module is used for querying the code file of the target interface based on the at least one resource identifier;
the information acquisition module is used for inquiring an application configuration file based on the at least one resource identifier to obtain configuration information corresponding to the at least one resource identifier when the code file is determined to be missed through inquiry;
a display module, configured to display the at least one interface element in the target interface based on configuration information corresponding to the at least one resource identifier;
the query module is configured to:
traversing a code file of the target interface based on the at least one resource identifier;
and acquiring at least one section of program code containing the at least one resource identifier, and determining that the interface element corresponding to any section of program code misses the code file when any section of program code does not contain configuration information.
9. The apparatus of claim 8, further comprising:
the comparison module is used for comparing the information abstract value of the applied resource packet with the information abstract value of the target resource packet in the server;
the list acquisition module is used for acquiring a resource updating list if the two information abstract values are different;
and the configuration file acquisition module is used for acquiring the configuration file in the target resource package if the resource update list comprises the file identifier of the configuration file.
10. The apparatus of claim 8, wherein the display module is configured to:
determining the display type of any interface element based on the configuration information of any interface element;
when the display type of any interface element is trigger display, setting the interface element to be in a hidden state;
and when the display type of any interface element is resident display, displaying the interface element based on the configuration information.
11. The apparatus of claim 10, wherein the display module is configured to:
and when any interface element is in trigger display, adjusting the transparency of the interface element to the maximum value.
12. A computer device comprising one or more processors and one or more memories having stored therein at least one program code, the at least one program code loaded into and executed by the one or more processors to perform operations executed by a display method of an interface element according to any one of claims 1 to 7.
13. A computer-readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor to perform operations performed by a display method of an interface element according to any one of claims 1 to 7.
CN201911100448.XA 2019-11-12 2019-11-12 Interface element display method and device, computer equipment and storage medium Active CN110841285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911100448.XA CN110841285B (en) 2019-11-12 2019-11-12 Interface element display method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911100448.XA CN110841285B (en) 2019-11-12 2019-11-12 Interface element display method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110841285A CN110841285A (en) 2020-02-28
CN110841285B true CN110841285B (en) 2021-09-14

Family

ID=69599883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911100448.XA Active CN110841285B (en) 2019-11-12 2019-11-12 Interface element display method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110841285B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111443858B (en) * 2020-03-24 2024-03-01 深圳市腾讯信息技术有限公司 Display method, device, terminal and storage medium of application interface
CN111767071A (en) * 2020-07-02 2020-10-13 湖南快乐阳光互动娱乐传媒有限公司 Data display adjustment method and device and electronic equipment
CN112363654A (en) * 2020-11-27 2021-02-12 歌尔科技有限公司 Display control method of wearable device, wearable device and storage medium
CN114609934A (en) * 2020-12-07 2022-06-10 中国石油天然气集团有限公司 Method and device for determining diesel oil delivery information, computer equipment and storage medium
CN113032044A (en) * 2021-03-22 2021-06-25 上海哔哩哔哩科技有限公司 Resource loading method and device
CN113304477A (en) * 2021-05-26 2021-08-27 网易(杭州)网络有限公司 Game interface display method, device, equipment and medium
CN113535226B (en) * 2021-07-27 2024-04-12 抖音视界有限公司 Application downloading method, terminal, server, computer device and storage medium
CN113656606A (en) * 2021-08-05 2021-11-16 上海钧正网络科技有限公司 Code query method, device, equipment and storage medium of application program
CN113467663B (en) * 2021-09-06 2023-09-05 北京达佳互联信息技术有限公司 Interface configuration method, device, computer equipment and medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090055757A1 (en) * 2007-08-20 2009-02-26 International Business Machines Corporation Solution for automatically generating software user interface code for multiple run-time environments from a single description document
CN103593374B (en) * 2012-08-17 2019-07-30 北京京东尚科信息技术有限公司 The front-end interface generation method and system of merchandise news on a kind of e-commerce platform
CN103605521A (en) * 2013-11-21 2014-02-26 广州爱九游信息技术有限公司 Method and device for realizing interface apposition
CN105468348B (en) * 2014-09-05 2019-06-11 中国移动通信集团公司 A kind of method, apparatus and terminal of defined interface displayed on the terminals
CN105760148A (en) * 2014-12-17 2016-07-13 北京北方微电子基地设备工艺研究中心有限责任公司 Interface control attribute configuration method and device
CN104484189B (en) * 2014-12-31 2018-07-10 北京拼图科技有限公司 The structure and design method of a kind of application interface
CN104978195A (en) * 2015-06-26 2015-10-14 浪潮软件集团有限公司 Interface configuration device and method
CN105446739A (en) * 2015-11-16 2016-03-30 深圳市创维电器科技有限公司 UI interface setting method and apparatus
CN106775725B (en) * 2016-12-19 2020-12-01 网易(杭州)网络有限公司 Visual configuration editing method and device
CN109508220A (en) * 2018-11-13 2019-03-22 广州金视网络信息工程有限公司 Finance data interface creating method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110841285A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN110674022B (en) Behavior data acquisition method and device and storage medium
US11954200B2 (en) Control information processing method and apparatus, electronic device, and storage medium
CN109922356B (en) Video recommendation method and device and computer-readable storage medium
CN111569435B (en) Ranking list generation method, system, server and storage medium
CN110139143B (en) Virtual article display method, device, computer equipment and storage medium
WO2022134632A1 (en) Work processing method and apparatus
CN112052354A (en) Video recommendation method, video display method and device and computer equipment
CN109783176B (en) Page switching method and device
CN111437600A (en) Plot showing method, plot showing device, plot showing equipment and storage medium
CN111192072A (en) User grouping method and device and storage medium
CN110471614B (en) Method for storing data, method and device for detecting terminal
CN110677713A (en) Video image processing method and device and storage medium
CN107943484B (en) Method and device for executing business function
CN112612539B (en) Data model unloading method and device, electronic equipment and storage medium
CN112612540B (en) Data model configuration method, device, electronic equipment and storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN112188268B (en) Virtual scene display method, virtual scene introduction video generation method and device
CN111464829B (en) Method, device and equipment for switching media data and storage medium
CN111369434B (en) Method, device, equipment and storage medium for generating spliced video covers
CN111064657B (en) Method, device and system for grouping concerned accounts
CN113268234A (en) Page generation method, device, terminal and storage medium
CN109618018B (en) User head portrait display method, device, terminal, server and storage medium
CN109388732B (en) Music map generating and displaying method, device and storage medium
CN109101166B (en) Audio control method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022248

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant