Card display method and related products

The card type and layout are determined through protocol data, which solves the problem of single card display function of electronic devices, realizes the display of video and animation data, and improves the richness and user experience of card display.

CN115033331BActive Publication Date: 2024-11-19GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210743655.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-11-19
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

The card display function of existing electronic devices is relatively single and cannot support the display of video software, resulting in a low card richness.

Method used

Through protocol data, determine the card type and layout between the negative screen and the target application, achieve the diversified layout of the target card, and support the display of video data and animation data.

Benefits of technology

It improves the richness of card display, realizes the display of video and animation data, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033331B_ABST
    Figure CN115033331B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a card display method and related products, the method comprising: in response to a first operation, displaying a negative one screen; obtaining protocol data and card data of a target application in the negative one screen; parsing the protocol data, determining the card type of a target card corresponding to the target application, and laying out the target card corresponding to the target application in the negative one screen according to the card type; displaying the card data in the target card, wherein the card data includes at least one of the following: video data, animation data, text data, and picture data. The use of the embodiment of the present application is conducive to realizing the diversification of card layout, and realizing the display of video data or animation data, etc. through target cards, which is conducive to improving the richness of card display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and in particular to a card display method and related products. Background Art

[0002] With the advancement of multimedia technology, the application scope of electronic devices is becoming wider and wider, and their corresponding functions are becoming more and more abundant. For example, the negative screen can be used to integrate application functions and information into one interface to help users obtain information in the application in a timely manner. For example, different application functions can be provided to users through cards, such as searching for food, movies, travel and other information, or displaying news flashes, stock market conditions, weather conditions and other information. Users can add cards corresponding to applications through the negative screen, but the current richness of cards is low, and they often display some text information, and cannot support the display of video software. Summary of the invention

[0003] The embodiments of the present application provide a card display method and related products, which can determine the card type and card layout between the negative one screen and the target application through protocol data, so as to realize the layout of target cards for different target applications, which is conducive to realizing the diversification of card layout and realizing the display of video data or animation data, etc., which is conducive to improving the richness of card display.

[0004] In a first aspect, an embodiment of the present application provides a card display method, the method comprising:

[0005] In response to the first operation, displaying a negative one screen;

[0006] Acquire the protocol data and card data of the target application in the negative one screen;

[0007] Parsing the protocol data, determining the card type of the target card corresponding to the target application, and laying out the target card corresponding to the target application on the negative first screen according to the card type;

[0008] The card data is displayed in the target card, wherein the card data includes at least one of the following: video data, animation data, text data and picture data.

[0009] In a second aspect, an embodiment of the present application provides a card display device, which is applied to an electronic device. The device includes: a display unit, an acquisition unit, and a layout unit, wherein:

[0010] The display unit is used to display a negative one screen in response to the first operation;

[0011] The acquisition unit is used to acquire the protocol data and card data of the target application in the negative one screen;

[0012] The layout unit is used to parse the protocol data, determine the card type of the target card corresponding to the target application, and layout the target card corresponding to the target application on the negative one screen according to the card type;

[0013] The display unit is further used to display the card data in the target card, wherein the card data includes at least one of the following: video data, animation data and text data.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any method in the first aspect of the embodiment of the present application.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0017] It can be seen that in the embodiment of the present application, in response to the first operation, the negative one screen is displayed; the protocol data and card data of the target application in the negative one screen are obtained; the protocol data is parsed to determine the card type of the target card corresponding to the target application, and according to the card type, the target card corresponding to the target application is laid out in the negative one screen; the card data is displayed in the target card, wherein the card data includes at least one of the following: video data, animation data, text data, and image data. In this way, the card type and card layout between the negative one screen and the target application can be determined through the protocol data to realize the layout of the target cards for different target applications, which is conducive to realizing the diversification of the card layout, and the display of video data or animation data, etc., can be realized through the target card, which is conducive to improving the richness of the card display. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 is a structural schematic diagram of a card display system provided in an embodiment of the present application;

[0020] Figure 2 It is a flowchart of a card display method provided in an embodiment of the present application;

[0021] Figure 3A It is a schematic diagram of interaction between a negative one screen and a target application provided in an embodiment of the present application;

[0022] Figure 3B It is a schematic diagram of interaction between a negative one screen and a target application provided in an embodiment of the present application;

[0023] Figure 3C It is a schematic diagram of interaction between a negative one screen and a target application provided in an embodiment of the present application;

[0024] Figure 4 is a card schematic diagram of a music application provided in an embodiment of the present application;

[0025] Figure 5 It is a flowchart of a card display method provided in an embodiment of the present application;

[0026] Figure 6 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0027] Fig. 7A It is a block diagram of the functional units of a card display device provided in an embodiment of the present application;

[0028] Figure 7B It is a block diagram of the functional units of a card display device provided in an embodiment of the present application;

[0029] Figure 7C It is a block diagram of the functional units of a card display device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0032] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0033] 1) The electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or a music player, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication functions (such as a smart watch, smart glasses), a vehicle-mounted device, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with an IOS system, an Android system, a Microsoft system, or other operating systems. The above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer, etc. It should also be understood that in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.

[0034] 2) Assistant Screen: The interface that appears after swiping left on the main interface of an electronic device. It is used to display multiple cards corresponding to multiple applications (programs), and each application can correspond to one card.

[0035] 3) Target Card or Cards: Cards that can be added to the negative one screen to provide users with different application functions of the corresponding application, for example, they can search for information on food, movies, travel, etc., or they can display news flashes, stock market conditions, weather conditions, etc.

[0036] In the first part, the example application scenarios disclosed in the embodiments of the present application are introduced as follows.

[0037] Figure 1 The structure diagram of the card display system 100 applicable to the present application is shown. The system 100 may include: a negative one screen 101, a card service module 102 and a card data configuration module 103.

[0038] The negative first screen 101 is connected to the card service module 102, and the card service module 102 can be connected to the card data configuration module 103. The negative first screen 101 can interact with the card data configuration module 103 through the card service module 102.

[0039] Among them, the negative first screen 101 can be used to display target cards corresponding to one or more target applications, and the card type of the target card can include at least one of the following: video type, animation type, text type, and picture type, etc. In the negative first screen 101, the layout or card style of each target card can be determined according to its corresponding target application. The above-mentioned target applications can include at least one of the following: video applications, music applications, shopping applications, food delivery applications, stock applications, reading applications, etc., which are not limited here.

[0040] Optionally, the negative one screen 101 may provide a card subscription service, which may be used for users to set up their own or system default configuration or to subscribe to a target card corresponding to a target application.

