CN113138827B - Method, device, electronic equipment and medium for displaying data - Google Patents

Method, device, electronic equipment and medium for displaying data Download PDF

Info

Publication number
CN113138827B
CN113138827B CN202110477592.6A CN202110477592A CN113138827B CN 113138827 B CN113138827 B CN 113138827B CN 202110477592 A CN202110477592 A CN 202110477592A CN 113138827 B CN113138827 B CN 113138827B
Authority
CN
China
Prior art keywords
card
displayed
data
layout data
layout
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
CN202110477592.6A
Other languages
Chinese (zh)
Other versions
CN113138827A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110477592.6A priority Critical patent/CN113138827B/en
Publication of CN113138827A publication Critical patent/CN113138827A/en
Application granted granted Critical
Publication of CN113138827B publication Critical patent/CN113138827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/451Execution arrangements for user interfaces
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure provides a method, a device, electronic equipment and a medium for displaying data, relates to the technical field of computers, and particularly relates to the technical field of information flow. The specific implementation scheme is as follows: for each card component to be displayed in at least one card component to be displayed, acquiring card content data and layout data corresponding to the card component to be displayed in a local storage space, wherein the card content data comprises at least one element to be displayed, and the layout data comprises layout information of the at least one element to be displayed in the card component when the at least one element to be displayed is displayed through the card component; and displaying each card component to be displayed in the display interface according to the layout data so as to display at least one corresponding element to be displayed through each card component to be displayed.

Description

