Card processing method and device, terminal equipment, storage medium and program product
By requesting card information from the server through the terminal device, the layout information and display method are determined according to the card type and element size, which solves the problem of inaccurate card creation and improves the accuracy and efficiency of card creation and interface display.
Patent Information
- Application Number
- CN202510749556.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-19
AI Technical Summary
The accuracy of card creation in the existing technology is low, resulting in interface display mismatch, resource waste and poor visual effects.
The terminal device responds to the interface display operation, requests card information from the server, determines the layout information and display mode according to the card type and element size, and determines the exact size of the card in the interface through multiple sizes, layout information and display modes.
Improves the accuracy of card creation and interface display, avoiding resource waste and interface layout jumps.
Smart Images

Figure CN120670071A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of multimedia interaction technology, and in particular to a card processing method, apparatus, terminal device, storage medium, and program product. Background Art
[0002] The application interface may include multiple cards, each of which may display related content. For example, a video search result may include multiple video cards, each of which may display information about the video.
[0003] Currently, because rendering takes a long time when displaying an interface, terminal devices can pre-create blank cards of a fixed size in the interface to serve as placeholders, allowing users to pre-visualize the basic layout of the interface. However, in this method, the card size may not match the associated data (for example, the card may be too small to display all the data), resulting in low card creation accuracy. Summary of the Invention
[0004] The embodiments of the present disclosure provide a card processing method, apparatus, terminal device, storage medium, and program product, which are used to solve the technical problem of low accuracy in card creation in the prior art.
[0005] In a first aspect, an embodiment of the present disclosure provides a card processing method, the card processing method comprising:
[0006] In response to an operation of displaying a first interface, determining a type of a card to be displayed in the first interface and a first size of each card element in the card;
[0007] Determining, based on the type of the card, layout information of the card and a display method of each card element in the card, wherein the layout information indicates an association between the size of the card and the size of the card elements;
[0008] The size of the card in the first interface is determined according to multiple first sizes, the layout information, and multiple display modes.
[0009] In a second aspect, an embodiment of the present disclosure provides a card processing device, wherein the photographing device includes a first determination module, a second determination module, and a third determination module, wherein:
[0010] The first determining module is configured to, in response to an operation of displaying the first interface, determine a type of a card to be displayed in the first interface and a first size of each card element in the card;
[0011] The second determining module is configured to determine, based on the type of the card, layout information of the card and a display method of each card element in the card, wherein the layout information indicates a correlation between the size of the card and the size of the card elements;
[0012] The third determining module is configured to determine a size of the card in the first interface according to a plurality of first sizes, the layout information, and a plurality of display modes.
[0013] In a third aspect, the present disclosure provides a terminal device, comprising: a processor and a memory;
[0014] The memory stores computer-executable instructions;
[0015] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the first aspect and various card processing methods that may be involved in the first aspect.
[0016] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, the card processing method as described in the first aspect and various possible methods involved in the first aspect are implemented.
[0017] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the first aspect and various card processing methods that may be involved in the first aspect.
[0018] The embodiments of the present disclosure provide a card processing method, apparatus, terminal device, storage medium and program product. In response to an operation of displaying a first interface, the terminal device can determine the type of card to be displayed in the first interface, and the first size of each card element in the card. The terminal device can determine the layout information of the card and the display method of each card element in the card based on the type of the card, wherein the layout information can be used to indicate the association between the size of the card and the size of the card element. The terminal device can determine the size of the card in the first interface based on multiple first sizes, layout information and multiple display methods. In the above method, since the terminal device can predict the size of the card based on the layout information of the card, the display method of the card element and the first size of the card element, the accuracy of the card size can be improved. In this way, the terminal device can accurately create the card in the interface, improve the accuracy of card creation, and improve the accuracy of interface display. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0021] Figure 2 A flowchart of a card processing method provided in an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of determining a card type and a first size of a card element provided in an embodiment of the present disclosure;
[0023] Figure 4 A schematic diagram of a method for determining the size of a card provided in an embodiment of the present disclosure;
[0024] Figure 5 A schematic diagram of determining card elements associated with card size provided by an embodiment of the present disclosure;
[0025] Figure 6 A schematic diagram of a process for determining the size of a card in a first interface provided by an embodiment of the present disclosure;
[0026] Figure 7 A schematic diagram of determining the size of a video card provided in an embodiment of the present disclosure;
[0027] Figure 8 A schematic diagram of determining the size of a search card provided in an embodiment of the present disclosure;
[0028] Figure 9 A schematic diagram of determining the size of a live broadcast card provided in an embodiment of the present disclosure;
[0029] Figure 10 A schematic diagram of a method for displaying a first interface provided by an embodiment of the present disclosure;
[0030] Figure 11 A schematic diagram of a method for determining the display area of each card provided in an embodiment of the present disclosure;
[0031] Figure 12 A schematic structural diagram of a card processing device provided in an embodiment of the present disclosure;
[0032] Figure 13 A schematic diagram of the structure of a terminal device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0034] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0035] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0036] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in the form of text. In addition, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0037] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0038] Next, combine Figure 1 , the application scenarios of the embodiments of the present disclosure are described.
[0039] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Figure 1, including: a terminal device. Among them, the display interface of the terminal device is a search interface. The search interface includes a search bar, and the search bar includes a search control. When the user enters the text: funny video in the search bar and clicks the search control, the terminal device can determine that video A, video B, video C and video D are searched. Among them, the terminal device can determine that the height of card 1 corresponding to video A is 100, the height of card 2 corresponding to video B is 100, the height of card 3 corresponding to video C is 100, and the height of card 4 corresponding to video D is 100, and create blank cards in the search interface.
[0040] See Figure 1 When the terminal device renders the information of Video A, Video B, Video C, and Video D onto the corresponding cards, since each video contains relatively little information, to improve the visual effect, the height of the card corresponding to each video should be 60. The terminal device can recreate the cards and perform typesetting. After typesetting, the terminal device can render the information of each video onto the corresponding card. Among them, Card 1 contains the information of Video A, Card 2 contains the information of Video B, Card 3 contains the information of Video C, and Card 4 contains the information of Video D. The height of each card is 60.
[0041] It should be noted that Figure 1 The examples are application scenarios of the embodiments of the present disclosure, but are not limitations of the application scenarios of the embodiments of the present disclosure.
[0042] In related technologies, an application interface may include multiple cards, each of which may display related content. Figure 1 In the embodiment shown, when a user searches for funny videos, the terminal device can display the results of the user's search through multiple video cards. Currently, when the terminal device displays the interface, since it takes a long time to render the screen, the terminal device can pre-create blank cards in the interface based on a fixed size to take up space, so that the user can perceive the basic layout of the interface in advance, which can improve the user experience. However, in the above method, the size of the card created by the terminal device may not match the relevant data, resulting in low accuracy in card creation. For example, Figure 1 In the embodiment shown, the height of the card created by the terminal device is 100. However, when rendering data, the height of the card can be 60. If a card with a height of 100 is used for data rendering, there will be a large blank area on the card, and the visual effect will be poor. If the terminal device readjusts the size of the card, it will lead to a waste of resources. In addition, the size of the card will also jump, and the layout of the interface may also jump.
[0043] In order to solve the technical problems in the related art, the embodiment of the present disclosure provides a card processing method. In response to the operation of displaying the first interface, the terminal device can send a request to the server for requesting to obtain the card information for rendering the first interface, and receive the card information sent by the server. The card information may include the data of the card to be displayed on the first interface, the type of the card and the first size of each card element in the card. The terminal device can determine the layout information of the card and the display method of each card element in the card according to the type of the card, and determine the size of the card in the first interface according to multiple first sizes, layout information and multiple display methods. In the above method, when the terminal device displays the first interface, since the server can send the card information in the first interface to the terminal device, the terminal device can quickly determine the size of each card in the first interface, and since the terminal device can accurately predict the size of the card based on the layout information of the card, the display method of the card element and the first size of the card element associated with the size of the card, the terminal device can accurately create the card in the first interface, improve the accuracy of card creation, and improve the accuracy of the display of the first interface.
[0044] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.
[0045] Figure 2 This is a flowchart of a card processing method provided by an embodiment of the present disclosure. Figure 2 , the method may include:
[0046] S201: In response to an operation of displaying a first interface, determine the type of a card to be displayed in the first interface and a first size of each card element in the card.
[0047] The execution subject of the embodiment of the present disclosure may be a terminal device or a card processing device provided in the terminal device. The card processing device may be implemented based on software or a combination of software and hardware, which is not limited in the embodiment of the present disclosure.
[0048] The first interface may be an interface including cards. In some embodiments, cards may be used to display information. For example, cards may include product cards, video cards, search cards, and live broadcast cards.
[0049] For example, a product card may include an image of the product, a description of the product, a price of the product, etc.; a video card may include a video, a description of the video, etc.; a search card may include information and images of the search content; a live broadcast card may include an image of the live broadcast object, a description of the live broadcast object, etc. The embodiments of the present disclosure do not limit this.
[0050] In some embodiments, the first interface may be an interface including a product card, a video card, a search card, a live broadcast card, or any other type of card.
[0051] Exemplarily, the first interface may be a search interface, which may include search results, wherein the search results may be presented based on cards, and the search interface may include video cards, live broadcast cards, etc., which is not limited in this embodiment of the present disclosure.
[0052] In some embodiments, the operation of displaying the first interface may be an operation input by a user.
[0053] Exemplarily, the first interface can be used to display search results, wherein when the user enters search content in the search bar and clicks the search control in the search bar, the terminal device can display search results associated with the search content, that is, the terminal device can determine to display the first interface.
[0054] Exemplarily, the first interface can be used to display multiple videos, wherein when the user clicks on the video playback application, the terminal device can display the first interface, and the first interface can include multiple video cards, each video card can be associated with a video, and when the user clicks on the video card, the terminal device can play the video associated with the video card.
[0055] In some embodiments, the card to be displayed may be a card in the first interface. For example, when the terminal device displays the first interface, the card in the first interface may be the card to be displayed. For example, the first interface may include Card 1, Card 2, and Card 3. When the terminal device displays the first interface, it may determine that the cards to be displayed in the first interface may include Card 1, Card 2, and Card 3.
[0056] The types of cards may include any types such as product cards, video cards, search cards, live broadcast cards, etc., and the embodiments of the present disclosure do not limit this.
[0057] In some embodiments, the terminal device can determine the type of card based on the identifier of the card to be displayed. For example, identifier A is associated with the video card, identifier B is associated with the search card, and identifier C is associated with the live card. The cards to be displayed in the first interface include card 1, card 2, and card 3. If the identifier of card 1 is identifier A, the terminal device can determine that the type of card 1 is a video card. If the identifier of card 2 is identifier B, the terminal device can determine that the type of card 2 is a search card. If the identifier of card 3 is identifier C, the terminal device can determine that the type of card 3 is a live card.
[0058] In some embodiments, a card may include card elements, which may be elements that constitute the card.
[0059] Exemplarily, card elements may include any elements such as images, first-level titles, second-level titles, videos, texts, and controls, which are not limited in the embodiments of the present disclosure.
[0060] In some embodiments, the card type can be associated with card elements. For example, the card elements in a video card can include a video, a first-level title, and a second-level title; the card elements in a search card can include an image, text, and controls; and the card elements in a live card can include an image, text, and a title.
[0061] The first size can be the size of a card element. For example, the card elements in a live card may include an image, text, and a title. The first size of an image can be the height and width of the image in the live card, the first size of text can be the height and width of the area where the text is displayed in the live card, and the first size of a title can be the height and width of the title in the live card.
[0062] In some embodiments, a terminal device can determine the type of card to be displayed in the first interface and the first size of each card element in the card based on the following feasible implementation method: sending a request message to a server and receiving card information sent by the server, wherein the card information may include card data, card type, and the first size of each card element in the card. In this way, the server can quickly determine the size of the card elements, and the terminal device can accurately determine the size of the card based on the size of each card element, thereby improving the accuracy and efficiency of card creation.
[0063] The request information may be used to request card information for rendering the first interface. For example, in response to an operation to display the first interface, the terminal device may send a request information to the server. The request information may include an identifier of the first interface. The server may determine, based on the identifier of the first interface, the number of cards that can be displayed in the first interface, the type of each card, the size of the card elements in the card, and the data of each card (e.g., image data, text data, etc.), and send the above information to the terminal device.
[0064] In some embodiments, the server may determine the first size of the card element based on any feasible implementation method, which is not limited in the embodiments of the present disclosure. For example, in a search card, in order to highlight an image, the first size of the image may be 300 pixels in width and 300 pixels in height. For example, in a news card, in order to highlight a title, the first size of the title may be 300 pixels in width and 50 pixels in height. For example, if the text in the card has a large number of words, the area of the first size where the text is located is large, and if the card has a large number of images, in order to display all the images, the size of each image may be smaller.
[0065] In some embodiments, the server is more efficient in determining the first size of the card element. However, the terminal device may also determine the first size of the card element locally, which is not limited in the embodiments of the present disclosure.
[0066] Next, combine Figure 3 , a detailed description is given of the process by which the terminal device determines the type of the card and the first size of the card element.
[0067] Figure 3 This is a schematic diagram of determining the card type and the first size of the card element provided by the embodiment of the present disclosure. Figure 3 , including: a terminal device and a server. The terminal device can send a request message to the server to request display of a first interface. After receiving the request message, the server can determine that the first interface can display video card 1, video card 2, video card 3, and live card 4. The server can determine card information, which includes information about video card 1, video card 2, video card 3, and live card 4.
[0068] See Figure 3, the information of video card 1 includes image A (200×200, i.e., width and height), a first-level title (200×10) and a second-level title (200×30). The information of video card 2 includes image B (200×200), a first-level title (200×20) and a second-level title (200×20). The information of video card 3 includes image C (200×200), a first-level title (200×20) and a second-level title (200×30). The information of live card 4 includes image D (200×150) and a title (200×50). The server can send the card information to the terminal device, and the terminal device can determine the size of each card based on the card information, which can improve the accuracy and efficiency of card creation.
[0069] S202: Determine the layout information of the card and the display mode of each card element in the card according to the type of the card.
[0070] In some embodiments, the layout information may be used to indicate the relationship between the size of a card and the size of card elements. For example, the layout information of a card may indicate the layout of multiple card elements in the card. For example, the layout information of a card may indicate the position of multiple card elements in the card. For example, the layout information of a card may indicate the relationship between the width of the card and the width of each card element, and the relationship between the height of the card and the height of each card element.
[0071] Exemplarily, the card elements in the card may include an image, a first-level title, and a second-level title, wherein the layout information may indicate that the image, the first-level title, and the second-level title are distributed sequentially from top to bottom.
[0072] Exemplarily, the card elements in a card may include an image, a first-level title, and a second-level title, wherein the layout information indicates that the width of the card may be the width of the image, and the height of the card may be the sum of the height of the image, the height of the first-level title, and the height of the second-level title.
[0073] The display mode may indicate how the card elements are displayed in the card. For example, the terminal device may determine the first size of the card elements in each card based on the card information sent by the server. However, since the card needs to be adapted to the configuration of different terminal devices when displayed on the card, the terminal device may adjust the first size of the card elements based on the display mode of each card element.
[0074] In some embodiments, the display method may include adapting the screen, adapting the font size, adapting the display direction, etc., which is not limited in the embodiments of the present disclosure.
[0075] For example, since screen sizes may vary, when a terminal device displays a card, the size of the card element needs to adapt to the screen size. When the screen size is larger, the size of the card element can be increased, and when the screen size is smaller, the size of the card element can be decreased.
[0076] For example, the screen may include a camera, and the area where the camera is located cannot display content. When the terminal device determines the size of the card element, it needs to avoid displaying content in the area where the camera is located. Therefore, the terminal device can adjust the first size of the card element.
[0077] For example, since the font size selected by the terminal device may be different, when the terminal device displays the card, the size of the card element needs to be adapted to the font size. When the font size of the terminal device is large, the size of the card element can be increased, and when the font size of the terminal device is small, the size of the card element can be decreased.
[0078] For example, since the display orientation of the terminal device may be different (e.g., landscape display, portrait display), the size of the card element needs to adapt to the display orientation when the terminal device displays the card. Specifically, when the terminal device is in landscape display, the width of the card element can be increased, and when the terminal device is in portrait display, the width of the card element can be decreased.
[0079] In some embodiments, the terminal device can determine the correspondence between the card type, layout information, and display mode, wherein the correspondence may include multiple card types and the layout information and display mode corresponding to each card type. For example, the correspondence between the card type, layout information, and display mode can be as shown in Table 1:
[0080] Table 1
[0081]
[0082]
[0083] It should be noted that Table 1 is only an example of the correspondence between the card type, layout information and display mode, and does not limit the correspondence between the card type, layout information and display mode.
[0084] For example, if the terminal device determines that the type of card is type 1, the terminal device can determine that the layout information of the card is layout information 1, and the display mode of each card element in the card is display mode 1; if the terminal device determines that the type of card is type 2, the terminal device can determine that the layout information of the card is layout information 2, and the display mode of each card element in the card is display mode 2; if the terminal device determines that the type of card is type 3, the terminal device can determine that the layout information of the card is layout information 3, and the display mode of each card element in the card is display mode 3.
[0085] S203: Determine a size of the card in the first interface according to the multiple first sizes, layout information, and multiple display modes.
[0086] In some embodiments, the terminal device can determine the size of the card in the first interface based on the following feasible implementation: determining the first parameter corresponding to each display mode, and determining the card size based on the multiple display modes, the multiple first parameters, the layout information, and the first size of each card element. In this way, the terminal device can accurately determine the size of each card based on the current configuration information (e.g., font size, display orientation, etc.), thereby improving the accuracy of card creation.
[0087] The first parameter can be used to process the first size corresponding to the display mode. For example, the first parameter can be used to increase or decrease the first size of the card element, thereby adapting the size of the card element to the display mode of the card element. For example, if the current font of the terminal device is large, the size of the title can be increased to ensure that the title area can fully display the text corresponding to the title.
[0088] For example, if the display mode is large font display, the first parameter of large font display can be 1.2; if the display mode is small font display, the first parameter of small font display can be 0.8. It should be noted that when the display mode is font size adaptation, the first parameter corresponding to the display mode is used to adjust the first size of the card element including text.
[0089] Exemplarily, the terminal device can determine the first size of the card element and, based on the layout information, determine the association between the card element and the size of the card. The terminal device can adjust the first size of the card element based on the first parameter and, based on the adjusted size of the card element and the association between the card element and the size of the card, accurately determine the size of the card, thereby improving the accuracy of card creation.
[0090] The embodiment of the present disclosure provides a card processing method. In response to an operation of displaying a first interface, a terminal device can send a request message to a server and receive card information sent by the server. The card information includes the data of the card, the type of the card, and the first size of each card element in the card. The terminal device can determine the layout information of the card and the display mode of each card element in the card according to the type of the card. The terminal device can determine the first parameter corresponding to each display mode, and determine the size of the card in the first interface according to multiple display modes, multiple first parameters, layout information, and the first size of each card element. In the above method, since the server can determine the first size of each card element, the terminal device can quickly determine the size of each card in the first interface, and since the terminal device can accurately predict the size of the card in the first interface according to the layout information of the card, the display mode of the card element, the first parameter of the display mode, and the first size of the card element, the terminal device can accurately create a card in the first interface, thereby improving the accuracy of card creation and improving the accuracy of the display of the first interface.
[0091] exist Figure 2 Based on the embodiment shown below, combined with Figure 4 , in the above-mentioned card processing method, a method for the terminal device to determine the size of the card according to multiple display modes, multiple first parameters, layout information and the first size of each card element is described in detail.
[0092] Figure 4 This is a schematic diagram of a method for determining the size of a card provided by an embodiment of the present disclosure. Figure 4 , the method flow may include:
[0093] S401: For any card element, process the first size according to the display mode and the first parameter to obtain the second size of the card element.
[0094] The second size may be the size of the card element after processing the first size. For example, the first size may be the actual size of the card element. Since the display mode also affects the size of the card element in the card, the terminal device may adjust the first size of the card element based on the first parameter of the display mode to obtain the second size. The second size may be the size of the card element in the card.
[0095] In some embodiments, when the display mode is adaptive font size, since the width of the card element associated with the text is usually the same as the width of the image, that is, the area where the text is located has more horizontal blank areas, therefore, when the terminal device adjusts the first size based on the first parameter of the display mode, the height in the first size can be adjusted.
[0096] For example, if the display mode is adapted to large font size, the first parameter of this display mode is 1.2. If the first size of the card element is 20*20 (width*height), the terminal device can multiply the height by the first parameter to obtain the second size of the card element, that is, the second size of the card element is 20*24. If the display mode is adapted to small font size, the first parameter of this display mode is 0.9. If the first size of the card element is 20*20 (width*height), the second size of the card element can be 20*18.
[0097] In some embodiments, the display mode may also include fixed display. For example, if the display mode of an image is fixed display, the first parameter corresponding to the display mode may be 1. For example, if the first size of an image is 200*200, if the display mode is fixed display, the second size of the image may be 200*200.
[0098] In some embodiments, the display mode may further include scaling. For example, if the first size of an image is 200*200 and the display mode is scaling, if the parameter corresponding to the display mode is 1.2, the terminal device may determine the second size of the image to be 240*240. If the parameter corresponding to the display mode is 0.9, the terminal device may determine the second size of the image to be 180*180.
[0099] S402: Determine the size of the card according to the multiple second sizes and layout information.
[0100] In some embodiments, the terminal device may determine the size of the card according to the following feasible implementation: based on the layout information, determine the card element associated with the height of the card and the card element associated with the width of the card, and determine the size of the card based on the second size of the card element associated with the height of the card and the second size of the card element associated with the width of the card. In this way, the terminal device can accurately determine the size of the card based on the second size of the card element and the layout information, thereby improving the accuracy of card creation.
[0101] In some embodiments, since the layout information can indicate the arrangement (display position) of card elements in the card, the terminal device can accurately determine the card elements associated with the height of the card and the card elements associated with the width of the card based on the layout information.
[0102] In some embodiments, the card element associated with the height of the card may be a card element whose second size affects the height of the card. For example, a card may include an image and a title. If the layout information of the card indicates that the image and the title are arranged from top to bottom, the heights of the image and the title will affect the height of the card. That is, the terminal device may determine the image and the title as card elements associated with the height of the card. If the layout information of the card indicates that the image and the title are arranged from left to right, and the height of the image is greater than the height of the title, the height of the image will affect the height of the card, and the height of the title will not affect the height of the card. That is, the terminal device may determine the image as a card element associated with the height of the card.
[0103] In some embodiments, the card element associated with the width of the card may be a card element whose second size affects the width of the card. For example, a card may include an image and a title. If the card layout information indicates that the image and title are arranged from top to bottom, and the width of the image is greater than the width of the title, then the width of the image will affect the width of the card, while the width of the title will not affect the width of the card. That is, the terminal device may determine the image as a card element associated with the width of the card. If the card layout information indicates that the image and title are arranged from left to right, then the widths of both the image and the title will affect the width of the card. That is, the terminal device may determine the image and the title as card elements associated with the width of the card.
[0104] Next, combine Figure 5 , describes the process of a terminal device determining a card element associated with a card size.
[0105] Figure 5 A schematic diagram of determining card elements associated with card size provided by an embodiment of the present disclosure. Figure 5 , including: card layout information. Among them, the upper area includes images and titles arranged from left to right. The titles include first-level titles, second-level titles, and third-level titles, and the first-level titles, second-level titles, and third-level titles are arranged from top to bottom. The lower area includes the interaction bar. Since the height of the image + the height of the interaction bar is the largest, the terminal device ( Figure 5 (Not shown) Card elements associated with the card's height may include: images and interactive bars.
[0106] See Figure 5Since the width of the image plus the width of the first-level title (second-level title or third-level title is also acceptable) is the largest, the terminal device can determine that the card elements associated with the card width include: the image and the first-level title (second-level title or third-level title). In this way, the terminal device can accurately determine the card elements associated with the card height and the card elements associated with the card width based on the layout information. Therefore, the terminal device can accurately determine the card size based on the second size of the card elements, thereby improving the accuracy of card creation.
[0107] In some embodiments, the second size may include height and width. The terminal device may determine the size of the card according to the following feasible implementation: determining the height of the card based on the height of a card element associated with the height of the card, and determining the width of the card based on the width of a card element associated with the width of the card, wherein the size of the card includes the height and width of the card. In this way, the terminal device can accurately determine the height and width of the card, thereby improving the accuracy of card creation.
[0108] In some embodiments, the terminal device may determine the sum of the heights of the card elements associated with the height of the card as the height of the card, and determine the sum of the widths of the card elements associated with the width of the card as the width of the card.
[0109] For example, a card element in a card may include an image, a first-level title, and a second-level title. The first size of the image is 200*200, the first size of the first-level title is 20*20, and the first size of the second-level title is 20*20. The display mode is a font adapted for large font size, and the first parameter corresponding to the display mode is 1.2. Since the image does not include text, the terminal device may determine that the image display mode is fixed, i.e., the second size of the image is also 200*200. The terminal device may determine that the second size of the first-level title is 20*24 (the width may remain unchanged), and the second size of the second-level title is 20*24. Based on the layout information, the terminal device determines that the card element associated with the card's height is the image, and that the card elements associated with the card's width include the image, the first-level mark, and the second-level title. Thus, the terminal device may determine that the card's width is the width of the image, i.e., the card's width is 200. The terminal device may determine that the card's height is the height of the image + the height of the first-level title + the height of the second-level title, i.e., the card's height is 248.
[0110] In some embodiments, the height and width of a card may satisfy the following formula:
[0111] height=f h1 (y1)+f h2 (y2)+…+f hn (y n )
[0112] width=f w1 (x1)+f w2 (x2)+…+f wn (x n )
[0113] Among them, height is the height of the card, width is the width of the card, x can be the width of the card element, y can be the height of the card element, f h and f w It can be a function associated with the first parameter (eg, the first parameter multiplied by the height or width).
[0114] The above formula is explained below through a specific example. The height and width of the card can satisfy the following formula:
[0115] height=f h1 (y1)+f h2 (y2)
[0116] width=f w1 (x1)
[0117] Among them, f h1 (y1)=1*y1,f h2 (y2) = A*y2, f w1 (x1) = 1 * x1, where y1 is the image height, y2 is the title height, A is the first parameter for font size adaptation, and x1 is the image width. That is, based on the above formula, the card height can be determined as image height + title height * first parameter, and the card width can be determined as the image width.
[0118] It should be noted that the above formula is an example of the height and width of a card, and is not a limitation of the height and width of a card.
[0119] Next, combine Figure 6 , a detailed description is given on determining the size of the card in the first interface.
[0120] Figure 6 This is a schematic diagram of a process for determining the size of a card in the first interface provided by an embodiment of the present disclosure. Figure 6 , including: card information and layout information. Among them, the card information includes images, first-level titles, second-level titles and third-level titles (card elements). Among them, the first size of the image is: height 20, width 20, the first size of the first-level title is: height 10, width 20, the first size of the second-level title is: height 10, width 20, and the first size of the third-level title is: height 20, width 20. Please refer to Figure 4The layout information of the card is: the height of the card is the height of the image + the height of the first-level title + the height of the second-level title + the height of the third-level title, and the width of the card is the width of the image.
[0121] See Figure 6 , the display mode is adapted to large font size, and the first parameter corresponding to this display mode is 1.3. The terminal device can determine that the width of the card is 20, and the height of the card is: the height of the image + the height of the first-level title * 1.3 + the height of the second-level title * 1.3 + the height of the third-level title * 1.3, that is, the height of the card is: 20 + 10 * 1.3 + 10 * 1.3 + 20 * 1.3 = 72. The terminal device can determine that the width of the card is 20 and the height of the card is 72. The terminal device can create the card in the first interface based on this size, thereby improving the accuracy of card creation.
[0122] Next, combine Figures 7 to 9 , the process of determining the size of the card is explained in detail.
[0123] Figure 7 A schematic diagram of determining the size of a video card provided by an embodiment of the present disclosure. Figure 7 , including a video card. The card elements in the video card include a cover image and a first-level title, and the cover image and the first-level title are arranged from top to bottom. The display mode of the cover image is fixed display, and the display mode of the first-level title is adaptive large font size. Terminal device ( Figure 7 (Not shown) The height of the video card can be determined as: the height of the cover image + the height of the first-level title × the first parameter for adapting to large font size. The terminal device can determine the width of the video card as: the width of the cover image.
[0124] Figure 8 This is a schematic diagram of determining the size of a search card provided by an embodiment of the present disclosure. Figure 8 , including a search card. The card elements in the search card include the main title, image, and interaction bar. The main title and image are arranged from left to right in the upper area, and the interaction bar is in the lower area. The image is displayed in a fixed manner, the main title is displayed in a fixed manner, and the interaction bar is displayed in a fixed manner. Terminal device ( Figure 8 (Not shown) The height of the search card can be determined as: the height of the image + the height of the interaction bar. The terminal device can determine the width of the search card as: the width of the image + the width of the main title.
[0125] Figure 9 This is a schematic diagram of determining the size of a live broadcast card provided by an embodiment of the present disclosure. Figure 9, including a live broadcast card. Among them, the card elements in the live broadcast card include a cover image, a first-level title, an evaluation area, and a store area, and the cover image, the first-level title, the evaluation area, and the store area are arranged from top to bottom. Among them, the display mode of the cover image is proportional scaling, the display mode of the first-level title and the evaluation area is adaptive large font size, and the display mode of the store area is fixed display. Terminal device ( Figure 9 (Not shown) The height of the live broadcast card can be determined as: the height of the cover image × the first parameter for scaling + the height of the first-level title × the first parameter for adapting to large font size + the height of the evaluation area × the first parameter for adapting to large font size + the height of the store area. The terminal device can determine the width of the live broadcast card as: the width of the cover image.
[0126] The disclosed embodiment provides a method for determining the size of a card. For any card element, a terminal device can process a first size based on a display mode and a first parameter to obtain a second size of the card element. The terminal device can determine the card element associated with the height of the card and the card element associated with the width of the card based on layout information, and determine the height of the card based on the height of the card element associated with the height of the card, and determine the width of the card based on the width of the card element associated with the width of the card. In this way, the terminal device can accurately determine the height and width of the card based on the second size of the card element and the layout information, thereby improving the accuracy of card creation.
[0127] On the basis of any of the above embodiments, after the terminal device determines the size of the card in the first interface, the card processing method further includes a method for displaying the first interface. Figure 10 , a method for displaying the first interface on the terminal device is described in detail.
[0128] Figure 10 This is a schematic diagram of a method for displaying a first interface provided by an embodiment of the present disclosure. Figure 10 The method flow includes:
[0129] S1001. Determine the display area of each card on the first interface according to the size of each card.
[0130] In some embodiments, after determining the size of each card, the terminal device may determine the display area of each card on the first interface based on the width and height of each card. For example, the terminal device may obtain the size of the first interface and determine the display area of each card on the first interface based on the size of the first interface and the width and height of each card.
[0131] For example, the width of the first interface is 200 and the height is 1000. The terminal device can determine that the horizontal area of the first interface can hold one card with a width of 200 or two cards with a width of 100. The vertical area of the first interface can hold five cards with a height of 200 or ten cards with a height of 100.
[0132] Optionally, after the terminal device determines the size of the first interface and the size of each card, it can determine the display area of each card on the first interface based on any feasible implementation method, which is not limited in this embodiment of the present disclosure.
[0133] Next, combine Figure 11 , wherein, taking the width of the card as a fixed width and the fact that two cards can be placed horizontally on the first interface as an example, the relationship between the height of the card and the display area is explained.
[0134] Figure 11 This is a schematic diagram of a method for determining the display area of each card provided by an embodiment of the present disclosure. Figure 11 , including: the size of the card. Among them, the height of card 1 is 60, the height of card 2 is 100, the height of card 3 is 100, the height of card 4 is 100, the height of card 5 is 100, and the height of card 6 is 60. The terminal device can determine that the height of the first interface is 260. Therefore, the terminal device can determine that card 2, card 4 and card 6 are arranged from top to bottom in the left half area, and card 1, card 3 and card 5 are arranged from top to bottom in the right half area. Among them, if the height of card 4 is adjusted to 40, the terminal device can redetermine the display area of each card in the first interface. Among them, card 2, card 4 and card 5 are arranged from top to bottom in the left half area, and card 1, card 3 and card 6 are arranged from top to bottom in the right half area. In this way, the accuracy of card arrangement can be improved.
[0135] S1002: Display the first interface according to the display area of each card in the first interface.
[0136] In some embodiments, the terminal device may determine the data of each card and display the first interface based on the display area of each card and the data of each card. For example, the terminal device may determine information such as image data and text data in a card and render the relevant data in the display area corresponding to the card, thereby displaying the first interface.
[0137] Exemplarily, the card elements in the card may include an image and a title, wherein the terminal device can determine the display area of the card in the first interface, and render image data at the position of the image in the card, and render text data at the position of the title, that is, the terminal device can render the card in the first interface. In this way, after the terminal device renders each card in the first interface, the first interface can display the information corresponding to each card. In other words, the terminal device has displayed the first interface, improving the interface display effect.
[0138] The disclosed embodiment provides a method for displaying a first interface, wherein a terminal device can determine the display area of each card in the first interface based on the size of each card, and display the first interface based on the display area of each card in the first interface. In this way, the terminal device can accurately determine the display area of each card in the first interface based on the size of each card and the size of the first interface, and the terminal device can quickly and accurately render the data corresponding to each card element in the card in the display area of the card, thereby improving the accuracy of card creation and card rendering, and improving the display efficiency and display accuracy of the first interface. Moreover, since the accuracy of the card size is relatively high, the terminal device does not need to re-adapt the card size based on the card data, thereby improving the user experience.
[0139] Figure 12 This is a schematic diagram of the structure of a card processing device provided by an embodiment of the present disclosure. Figure 12 The card processing device 1200 includes a first determination module 1201, a second determination module 1202 and a third determination module 1203, wherein:
[0140] The first determining module 1201 is configured to, in response to an operation of displaying the first interface, determine the type of card to be displayed in the first interface and the first size of each card element in the card;
[0141] The second determining module 1202 is configured to determine, based on the type of the card, layout information of the card and a display method of each card element in the card, wherein the layout information indicates an association between the size of the card and the size of the card elements;
[0142] The third determining module 1203 is configured to determine a size of the card in the first interface according to multiple first sizes, the layout information, and multiple display modes.
[0143] In this way, since the card processing device can predict the size of the card based on the card layout information, the display method of the card elements and the first size of the card elements, the accuracy of the card size can be improved. In this way, the card processing device can accurately create cards in the interface, improve the accuracy of card creation, and improve the accuracy of interface display.
[0144] According to one or more embodiments of the present disclosure, the third determining module 1203 is specifically configured to:
[0145] Determining a first parameter corresponding to each display mode, where the first parameter is used to process a first size corresponding to the display mode;
[0146] The size of the card is determined according to the multiple display modes, the multiple first parameters, the layout information, and the first size of each card element.
[0147] In this way, the card processing device can accurately determine the size of each card based on the current configuration information (such as font size, display direction, etc.), thereby improving the accuracy of card creation.
[0148] According to one or more embodiments of the present disclosure, the third determining module 1203 is specifically configured to:
[0149] For any card element, the first size is processed according to the display mode and the first parameter to obtain a second size of the card element;
[0150] The size of the card is determined according to the plurality of second sizes and the layout information.
[0151] In this way, the card processing device can accurately determine the height and width of the card according to the second size of the card element and the layout information, thereby improving the accuracy of card creation.
[0152] According to one or more embodiments of the present disclosure, the third determining module 1203 is specifically configured to:
[0153] Determining, according to the layout information, a card element associated with the height of the card and a card element associated with the width of the card;
[0154] The size of the card is determined based on a second size of the card element associated with a height of the card and a second size of the card element associated with a width of the card.
[0155] In this way, the card processing device can accurately determine the size of the card according to the second size of the card elements and the layout information, thereby improving the accuracy of card creation.
[0156] According to one or more embodiments of the present disclosure, the third determining module 1203 is specifically configured to:
[0157] determining the height of the card based on a height of a card element associated with the height of the card;
[0158] The width of the card is determined according to the width of the card element associated with the width of the card, and the size of the card includes the height and width of the card.
[0159] In this way, the card processing device can accurately determine the height and width of the card, thereby improving the accuracy of card creation.
[0160] According to one or more embodiments of the present disclosure, the first determining module 1201 is specifically configured to:
[0161] Sending a request message to the server, wherein the request message is used to request to obtain the card information for rendering the first interface;
[0162] Receive card information sent by the server, where the card information includes card data, the card type, and a first size of each card element in the card.
[0163] In this way, the server can quickly determine the size of the card elements, and the card processing device can accurately determine the size of the card according to the size of each card element, thereby improving the accuracy and efficiency of card creation.
[0164] According to one or more embodiments of the present disclosure, the third determining module 1203 is further configured to:
[0165] Determining a display area of each card on the first interface according to the size of each card;
[0166] The first interface is displayed according to the display areas of the cards on the first interface.
[0167] In this way, the terminal device can accurately determine the display area of each card in the first interface based on the size of each card and the size of the first interface, and the terminal device can quickly and accurately render the data in the display area of the card based on the data corresponding to each card element in the card, thereby improving the accuracy of card creation and card rendering.
[0168] The card processing provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0169] Figure 13 This is a schematic diagram of the structure of a terminal device provided by an embodiment of the present disclosure. Figure 13, which shows a schematic diagram of the structure of a terminal device 1300 suitable for implementing the embodiment of the present disclosure. Figure 13 As shown, terminal device 1300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1301, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1302 or programs loaded from a storage device 1308 into a random access memory (RAM) 1303. Various programs and data required for the operation of terminal device 1300 are also stored in RAM 1303. Processing device 1301, ROM 1302, and RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to bus 1304.
[0170] Typically, the following devices may be connected to the I / O interface 1305: an input device 1306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1309. The communication device 1309 may allow the terminal device 1300 to communicate with other devices wirelessly or by wire to exchange data. Figure 13 The terminal device 1300 is shown as having various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0171] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 1309, or installed from the storage device 1308, or installed from the ROM 1302. When the computer program is executed by the processing device 1301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0172] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), or any suitable combination thereof.
[0173] The computer-readable medium may be included in the terminal device, or may exist independently without being incorporated into the terminal device.
[0174] The computer-readable medium carries one or more programs. When the one or more programs are executed by the terminal device, the terminal device executes the method shown in the above embodiment.
[0175] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, various methods that may be involved in the above embodiments are implemented.
[0176] An embodiment of the present disclosure provides a computer program product, including a computer program, which implements various possible methods involved in the above embodiments when executed by a processor.
[0177] Since the terminal device can predict the size of the card based on the card layout information, the display method of the card elements and the first size of the card elements, the accuracy of the card size can be improved. In this way, the terminal device can accurately create cards in the interface, improve the accuracy of card creation, and improve the accuracy of interface display.
[0178] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0180] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0181] The functions described above herein can be performed at least in part by one or more hardware logic components. For example, without limitation, the hardware logic components of exemplary types that can be used include: field programmable gate array (FPGA), application specific integrated circuit (ASIC), application specific standard product (ASSP), system on chip (SOC), complex programmable logic device (CPLD) etc. In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0182] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0183] In a first aspect, an embodiment of the present disclosure provides a card processing method, the card processing method comprising:
[0184] In response to an operation of displaying a first interface, determining a type of a card to be displayed in the first interface and a first size of each card element in the card;
[0185] Determining, based on the type of the card, layout information of the card and a display method of each card element in the card, wherein the layout information indicates an association between the size of the card and the size of the card elements;
[0186] The size of the card in the first interface is determined according to multiple first sizes, the layout information, and multiple display modes.
[0187] According to one or more embodiments of the present disclosure, determining the size of the card in the first interface based on the multiple first sizes, the layout information, and the multiple display modes includes:
[0188] Determining a first parameter corresponding to each display mode, where the first parameter is used to process a first size corresponding to the display mode;
[0189] The size of the card is determined according to the multiple display modes, the multiple first parameters, the layout information, and the first size of each card element.
[0190] According to one or more embodiments of the present disclosure, determining the size of the card according to the multiple display modes, the multiple first parameters, the layout information, and the first size of each card element includes:
[0191] For any card element, the first size is processed according to the display mode and the first parameter to obtain a second size of the card element;
[0192] The size of the card is determined according to the plurality of second sizes and the layout information.
[0193] According to one or more embodiments of the present disclosure, determining the size of the card according to the multiple second sizes and the layout information includes:
[0194] Determining, according to the layout information, a card element associated with the height of the card and a card element associated with the width of the card;
[0195] The size of the card is determined based on a second size of the card element associated with a height of the card and a second size of the card element associated with a width of the card.
[0196] According to one or more embodiments of the present disclosure, the second size includes a height and a width; and determining the size of the card according to the second size of the card element associated with the height of the card and the second size of the card element associated with the width of the card includes:
[0197] determining the height of the card based on a height of a card element associated with the height of the card;
[0198] The width of the card is determined according to the width of the card element associated with the width of the card, and the size of the card includes the height and width of the card.
[0199] According to one or more embodiments of the present disclosure, determining the type of a card to be displayed in the first interface and the first size of each card element in the card includes:
[0200] Sending a request message to the server, wherein the request message is used to request to obtain the card information for rendering the first interface;
[0201] Receive card information sent by the server, where the card information includes card data, the card type, and a first size of each card element in the card.
[0202] According to one or more embodiments of the present disclosure, after determining the size of the card in the first interface, the method further includes:
[0203] Determining a display area of each card on the first interface according to the size of each card;
[0204] The first interface is displayed according to the display areas of the cards on the first interface.
[0205] In a first aspect, an embodiment of the present disclosure provides a card processing device, the card processing device including a first determination module, a second determination module, and a third determination module, wherein:
[0206] The first determining module is configured to, in response to an operation of displaying the first interface, determine a type of a card to be displayed in the first interface and a first size of each card element in the card;
[0207] The second determining module is configured to determine, based on the type of the card, layout information of the card and a display method of each card element in the card, wherein the layout information indicates a correlation between the size of the card and the size of the card elements;
[0208] The third determining module is configured to determine a size of the card in the first interface according to a plurality of first sizes, the layout information, and a plurality of display modes.
[0209] According to one or more embodiments of the present disclosure, the third determining module is specifically configured to:
[0210] Determining a first parameter corresponding to each display mode, where the first parameter is used to process a first size corresponding to the display mode;
[0211] The size of the card is determined according to the multiple display modes, the multiple first parameters, the layout information, and the first size of each card element.
[0212] According to one or more embodiments of the present disclosure, the third determining module is specifically configured to:
[0213] For any card element, the first size is processed according to the display mode and the first parameter to obtain a second size of the card element;
[0214] The size of the card is determined according to the plurality of second sizes and the layout information.
[0215] According to one or more embodiments of the present disclosure, the third determining module is specifically configured to:
[0216] Determining, according to the layout information, a card element associated with the height of the card and a card element associated with the width of the card;
[0217] The size of the card is determined based on a second size of the card element associated with a height of the card and a second size of the card element associated with a width of the card.
[0218] According to one or more embodiments of the present disclosure, the third determining module is specifically configured to:
[0219] determining the height of the card based on a height of a card element associated with the height of the card;
[0220] The width of the card is determined according to the width of the card element associated with the width of the card, and the size of the card includes the height and width of the card.
[0221] According to one or more embodiments of the present disclosure, the first determining module is specifically configured to:
[0222] Sending a request message to the server, wherein the request message is used to request to obtain the card information for rendering the first interface;
[0223] Receive card information sent by the server, where the card information includes card data, the card type, and a first size of each card element in the card.
[0224] According to one or more embodiments of the present disclosure, the third determining module is further configured to:
[0225] Determining a display area of each card on the first interface according to the size of each card;
[0226] The first interface is displayed according to the display areas of the cards on the first interface.
[0227] In a third aspect, the present disclosure provides a terminal device comprising: a processor and a memory;
[0228] The memory stores computer-executable instructions;
[0229] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the card processing method as described in the first aspect and various possible aspects of the first aspect.
[0230] In a fourth aspect, the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the card processing method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0231] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the card processing method as described in the first aspect and various possible aspects of the first aspect.
[0232] The names of the messages or information exchanged between the multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information. It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions. Data may include information, parameters and messages, such as flow switching indication information.
[0233] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0234] In addition, although the operations are described in a specific order, this should not be understood as requiring that these operations be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of this disclosure. Certain features described in the context of separate embodiments can also be implemented in a single embodiment in combination. Conversely, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination. Although the subject matter has been described in language specific to structural features and / or method logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A card processing method, characterized in that: include: In response to an operation of displaying a first interface, determining a type of a card to be displayed in the first interface and a first size of each card element in the card; Determining, based on the type of the card, layout information of the card and a display method of each card element in the card, wherein the layout information indicates an association between the size of the card and the size of the card elements; The size of the card in the first interface is determined according to multiple first sizes, the layout information, and multiple display modes.
2. The method according to claim 1, characterized in that The determining, based on the multiple first sizes, the layout information, and the multiple display modes, of the size of the card in the first interface includes: Determining a first parameter corresponding to each display mode, where the first parameter is used to process a first size corresponding to the display mode; The size of the card is determined according to the multiple display modes, the multiple first parameters, the layout information, and the first size of each card element.
3. The method according to claim 2, characterized in that The determining the size of the card according to the multiple display modes, the multiple first parameters, the layout information, and the first size of each card element includes: For any card element, the first size is processed according to the display mode and the first parameter to obtain a second size of the card element; The size of the card is determined according to the plurality of second sizes and the layout information.
4. The method according to claim 3, characterized in that The determining the size of the card according to the plurality of second sizes and the layout information includes: Determining, according to the layout information, a card element associated with the height of the card and a card element associated with the width of the card; The size of the card is determined based on a second size of the card element associated with a height of the card and a second size of the card element associated with a width of the card.
5. The method according to claim 4, characterized in that The second size includes a height and a width; and determining the size of the card according to the second size of the card element associated with the height of the card and the second size of the card element associated with the width of the card includes: determining the height of the card based on a height of a card element associated with the height of the card; The width of the card is determined according to the width of the card element associated with the width of the card, and the size of the card includes the height and width of the card.
6. The method according to any one of claims 1 to 5, characterized in that Determining the type of the card to be displayed in the first interface and the first size of each card element in the card includes: Sending a request message to the server, wherein the request message is used to request to obtain the card information for rendering the first interface; Receive card information sent by the server, where the card information includes card data, the card type, and a first size of each card element in the card.
7. The method according to any one of claims 1 to 5, characterized in that After determining the size of the card in the first interface, the method further includes: Determining a display area of each card on the first interface according to the size of each card; The first interface is displayed according to the display areas of the cards on the first interface.
8. A card processing device, characterized in that: It includes a first determining module, a second determining module and a third determining module, wherein: The first determining module is configured to, in response to an operation of displaying the first interface, determine a type of a card to be displayed in the first interface and a first size of each card element in the card; The second determining module is configured to determine, based on the type of the card, layout information of the card and a display method of each card element in the card, wherein the layout information indicates a correlation between the size of the card and the size of the card elements; The third determining module is configured to determine a size of the card in the first interface according to a plurality of first sizes, the layout information, and a plurality of display modes.
9. A terminal device, characterized in that: include: processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the card processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the card processing method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the card processing method according to any one of claims 1 to 7 when executed by a processor.