[0041] Among them, the above-mentioned card service module 102 is equivalent to a data channel, which can connect the data interaction between the negative one screen 101 and the target application. The above-mentioned target application may include third-party applications, quick applications, plug-ins, etc., which are not limited here. The card service module 102 can be used to set and manage the card life cycle corresponding to each target card; it can be used to cache card data, and the card data may include at least one of the following: video data, animation data, text data and picture data, etc., which are not limited here; it can be used to cache data channel information, wherein the data channel information is different from the card data, and the corresponding data channel is different. The card data can be cached content data for card display. The data channel information is related to the card life cycle and can be used to store instructions issued to the target application when the card life cycle changes.

[0042] Optionally, when the corresponding card life cycle of a target card is updated, the card service module 102 will send a card life cycle update instruction to the negative one screen 101 to update the card life cycle, and cache the instruction for sending the instruction to the target service to synchronize the card life cycle corresponding to the target application.

[0043] The target application can provide data, such as protocol data, card data, etc., to the negative first screen 101 and / or the card service module 102 through the card data configuration module 103, which is not limited here. Of course, the card data can also be pre-stored in the card service module 102, so as to update the corresponding display data when displaying the target card.

[0044] Among them, the above-mentioned card data configuration module 103 can also be used to provide card configuration functions to one or more target applications. The target application can configure or set the protocol data of its corresponding target card through the card data configuration module 103. The protocol data can be used to indicate the card layout, card shape, card size, card color, control customization, card type, etc. of the target card, which is not limited here.

[0045] The card data configuration module 103 may also provide a protocol mode for one or more target applications to describe the card layout, custom animation effects, custom video playback, etc. of the corresponding target card, which is not limited here.

[0046] It can be seen that in the present application, the above-mentioned negative one screen 101, card service module 102 and card data configuration module 103 can be used to provide an interface or platform for the target application to support the target application's animation effect customization, video playback, control customization and other functions, and provide a more complete card life cycle for the target card corresponding to the target application, so as to better manage the target card and provide capabilities such as refresh layout and card rendering.

[0047] It should be noted that, in the present application, the above-mentioned multiple may refer to two or more than two, which will not be repeated later.

[0048] In the second part, the protection scope of the claims disclosed in the embodiments of the present application is introduced as follows.

[0049] See also Figure 2 , Figure 2 It is a flowchart of a card display method provided in an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the card display method includes the following operations.

[0050] S201. In response to a first operation, display a negative one screen.

[0051] Among them, the above-mentioned negative one screen can be as follows Figure 1 The negative one screen 101 is shown.

[0052] The first operation can be used to trigger the display of the negative one screen. The first operation can be set by the user or by the system default, which is not limited here. For example, it can be detected that a sliding operation is performed from other interfaces to the negative one screen interface, or other operations such as clicking or flipping up and down. Of course, it can also be entered into the negative one screen interface by other triggering methods.

[0053] S202: Acquire protocol data and card data of the target application in the negative one screen.

[0054] Among them, the above-mentioned target application may refer to any application that reaches a card display agreement with the negative first screen of the electronic device, which may be at least one of the following: video applications, music applications, shopping applications, food delivery applications, stock applications, reading applications, etc., without limitation here.

[0055] The protocol data can be used to describe the protocol content of the target application, such as card layout, card shape, card size, card color, control customization, card type, etc. The protocol data can be a description file in json format; the specific content of the protocol data can be determined according to the card type.

[0056] For example, for an animation type target card, the protocol data may also include animation effects, etc. The animation effects may be reflected through features such as a progress bar and a rotating disc.

[0057] The card data may refer to data used for card display. For example, if the card data is video data, the card data may be data used for video playback and may be cached in advance in a location such as Figure 1 The card data configuration module shown is used to play the above video data through the target card after the card is displayed.

[0058] S203: Parse the protocol data to determine the card type of the target card corresponding to the target application, and layout the target card corresponding to the target application on the negative first screen according to the card type.

[0059] Among them, the protocol specifications of the above-mentioned protocol data can be set by the user or by the system default, and are not limited here; the protocol specifications can be used to define the protocol content included in the protocol data, as well as the protocol format and display method corresponding to the protocol content, etc.

[0060] The card types mentioned above may include at least one of the following: video type, animation type, text type, and picture type, etc., which are not limited here.

[0061] Among them, when the target card corresponding to the target application is created for the first time, the corresponding target card can be generated according to the card type and protocol data; if it is not the first time to create the target card corresponding to the target application, the target card is laid out on the negative one screen according to the card type, so as to lay out the style of the target card to reflect the functional effect of the target application, for example, it can be a video effect or animation effect, etc., which is not limited here.

[0062] For example, by parsing the protocol data, the target control corresponding to the template application can be obtained, and the control can be a native control or a custom control. Then, the functions and event capabilities can be expanded according to the target control. For example, the function can be a video capability or an animation capability, etc. Then, the generated target controls and functions (for example, animation effects) can be rendered and laid out in the target card through the target card, and then the target card can be displayed on the negative one screen.

[0063] S204. Display the card data in the target card, wherein the card data includes at least one of the following: video data, animation data, text data, and picture data.

[0064] The card data may be displayed in the target card after layout, so as to realize the display of video data or animation data, etc. through the target card.

[0065] It can be seen that in this example, while triggering the negative one screen display, the acquisition of the protocol data and card data of the target application in the negative one screen, the layout of the target card, and the display of the card data in the target card can be completed. When the card life cycle of the target card subsequently indicates that the display state of the target card is switched from an invisible state to a visible state, it is beneficial to ensure that the target card displays the latest layout or the latest card data, which is beneficial to improve the user experience.

[0066] Optionally, for the following scenario: when the electronic device detects that the user switches from video application A to the negative one screen, the application A has a display agreement with the negative one screen, and card A can be displayed on the negative one screen to display the video data of the application A; then, the protocol data and card data corresponding to the application A can be obtained, and the card data can be the video data displayed in the next N seconds (this condition can also be limited according to the protocol data) of the application A actively obtained by the negative one screen, then the protocol data can be parsed to obtain the card layout of card A and the card type of the video type, and according to the card type, the card A is laid out according to the card layout in the negative one screen to display the video data corresponding to the next N seconds of application A. In this way, when the user switches application A to the background, the video data corresponding to the application A can still be played through the target card to remind the user that the current application A is playing the video data, so as to expand the function of the card A, so as to realize the online video playback function through the negative one screen, which is conducive to improving the user experience.

[0067] It can be seen that the card display method described in the embodiment of the present application displays the negative one screen in response to the first operation; obtains the protocol data and card data of the target application in the negative one screen; parses the protocol data to determine the card type of the target card corresponding to the target application, and layouts the target card corresponding to the target application in the negative one screen according to the card type; displays the card data in the target card, wherein the card data includes at least one of the following: video data, animation data, text data, and image data. In this way, the card type and card layout between the negative one screen and the target application can be determined through the protocol data to realize the layout of the target cards for different target applications, which is conducive to realizing the diversification of the card layout, and the display of video data or animation data, etc., can be realized through the target card, which is conducive to improving the richness of the card display.