Method, device, electronic equipment and medium for displaying data
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the field of information flow technology.
Background
Since the screen size of the terminal device is limited, the amount of data that can be simultaneously presented within the screen is limited. Based on the above, when the data amount required to be displayed by the terminal device is large, the data can be displayed in an information flow mode. In this way, the data to be displayed are divided into a plurality of groups, each group of data is displayed through a card assembly in a display interface, and the displayed data can be updated according to the operation of a user.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, and storage medium for displaying data.
According to an aspect of the present disclosure, there is provided a method of displaying data, including: for each card component to be displayed in at least one card component to be displayed, acquiring card content data and layout data corresponding to the card component to be displayed in a local storage space, wherein the card content data comprises at least one element to be displayed, and the layout data comprises layout information of the at least one element to be displayed in the card component when the at least one element to be displayed is displayed through the card component; and displaying each card component to be displayed in a display interface according to the layout data so as to display the corresponding at least one element to be displayed through each card component to be displayed.
According to another aspect of the present disclosure, there is provided an apparatus for displaying data, including: the card content data comprises at least one element to be displayed, and the layout data comprises layout information of the at least one element to be displayed in the card assembly when the at least one element to be displayed is displayed through the card assembly; and the display module is used for displaying each card component to be displayed in a display interface according to the layout data so as to display the corresponding at least one element to be displayed through each card component to be displayed.
Another aspect of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods shown in the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods shown in the disclosed embodiments.
According to another aspect of the disclosed embodiments, there is provided a computer program product, a computer program, which when executed by a processor, implements the method shown in the disclosed embodiments.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 schematically illustrates an exemplary system architecture to which a method of exposing data may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a method flow diagram of exposing data in accordance with an embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of a presentation interface according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a method flow diagram of exposing data according to another embodiment of the present disclosure;
FIG. 5 schematically illustrates an operational flow diagram for configuring version identification for layout data, according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates an operational flow diagram for checking version identification of layout data, according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates an operational flow diagram for configuring application display mode identification for layout data according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates an operational flow diagram for checking display mode identification of layout data, according to an embodiment of the present disclosure;
FIG. 9 schematically illustrates a method flow diagram of exposing data according to another embodiment of the present disclosure;
FIG. 10A schematically illustrates a schematic view of a first stage in the movement of a card assembly according to an embodiment of the disclosure;
FIG. 10B schematically illustrates a schematic view of a second stage in the movement of a card assembly according to an embodiment of the disclosure;
FIG. 11 schematically illustrates a schematic diagram of a method of presenting data according to another embodiment of the present disclosure;
FIG. 12 schematically illustrates a block diagram of an apparatus for presenting data, according to an embodiment of the disclosure; and
FIG. 13 illustrates a schematic block diagram of an example electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 schematically illustrates an exemplary system architecture 100 in which a method of exposing data may be applied, according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
The server 105 may be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual PRIVATE SERVER" or simply "VPS"). The server 105 may also be a server of a distributed system or a server that incorporates a blockchain.
It should be noted that, the method for displaying data provided by the embodiments of the present disclosure may be performed by the terminal devices 101, 102, 103, for example. Accordingly, the apparatus for displaying data provided by the embodiments of the present disclosure may be, for example, provided in the terminal devices 101, 102, 103. The method of presenting data provided by the embodiments of the present disclosure may also be performed by a device other than the terminal device 101, 102, 103 and capable of communicating with the terminal device 101, 102, 103 and/or the server 105. Accordingly, the apparatus for displaying data provided by the embodiments of the present disclosure may also be provided in a device different from the terminal device 101, 102, 103 and capable of communicating with the terminal device 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of a method of exposing data according to an embodiment of the present disclosure.
As shown in fig. 2, the method 200 of displaying data includes operations S210 to S220. The method may be applied, for example, to terminal devices 101, 102, 103 as shown in fig. 1.
In operation S210, for each card component to be displayed in the at least one card component to be displayed, card content data and layout data corresponding to the card component to be displayed in the local storage space are obtained.
According to embodiments of the present disclosure, a card component is a presentation component that may be presented in a presentation interface of an application. The card assembly may be used to present one or more elements, which may include, for example, text, pictures, links, controls, and the like types of data.
According to an embodiment of the present disclosure, the card assembly to be displayed is a card assembly to be displayed. The number of card assemblies to be displayed may be determined according to the size of each card assembly to be displayed and the size of the display interface. For example, the upper limit of the number of card components to be displayed, which can be contained in the display interface, can be determined as the number of card components to be displayed according to the size of each card component to be displayed and the size of the display interface.
The card content data comprises at least one element to be displayed, and the layout data comprises layout information of the at least one element to be displayed in the card assembly when the at least one element to be displayed is displayed through the card assembly.
According to the embodiments of the present disclosure, card content data and corresponding layout information may be predetermined and stored to a local storage space. The local storage space may be, for example, set in a local disk, a memory, a cache, or the like of the terminal device.
In operation S220, each card component to be displayed is displayed in the display interface according to the layout data, so as to display at least one corresponding element to be displayed through each card component to be displayed.
According to the embodiment of the disclosure, the card component to be displayed can be displayed in the display interface, and the element to be displayed in the corresponding card content data is displayed in the card component according to the layout data.
In the related art, it is necessary to calculate layout data of a card assembly every time the card assembly is displayed in a display interface. According to the embodiment of the disclosure, the calculated layout data is stored in the local storage space in advance, and when the card assembly is displayed, the layout data can be directly obtained from the local storage space without calculating the layout data, so that the calculation cost is reduced, and the fluency when the card assembly is displayed is improved.
Fig. 3 schematically illustrates a schematic diagram of a presentation interface according to an embodiment of the present disclosure.
As shown in fig. 3, the presentation interface 300 may be used, for example, to present one or more card assemblies 310. Card component 310 may include elements such as, for example, avatar 311, user name 312, user information 313, content text 314, picture 315, control 316, and the like.
In accordance with embodiments of the present disclosure, where the presentation interface contains a plurality of card assemblies 310, the plurality of card assemblies 310 may be presented in a list in the presentation interface. The width and height of the card assembly 310 illustrated therein may be determined according to actual needs. Illustratively, in this embodiment, each card assembly 310 in the presentation interface 300 is configured to have the same width, and the height of each card assembly 310 is determined according to the corresponding layout data and card content data.
Fig. 4 schematically illustrates a method flow diagram of exposing data according to another embodiment of the present disclosure.
As shown in fig. 4, the method 400 of displaying data includes operations S410 to S450. The method may be applied, for example, to terminal devices 101, 102, 103 as shown in fig. 1.
In operation S410, card content data from a server is acquired and stored in a local storage space.
According to the embodiment of the disclosure, the card content data from the server can be acquired according to the preset card data pulling interface, and the number of acquired card content data can be one or a plurality of card content data. Wherein the card content data may for example comprise at least one element to be presented. The servers may include, for example, server 105 shown in fig. 1.
According to an embodiment of the present disclosure, the local storage space may be, for example, provided in a local disk, a memory, or a cache of the terminal device. For example, in this implementation, the local storage space may be set in a cache of the terminal device.
In operation S420, a layout calculation operation is performed with respect to the card content data to obtain layout data corresponding to the card content data.
According to the embodiment of the disclosure, for each card content data stored in the local storage space, layout information, i.e., layout data, required for all elements to be displayed in each card content data to be presented in the display interface is calculated. For example, the content information of the element to be displayed corresponding to the card assembly and according to the preset layout rule can be obtained. The preset layout rules are used for specifying the relative positions of elements in the card. The content information of the element to be presented may include, for example, the number of characters of the text element, the pixel size, the number of pixels of the picture element, and the like.
In operation S430, the layout data is stored to the local storage space.
According to the embodiment of the disclosure, the card content data and the corresponding layout data may be stored in the same location in the local storage space, or may be stored in different locations, respectively.
In operation S440, for each card component to be displayed in the at least one card component to be displayed, card content data and layout data corresponding to the card component to be displayed in the local storage space are acquired.
In accordance with an embodiment of the present disclosure, the operation S440 may refer to, for example, the operation S210 shown in fig. 2, and will not be described herein.
In operation S450, each card component to be displayed is displayed in the display interface according to the layout data, so that at least one corresponding element to be displayed is displayed through each card component to be displayed.
Operation S450 may refer to operation S220 shown in fig. 2, for example, and will not be described herein.
According to an embodiment of the present disclosure, card content data from a server is acquired, then layout data is calculated from the card content data, and the layout data is stored to a local storage space. Therefore, when the card assembly is displayed, the layout data can be directly obtained from the local storage space, calculation of the layout data is not needed, calculation cost is reduced, and fluency when the card assembly is displayed is improved.
According to another embodiment of the present disclosure, after performing the layout calculation operation to obtain layout data, a version identifier may also be configured for the layout data, where the version identifier may be used to represent an application version corresponding to the layout data.
For example, FIG. 5 schematically illustrates an operational flow diagram for configuring version identification for layout data according to an embodiment of the present disclosure. As shown in fig. 5, the operation of configuring the version identification for the layout data may include operations S510 to S520, for example.
In operation S510, application version information corresponding to the presentation interface is acquired.
In operation S520, a version identification is configured for the layout data according to the application version information.
After the version identification is configured for the layout data, it may be checked whether the current application version information is consistent with the version identification of the layout data at regular intervals, or it may be checked whether the current application version information is consistent with the version identification of the layout data when the application version information is changed. And under the condition that the current application program version information is inconsistent with the version identification of the layout data, recalculating the layout data to ensure the validity of the layout data.
For example, fig. 6 schematically illustrates an operational flow diagram of checking version identification of layout data according to an embodiment of the present disclosure.
As shown in fig. 6, the operation of checking the version identification of the layout data may include, for example, the following operations S610 to S630.
In operation S610, application version information corresponding to the presentation interface is re-acquired.
In operation S620, in case that the re-acquired program version information is inconsistent with the version identification of the layout data, the layout data in the local storage space is deleted and new layout data is recalculated.
In operation S630, the new layout data is stored in the local storage space, and a new version identification is configured for the new layout data according to the re-acquired program version information.
According to embodiments of the present disclosure, by configuring version identification for layout data, it is possible to prevent layout data from being invalidated due to an application version change (e.g., an application version upgrade).
According to another embodiment of the present disclosure, after performing the layout calculation operation to obtain layout data, a display mode identifier may also be configured for the layout data, where the display mode identifier may be used to represent a display mode corresponding to the layout data.
For example, FIG. 7 schematically illustrates an operational flow diagram for configuring application display mode identification for layout data according to an embodiment of the present disclosure.
As shown in fig. 7, the operation of configuring the application display mode identification for the layout data may include operations S710 to S720, for example.
In operation S710, display mode information is acquired.
In operation S720, a display mode identification is configured for the layout data according to the display mode information.
After the display mode identifier is configured for the layout data, it may be checked whether the current display mode information is consistent with the display mode identifier of the layout data at regular intervals, or it may be checked whether the current display mode information is consistent with the display mode identifier of the layout data when the display mode is changed. And under the condition that the current display mode information is inconsistent with the display mode identification of the layout data, recalculating the layout data to ensure the effectiveness of the layout data.
For example, fig. 8 schematically illustrates an operational flow diagram of checking display mode identification of layout data according to an embodiment of the present disclosure.
As shown in fig. 8, the operation of checking the display mode identification of the layout data may include, for example, the following operations S810 to S830.
In operation S810, display mode information is reacquired.
According to an embodiment of the present disclosure, the display mode information may include, for example, a daytime mode and a nighttime mode. In the actual application process, the display mode information may also include information for indicating other display modes, which is not specifically limited in this disclosure.
In operation S820, in case that the retrieved display mode information is inconsistent with the display mode identification of the layout data, the layout data in the local storage space is deleted and new layout data is recalculated.
In operation S830, the new layout data is stored in the local storage space, and a new display mode identification is configured for the new layout data according to the newly acquired display mode information.
According to the embodiments of the present disclosure, by configuring the display mode identification for the layout data, it is possible to prevent the layout data from being invalidated due to a display mode change (e.g., switching the daytime/nighttime mode).
According to the embodiment of the disclosure, the terminal device may acquire any number of card content data from the server, then calculate corresponding layout data according to the card content data, and store the card content data and the corresponding layout data in the local storage space. Wherein, in the case that the number of acquired card content data is plural, part of the card content data in the plural card content data may be displayed in the card assembly. And then according to the preset operation, other card content data are displayed by updating the card assembly.
Based on this, fig. 9 schematically shows a method flowchart of presenting data according to another embodiment of the present disclosure.
As shown in fig. 9, the method 900 may further include operations S910 to S960.
In operation S910, a plurality of card content data are acquired from a server and stored to a local storage space.
Operation S910 may refer to, for example, operation S420 shown in fig. 4, and will not be described herein.
In operation S920, a layout calculation operation is performed with respect to the card content data to obtain layout data corresponding to the card content data, and the layout data is stored in the local storage space.
According to an embodiment of the present disclosure, the operation S920 may refer to operations S420 to S430 shown in fig. 4, for example, and will not be described herein.
In operation S930, a plurality of card assemblies are displayed in a display interface to display corresponding card content data through the plurality of card assemblies.
According to embodiments of the present disclosure, a plurality of card assemblies may be presented in a list form in a presentation interface.
In operation S940, the card assembly displayed in the display interface is moved in response to the preset operation.
According to an embodiment of the present disclosure, the preset operation may include, for example, a scroll operation. For example, a plurality of card assemblies may be moved in synchronization in a direction corresponding to a scroll operation in response to the scroll operation.
In operation S950, the target card content data and the target layout data in the local storage space are acquired with at least a portion of the first card assembly moved out of the presentation interface.
The first card assembly is a card assembly displayed in the display interface.
According to the embodiment of the disclosure, the card content data may be ordered in advance to obtain a preset order. Then, according to the preset sequence, the card content data arranged behind the currently displayed card assembly is determined as target card content data, and the layout data corresponding to the target card content data is determined as target layout data. For example, in this embodiment, the preset order may be determined by the acquisition time sequence.
In operation S960, a second card assembly corresponding to the target layout data is displayed in the display interface to display the element to be displayed in the target card content data through the second card assembly.
According to embodiments of the present disclosure, the second card assembly may be a card assembly that is not displayed in the display interface before at least a portion of the first card assembly is moved out of the display interface. The second card assembly may move into the display interface as the first card assembly moves out of the display interface.
Fig. 10A schematically illustrates a schematic view of a first stage in the movement of a card assembly according to an embodiment of the disclosure.
As shown in fig. 10A, the presentation interface 1000 is presented with card assemblies 1010 and 1020. The preset operation is a scroll operation in the direction indicated by the arrow. In response to this scrolling operation, card assemblies 1010 and 1020 move synchronously in the direction indicated by the arrow.
Fig. 10B schematically illustrates a schematic view of a second stage in the movement of a card assembly according to an embodiment of the disclosure. As shown in fig. 10B, as the scroll distance of the scroll operation increases, a portion of card assembly 1010 moves out of the presentation interface. When a portion of card assembly 1010 is moved out of the display interface, card assembly 1030 is displayed in the display interface according to the target layout data to display the element to be displayed in the target card content data via the second card assembly.
In the related art, when a user opens a page based on information flow through a terminal device, the terminal device obtains a plurality of data to be displayed from a server at one time, and then displays the data to the user through a card assembly in a display interface according to the sequence of the received data. In this process, it is necessary to calculate layout data of a card assembly every time the card assembly enters the presentation interface from outside the presentation interface. In the case that a large amount of card content is contained in one information flow page, if the user continuously triggers the scrolling operation, the operation of recalculating layout data is continuously performed, resulting in a jam when the information flow is updated.
According to the embodiment of the disclosure, the card component in the display interface can be dynamically updated according to the scrolling operation, so that the card component can be displayed in the form of an information stream in the display interface. When updating the card assembly, the layout data can be acquired from the local storage space without recalculating the layout data, thereby reducing the problem of jamming during information stream updating.
The method for displaying data described above is further described with reference to fig. 11 in conjunction with an embodiment. Those skilled in the art will appreciate that the following example embodiments are merely for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Fig. 11 schematically illustrates a schematic diagram of a method of presenting data according to another embodiment of the present disclosure.
For example, in this embodiment, the card data FRSDATAITEM may be configured in the memory in advance, so as to store related data for acquiring, from the server, various elements that need to be displayed in the card assembly.
As shown in fig. 11, the main thread MAINTHREAD of the terminal device acquires card content data from the server through the card data pull interface Model. After the Model obtains new card content data, the obtained card content data is inserted into an original card data list of the card data cache DataSource.
When the DataSource obtains new card content data, for each new card content data, calculating layout information required for displaying all elements in the card content data, and placing all calculated layout information into newly generated layout data Layouter. The layout data may also contain identification of the current version number, day and night mode, etc., preventing layout failure.
The calculated layout data Layouter is then placed into the card data FRSDATAITEM.
Next, the controller may present the card assembly Cell in the form of a card list. In addition, the controller may move the card assembly displayed in the display interface in response to a scroll operation each time the user triggers the scroll operation. And in the moving process, circularly calling the card assembly and updating the content displayed in the card assembly.
When the Controller needs to display the card assembly in the display interface, the calculated layout data Layouter is directly obtained from the cache, and the card assembly is rendered in the display interface according to Layouter in the cache without repeatedly calculating the layout data, so that the problem of clamping caused by card layout calculation when the information flow is rolled is at least partially solved;
in addition, when the user triggers the operation of updating the version or switching the day and night mode and the like which needs to recalculate the layout data of the card, the outdated layout data in the memory is deleted, and the recalculation of the layout data is triggered, so that the page elements can be correctly displayed.
Fig. 12 schematically illustrates a block diagram of an apparatus for presenting data according to an embodiment of the disclosure.
As shown in fig. 12, an apparatus 1200 for presenting data includes an acquisition module 1210 and a presentation module 1220.
The obtaining module 1210 is configured to obtain, for each card component to be displayed in the at least one card component to be displayed, card content data and layout data corresponding to the card component to be displayed in the local storage space, where the card content data includes at least one element to be displayed, and the layout data includes layout information of the at least one element to be displayed in the card component when the at least one element to be displayed is displayed by the card component.
The display module 1220 is configured to display each card component to be displayed in the display interface according to the layout data, so as to display at least one corresponding element to be displayed through each card component to be displayed.
According to the embodiment of the disclosure, the calculated layout data is stored in the local storage space in advance, and when the card assembly is displayed, the layout data can be directly obtained from the local storage space without calculating the layout data, so that the calculation cost is reduced, and the fluency when the card assembly is displayed is improved.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 13 illustrates a schematic block diagram of an example electronic device 1300 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 13, the apparatus 1300 includes a computing unit 1301 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1302 or a computer program loaded from a storage unit 1308 into a Random Access Memory (RAM) 1303. In the RAM 1303, various programs and data required for the operation of the device 1300 can also be stored. The computing unit 1301, the ROM 1302, and the RAM 1303 are connected to each other through a bus 1304. An input/output (I/O) interface 1305 is also connected to bus 1304.
Various components in device 1300 are connected to I/O interface 1305, including: an input unit 1306 such as a keyboard, a mouse, or the like; an output unit 1307 such as various types of displays, speakers, and the like; storage unit 1308, such as a magnetic disk, optical disk, etc.; and a communication unit 1309 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 1309 allows the device 1300 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 1301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1301 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1301 performs the respective methods and processes described above, for example, a method of presenting data. For example, in some embodiments, the method of exposing data may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1308. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 1300 via the ROM1302 and/or the communication unit 1309. When the computer program is loaded into RAM 1303 and executed by computing unit 1301, one or more steps of the method of presenting data described above may be performed. Alternatively, in other embodiments, computing unit 1301 may be configured to perform the method of exposing data in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
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. The 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a presentation device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for presenting information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (13)