[0068] In a possible example, before parsing the protocol data and determining the card type of the target card corresponding to the target application, the method further includes the following steps: determining a card life cycle of the target card, wherein the card life cycle is controlled by a first instruction, a second instruction, a third instruction and a fourth instruction, the first instruction being used to indicate card creation, the second instruction being used to indicate that the display state of the target card is switched from an invisible state to a visible state, the third instruction being used to indicate that the display state of the target card is switched from the visible state to the invisible state, and the fourth instruction being used to indicate that the card is deleted; managing the protocol data of the target card according to the card life cycle; or, helping the target application to complete business requirements according to the card life cycle.

[0069] Among them, each target card corresponding to the target application may correspond to its own card life cycle, and the card life cycle can be Figure 1 The card service module 102 is shown configured.

[0070] The card life cycle may be described by multiple instructions, which may include at least one of the following: a first instruction, a second instruction, a third instruction, and a fourth instruction, etc., which are not limited here. The first instruction, the second instruction, the third instruction, and the fourth instruction may be used to manage the target card in various states (including: visible state, invisible state, deleted state, initial state, etc., wherein, in this application, the visible state and the invisible state may be unified as the display state).

[0071] Among them, the above-mentioned first instruction can be used to indicate that the target card is created, and the target card is in an initial creation state. After the card service module 102 first creates the target card of the target application, the card service module 102 can send a first instruction to the target application through the card data configuration module 103 to notify the target application that the creation of the target card is complete; the second instruction is used to indicate that the display state of the target card is switched from an invisible state to a visible state. Through the second instruction, the card service module 102 can pull up the target application and send a second instruction to the target application through the card data configuration module 103 to notify the target application that the target card is switched from an invisible state to a visible state at this time. If the card life cycle is changed Changes may occur, and it may be necessary to update, refresh, or cache the card data or protocol data to prepare for the next update of the card layout and / or card data in the target card; the above-mentioned third instruction is used to indicate that the display state of the target card is switched from the visible state to the invisible state, and the card service module 102 can send the third instruction to the target application through the card data configuration module 103; the fourth instruction is used to indicate that the card is deleted, the target card is in the deleted state, and the fourth instruction is sent to the target application through the card data configuration module 103 to notify the target application that the corresponding target card is deleted, which is conducive to helping the target application release corresponding resources in time.

[0072] It can be seen that in this example, the target card can be managed in various states through the above-mentioned card life cycle, and under different conditions, different instructions (for example, the first instruction, the second instruction, the third instruction and the fourth instruction) can be triggered to be sent to the target application to pull up the target application, so that the target application is in the background state, so as to update data in real time, or release data in time, which is conducive to better management of the target card in the negative one screen to realize multi-card management.

[0073] In one possible example, the method for determining the card life cycle of the target card includes the following steps: if the target card is in the first creation state, sending the first instruction to the target application; in response to a second operation, switching the display state of the target card from the invisible state to the visible state, and sending the second instruction to the target application so that the target application is in the background state; in response to a third operation, switching the display state of the target card from the visible state to the invisible state, and sending the third instruction to the target application; in response to a fourth operation, deleting the target card, and sending the fourth instruction to the target application.

[0074] The second operation, the third operation and / or the fourth operation are different from the first operation, and the second operation, the third operation and / or the fourth operation can be set by the user or set by the system by default, which is not limited here. The operations corresponding to the second operation, the third operation and the fourth operation can be different or the same.

[0075] For example, Figure 3A As shown, it is a schematic diagram of the interaction between the negative one screen and the target application, and the negative one screen includes a target card A, a target card 1 and a target card 2; wherein, the target card 1 displays the information such as the played songs, singers, progress bars, etc. of the music target application through an animation state, and the target card 2 can be used to display the news clips of the news target application, and the target card A can be used to display the user's planned tasks for today. When the electronic device detects that the user slides down the negative one screen, the target card A gradually slides out of the screen and is outside the display range of the current negative one screen, that is, the target card A changes from being within the display range of the negative one screen to being outside the display range. At this time, since the target card A has drawn the display range, the negative one screen can adapt another target card B in the uppermost display area, and the target card B is used to display the user's exercise data (including exercise mileage, exercise burned calories, today's exercise completion, etc.); it can be determined that the display state of the target card A is switched from a visible state to an invisible state, and then the electronic device or the negative one screen can send a third instruction to the target application A corresponding to the target card A; such as Figure 3B As shown, it is a schematic diagram of the interaction between the negative one screen and the target application. Figure 3A In contrast, at this time, application A draws a display range of the negative one screen, which includes target card B, target card 1 and target card 2. Target card B is used to display the user's exercise data (including exercise mileage, exercise burned calories, today's exercise completion, etc.); target card B gradually changes from outside the display range of the negative one screen to within the display range, then it can be determined that the display state of target card B is switched from invisible to visible, and the negative one screen can send a second instruction to the target application B corresponding to target card B; Figure 3CAs shown, it is a schematic diagram of the interaction between the negative one screen and the target application, and the negative one screen includes a target card B, a target card 1 and a target card 2. When the electronic device detects that the user has long pressed the target card 1, the target card 1 can be deleted in the negative one screen, and the above-mentioned fourth instruction is sent to the target application 1 corresponding to the target card 1 to inform the target application 1 that its corresponding target card 1 has been deleted.

[0076] It can be seen that in this example, the target card can be managed in various states through the above-mentioned card life cycle, and under different conditions, different instructions (for example, the first instruction, the second instruction, the third instruction and the fourth instruction) can be triggered to be sent to the target application to pull up the target application, so that the target application is in the background state, so as to update data in real time, or release data in time, which is conducive to better management of the target card in the negative one screen to realize multi-card management.

[0077] In a possible example, according to the card life cycle, the target application is helped to complete business needs. The above method may also include the following steps: if it is determined that the display state of the card is switched from the invisible state to the visible state, the configuration information of the target card is determined; if the configuration information indicates that the target card supports active refresh, the refresh interval between the previous sending of the second instruction by the target card and the current sending of the second instruction is determined, and the second instruction currently sent is marked as valid; if the refresh interval is less than or equal to the minimum time interval, the target instruction sent to the target application is determined, and the target instruction is placed in a message queue, and the message queue is used to send the target instruction to the target application, and the target instruction is used by the target application to complete business needs.

[0078] In this example, if Figure 1 When the card service module 102 shown detects a refresh status instruction sent by the target application that requires refreshing its corresponding display data, it can generate a target instruction when the card life cycle of the target card changes (for example, if it is detected that the display status of the target card switches from an invisible state to a visible state, etc.), and through the target instruction and the message queue, realize the update of the display data in the target application.

[0079] The above configuration information may include at least one of the following: whether the target card supports active refresh, the corresponding minimum time interval in the case of active refresh, etc., which are not limited here.

[0080] The card service module 102 will record the time of sending the second instruction each time.

[0081] The above minimum time interval can be set by the user or by the system default, and is not limited here. The minimum time interval can be used to evaluate whether the target application needs to update or refresh the display data at this time. When the time interval between sending the second instruction twice is less than or equal to the minimum time interval, the sending of the target instruction and other steps can be triggered to ensure that the target application achieves its own business needs. For example, when the user switches from the negative one screen to the target application, the display data of the target application can be guaranteed to be consistent with the card data in the target card, which can be used to refresh the display data of the target application.

[0082] Optionally, the above-mentioned target instructions can be used to be sent to a target application to pull up the target application so that the target application can complete its desired business needs, such as refreshing the display page UI data, updating the display data in the background, determining the user's current video playback progress, determining the news clip that the user is currently reading, etc.

[0083] In a specific implementation, if the target application needs to refresh the data corresponding to the target card, and when the display state of the target card is switched from an invisible state to a visible state, the negative one screen needs to send a second instruction to the target application. Before sending the second instruction, it can be further determined that the target card supports active refresh, and the difference (time interval) between the sending time of the current second instruction and the last sending of the second instruction is determined as the refresh interval, and when the refresh interval is less than or equal to the minimum time interval, the target instruction that needs to be sent to the target application is determined.

[0084] In this case, it is necessary to send a second instruction to the target application to switch the display state of the target card from invisible to visible. Then, data preparation can be performed directly in the callback process of the second instruction, that is, the target instruction is stored in the message queue. Figure 1 When the card service module 102 shown detects a refresh status instruction sent by the target application that requires refreshing its corresponding display data, it indicates that the target application needs to implement data refresh. The target application can pull the target instruction from the message queue, and the card service module 102 can push the card data corresponding to the target card corresponding to the second instruction (which can be the cached data displayed by the current target card) to the target application to implement a refresh of the display data in the target application, or directly pull the card data corresponding to the target application to implement its own business needs.

[0085] It can be seen that in this example, the electronic device can prepare data directly in the callback process of the second instruction while sending the second instruction during the card life cycle, that is, directly store the target instructions for the target application business needs in the message queue. When the target application needs data refresh or data update, the target application can directly pull the card data corresponding to the target application through the message queue to realize its own business needs.

[0086] In a possible example, the protocol data of the target card is managed according to the card life cycle, including: in response to a refresh status instruction sent by the target application, receiving the target data corresponding to the refresh status instruction; determining whether the target card supports active refresh; if it is determined that the target card supports the active refresh, updating the protocol data of the target card to the target data; if it is determined that the target card does not support the active refresh, determining whether the display state of the target card is the visible state; if it is determined that the display state of the target card is the invisible state, caching the target data; if it is determined that the display state of the target card is the visible state, updating the protocol data of the target card to the target data.

[0087] In this example, when the target application has a business update requirement for the target card in the negative one screen, for example, the card layout of the target card in the negative one screen needs to be updated, it can directly report to the following: Figure 1 The card service module 102 shown sends a refresh status instruction, which may carry target data, and the target data may include updated protocol data.

[0088] Among them, when the target card does not support active refresh, the display state of the target card can be further determined. When the corresponding display state is visible, the protocol data of the target card can be timely adapted or updated, and the card layout and other data of the target card can be timely updated. When the corresponding display state is invisible, the target data can be cached, which is conducive to saving computing resources of electronic devices.

[0089] It can be seen that in this example, when the target application has a business update requirement for the target card in the negative one screen, it can actively send a refresh status instruction to the target card corresponding to the target application. The target data sent by the target application can be adapted based on the display status of the target card (visible or invisible, etc.) and whether the target card supports active refresh. This is conducive to achieving real-time updates of the card layout.

[0090] In one possible example, in response to the refresh status instruction sent by the target application, after receiving the target data corresponding to the refresh status instruction, the method further includes the following steps: if it is detected that the target card switches from the invisible state to the visible state, determining whether the target card supports the active refresh; if it is determined that the target card supports the active refresh, updating the protocol data of the target card to the target data; if it is determined that the target card does not support the active refresh, determining whether the target card corresponds to cached data; if it is determined that the target card corresponds to the cached data, updating the protocol data of the target card to the cached data.

[0091] In the specific implementation, in this example, if the target card is in a state switching state at this time, especially when the display state switches from an invisible state to a visible state, if a refresh state instruction sent by the target application is received at this time, then it can be determined whether the target card supports active refresh. If it supports active refresh, the protocol data of the target card can be directly updated to the target data, and the target data can be parsed to display the new card layout, etc. If active refresh is not supported, it can be further determined whether it corresponds to cached data (the cached data may be the target data corresponding to the last refresh state instruction), and when it is determined that it corresponds to cached data, the protocol data of the target card is directly updated to cached data, and the cached data is parsed to display the new card layout, etc. Finally, the target data can be cached. If it does not correspond to cached data, the protocol data of the target card can be updated to the target data, and the target data can be parsed to display the new card layout, etc.

[0092] It can be seen that in this example, when the target application has a business update requirement for the target card in the negative one screen, it can actively send a refresh status instruction to the target card corresponding to the target application. The target data sent by the target application can be adapted based on whether the target card has corresponding cache data and whether the target card supports active refresh. This is conducive to achieving real-time update of the card layout.

[0093] In one possible example, the protocol data is parsed to determine the card type of the target card corresponding to the target application, and according to the card type, the target card corresponding to the target application is laid out on the negative first screen. The method may include the following steps: parsing the protocol data to obtain the description file and card layout information corresponding to the target application; generating a target control according to the description file; determining the card type of the target card according to the target control; and laying out the target card on the negative first screen according to the card layout information and the card type.

[0094] The target control may be a custom setting or a native control of the target application.

[0095] Among them, the above-mentioned target control can be used to realize the display of video data and animation data in particular, and the layout of video data and UI layout of animation data can be realized through the card layout information corresponding to the protocol data to achieve animation effects.

[0096] It can be seen that in this example, when the target card is created for the first time or the protocol data is parsed for the first time, the target control corresponding to the target application can be obtained by parsing the protocol data, and the card type can be determined according to the target control, and the layout of the target card can be completed according to the card type and card layout information. This is conducive to the display of multiple types of cards.

[0097] In a possible example, the card type includes at least one of the following: video type, animation type, text type, and picture type.

[0098] In one possible example, the card data is displayed in the target card, and the method may include the following steps: if it is determined that the card type is the video type, calling a preset library, and a first drawing tool establishing a sub-thread to refresh the video data in the target card to realize the rendering of the video data in the target card corresponding to the target application.

[0099] In a possible example, the negative one screen establishes a main thread through a second drawing tool to layout the target card in the negative one screen through the card layout information.

[0100] The preset library can be set by the user or by the system default, which is not limited here. The preset library can be used to provide standard audio and video components, etc., and can be an ExoPlayer library.

[0101] Among them, the electronic device may include a first drawing tool (SurfaceView) and a second drawing tool (View), wherein the above-mentioned first drawing tool can be used to establish a sub-thread, and each target card can correspond to a sub-thread; the above-mentioned second drawing tool can be used to establish a main thread, and the main thread can be used to complete the overall layout corresponding to multiple target cards in the entire negative one screen.

[0102] For example, the card service module 102 may call the method provided by the dependent video player (EXOPlayer) in its corresponding software development kit (SDK), render a playback interface (playerview) through SurfaceView, and call the playback method encapsulated in EXOPlayer when playing the video.

[0103] It can be seen that in this example, the rendering and layout of each target card and all target cards in the negative one screen can be distinguished through the child thread and the main thread, which is helpful to help each target application quickly realize the display and generation of cards and improve rendering efficiency.

[0104] In one possible example, the card data is displayed in the target card, and the method may include the following steps: if it is determined that the card type is the animation type, then the animation attribute information corresponding to the protocol data is determined, and the animation data in the target card is rendered according to the animation attribute information.

[0105] The above animation attribute information can be used to describe the effects, UI display, layout and other information of the animation, and can include at least one of the following: number of plays, play cycle, animation duration, rotation angle, style of the rotation speed progress bar, animation duration, style of the rotating disc, rotation angle of the rotating disc, rotation cycle of the rotating disc, etc., which are not limited here.

[0106] It can be seen that in this example, the rendering of animation data can be realized to provide users with a display of data of various applications, which is conducive to improving the richness of card display.

[0107] In a possible example, the animation attribute information includes at least one of the following: a progress bar style, an animation duration, a rotating disc style, a rotating disc rotation angle, and a rotating disc rotation period.

[0108] For example, if Figure 4 As shown, it is a card schematic diagram of a music application. The target card corresponding to the music application can be used to display the progress of the currently playing song, the duration of the song, the singer, etc. The singer can also be displayed by rotating the disc control, the progress of the song can be displayed by the progress bar control, and the song can be fast-forwarded by the waving progress bar control. The song can be paused, played on the previous or next song, etc. by the previous, next and pause controls, thereby realizing the animation effect of the target application.

[0109] See also Figure 5 , Figure 5 It is a flowchart of a card display method provided in an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the card display method includes the following operations.

[0110] S501. In response to a first operation, display a negative one screen.

[0111] S502: Acquire protocol data and card data of the target application in the negative one screen.

[0112] S503. Determine the card life cycle of the target card, wherein the card life cycle is controlled by a first instruction, a second instruction, a third instruction and a fourth instruction, the first instruction is used to indicate card creation, the second instruction is used to indicate that the display state of the target card is switched from an invisible state to a visible state, the third instruction is used to indicate that the display state of the target card is switched from the visible state to the invisible state, and the fourth instruction is used to indicate that a card is deleted.

[0113] S504: In response to the refresh status instruction sent by the target application, receive target data corresponding to the refresh status instruction.

[0114] S505: Determine whether the target card supports active refresh.

[0115] S506: If it is determined that the target card supports the active refresh, the protocol data of the target card is updated to the target data.

[0116] S507: If it is determined that the target card does not support the active refresh, determine whether the display state of the target card is the visible state.

[0117] S508: If it is determined that the display state of the target card is the invisible state, cache the target data.

[0118] S509: If it is determined that the display state of the target card is the visible state, the protocol data of the target card is updated to the target data.

[0119] S510: If it is detected that the target card is switched from the invisible state to the visible state, determine whether the target card supports the active refresh.

[0120] S511: If it is determined that the target card supports the active refresh, the protocol data of the target card is updated to the target data.

[0121] S512: If it is determined that the target card does not support the active refresh, determine whether there is cache data corresponding to the target card.

[0122] S513: If it is determined that the target card corresponds to the cache data, the protocol data of the target card is updated to the cache data.

[0123] S514: Parse the protocol data to determine the card type of the target card corresponding to the target application, and layout the target card corresponding to the target application on the negative first screen according to the card type.

[0124] S515. Display the card data in the target card, wherein the card data includes at least one of the following: video data, animation data, text data, and picture data.

[0125] Optionally, the detailed description of the above steps 501 to 515 can be referred to Figure 2 The corresponding steps of step 201 to step 204 of the described card display method are not repeated here.

[0126] It can be seen that the card display method described in the embodiment of the present application displays the negative one screen in response to a first operation; obtains the protocol data and card data of the target application in the negative one screen; determines the card life cycle of the target card, wherein the card life cycle is controlled by a first instruction, a second instruction, a third instruction and a fourth instruction, the first instruction is used to indicate card creation, the second instruction is used to indicate that the display state of the target card is switched from an invisible state to a visible state, the third instruction is used to indicate that the display state of the target card is switched from the visible state to the invisible state, and the fourth instruction is used to indicate that the card is deleted; in response to a refresh status instruction sent by the target application, receives the target data corresponding to the refresh status instruction; determines whether the target card supports active refresh; if it is determined that the target card supports the active refresh, updates the protocol data of the target card to the target data; if it is determined that the target card does not support the active refresh, determines whether the display state of the target card is the visible state; if it is determined that If the display state of the target card is the invisible state, the target data is cached; if it is determined that the display state of the target card is the visible state, the protocol data of the target card is updated to the target data; if it is detected that the target card is switched from the invisible state to the visible state, whether the target card supports the active refresh is determined; if it is determined that the target card supports the active refresh, the protocol data of the target card is updated to the target data; if it is determined that the target card does not support the active refresh, whether the target card corresponds to the cached data is determined; if it is determined that the target card corresponds to the cached data, the protocol data of the target card is updated to the cached data; the protocol data is parsed to determine the card type of the target card corresponding to the target application, and according to the card type, the target card corresponding to the target application is laid out on the negative one screen; the card data is displayed in the target card, wherein the card data includes at least one of the following: video data, animation data, text data and picture data. When the target application has a business update requirement for the target card in the negative one screen, a refresh status instruction can be actively sent to the target card corresponding to the target application. The target data sent by the target application can be adapted based on conditions such as whether the target card has corresponding cache data and whether the target card supports active refresh. Alternatively, the target data sent by the target application can be adapted based on conditions such as the display status of the target card (visible or invisible, etc.) and whether the target card supports active refresh.This is conducive to achieving real-time updates of the card layout and determining the card type and card layout between the negative one screen and the target application, so as to realize the layout of target cards for different target applications, and is conducive to achieving the diversification of card layouts. It is also conducive to displaying video data or animation data through target cards, and is conducive to improving the richness of card display.

[0127] See also Figure 6 , Figure 6 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface and one or more programs, which are applied to the electronic device, wherein the one or more programs are stored in the memory, and the one or more programs are configured to execute the following steps by the processor:

[0128] In response to the first operation, displaying a negative one screen;

[0129] Acquire the protocol data and card data of the target application in the negative one screen;

[0130] Parsing the protocol data, determining the card type of the target card corresponding to the target application, and laying out the target card corresponding to the target application on the negative first screen according to the card type;

[0131] The card data is displayed in the target card, wherein the card data includes at least one of the following: video data, animation data, text data and picture data.

[0132] It can be seen that the electronic device described in the embodiment of the present application, in response to the first operation, displays the negative one screen; obtains the protocol data and card data of the target application in the negative one screen; parses the protocol data, determines the card type of the target card corresponding to the target application, and layouts the target card corresponding to the target application in the negative one screen according to the card type; displays the card data in the target card, wherein the card data includes at least one of the following: video data, animation data, text data, and picture data. In this way, the card type and card layout between the negative one screen and the target application can be determined through the protocol data to realize the layout of the target cards for different target applications, which is conducive to realizing the diversification of the card layout, and the display of video data or animation data, etc., can be realized through the target card, which is conducive to improving the richness of the card display.

[0133] In a possible example, before parsing the protocol data to determine the card type of the target card corresponding to the target application, the program further includes instructions for executing the following steps:

[0134] Determine the card life cycle of the target card, wherein the card life cycle is controlled by a first instruction, a second instruction, a third instruction, and a fourth instruction, wherein the first instruction is used to instruct card creation, the second instruction is used to instruct the display state of the target card to switch from an invisible state to a visible state, the third instruction is used to instruct the display state of the target card to switch from the visible state to the invisible state, and the fourth instruction is used to instruct the card to be deleted;

[0135] managing the protocol data of the target card according to the card life cycle; or,

[0136] According to the card life cycle, the target application is helped to meet business requirements.

[0137] In a possible example, in terms of determining the card life cycle of the target card, the program includes instructions for executing the following steps:

[0138] If the target card is in the first creation state, sending the first instruction to the target application;

[0139] In response to a second operation, switching the display state of the target card from the invisible state to the visible state, and sending the second instruction to the target application so that the target application is in a background state;

[0140] In response to a third operation, switching the display state of the target card from the visible state to the invisible state, and sending the third instruction to the target application;

[0141] In response to a fourth operation, the target card is deleted, and the fourth instruction is sent to the target application.

[0142] In a possible example, in terms of helping the target application to complete business requirements according to the card life cycle, the program includes instructions for executing the following steps:

[0143] If it is determined that the display state of the card is switched from the invisible state to the visible state, then determining the configuration information of the target card;

[0144] If the configuration information indicates that the target card supports active refresh, determining a refresh interval between the last time the target card sent the second instruction and the current time the target card sent the second instruction, and marking the current time the second instruction is sent as a valid state;

[0145] If the refresh interval is less than or equal to the minimum time interval, a target instruction to be sent to the target application is determined and placed in a message queue, wherein the message queue is used to provide the target instruction to the target application, and the target instruction is used by the target application to complete business requirements.

[0146] In a possible example, in terms of managing the protocol data of the target card according to the card life cycle, the program includes instructions for performing the following steps:

[0147] In response to a refresh status instruction sent by the target application, receiving target data corresponding to the refresh status instruction;

[0148] Determine whether the target card supports active refresh;

[0149] If it is determined that the target card supports the active refresh, updating the protocol data of the target card to the target data;

[0150] If it is determined that the target card does not support the active refresh, determining whether the display state of the target card is the visible state;

[0151] If it is determined that the display state of the target card is the invisible state, caching the target data;

[0152] If it is determined that the display state of the target card is the visible state, the protocol data of the target card is updated to the target data.

[0153] In a possible example, in response to the refresh status instruction sent by the target application, after receiving the target data corresponding to the refresh status instruction, the program further includes instructions for executing the following steps:

[0154] If it is detected that the target card is switched from the invisible state to the visible state, determining whether the target card supports the active refresh;

[0155] If it is determined that the target card supports the active refresh, updating the protocol data of the target card to the target data;

[0156] If it is determined that the target card does not support the active refresh, determining whether there is cache data corresponding to the target card;

[0157] If it is determined that the target card corresponds to the cache data, the protocol data of the target card is updated to the cache data.

[0158] In one possible example, in parsing the protocol data, determining the card type of the target card corresponding to the target application, and laying out the target card corresponding to the target application on the negative one screen according to the card type, the program includes instructions for performing the following steps:

[0159] Parsing the protocol data to obtain a description file and card layout information corresponding to the target application;

[0160] Generate a target control according to the description file;

[0161] Determine the card type of the target card according to the target control;

[0162] The target card is laid out on the negative one screen according to the card layout information and the card type.

[0163] In a possible example, the card type includes at least one of the following: video type, animation type, text type, and picture type.

[0164] In a possible example, in terms of displaying the card data in the target card, the program includes instructions for performing the following steps:

[0165] If it is determined that the card type is the video type, a preset library is called, and the first drawing tool establishes a subthread to refresh the video data in the target card to implement rendering of the video data in the target card corresponding to the target application.

[0166] In a possible example, in terms of displaying the card data in the target card, the program includes instructions for performing the following steps:

[0167] If it is determined that the card type is the animation type, the animation attribute information corresponding to the protocol data is determined, and the rendering of the animation data in the target card is implemented according to the animation attribute information.

[0168] In a possible example, the animation attribute information includes at least one of the following: a progress bar style, an animation duration, a rotating disc style, a rotating disc rotation angle, and a rotating disc rotation period.

[0169] In one possible example, the above program includes instructions for executing the following steps:

[0170] The negative one screen establishes a main thread through a second drawing tool to layout the target card in the negative one screen through the card layout information.

[0171] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0172] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0173] In the case of dividing each functional module into corresponding functional modules, Fig. 7A A schematic diagram of a card display device is shown, Fig. 7A As shown, the device is applied to an electronic device. The card display device 700 may include: a display unit 701, an acquisition unit 702 and a layout unit 703, wherein:

[0174] The display unit 701 is used to display a negative one screen in response to a first operation;

[0175] The acquisition unit 702 is used to acquire the protocol data and card data of the target application in the negative one screen;

[0176] The layout unit 703 is used to parse the protocol data, determine the card type of the target card corresponding to the target application, and layout the target card corresponding to the target application on the negative first screen according to the card type;

[0177] The display unit 701 is further configured to display the card data in the target card, wherein the card data includes at least one of the following: video data, animation data, and text data.

[0178] It can be seen that the card display device provided in the embodiment of the present application displays the negative one screen in response to the first operation; obtains the protocol data and card data of the target application in the negative one screen; parses the protocol data to determine the card type of the target card corresponding to the target application, and layouts the target card corresponding to the target application in the negative one screen according to the card type; displays the card data in the target card, wherein the card data includes at least one of the following: video data, animation data, text data, and picture data. In this way, the card type and card layout between the negative one screen and the target application can be determined through the protocol data to realize the layout of the target cards for different target applications, which is conducive to realizing the diversification of the card layout, and the display of video data or animation data, etc., can be realized through the target card, which is conducive to improving the richness of the card display.

[0179] In a possible example, before parsing the protocol data to determine the card type of the target card corresponding to the target application, Figure 7B As shown, Figure 7B A schematic diagram of another card display device is shown. Fig. 7A Based on the above, the card display device 700 may further include: a determination unit 704 and a management unit 705, wherein:

[0180] The determining unit 704 is used to determine the card life cycle of the target card, wherein the card life cycle is controlled by a first instruction, a second instruction, a third instruction and a fourth instruction, the first instruction is used to instruct card creation, the second instruction is used to instruct the display state of the target card to switch from an invisible state to a visible state, the third instruction is used to instruct the display state of the target card to switch from the visible state to the invisible state, and the fourth instruction is used to instruct the card to be deleted;

[0181] The management unit 705 is used to manage the protocol data of the target card according to the card life cycle; or

[0182] The management unit 705 is further configured to help the target application meet business requirements according to the card life cycle.

[0183] In a possible example, in determining the card life cycle of the target card, the determining unit 704 is specifically configured to:

[0184] If the target card is in the first creation state, sending the first instruction to the target application;

[0185] In response to a second operation, switching the display state of the target card from the invisible state to the visible state, and sending the second instruction to the target application so that the target application is in a background state;

[0186] In response to a third operation, switching the display state of the target card from the visible state to the invisible state, and sending the third instruction to the target application;

[0187] In response to a fourth operation, the target card is deleted, and the fourth instruction is sent to the target application.

[0188] In a possible example, in terms of helping the target application to complete business requirements according to the card life cycle, the management unit 705 is specifically used to:

[0189] If it is determined that the display state of the card is switched from the invisible state to the visible state, then determining the configuration information of the target card;