1. A method of displaying data, comprising:
For each card component to be displayed in at least one card component to be displayed, acquiring card content data and layout data corresponding to the card component to be displayed in a local storage space, wherein the card content data comprises at least one element to be displayed, and the layout data comprises layout information of the at least one element to be displayed in the card component when the at least one element to be displayed is displayed through the card component; and
Displaying each card component to be displayed in a display interface according to the layout data so as to display the corresponding at least one element to be displayed through each card component to be displayed;
Acquiring target card content data and target layout data in a local storage space under the condition that at least one part of the first card assembly moves out of the display interface; and
Displaying a second card component corresponding to the target layout data in the display interface so as to display elements to be displayed in the target card content data through the second card component;
The target card content data is obtained based on a preset sequence of card content, the target layout data corresponds to the target card content data, the first card component is one card component displayed in the display interface, the second card component is a card component which is not displayed in the display interface before at least a part of the first card component moves out of the display interface, and the second card component moves into the display interface along with the movement of the first card component out of the display interface.
2. The method of claim 1, further comprising:
acquiring card content data from a server, and storing the card content data into a local storage space;
performing a layout calculation operation on the card content data to obtain layout data corresponding to the card content data; and
And storing the layout data into the local storage space.
3. The method of claim 1, further comprising:
And responding to a preset operation, and moving the card assembly displayed in the display interface.
4. A method according to claim 3, further comprising: a plurality of card assemblies are presented in a list in the presentation interface,
Wherein the preset operation includes a scroll operation, and the moving the card assembly in the presentation interface in response to the preset operation includes:
In response to a scrolling operation, the plurality of card assemblies are moved synchronously in a direction corresponding to the scrolling operation.
5. The method of claim 2, further comprising, after performing the layout calculation operation:
acquiring application version information corresponding to the display interface; and
And configuring a version identifier for the layout data according to the application program version information.
6. The method of claim 5, further comprising, after configuring a version identification for the layout data:
Re-acquiring the version information of the application program corresponding to the display interface;
Deleting the layout data in the local storage space and recalculating new layout data under the condition that the re-acquired application program version information is inconsistent with the version identification of the layout data; and
And storing the new layout data into a local storage space, and configuring a new version identifier for the new layout data according to the re-acquired application program version information.
7. The method of claim 2, further comprising, after performing the layout calculation operation:
Acquiring display mode information; and
And configuring a display mode identifier for the layout data according to the display mode information.
8. The method of claim 7, further comprising, after configuring a display mode identification for the layout data:
Re-acquiring display mode information;
Deleting the layout data in the local storage space and recalculating new layout data under the condition that the newly acquired display mode information is inconsistent with the version identification of the layout data; and
And storing the new layout data into a local storage space, and configuring a new display mode identifier for the new layout data according to the re-acquired display mode information.
9. The method of claim 2, wherein the obtaining card content data from a server comprises:
and acquiring card content data from the server through the card data pulling interface.
10. An apparatus for displaying data, comprising:
The card content data comprises at least one element to be displayed, and the layout data comprises layout information of the at least one element to be displayed in the card assembly when the at least one element to be displayed is displayed through the card assembly; and
The display module is used for displaying each card component to be displayed in a display interface according to the layout data so as to display the corresponding at least one element to be displayed through each card component to be displayed;
The acquisition module is used for acquiring target card content data and target layout data in the local storage space under the condition that at least one part of the first card assembly moves out of the display interface; and
The processing module is used for displaying a second card component corresponding to the target layout data in the display interface so as to display elements to be displayed in the target card content data through the second card component;
The target card content data is obtained based on a preset sequence of card content, the target layout data corresponds to the target card content data, the first card component is one card component displayed in the display interface, the second card component is a card component which is not displayed in the display interface before at least a part of the first card component moves out of the display interface, and the second card component moves into the display interface along with the movement of the first card component out of the display interface.
11. An electronic device, comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-9.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-9.
CN202110477592.6A 2021-04-29 2021-04-29 Method, device, electronic equipment and medium for displaying data Active CN113138827B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110477592.6A CN113138827B (en) 2021-04-29 2021-04-29 Method, device, electronic equipment and medium for displaying data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110477592.6A CN113138827B (en) 2021-04-29 2021-04-29 Method, device, electronic equipment and medium for displaying data