[0190] If the configuration information indicates that the target card supports active refresh, determining a refresh interval between the last time the target card sent the second instruction and the current time the target card sent the second instruction, and marking the current time the second instruction is sent as a valid state;

[0191] If the refresh interval is less than or equal to the minimum time interval, a target instruction to be sent to the target application is determined and placed in a message queue, wherein the message queue is used to provide the target instruction to the target application, and the target instruction is used by the target application to complete business requirements.

[0192] In a possible example, in terms of managing the protocol data of the target card according to the card life cycle, the management unit 705 is specifically used to:

[0193] In response to a refresh status instruction sent by the target application, receiving target data corresponding to the refresh status instruction;

[0194] Determine whether the target card supports active refresh;

[0195] If it is determined that the target card supports the active refresh, updating the protocol data of the target card to the target data;

[0196] If it is determined that the target card does not support the active refresh, determining whether the display state of the target card is the visible state;

[0197] If it is determined that the display state of the target card is the invisible state, caching the target data;

[0198] If it is determined that the display state of the target card is the visible state, the protocol data of the target card is updated to the target data.

[0199] In a possible example, in response to the refresh state instruction sent by the target application, after receiving the target data corresponding to the refresh state instruction, as follows Figure 7C As shown, Figure 7C A schematic diagram of another card display device is shown. Fig. 7A and Figure 7B Based on the above, the card display device 700 may further include: a judgment unit 706 and an update unit 707, wherein:

[0200] The judging unit 706 is configured to judge whether the target card supports the active refresh if it is detected that the target card switches from the invisible state to the visible state;

[0201] The updating unit 707 is configured to update the protocol data of the target card to the target data if it is determined that the target card supports the active refresh;

[0202] The judging unit 706 is further configured to judge whether there is cache data corresponding to the target card if it is determined that the target card does not support the active refresh;

[0203] The updating unit 707 is further configured to update the protocol data of the target card to the cache data if it is determined that the target card corresponds to the cache data.

[0204] In a possible example, in parsing the protocol data, determining the card type of the target card corresponding to the target application, and laying out the target card corresponding to the target application on the negative one screen according to the card type, the layout unit 703 is specifically used to:

[0205] Parsing the protocol data to obtain a description file and card layout information corresponding to the target application;

[0206] Generate a target control according to the description file;

[0207] Determine the card type of the target card according to the target control;

[0208] The target card is laid out on the negative one screen according to the card layout information and the card type.

[0209] In a possible example, the card type includes at least one of the following: video type, animation type, text type, and picture type.

[0210] In a possible example, in terms of displaying the card data in the target card, the display unit 701 is specifically used to:

[0211] If it is determined that the card type is the video type, a preset library is called, and the first drawing tool establishes a subthread to refresh the video data in the target card to implement rendering of the video data in the target card corresponding to the target application.

[0212] In a possible example, in terms of displaying the card data in the target card, the display unit 701 is specifically used to:

[0213] If it is determined that the card type is the animation type, the animation attribute information corresponding to the protocol data is determined, and the rendering of the animation data in the target card is implemented according to the animation attribute information.

[0214] In a possible example, the animation attribute information includes at least one of the following: a progress bar style, an animation duration, a rotating disc style, a rotating disc rotation angle, and a rotating disc rotation period.

[0215] In one possible example, the above program includes instructions for executing the following steps:

[0216] The negative one screen establishes a main thread through a second drawing tool to layout the target card in the negative one screen through the card layout information.

[0217] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0218] The electronic device provided in this embodiment is used to execute the above card display method, and thus can achieve the same effect as the above implementation method.

[0219] In the case of using an integrated unit, the electronic device may include a processing module, a storage module and a communication module. Among them, the processing module can be used to control and manage the actions of the electronic device, for example, it can be used to support the electronic device to execute the steps performed by the above-mentioned display unit 701, acquisition unit 702, layout unit 703, determination unit 704, management unit 705, judgment unit 706 and update unit 707. The storage module can be used to support the electronic device to execute stored program codes and data, etc. The communication module can be used to support the communication between the electronic device and other devices.

[0220] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.

[0221] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0222] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0223] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0224] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0225] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0226] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0227] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0228] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0229] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0230] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A card display method, characterized in that: The method comprises: In response to the first operation, displaying a negative one screen; Acquire the protocol data and card data of the target application in the negative one screen; Parsing the protocol data, determining the card type of the target card corresponding to the target application, and laying out the target card corresponding to the target application on the negative one screen according to the card type; Displaying the card data in the target card, wherein the card data includes at least one of the following: video data, animation data, text data, and picture data; Wherein, before parsing the protocol data and determining the card type of the target card corresponding to the target application, the method further includes: determining the card life cycle of the target card, wherein the card life cycle is controlled by a first instruction, a second instruction, a third instruction and a fourth instruction, the first instruction is used to indicate card creation, the second instruction is used to indicate that the display state of the target card is switched from an invisible state to a visible state, the third instruction is used to indicate that the display state of the target card is switched from the visible state to the invisible state, and the fourth instruction is used to indicate that the card is deleted; According to the card life cycle, help the target application to meet business needs; Wherein, helping the target application to complete the business requirements according to the card life cycle includes: if it is determined that the display state of the card is switched from the invisible state to the visible state, determining the configuration information of the target card; If the configuration information indicates that the target card supports active refresh, determining a refresh interval between the last time the target card sent the second instruction and the current time the target card sent the second instruction, and marking the current time the second instruction is sent as a valid state; If the refresh interval is less than or equal to the minimum time interval, a target instruction to be sent to the target application is determined and placed in a message queue, wherein the message queue is used to provide the target instruction to the target application, and the target instruction is used by the target application to complete business requirements.

2. The method according to claim 1, characterized in that Before parsing the protocol data to determine the card type of the target card corresponding to the target application, the method further includes: The protocol data of the target card is managed according to the card life cycle.

3. The method according to claim 2, characterized in that The determining the card life cycle of the target card includes: If the target card is in the first creation state, sending the first instruction to the target application; In response to a second operation, switching the display state of the target card from the invisible state to the visible state, and sending the second instruction to the target application so that the target application is in a background state; In response to a third operation, switching the display state of the target card from the visible state to the invisible state, and sending the third instruction to the target application; In response to a fourth operation, the target card is deleted, and the fourth instruction is sent to the target application.

4. The method according to claim 3, characterized in that The managing the protocol data of the target card according to the card life cycle includes: In response to a refresh status instruction sent by the target application, receiving target data corresponding to the refresh status instruction; Determine whether the target card supports active refresh; If it is determined that the target card supports the active refresh, updating the protocol data of the target card to the target data; If it is determined that the target card does not support the active refresh, determining whether the display state of the target card is the visible state; If it is determined that the display state of the target card is the invisible state, caching the target data; If it is determined that the display state of the target card is the visible state, the protocol data of the target card is updated to the target data.

5. The method according to claim 4, characterized in that After receiving the target data corresponding to the refresh status instruction in response to the refresh status instruction sent by the target application, the method further includes: If it is detected that the target card is switched from the invisible state to the visible state, determining whether the target card supports the active refresh; If it is determined that the target card supports the active refresh, updating the protocol data of the target card to the target data; If it is determined that the target card does not support the active refresh, determining whether there is cache data corresponding to the target card; If it is determined that the target card corresponds to the cache data, the protocol data of the target card is updated to the cache data.

6. The method according to claim 1, characterized in that The parsing of the protocol data, determining the card type of the target card corresponding to the target application, and laying out the target card corresponding to the target application on the negative first screen according to the card type, includes: Parsing the protocol data to obtain a description file and card layout information corresponding to the target application; Generate a target control according to the description file; Determine the card type of the target card according to the target control; The target card is laid out on the negative one screen according to the card layout information and the card type.

7. The method according to claim 6, characterized in that The card type includes at least one of the following: video type, animation type, text type and picture type.

8. The method according to claim 7, characterized in that The displaying the card data in the target card includes: If it is determined that the card type is the video type, a preset library is called, and the first drawing tool establishes a subthread to refresh the video data in the target card to implement rendering of the video data in the target card corresponding to the target application.

9. The method according to claim 7, characterized in that: The displaying the card data in the target card includes: If it is determined that the card type is the animation type, the animation attribute information corresponding to the protocol data is determined, and the rendering of the animation data in the target card is implemented according to the animation attribute information.

10. The method according to claim 9, characterized in that The animation attribute information includes at least one of the following: a progress bar style, an animation duration, a rotating disc style, a rotating disc rotation angle, and a rotating disc rotation period.

11. The method according to claim 1 or 8, characterized in that: The negative one screen establishes a main thread through a second drawing tool to layout the target card in the negative one screen through card layout information.

12. A card display device, characterized in that: The device comprises: a display unit, an acquisition unit and a layout unit, wherein: The display unit is used to display a negative one screen in response to the first operation; The acquisition unit is used to acquire the protocol data and card data of the target application in the negative one screen; The layout unit is used to parse the protocol data, determine the card type of the target card corresponding to the target application, and layout the target card corresponding to the target application on the negative one screen according to the card type; The display unit is further used to display the card data in the target card, wherein the card data includes at least one of the following: video data, animation data and text data; Wherein, before parsing the protocol data and determining the card type of the target card corresponding to the target application, the method further includes: determining the card life cycle of the target card, wherein the card life cycle is controlled by a first instruction, a second instruction, a third instruction and a fourth instruction, the first instruction is used to indicate card creation, the second instruction is used to indicate that the display state of the target card is switched from an invisible state to a visible state, the third instruction is used to indicate that the display state of the target card is switched from the visible state to the invisible state, and the fourth instruction is used to indicate that the card is deleted; According to the card life cycle, help the target application to meet business needs; Wherein, helping the target application to complete the business requirements according to the card life cycle includes: if it is determined that the display state of the card is switched from the invisible state to the visible state, determining the configuration information of the target card; If the configuration information indicates that the target card supports active refresh, determining a refresh interval between the last time the target card sent the second instruction and the current time the target card sent the second instruction, and marking the current time the second instruction is sent as a valid state; If the refresh interval is less than or equal to the minimum time interval, a target instruction to be sent to the target application is determined and placed in a message queue, wherein the message queue is used to provide the target instruction to the target application, and the target instruction is used by the target application to complete business requirements.

13. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 11.

15. A computer program product, wherein: The computer program product comprises a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute the method according to any one of claims 1 to 11.