Publications (2)

Publication Number Publication Date
CN113138827A CN113138827A (en) 2021-07-20
CN113138827B true CN113138827B (en) 2024-05-31

Family

ID=76816757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110477592.6A Active CN113138827B (en) 2021-04-29 2021-04-29 Method, device, electronic equipment and medium for displaying data

Country Status (1)

Country Link
CN (1) CN113138827B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791859A (en) * 2021-09-14 2021-12-14 阿波罗智联(北京)科技有限公司 Data processing method, data processing apparatus, storage medium, program product, and electronic station board
CN113867862B (en) * 2021-09-26 2024-04-26 掌阅科技股份有限公司 List page layout method and computing device
CN114092370B (en) * 2021-11-19 2024-09-06 抖音视界有限公司 Image display method, device, computer equipment and storage medium
CN114416261B (en) * 2022-01-21 2023-12-12 抖音视界有限公司 Information display method, device, equipment and medium
CN118502621B (en) * 2024-07-17 2024-10-01 阳光学院 Energy efficiency platform management system based on Hongmon system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373534A (en) * 2014-08-12 2016-03-02 腾讯科技(北京)有限公司 List display method, device and list display terminal
WO2016144977A1 (en) * 2015-03-08 2016-09-15 Apple Inc. Sharing user-configurable graphical constructs
CN106502699A (en) * 2016-11-03 2017-03-15 腾讯科技(深圳)有限公司 A kind of five application page processing method, apparatus and system
CN107329743A (en) * 2017-06-14 2017-11-07 北京小米移动软件有限公司 Methods of exhibiting, device and the storage medium of five application page
CN110035181A (en) * 2019-04-12 2019-07-19 维沃移动通信有限公司 It is a kind of to apply card theme setting method and terminal fastly
CN110472172A (en) * 2019-08-07 2019-11-19 咪咕动漫有限公司 Information displaying method and terminal
CN110708423A (en) * 2019-09-26 2020-01-17 珠海市小源科技有限公司 Message content display method and device and storage medium
CN111290809A (en) * 2020-01-17 2020-06-16 西安奥卡云数据科技有限公司 Dynamic editing method for large data screen
CN112379944A (en) * 2020-11-18 2021-02-19 深圳康佳电子科技有限公司 Resource file loading method and device, storage medium and terminal equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373534A (en) * 2014-08-12 2016-03-02 腾讯科技(北京)有限公司 List display method, device and list display terminal
WO2016144977A1 (en) * 2015-03-08 2016-09-15 Apple Inc. Sharing user-configurable graphical constructs
CN106502699A (en) * 2016-11-03 2017-03-15 腾讯科技(深圳)有限公司 A kind of five application page processing method, apparatus and system
CN107329743A (en) * 2017-06-14 2017-11-07 北京小米移动软件有限公司 Methods of exhibiting, device and the storage medium of five application page
CN110035181A (en) * 2019-04-12 2019-07-19 维沃移动通信有限公司 It is a kind of to apply card theme setting method and terminal fastly
CN110472172A (en) * 2019-08-07 2019-11-19 咪咕动漫有限公司 Information displaying method and terminal
CN110708423A (en) * 2019-09-26 2020-01-17 珠海市小源科技有限公司 Message content display method and device and storage medium
CN111290809A (en) * 2020-01-17 2020-06-16 西安奥卡云数据科技有限公司 Dynamic editing method for large data screen
CN112379944A (en) * 2020-11-18 2021-02-19 深圳康佳电子科技有限公司 Resource file loading method and device, storage medium and terminal equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于卡片的网页设计在购物类网站中的应用;殷晓晨;孙冠东;张兆鹏;刘玉琪;;艺术与设计(理论);20160623(第06期);全文 *
运维数据可视化展示平台的设计与实现;张小琼;梁苑苑;邓力涌;王丽玫;;气象研究与应用;20190315(第01期);全文 *

Also Published As

Publication number Publication date
CN113138827A (en) 2021-07-20

Similar Documents

Publication Publication Date Title
CN113138827B (en) Method, device, electronic equipment and medium for displaying data
CN110046021B (en) Page display method, device, system, equipment and storage medium
CN110096660B (en) Method and device for loading page pictures and electronic equipment
CN110874251A (en) Method and device for realizing picture wooden barrel layout
CN113660504A (en) Message display method and device, electronic equipment and storage medium
CN114330249A (en) Information editing method, device, equipment and storage medium
CN105808307B (en) Page display method and device
CN112947918A (en) Data display method and device
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
CN113626113B (en) Page rendering method and device
CN113873318A (en) Video playing method, device, equipment and storage medium
CN111767490A (en) Method, device, equipment and storage medium for displaying image
CN109672931B (en) Method and apparatus for processing video frames
CN113282852A (en) Method and device for editing webpage
CN110362297B (en) Element ordering method and device
US11277300B2 (en) Method and apparatus for outputting information
CN111159593A (en) Method and device for generating flow chart, storage medium and electronic equipment
CN114500438B (en) File sharing method and device, electronic equipment and storage medium
CN114329278B (en) Processing method and device of search result page, electronic equipment and storage medium
CN114625460B (en) Image-text mixed arrangement method, device, equipment and storage medium
CN114510309B (en) Animation effect setting method, device, equipment and medium
CN111695059A (en) Information view list processing method and device and display equipment
CN113407329B (en) Task execution method, device, equipment and storage medium
CN114548581A (en) Information processing method, information processing apparatus, electronic device, and medium
CN111596941B (en) Application updating method, device, electronic equipment and medium

Legal Events

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