Widget display method, electronic device, and readable storage medium

Directly requesting card update information and virtual machine permission isolation through the card rendering service, solving the problems of high power consumption and difficulty in permission isolation when updating card information, and achieving efficient card display and system security.

WO2024260150A1PCT designated stage expired Publication Date: 2024-12-26HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/093050
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-21
Filing Date
2024-05-14
Publication Date
2024-12-26

AI Technical Summary

Technical Problem

When the existing card information is updated, the application process needs to be frequently pulled up, resulting in high power consumption and low efficiency, and difficult to achieve permission isolation.

Method used

Through the card rendering service, directly request card update information from the target system service, avoid frequent pulling up application processes, and achieve permission isolation through virtual machines and authentication services.

Benefits of technology

It reduces power consumption of electronic devices, improves card display efficiency, and enhances system security and permission isolation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024093050_26122024_PF_FP_ABST
    Figure CN2024093050_26122024_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a widget display method, an electronic device, and a readable storage medium. In the method, a first application displays a widget of a second application; a widget rendering service sends a widget information updating request to a target system service, wherein the widget information updating request is used for requesting update information of the widget; the target system service verifies the permission of the second application; in response to a success of the permission verification of the second application, the target system service sends the update information of the widget to the widget rendering service, and the widget rendering service sends the update information of the widget to the first application; and the first application displays an updated widget on the basis of the update information of the widget. In the present application, when information of a widget is updated, the widget rendering service can directly request the update information of the widget from the target system service without launching the application process of the second application, and the second application requests the update information of the widget from the target system service, so that the power consumption can be reduced, and the widget display efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Card display method, electronic device and readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 21, 2023, with application number 202310743367.1 and application name “Card display method, electronic device and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of terminal technology, and in particular to a card display method, an electronic device, and a readable storage medium. Background Art

[0003] Cards are a way for electronic devices to display information. Currently, cards can be created on electronic device desktops and application interfaces to display information. For example, you can create weather cards, calendar cards, and clock cards on the desktop. A weather card displays weather information, a calendar card displays calendar information, and a clock card displays time information.

[0004] Currently, after a card is created, when the card's information needs to be updated, the corresponding application process is launched. This application process then calls the system service interface to obtain the card's updated information so that the card can display the updated information in a timely manner. Currently, each update to the card requires launching the corresponding application process, which consumes a lot of power and is inefficient.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a card display method, an electronic device, and a readable storage medium, in which a card rendering service directly requests card update information from a target system service without starting an application process of a second application, thereby reducing power consumption and improving card display efficiency.

[0007] In the first aspect, an embodiment of the present application provides a card display method, and the execution subject of the card display method can be an electronic device or a chip in the electronic device. The following description will be made using an electronic device as an example. The electronic device may include a first application, a second application, a card rendering service, and a target system service. In this method, the first application displays the card of the second application. When the information in the card needs to be updated, the card rendering service sends a card information update request to the target system service, and the card information update request is used to request the update information of the card. In some examples, for example, the card rendering service may send a card information update request to the target system service periodically or at intervals.

[0008] In response to the card information update request, the target system service may verify the permissions of the second application. In response to the second application passing the permission verification, the target system service sends the updated card information to the card rendering service. The card rendering service sends the updated card information to the first application, and the first application displays the updated card based on the updated card information.

[0009] In an embodiment of the present application, when an electronic device updates a card, there is no need to start the application process of the second application and have the second application request the target system service for the card update information. Instead, the card rendering service directly requests the target system service for the card update information, which can reduce the power consumption of the electronic device and improve the card display efficiency.

[0010] In one possible implementation, the card rendering service includes a virtual machine corresponding to the second application, and the virtual machine corresponding to the second application can be created by the card rendering service. In some examples, when the electronic device displays the card of the second application for the first time, the card rendering service can create a virtual machine corresponding to the second application. The virtual machine corresponding to the second application is hereinafter referred to as the virtual machine.

[0011] In some examples, the card information update request may include verification information of the card rendering service and an identifier of the virtual machine. The electronic device may include an authentication service.

[0012] In an embodiment of the present application, the target system service verifying the permissions of the second application may specifically include: the target system service may send a verification request to the authentication service in response to the card information update request, wherein the verification request includes the verification information of the card rendering service and the identifier of the virtual machine. In response to the verification request, the authentication service may obtain the verification information of the second application based on the verification information of the card rendering service and the identifier of the virtual machine, and the authentication service may verify the permissions of the second application based on the verification information of the second application.

[0013] In this implementation, the authentication service in the system service verifies the permission of the second application, which can improve verification security.

[0014] In a possible implementation, the electronic device further includes a card management service. The card management service includes: a first mapping relationship between the verification information of the second application and the identifier of the virtual machine.

[0015] In some examples, the authentication service may include an authentication interface. The target system service may call the authentication interface of the authentication service in response to the card information update request and send the verification request to the authentication service. In an embodiment of the present application, because the card management service stores a first mapping relationship between the verification information of the second application and the identifier of the virtual machine, the authentication service may send the identifier of the virtual machine to the card management service in response to the verification request based on the verification information of the card rendering service to request the verification information of the second application from the card management service. In particular, the card management service may send the verification information of the second application to the authentication service based on the identifier of the virtual machine and the first mapping relationship in response to the identifier of the virtual machine from the authentication service, so that the authentication service can verify the permissions of the second application.

[0016] In an embodiment of the present application, the first mapping relationship is stored in the card management service. On the one hand, it can improve the security of the verification information. On the other hand, the verification information of the second application stored in the card management service and the first mapping relationship of the virtual machine identifier can also assist the authentication service in verifying the permissions of the second application, so as to enable the card rendering service to directly request the target system service for card update information.

[0017] In one possible implementation, the authentication service includes a second mapping between verification information of the second application and permissions of the second application, so that the authentication service can verify the permissions of the second application. In some examples, the permissions of the second application in the second mapping can be understood as the second application having permission to call system services. In some examples, the permissions of the second application in the second mapping can include the identifier of at least one system service that the second application can call.

[0018] The authentication service receives verification information of the second application from the card management service, and the authentication service can determine whether the second application has permission to call the target system service based on the verification information of the second application and the second mapping relationship.

[0019] In the embodiment of the present application, the authentication service can cooperate with the card management service to verify the verification information of the second application, which can improve the verification security.

[0020] In one possible implementation, after the authentication service determines whether the second application has permission to call the target system service, if the second application does have permission to call the target system service, the authentication service determines that the second application's permission verification has passed and sends a verification success message to the target system service. In response to the verification success message, the target system service may send updated card information to the card rendering service to implement the card update.

[0021] Among them, after the authentication service determines whether the second application has the permission to call the target system service, when the second application does not have the permission to call the target system service, the authentication service determines that the permission check of the second application has failed, and sends a verification failure message to the target system service, and the target system service sends a call failure message to the card rendering service.

[0022] In an embodiment of the present application, by verifying the permissions of the second application, it is possible to determine whether the second application has the permission to call the target system service. When the second application has the permission to call the target system service, the target system service can send the update information of the card to the card rendering service, thereby enabling the update of the card. When the second application does not have the permission to call the target system service, the target system service may not send the update information of the card to the card rendering service. In an embodiment of the present application, it is possible to ensure that the permission to use the target system service is only effective for specific applications, thereby improving system security.

[0023] The above describes the process of the first application displaying the updated card. The following describes the process of the first application displaying the card of the second application:

[0024] In one possible implementation, the authentication service may include a registration interface. The second application may call the registration interface of the authentication service to register the verification information of the second application. The card rendering service may call the registration interface to register the verification information of the card rendering service. In one possible implementation, the verification information of the second application is a token, the verification information of the card rendering service is a token, and the identifier of the virtual machine corresponding to the second application is the thread number of the thread in the virtual machine corresponding to the second application.

[0025] For example, when a user triggers a first application to display a card for a second application, the first application may send a card creation request to the card management service. The card creation request includes the identifier of the second application and the identifier of the card. The card management service then establishes a connection with the second application based on the identifier of the second application. The second application may then send verification information about the second application to the card management service.

[0026] Among them, the card management service can detect whether the verification information of the second application has been stored in the card management service. Among them, when the verification information of the second application has been stored in the card management service, it indicates that the electronic device has created a card for the second application, and the card management service can send a rendering instruction to the card rendering service, and the rendering instruction is used to instruct the card rendering service to obtain the graphic node tree of the card. Alternatively, when the verification information of the second application is not stored in the card management service, it indicates that the electronic device has not created a card for the second application, or the cards of the second application have all been deleted, the card management service stores the verification information of the second application and sends the rendering instruction to the card rendering service.

[0027] In one possible implementation, the rendering instruction includes an identifier of the second application and an identifier of the card. In response to the rendering instruction, the card rendering service may determine, based on the identifier of the second application, whether the card rendering service includes a virtual machine corresponding to the second application.

[0028] When the card rendering service determines that the virtual machine is included in the card rendering service, the card rendering service may obtain the layout code of the card based on the identifier of the card, and obtain the graphic node tree based on the layout code of the card. When the card rendering service determines that the virtual machine is not included in the card rendering service based on the identifier of the second application, the card rendering service may create the virtual machine, and the card rendering service may send the identifier of the virtual machine to the card management service so that the card management service stores the first mapping relationship between the verification information of the second application and the identifier of the virtual machine.

[0029] When the card rendering service determines, based on the identifier of the second application, that the virtual machine is not included in the card rendering service, the card rendering service may obtain the layout code of the card based on the identifier of the card, and obtain the graphic node tree based on the layout code of the card.

[0030] In an embodiment of the present application, the graphic node tree can represent the layout of the card. The purpose of the card rendering service obtaining the graphic node tree is to enable the first application to display the card of the second application based on the graphic node tree.

[0031] In one possible implementation, the embodiment of the present application can obtain the card information of the second application in the following two ways:

[0032] First, a second application obtains information about a card of the second application. The second application may send a card information acquisition request to the target system service, requesting the card information. In response to the card information acquisition request, the target system service may send the card information to the second application. The second application sends the card information to the card rendering service.

[0033] Second, the card rendering service obtains the card information of the second application. The card rendering service may send a card information acquisition request to the target system service, wherein the card information acquisition request is used to request the card information. The target system service verifies the permissions of the second application. In response to the second application's permission verification passing, the target system service sends the card information to the card rendering service. The process of the target system service verifying the permissions of the second application can refer to the relevant description in the above embodiment.

[0034] In an embodiment of the present application, when creating a card, the card rendering service can also directly request the target system service to obtain the card information. Compared with the method in which the second application requests the target system service to obtain the card information and then sends it to the card rendering service, it can reduce signaling overhead and improve card display efficiency.

[0035] In one possible implementation, after the card rendering service obtains the card information and the graphic node tree, the card rendering service may send the graphic node tree and the card information to the first application, wherein the first application displays the card based on the graphic node tree and the card information.

[0036] In a second aspect, an embodiment of the present application provides an electronic device, which may include a processor and a memory. The memory is configured to store computer-executable program code, the program code including instructions; when the processor executes the instructions, the instructions cause the electronic device to perform the method described in the first aspect.

[0037] In a third aspect, an embodiment of the present application provides an electronic device, which may include a unit, module or circuit for executing the method provided in the first aspect above.

[0038] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method in the first aspect described above.

[0039] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enables the computer to execute the method in the first aspect above.

[0040] The beneficial effects of the possible implementation methods of the second to fifth aspects mentioned above can be referred to the beneficial effects brought about by the first aspect mentioned above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] FIG1A is a schematic diagram of an exemplary process of creating and displaying a card;

[0042] FIG1B is a schematic diagram of an exemplary process of creating multiple cards;

[0043] FIG2A is a schematic diagram of an exemplary process of creating and displaying a card;

[0044] FIG2B is a schematic diagram of an exemplary process of creating multiple cards;

[0045] FIG3 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0046] FIG4 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;

[0047] FIG5A is a schematic diagram of a process of a card display method provided in an embodiment of the present application;

[0048] FIG5B is a schematic diagram of a card creation process provided in an embodiment of the present application;

[0049] FIG6A is a flow chart of another card display method provided in an embodiment of the present application;

[0050] FIG6B is a schematic diagram of a card display process provided in an embodiment of the present application;

[0051] FIG7 is a schematic diagram showing different card providers having different permissions according to an embodiment of the present application;

[0052] FIG8 is a schematic diagram of an interface of an electronic device provided in an embodiment of the present application;

[0053] FIG9 is a flow chart of another card display method according to an embodiment of the present application;

[0054] FIG10 is a schematic structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] Definitions of terms involved in the embodiments of this application:

[0056] Cards / Card Components: These are development components within the application framework that can be embedded within an application and display relevant information. For example, a widget (or small component) is a card component. In some embodiments, cards may include, but are not limited to, weather cards, clock cards, calendar cards, memo cards, navigation cards, music cards, and gallery cards.

[0057] Card Provider: The application that provides the content displayed in a card. Card providers control the card's displayed content, control layout, and control click events. For example, a weather app is the provider of a weather card.

[0058] Card Consumer: The host application that displays the card content. The card consumer controls where the card is displayed within the host application. For example, if a user adds a weather card to the desktop, the desktop application is the card consumer for the weather card.

[0059] In some embodiments, the card user may be a system application; for example, a desktop application, a negative one screen application, or a service center application.

[0060] In other embodiments, the card user may be a third-party application.

[0061] In some embodiments, the card user may serve as the first application, and the card provider may serve as the second application.

[0062] Form Manager Service (FMS): A system service responsible for managing the card lifecycle and maintaining card data. Operations such as adding, refreshing, and deleting cards are managed by the FMS. The FMS also supports communication between card providers and card users.

[0063] Form Rendering Service (FRS): This is a system service. When creating a card, the Form Rendering Service (FMS) launches the FRS process to run the card layout code. The FRS parses the card layout code and constructs the graphical node tree required for card rendering. The FRS sends the graphical node tree to the card consumer, who then displays the card based on the node tree.

[0064] Graphical node tree: represents the card layout in the form of a node tree.

[0065] The electronic devices in the embodiments of the present application may be referred to as user equipment (UE), terminals, etc. For example, the electronic devices may be mobile phones, tablet computers, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices, vehicle-mounted devices, wearable devices, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in smart homes, etc. The embodiments of the present application do not specifically limit the form of the electronic devices.

[0066] The following uses "Creating a Weather Card on the Desktop" as an example to illustrate the current card creation and display process:

[0067] FIG1A is a flow chart of an exemplary card creation and display process. Referring to FIG1A , the current card creation and display process may include:

[0068] S101: The card user sends a card creation request to the FMS.

[0069] For example, when a user triggers the creation of a weather card on the desktop, the desktop application, acting as the card user, can send a card creation request to the FMS. This card creation request can include the identifier of the card provider, such as the identifier of the weather application. The identifier of the weather application can be, for example, the name or number of the weather application, which is not described in detail in this embodiment of the application.

[0070] S102: The FMS establishes a connection with the card provider.

[0071] In some embodiments, the card provider may run an application process responsible for handling card-related services. Accordingly, in response to a card creation request from a card user, the FMS may establish a connection with the card provider's application process based on the card provider's identifier. Once the FMS-card provider application process is connected, the card user's application process and the card provider's application process can communicate with each other through the FMS.

[0072] S103, FMS pulls up FRS.

[0073] In some embodiments, the FMS pulling up the FRS may also be understood as the FMS calling the FRS.

[0074] In some embodiments, S103 is an optional step. For example, in a scenario where multiple cards are created, if the FRS has been pulled up by the FMS, the FMS does not need to pull up the FRS again, and the FRS can directly execute S104.

[0075] There is no order distinction between S102 and S103.

[0076] S104, FRS constructs a graphic node tree according to the card layout code.

[0077] The embodiment of the present application does not elaborate on the process of constructing a graphic node tree based on the card layout code of the FRS, and reference may be made to the relevant description in the prior art.

[0078] In some embodiments, the card layout code may be deployed in the card provider's installation package. After the FRS is launched, the FRS may request the card layout code from the card provider, or the FRS may search for the card layout code on its own at the location where the card provider's installation package is stored. This embodiment of the present application is not limited to this.

[0079] S105, FRS sends the graphic node tree to the card user.

[0080] Exemplarily, after constructing the graphic node tree of the weather card based on the layout code of the weather card, the FRS may send the graphic node tree of the weather card to the desktop application.

[0081] S106: The card user displays the card according to the graphic node tree.

[0082] For example, the card's graphical node tree can be a graphical resource, such as the resources of each component of the card. A desktop application can display a weather card based on the weather card's graphical node tree. For example, the weather card can include: the current temperature, today's minimum and maximum temperatures, and an image representing the weather (e.g., sunny, cloudy, heavy rain, light rain, etc.).

[0083] After the card user displays the weather card, because the weather information changes in real time, the card user needs to update the weather card in real time. Updating the weather card can be understood as updating the information in the weather card. In some embodiments, the process of updating the weather card can refer to S107-S111:

[0084] S107, FRS sends a card information update request to the card provider.

[0085] In some embodiments, the FRS may periodically send a card information update request to the card provider to request an update of the information in the card.

[0086] In some embodiments, the FRS may send card information update requests at different intervals for different card providers. For example, for news cards, the FRS may send a card information update request to the card provider every 3 minutes, and for weather cards, the FRS may send a card information update request to the card provider every 10 minutes. This embodiment of the present application is not limited to this.

[0087] In some embodiments, the FRS may send a card information update request to the card provider via the FMS, wherein the FRS may send the card information update request to the FMS, and the FMS may transmit the card information update request to the card provider.

[0088] S108: The card provider calls the system application programming interface (API) to obtain update information.

[0089] In some embodiments, the FMS can launch the card provider's application process, which can then call a system API to obtain updated card information. For example, in response to a card information update request from the FRS, the FMS can launch a weather application process, which can then call a system API for providing weather information to obtain updated weather information.

[0090] S109: The card provider sends update information to the FRS.

[0091] In some embodiments, the card provider may send update information to the FRS via the FMS, wherein the card provider may send update information to the FMS, and the FMS may transmit the update information to the FRS.

[0092] S110, FRS sends update information to the card user.

[0093] S111: The card user displays the updated card according to the updated information.

[0094] In the method shown in Figure 1A, a unified rendering service, such as FRS, can construct a graphic node tree based on the layout code of the card. When the information in the subsequent card is updated, FRS can trigger FMS to pull up the application process of the card provider, and the card provider calls the system API to obtain the updated information of the card to realize the update of the information in the card.

[0095] In the scenario of creating multiple cards, for example, when creating a weather card, a clock card, and a calendar card on the desktop, the weather card, the clock card, and the calendar card can be respectively designated as Card 1, Card 2, and Card 3. Referring to FIG1B , based on the method shown in FIG1A , the FRS can construct a graphic node tree for each card based on the layout code of each card, and the card user can display each card based on the graphic node tree of each card. When the information of the multiple cards needs to be updated, the FRS can trigger the FMS to pull up the application process of each card provider respectively to obtain the update information so that the card user can update the multiple cards based on the update information.

[0096] FIG2A is a flow chart of an exemplary card creation and display process. Referring to FIG2A , the card creation and display process may include:

[0097] S201: The card user sends a card creation request to the FMS.

[0098] S202: The FMS establishes a connection with the card provider.

[0099] S201-S202 may refer to the description in S101-S102.

[0100] S203: The card user constructs a graphic node tree according to the card layout code.

[0101] In some embodiments, the card user can request the card layout code from the card provider through the FMS, or the card user can search for the card layout code by himself at the location where the card provider's installation package is stored. This embodiment of the present application does not limit this.

[0102] S204: The card user displays the card according to the graphic node tree.

[0103] S204 may refer to the description in S106.

[0104] After the card is displayed, the card user needs to update the card in real time because the information in the card changes in real time. In some embodiments, the process of updating the card can refer to S205-S208:

[0105] S205: The card user sends a card information update request to the card provider.

[0106] In some embodiments, the card user may periodically send a card information update request to the card provider to request updating of the information in the card. For details, refer to the relevant description in S107.

[0107] In some embodiments, the card user may send a card information update request to the card provider via the FMS, wherein the card user may send the card information update request to the FMS, and the FMS may transmit the card information update request to the card provider.

[0108] S206: The card provider calls the system API to obtain update information.

[0109] S206 may refer to the description in S108.

[0110] S207: The card provider sends update information to the card user via the FMS.

[0111] S208: The card user displays the updated card according to the updated information.

[0112] In the method shown in Figure 2A, the card user can construct a graphical node tree based on the card's layout code. When subsequently updating information, the card user can trigger the FMS to launch the card provider's application process, which then calls the system API to obtain updated information. The card provider can then send this updated information to the card user via the FMS, and the card user can then update the information on the card based on this updated information.

[0113] In the scenario of creating multiple cards, for example, when creating a weather card, a clock card, and a calendar card in a desktop application, the weather card, the clock card, and the calendar card can be respectively referred to as Card 1, Card 2, and Card 3. Referring to FIG2B , based on the method shown in FIG2A , the card user can construct a graphic node tree for each card based on the layout code of each card, and the card user can display each card based on the graphic node tree of each card. When the information of the multiple cards needs to be updated, the card user can trigger the FMS to pull up the application process of each card provider respectively, and the card provider calls the system API to obtain the updated information of the card. The card user can update the multiple cards based on the updated information of the card.

[0114] In the card creation and display methods shown in Figures 1A and 2A, the FMS needs to launch the card provider's application process each time the card information is updated, and the card provider obtains the updated information. Frequently launching the application process can easily lead to high power consumption and low efficiency. In addition, in the method shown in Figure 1A, a unified FRS service constructs the graphical node tree for all cards. The layout code for different cards runs in a single FRS process, making it difficult to achieve permission isolation. Cards can only display and update information, lacking more interactive capabilities, and the card information is single.

[0115] Therefore, the embodiments of the present application need to solve the following problems:

[0116] Question 1: Isolation of permissions for different cards.

[0117] Question 2: When updating card information, FMS needs to launch the card provider's application process, which consumes a lot of power and has low efficiency.

[0118] In response to questions 1 and 2, in some embodiments, referring to FIG3 , multiple card APIs can be pre-configured for FRS, and multiple virtual machines (VMs) can be created in FRS. Each virtual machine can correspond to a card API, and each card API can correspond to a card provider. On the one hand, in FRS, the layout code of the cards of the same card provider runs in the same virtual machine, and the layout code of the cards of different card providers runs in different virtual machines. In an embodiment of the present application, the resources and status of different card providers are isolated through the operating environment of the virtual machine. On the other hand, the card provider can call the card API provided by FRS and trigger FRS to directly call the system API to obtain update information so that the card can be updated. In this way, FRS directly calls the system API, which can avoid frequently pulling up the application process of the card provider when the card information is updated, and can reduce power consumption and improve card display efficiency.

[0119] Because different card providers may have different permissions, for example, Card Provider 1 may have permission to use the location system service and obtain updated location information, while Card Provider 2 may have permission to use the weather system service and obtain updated weather information. In some embodiments, when a card provider triggers the FRS to directly call a system API, the corresponding system service may perform a permission check on the card provider. Only when the system service determines that the card provider has the corresponding permission will it feed back the updated information to the FRS.

[0120] In some embodiments, the card provider's corresponding virtual machine can store verification information of the card provider, such as a token. When the FRS calls the system API, it can provide the card provider's token to the corresponding system service. The system service can verify the card provider's token. If the card provider's token passes the verification, the system service can feedback updated information to the FRS.

[0121] In this embodiment, the card interface provided by the FRS is separate from the system API. For an evolving operating system, this API split can lead to architectural corruption and increase API maintenance workload. Furthermore, the card provider's token is stored in the card provider's corresponding virtual machine, and the security of the card provider's token depends on the security of the virtual machine. If the virtual machine is easily compromised, the security of the card provider's token is reduced.

[0122] To address the current issues, an embodiment of the present application provides a card display method. On the one hand, a virtual machine is created in the FRS, and the resources and status of different card providers are isolated through the virtual machine's operating environment. On the other hand, the token can be stored in the system module of the electronic device, such as the FMS, to improve the security of the token. On the other hand, when the card information is updated, the embodiment of the present application can directly call the system API based on the card provider's token, avoiding the frequent launch of the card provider's application process, reducing power consumption, and improving card display efficiency.

[0123] Before introducing the card display method provided in the embodiment of the present application, the structure of the electronic device is first introduced:

[0124] FIG4 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. Referring to FIG4 , the electronic device may include: a card user, a card provider, an FMS, an FRS, and an access token manager service (ATMS). It should be understood that the electronic device may include at least one card user and at least one card provider. FIG4 takes one card user and two card providers as an example, where the two card providers are, for example, Card Provider 1 and Card Provider 2.

[0125] Card consumer, used to trigger the creation and display of cards.

[0126] It should be understood that the card provider and the card user can be applications in the electronic device, and the card provider and the card user can be, for example, system applications or third-party applications. In the following embodiment, the card provider 1 is a cycling application, the card provider 2 is a navigation application, and the card user is a desktop application.

[0127] Different card providers have different permissions, which can be understood as different card providers having permissions to call different system APIs. Take the cycling application with permission 1 and the navigation application with permission 2 as an example. Exemplarily, permission 1 may include location permission, network permission, and cross-device communication permission. Accordingly, the cycling application can use the location permission to call the system API for providing location information to obtain the current location information of the electronic device. The cycling application can use the network permission to call the system API for providing weather information to obtain the current weather information. The cycling application can use the cross-device communication permission to call the system API for establishing communication with other electronic devices such as watches to obtain information such as the user's heart rate. Exemplarily, permission 2 may include location permission. Accordingly, the navigation application can use the location permission to call the system API for providing location information to obtain the current location information of the electronic device.

[0128] In some embodiments, the permissions of different card providers may be pre-configured. For example, the installation package of the card provider may carry information related to the permissions of the card provider.

[0129] In some embodiments, when a card provider is installed in an electronic device, the card provider may send information related to the permissions possessed by the card provider to the ATMS, so that the ATMS can determine the permissions of each card provider in the electronic device. In some embodiments, when the card provider is a system application, the card provider may send information related to the permissions possessed by the card provider to the ATMS when the electronic device is powered on or when the electronic device runs the card provider, so that the ATMS can determine the permissions of the card provider.

[0130] In some examples, for the same card provider, the card provider may send information related to the card provider's permissions to the ATMS once. For example, the card provider may send information related to the card provider's permissions to the ATMS once when the electronic device is first powered on or when the electronic device first runs the card provider. The card provider may not send information related to the card provider's permissions to the ATMS when the electronic device is subsequently powered on or when the electronic device runs the card provider again.

[0131] In some embodiments, when the card provider is updated, for example, when the card provider's version is upgraded, the card provider's permissions may change. Therefore, when the card provider is updated, the card provider may resend information related to the updated permissions of the card provider to the ATMS so that the ATMS can determine the information related to the updated permissions of the card provider.

[0132] In some embodiments, users can customize the permissions of the card provider. For example, users can customize the permissions of the card provider in a settings application. For example, after the card provider is installed on an electronic device, when the card provider is first run, the card provider may request permissions to be activated, and the user can customize certain permissions of the card provider. For example, the card provider may request to obtain device information of the electronic device, request access to the electronic device's contact information, and request access to the gallery information.

[0133] In this embodiment, after the user customizes the permissions of the card provider, the card provider may send relevant information of the permissions possessed by the card provider to the ATMS so that the ATMS can determine the permissions of the card provider.

[0134] ATMS is a system service responsible for verifying the permissions of the card provider. For example, ATMS can verify the permissions of the service or application based on the token passed in from the outside.

[0135] In some embodiments, the ATMS can provide a registration interface and an authentication interface. The authentication interface verifies the card provider's permissions, while the registration interface is used to verify application or service registration information. Verification information can include, for example, a token or a verification password. The following embodiments use a token as an example.

[0136] In some embodiments, when the card provider is successfully installed, or when the card provider is a system application, the card provider can call the ATMS registration interface to register its own token when the electronic device is powered on for the first time, or when the electronic device first runs the card provider. The ATMS can store the card provider's token. Because the card provider can also send information related to the card provider's permissions to the ATMS, the ATMS can store the card provider's token and the card provider's permissions in a corresponding manner.

[0137] In some embodiments, the ATMS may include a mapping relationship between a card provider's token and the card provider's permissions. Exemplarily, the mapping relationship may include: at least one card provider's identification, token, and permissions.

[0138] In some embodiments, when the electronic device creates a card for the first time, that is, when the FMS pulls up the FRS for the first time, the FRS can also call the ATMS registration interface to register its own token. In some embodiments, the ATMS can store the FRS token.

[0139] The specific functions of FMS, FRS, and ATMS can refer to the relevant descriptions in the following embodiments.

[0140] The card display method provided by the embodiment of the present application is described below in conjunction with specific embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0141] The following first introduces the process of creating a card:

[0142] FIG5A is a flow chart of an embodiment of a card display method provided by an embodiment of the present application. Referring to FIG5A , the card display method provided by an embodiment of the present application may include:

[0143] S501: The card user sends a card creation request to the FMS.

[0144] For example, when creating a cycling card on a desktop, the desktop application can act as the card user and send a card creation request to the FMS. The card creation request can include the card provider's ID, such as the cycling application's ID.

[0145] In some embodiments, the card creation request may also include a card identifier. The card provider identifier is used to distinguish different card providers, and the card identifier is used to distinguish different cards. For example, taking a cycling app as an example, the cycling app, as a card provider, may correspond to multiple cards. For example, the multiple cards may include: Card 1 for displaying the cycling location and Card 2 for displaying information such as the user's heart rate.

[0146] In some embodiments, a card may correspond to a card provider. For example, a cycling card corresponds to a cycling application, and a weather card corresponds to a weather application.

[0147] S502: The FMS establishes a connection with the card provider.

[0148] In some embodiments of the present application, the FMS may establish a connection with the card provider according to the card provider identifier in the card creation request. The process of establishing the connection may refer to the description in S102.

[0149] In some embodiments, when the card creation is completed, the FMS can disconnect from the card provider. When the card user triggers the creation of the card provider's card again, the FMS can reconnect with the card provider.

[0150] S503: The card provider sends verification information of the card provider to the FMS.

[0151] For example, the verification information provided by the card is a token.

[0152] In some embodiments, after the card provider registers a token through the ATMS registration interface, the token can be stored in the kernel of the electronic device. After the card provider establishes a connection with the FMS, the card provider can call an inter-process communication (IPC) interface to obtain the card provider's token from the kernel and send the card provider's token to the FMS.

[0153] S504: The FMS determines whether the verification information of the card provider has been stored. If so, the process proceeds to S506; if not, the process proceeds to S505 and then S506.

[0154] In some embodiments, the FMS may store a mapping relationship between the verification information of the card provider and the identifier of the virtual machine corresponding to the card provider. This mapping relationship can be understood as a mapping relationship between the verification information and the identifier of the virtual machine. For example, the identifier of the virtual machine may be, for example, the serial number of the virtual machine, the thread identifier (TID) of a thread in the virtual machine, etc. In some embodiments, the mapping relationship between the verification information and the identifier of the virtual machine may be referred to as a first mapping relationship.

[0155] In some embodiments, for card providers that have created cards, each card provider may correspond to a virtual machine, and each virtual machine may have its own independent thread. The virtual machine may be created by FRS, and the creation process may refer to the relevant description in S507.

[0156] Taking the verification information of the card provider as a token and the identifier of the virtual machine as the TID of the thread in the virtual machine as an example, the FMS can store the token of the card provider and the mapping relationship between the TID of the thread in the virtual machine corresponding to the card provider. This mapping relationship can be understood as the mapping relationship between the token and the TID. Exemplarily, the mapping relationship between the token and the TID can be stored in the form of a table. For example, it can be stored in the form of a key-value table, where the key of the key-value table is the TID and the value is the token. The process of FMS storing the mapping relationship between the token and the TID can refer to the relevant description in S508-S509.

[0157] In an embodiment of the present application, the FMS, in response to the verification information from the card provider, can query the mapping relationship between the verification information and the identifier of the virtual machine to determine whether the verification information of the card provider is already included in the mapping relationship. If the verification information of the card provider is already included in the mapping relationship, the FMS can determine that the card provider is a card provider that has created a card, and the FRS contains the virtual machine corresponding to the card provider. If the verification information of the card provider is not included in the mapping relationship, the FMS can determine that the card provider is a card provider that has not created a card, or that the card provider is a card provider whose cards have all been deleted, and the FRS does not contain the virtual machine corresponding to the card provider.

[0158] S505, the FMS stores the verification information of the card provider.

[0159] Because the mapping relationship between the verification information and the identifier of the virtual machine does not include the verification information of the card provider, the FMS may store the verification information of the card provider.

[0160] S506: The FMS sends a rendering instruction to the FRS.

[0161] The rendering instruction is used to instruct the FRS to construct a graphic node tree of the card. In some embodiments, the rendering instruction may include an identifier of the card provider and an identifier of the card.

[0162] S507: When the virtual machine corresponding to the card provider is not stored in the FRS, the FRS creates a virtual machine corresponding to the card provider.

[0163] When a card is created, the FRS can create a virtual machine corresponding to the card provider and store the virtual machine corresponding to the card provider of the created card. In response to a rendering instruction from the FMS, the FRS can query whether the virtual machine corresponding to the card provider is already stored in the FRS based on the card provider identifier in the rendering instruction.

[0164] When the virtual machine corresponding to the card provider is not stored in the FRS, the FRS may create a virtual machine corresponding to the card provider.

[0165] In some embodiments, because one card provider corresponds to one virtual machine, when all cards of the card provider have been deleted, for example, when the user deletes all cards of the weather application, the FRS may delete the virtual machine corresponding to the card provider.

[0166] S508: The FRS sends the identifier of the virtual machine corresponding to the card provider to the FMS.

[0167] When the FRS does not store the virtual machine corresponding to the card provider, the FRS creates the virtual machine corresponding to the card provider and sends the identifier of the virtual machine corresponding to the card provider to the FMS. In some embodiments, the TID of the thread in the virtual machine can be used as the identifier of the virtual machine, and the FRS can send the TID of the thread in the virtual machine to the FMS.

[0168] S509 , the FMS stores the verification information of the card provider and the identifier of the virtual machine corresponding to the card provider in correspondence.

[0169] In response to the identification of the virtual machine corresponding to the card provider from the FRS, the FMS may store the verification information of the card provider and the identification of the virtual machine corresponding to the card provider. For example, the FMS may add the TID of the thread in the virtual machine corresponding to the card provider and the token of the card provider to the mapping relationship between the TID and the token.

[0170] After the FRS executes S508, it can execute S511. There is no order between S511 and S509.

[0171] S510: When the virtual machine corresponding to the card provider has been stored in the FRS, directly execute S511.

[0172] In response to the rendering instruction from the FMS, the FRS may query whether the virtual machine corresponding to the card provider is stored in the FRS according to the card provider identifier in the rendering instruction. If the virtual machine corresponding to the card provider is stored in the FRS, the FRS may directly execute S511.

[0173] S511, FRS constructs a graphic node tree according to the layout code of the card.

[0174] In the embodiment of the present application, because different cards correspond to different layout codes, the FRS can obtain the layout code of the card according to the card identifier, and the FRS can construct a graphical node tree according to the layout code of the card. The process of the FRS obtaining the layout code of the card can refer to the description in S104.

[0175] S512, FRS sends the graphic node tree to the card user.

[0176] S513: The card user displays the card according to the graphic node tree.

[0177] S511-S512 may refer to the description in S104-S106.

[0178] Figure 5B is a schematic diagram of a card creation process provided by an embodiment of the present application. Referring to Figure 5B, Figure 5B takes the example of a card user creating a card of card provider 1 and a card of card provider 2 respectively.

[0179] For example, when a card user creates Card 1, they can send a card creation request to the FMS. This request can include the identifiers of Card Provider 1 and Card 1. In response to the request, the FMS can establish a connection with Card Provider 1 based on its identifiers. Card Provider 1 can then send its token to the FMS.

[0180] In some examples, when Card Provider 1 has not created a card, the FMS may store the token of Card Provider 1 and send a rendering instruction to the FRS. The rendering instruction may include the identifier of Card Provider 1 and the identifier of Card 1. Based on the identifier of Card Provider 1 in the rendering instruction, the FRS may determine that the virtual machine corresponding to Card Provider 1 is not included in the FRS. The FRS may create a virtual machine corresponding to Card Provider 1 and return the TID of the thread in the virtual machine corresponding to Card Provider 1 to the FMS. In Figure 5B, VM1 represents the virtual machine corresponding to Card Provider 1.

[0181] In this way, the FMS can store the TID of the thread in the virtual machine corresponding to Card Provider 1 and the token of Card Provider 1. Accordingly, the FRS can construct a graphical node tree based on the layout code of Card 1 and send the graphical node tree to the card user. The card user can then display Card 1 based on the graphical node tree.

[0182] Taking the card of card provider 2 as Card 2 as an example, when the card user creates Card 2, the card user can send a card creation request to the FMS. The card creation request can include the identifier of card provider 2 and the identifier of card 2. In response to the card creation request, the FMS can establish a connection with card provider 2 based on the identifier of card provider 2, and card provider 2 can send its own token to the FMS. Assume that card provider 2 has created a card, that is, the TID of the thread in the virtual machine corresponding to card provider 2 and the token of card provider 2 have been stored in the FMS. VM2 represents the virtual machine corresponding to card provider 2 in Figure 5B.

[0183] The FMS can send a rendering instruction to the FRS. The rendering instruction can include the identifier of Card Provider 2 and the identifier of Card 2. Based on the identifier of Card Provider 2 in the rendering instruction, the FRS can determine that the FRS contains the virtual machine corresponding to Card Provider 2. Therefore, the FRS can construct a graphical node tree based on the layout code of Card 2 and send the graphical node tree to the card user. The card user can display Card 2 based on the graphical node tree.

[0184] In an embodiment of the present application, the FRS can create a corresponding virtual machine for each card provider, and isolate the resources of different card providers through the operating environment of the virtual machine, thereby achieving isolation of card permissions. In addition, each card provider and the FRS can call the registration interface of the ATMS to register their own verification information, and the FMS can also store the mapping relationship between the verification information of the card provider and the identifier of the virtual machine corresponding to the card provider. On the one hand, the storage of the verification information of the card provider in the FMS can improve the security of the verification information. On the other hand, the mapping relationship between the verification information of the card provider and the identifier of the virtual machine corresponding to the card provider in the FMS can also assist in enabling the FRS to directly call the system API.

[0185] In some embodiments, during the card creation process shown in FIG5A , the card provider may send a card information acquisition request to the target system service to request the card information. The target system service may respond to the card information acquisition request and send the card information to the card provider. For example, the card provider may call a system API to send the card information acquisition request to the target system service.

[0186] After the card provider obtains the card information, it can send the card information to the FRS. For example, when the FRS requests the card layout code from the card provider, the card provider can send the card information and the card layout code to the FRS.

[0187] In some embodiments, S512 may be replaced by: the FRS sends the graphic node tree and the card information to the card user. Correspondingly, S513 may be replaced by: the card user may display the card according to the graphic node tree and the card information.

[0188] In some embodiments, the card user may also update the information in the card. The following describes the process of the card user updating the information in the card in conjunction with FIG6A. In some embodiments, referring to FIG6A, after S513, the following may also be included:

[0189] S601, FRS sends a card information update request to the target system service.

[0190] In this embodiment of the present application, when updating card information, there's no need to launch the card provider's application process or call a system API. Instead, the FRS directly calls the system API. When the FRS calls the system API, the card information update request first reaches the system service corresponding to the system API, which can be referred to as the target system service. This means the FRS can send a card information update request to the target system service to request updated card information.

[0191] The target system service is used to provide card information. For example, taking a cycling application as an example, a cycling card may include location information. The target system service may be a system service that provides location information, such as a global positioning system (GPS) system service. The FRS may send a card information update request to the GPS system service to request the call of the GPS system service's system API to obtain updated location information.

[0192] The card information update request may include the verification information of the FRS and the identifier of the virtual machine corresponding to the card provider.

[0193] S602: The target system service sends a verification request to the ATMS in response to the card information update request.

[0194] The verification request may include verification information of the FRS and an identifier of a virtual machine corresponding to the card provider.

[0195] In some embodiments, when FRS calls the system API, FRS can act as the caller, and the target system service can call the authentication interface of ATMS in response to the card information update request, and at the same time pass the verification information of the caller FRS and the identifier of the virtual machine corresponding to the card provider to ATMS so that ATMS can verify the authority of the card provider.

[0196] S603, ATMS cooperates with FMS to verify the authority of the card provider based on the verification information of FRS and the identifier of the virtual machine corresponding to the card provider.

[0197] Because the FRS has previously registered its verification information by calling the ATMS registration interface, in this embodiment of the present application, the ATMS does not use the FRS verification information to verify the card provider's authority. Instead, it sends the card provider's corresponding virtual machine identifier to the FMS. Because the FMS stores a mapping between the card provider's verification information and the card provider's corresponding virtual machine identifier, the FMS can query the card provider's verification information mapped to the card provider's corresponding virtual machine identifier based on this mapping. The FMS can then send the card provider's verification information to the ATMS.

[0198] For example, the ATMS can call the FMS callback interface and pass the identifier of the virtual machine corresponding to the card provider as an input parameter. After receiving the callback from the ATMS, the FMS uses the identifier of the virtual machine corresponding to the card provider and the mapping relationship between the verification information and the virtual machine identifier to query the verification information of the card provider, and returns the obtained verification information of the card provider to the ATMS.

[0199] Because the ATMS stores a mapping relationship between the card provider's verification information and the card provider's permissions, the ATMS can verify the card provider's permissions based on the card provider's verification information returned by the FMS and this mapping relationship. In other words, the ATMS verifies whether the card provider has permission to call the system API. In some embodiments, the mapping relationship between the card provider's verification information and the card provider's permissions can be referred to as a second mapping relationship.

[0200] S604: In response to the card provider's permission verification being successful, the ATMS sends a verification success message to the target system service.

[0201] When the ATMS verifies the card provider's permissions and determines that the card provider has the permission to call the system API, it determines that the card provider's permission verification has passed, and the ATMS can send a verification success message to the target system service. In some embodiments, the card provider having the permission to call the system API can also be understood as the card provider having the permission to call or use the target system service.

[0202] S605: The target system service returns the updated information of the card to the FRS.

[0203] In response to the verification success message, the target system service can determine that the card provider has the authority to call the system API, so the target system service can return the card update information to the FRS, that is, the FRS successfully calls the system API to obtain the card update information.

[0204] S606: FRS sends the card update information to the card user.

[0205] S607: The card user displays the updated card according to the updated card information.

[0206] S608: When the card provider's authority verification fails, the ATMS sends a verification failure message to the target system service.

[0207] S609: The target system service returns a call failure message to the FRS.

[0208] The call failure message is used to indicate that the card provider does not have the permission to call the system API.

[0209] For example, referring to FIG6B , taking the FRS including VM1 corresponding to card provider 1 and VM2 corresponding to card provider 2 as an example, the following takes card provider 1 as an example to illustrate the process of FRS directly calling the system API:

[0210] FRS can call the system API, and the card information update request from FRS first reaches the system service. The card information update request can include the FRS token and the TID of the thread in VM1. In response to the card information update request, the system service can call the authentication interface of ATMS, and pass the token of the caller FRS and the TID of the thread in VM1 to ATMS, that is, the system service sends a verification request to ATMS. ATMS calls the callback interface of FMS and takes the TID of the thread in VM1 as an input parameter. After receiving the callback from ATMS, FMS uses the TID of the thread in VM1 to query the token mapped to the TID of the thread in VM1 in the mapping relationship between token and TID, and returns the queried token to ATMS.

[0211] The ATMS stores a mapping between tokens and permissions. In response to a token from the FMS, the ATMS can determine the permissions mapped to the token based on this mapping to determine whether Card Provider 1 has permission to call the system API. If Card Provider 1 has permission to call the system API, the ATMS can send a verification success message to the system service, which can then provide updated card information to the FRS.

[0212] In some embodiments, both verification success messages and verification failure messages may be referred to as verification results.

[0213] In the embodiment of the present application, the FMS stores a mapping relationship between the verification information of the card provider and the identifier of the virtual machine corresponding to the card provider. On the one hand, this can improve the security of the verification information. On the other hand, during card verification, the FMS can provide the verification information of the card provider to the ATMS, facilitating the smooth implementation of the authority verification. In the embodiment of the present application, the ATMS can verify the authority of the card provider based on the verification information of the card provider. When the authority verification passes, the FRS is allowed to directly call the system API, which not only realizes the authority verification of the card provider and reduces power consumption, but also achieves the purpose of isolating the authority of the card provider.

[0214] Exemplarily, referring to Figure 7, for example, card provider 1 has permission 1, and card provider 2 has permission 2. When updating the information in card 1, FRS calls the system API that requires permission 1. The system service can recognize that card 1 belongs to card provider 1, and then the authentication is passed. When updating the information in card 2, if FRS calls the system API that requires permission 1, since card provider 2, to which card 2 belongs, does not have permission 1, the system service can reject this call. In the embodiment of the present application, it can ensure that the permissions between different card providers are minimized, especially for certain sensitive permissions, such as geographic location permissions, contact data reading permissions, camera permissions, etc., it can ensure that the permissions are only effective for specific card providers, thereby improving system security.

[0215] In some embodiments, referring to the card creation process shown in FIG5A , in S512 , the FRS may not only construct a graphical node tree based on the card layout code, but may also send a card information acquisition request to the target system service. The card information acquisition request is used to request card information. In response to the card information acquisition request, the target system service may verify the card provider's permissions. In response to the card provider's permission verification, the target system service may send the card information to the FRS. The process of the target system service verifying the card provider's permissions can be described in detail in FIG6A .

[0216] For example, FRS can not only construct a graphic node tree based on the card layout code, but also call the system API to obtain the card information from the target system service so that the card user can display the information in the card when displaying the card.

[0217] In some embodiments, S601-S607 may be further executed after S512, and accordingly, S513 may be replaced by: the card user may display the card according to the graphic node tree and the card information.

[0218] In an embodiment of the present application, when creating a card, the FRS can also directly call the system API based on the token of the card provider to obtain the card information. Compared with the method in which the card provider calls the system API to obtain the card information and then sends it to the FRS, it can reduce signaling overhead and improve card display efficiency.

[0219] The following describes the card display method provided by the embodiment of the present application in conjunction with specific application scenarios:

[0220] Taking a mobile phone as an electronic device and a cycling application as an example, many users are accustomed to fixing their mobile phones on the bicycle frame when cycling outdoors to view cycling information in real time. The cycling information may include cycling mileage, cycling speed, user heart rate, etc. Currently, users can only see this information by opening the cycling application. If the user needs navigation at the same time, since the navigation application and the cycling application cannot be displayed in the foreground at the same time, the user can only switch the navigation application to the background and receive navigation information in the form of voice, which is not as intuitive as displaying the navigation information in the foreground. The card display method provided in the embodiment of the present application can create cycling cards and navigation cards on the desktop, so that users can see cycling information and navigation information on one interface.

[0221] Figure 8 illustrates a multi-card combination solution, where different card providers have different permissions. In this embodiment, based on the verification information of each card provider and their corresponding virtual machines, the permissions of the card providers can be isolated. This allows the card to securely carry more sensitive permission services, enriching the card's information. Users can access the information they need through the card without opening the application.

[0222] For example, for example, a cycling application has geographic location permissions, network permissions, and permissions for cross-device communication. Then, through the card creation and display method provided in the embodiment of the present application, the user can create a cycling card on the desktop of the electronic device, and the cycling card can inherit the permissions of the cycling application. For example, the FRS in the electronic device can directly call the system API corresponding to the geographic location permission to obtain the current location information, travel data, etc. The FRS can directly call the system API corresponding to the network permission to obtain weather information, etc. The FRS can directly call the system API corresponding to the permission for cross-device communication to obtain information such as the user's heart rate. Referring to Figure 8, the card user can display a cycling card, which may include location information, travel data, weather information, and information such as the user's heart rate.

[0223] Similarly, users can create navigation cards on the desktop of electronic devices, and navigation cards can inherit the permissions of navigation applications. For example, the FRS in the electronic device can directly call the system API corresponding to the navigation permission to obtain the current location information and navigation information. Referring to Figure 8, the card user can display the navigation card, which can include the current location information and navigation information.

[0224] In an embodiment of the present application, a user can create multiple cards on an interface of an electronic device, so that the user can obtain rich information based on the multiple cards without opening a specific application, thereby improving the user experience.

[0225] Similarly, users can also add other cards according to their preferences. For example, referring to Figure 8, for example, the radio card can be used to listen to the radio in real time, and the logistics card is used to pay attention to the upcoming express delivery, etc. In the embodiment of the present application, on the one hand, all cards are run within the FRS process, and there is no need to start multiple application processes. Resource isolation can be achieved based on the virtual machine, and the card information can be enriched while reducing power consumption. On the other hand, when the card information is updated, the FRS can directly call the system API without frequently pulling up the application process of the card provider, which reduces power consumption and can increase the speed at which the FRS obtains the card information, thereby improving the card display efficiency.

[0226] FIG9 is a flow chart of another card display method provided by an embodiment of the present application. FIG9 describes a method for a card user to update a card. The first application can be understood as the card user, and the second application can be understood as the card provider. Referring to FIG9, in some embodiments, the card display method provided by an embodiment of the present application may include:

[0227] S901: The first application displays a card of the second application.

[0228] The process of the first application displaying the card of the second application can refer to the relevant description in the above embodiment.

[0229] The card displayed by the first application corresponds to the second application. For example, the card displayed by the first application is a cycling card, and the cycling card corresponds to the second application "cycling application". For example, the card displayed by the first application is a weather card, and the weather card corresponds to the second application "weather application".

[0230] S902: The card rendering service sends a card information update request to the target system service. The card information update request is used to request updated card information.

[0231] In an embodiment of the present application, the card rendering service FRS can directly call the system API without frequently launching the application process of the second application. Calling the system API by the second application can reduce power consumption, increase the speed at which FRS obtains updated card information, and improve card display efficiency.

[0232] In some embodiments, the card rendering service may periodically or intermittently call a system API to send a card information update request to a target system service.

[0233] S903: The target system service verifies the permission of the second application.

[0234] In some embodiments, the target system service may store a mapping relationship between the identifier of the second application and the permissions of the second application. In response to the card information update request, the target system service may determine the permissions of the second application based on the mapping relationship to verify the permissions of the second application and determine whether the second application has permission to call the system API.

[0235] In some embodiments, in order to improve the verification security of the second application, the electronic device may set an authentication service, which is used to perform permission verification on the second application. Among them, the card rendering service includes a virtual machine corresponding to the second application, and the virtual machine corresponding to the second application is created by the card rendering service for the second application. Exemplarily, the card rendering service may include a virtual machine corresponding to at least one second application, and each second application corresponds to a virtual machine.

[0236] The card information update request includes verification information from the card rendering service and the virtual machine's identifier. In this embodiment, the target system service, in response to the card information update request, may send a verification request to the authentication service. The verification request includes verification information from the card rendering service and the virtual machine's identifier. In some embodiments, the target system service invokes the authentication service's authentication interface to send the verification request to the authentication service.

[0237] The authentication service, in response to the verification request, may obtain the verification information of the second application according to the verification information of the card rendering service and the identifier of the virtual machine.

[0238] In some embodiments, the authentication service may store a mapping relationship between the verification information of the second application and the identifier of the virtual machine corresponding to the second application, so that the authentication service can obtain the verification information of the second application based on the mapping relationship.

[0239] In some embodiments, in order to improve the authentication security of the second application, the electronic device may set up a card management service, which includes: a first mapping relationship between the verification information of the second application and the identifier of the virtual machine corresponding to the second application. The authentication service calls the callback interface of the card management service based on the verification information of the card rendering service, and takes the identifier of the virtual machine as an input parameter. In response to the callback of the authentication service, the card management service may return the verification information of the second application corresponding to the identifier of the virtual machine to the authentication service based on the first mapping relationship. The specific process can be referred to the description in Figure 6A.

[0240] In an embodiment of the present application, after obtaining the verification information of the second application, the authentication service can verify the permissions of the second application based on the verification information of the second application. In some embodiments, the authentication service can include: a second mapping relationship between the verification information of the second application and the permissions of the second application. The authentication service can determine whether the second application has permission to call the system API based on the verification information of the second application and the second mapping relationship.

[0241] S904: In response to the second application passing the permission check, the target system service sends the card update information to the card rendering service.

[0242] In some embodiments, when the second application has permission to call a system API, the authentication service determines that the second application has passed the permission verification, and the authentication service may send a verification success message to the target system service. In response to the verification success message from the authentication service, the target system service may determine that the second application has passed the permission verification, and the target system service may send the card update information to the card rendering service.

[0243] In some embodiments, when the second application does not have permission to call the system API, it is determined that the second application has failed permission verification, and the authentication service sends a verification failure message to the target system service. In response to the verification failure message from the authentication service, the target system service may determine that the second application has failed permission verification, and the target system service may send a call failure message to the card rendering service.

[0244] S905: The card rendering service sends the card update information to the first application.

[0245] S906: The first application displays the updated card according to the card update information.

[0246] In an embodiment of the present application, the first application may display an updated card in response to the update information of the card according to the update information of the card.

[0247] It can be understood that the embodiments of the present application have the same technical effects as the above embodiments, and reference can be made to the relevant descriptions in the above embodiments.

[0248] It should be noted that the data involved in this application (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0249] In one embodiment, the present application also provides an electronic device. Referring to FIG10 , the electronic device may include a processor 1001 (e.g., a CPU) and a memory 1002. The memory 1002 may include a high-speed random-access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk storage. The memory 1002 may store various instructions for performing various processing functions and implementing the method steps of the present application.

[0250] Optionally, the electronic device involved in this application may further include: a power supply 1003, a communication bus 1004, and a communication port 1005. The communication port 1005 is used to enable communication between the electronic device and other peripheral devices. In the embodiment of the present application, the memory 1002 is used to store computer-executable program code, which includes instructions; when the processor 1001 executes the instructions, the instructions cause the processor 1001 of the electronic device to perform the actions in the above-mentioned method embodiment. The implementation principles and technical effects are similar and will not be repeated here.

[0251] Optionally, the electronic device involved in this application may further include: a display screen 1006. The display screen 1006 is used to display an interface of the electronic device.

[0252] It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code, such as a controller. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0253] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0254] The term "plurality" in this article refers to two or more. The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0255] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.

[0256] It can be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

Claims

1. A card display method, characterized in that: Applied to an electronic device, the electronic device includes a first application, a second application, a card rendering service, and a target system service, the method includes: The first application displays a card of the second application; The card rendering service sends a card information update request to the target system service, where the card information update request is used to request update information of the card; The target system service verifies the permission of the second application; In response to the permission check of the second application being passed, the target system service sending update information of the card to the card rendering service; The card rendering service sends update information of the card to the first application; The first application displays the updated card according to the update information of the card.

2. The method according to claim 1, characterized in that The card rendering service includes a virtual machine corresponding to the second application, and the card information update request includes verification information of the card rendering service and an identifier of the virtual machine; the electronic device also includes an authentication service; The target system service verifies the permission of the second application, including: The target system service sends a verification request to the authentication service, where the verification request includes verification information of the card rendering service and an identifier of the virtual machine; The authentication service obtains verification information of the second application according to the verification information of the card rendering service and the identifier of the virtual machine; The authentication service verifies the permission of the second application according to the verification information of the second application.

3. The method according to claim 2, characterized in that The electronic device further includes a card management service, the card management service including: a first mapping relationship between the verification information of the second application and the identifier of the virtual machine; The target system service sends a verification request to the authentication service, including: The target system service calls the authentication interface of the authentication service and sends the verification request to the authentication service; The authentication service obtains verification information of the second application according to the verification information of the card rendering service and the identifier of the virtual machine, including: The authentication service sends the identifier of the virtual machine to the card management service according to the verification information of the card rendering service; The card management service sends verification information of the second application to the authentication service according to the identifier of the virtual machine and the first mapping relationship.

4. The method according to claim 2 or 3, characterized in that: The authentication service includes: a second mapping relationship between the verification information of the second application and the permission of the second application; The authentication service verifies the permission of the second application according to the verification information of the second application, including: The authentication service determines whether the second application has the authority to call the target system service according to the verification information of the second application and the second mapping relationship.

5. The method according to claim 4, characterized in that After determining whether the second application has the permission to call the target system service, the method further includes: When the second application has the permission to call the target system service, the authentication service determines that the permission verification of the second application has passed, and sends a verification success message to the target system service; or, When the second application does not have the permission to call the target system service, the authentication service determines that the permission check of the second application has failed, and sends a check failure message to the target system service; The target system service sends a call failure message to the card rendering service.

6. The method according to any one of claims 3 to 5, characterized in that: Before the first application displays the card of the second application, the method further includes: The first application sends a card creation request to the card management service, where the card creation request includes an identifier of the second application and an identifier of the card; The card management service establishes a connection with the second application according to the identifier of the second application; The second application sends verification information of the second application to the card management service; When the verification information of the second application is stored in the card management service, the card management service sends a rendering instruction to the card rendering service, where the rendering instruction is used to instruct the card rendering service to obtain a graphic node tree of the card; or, When the verification information of the second application is not stored in the card management service, the card management service stores the verification information of the second application and sends the rendering instruction to the card rendering service.

7. The method according to claim 6, characterized in that The rendering instruction includes the identifier of the second application and the identifier of the card. After sending the rendering instruction to the card rendering service, the method further includes: When the card rendering service determines, according to the identifier of the second application, that the card rendering service includes the virtual machine, the card rendering service obtains a layout code of the card according to the identifier of the card; The card rendering service obtains the graphic node tree according to the layout code of the card.

8. The method according to claim 7, characterized in that The method further comprises: When the card rendering service determines, according to the identifier of the second application, that the virtual machine is not included in the card rendering service, the card rendering service creates the virtual machine; The card rendering service obtains the layout code of the card according to the identifier of the card; The card rendering service obtains the graphic node tree according to the layout code of the card; The card rendering service sends the identifier of the virtual machine to the card management service; The card management service stores a first mapping relationship between the verification information of the second application and the identifier of the virtual machine.

9. The method according to claim 7 or 8, characterized in that: The method further comprises: The second application sends a card information acquisition request to the target system service, where the card information acquisition request is used to request the card information; The target system service sends the card information to the second application; The second application sends the card information to the card rendering service.

10. The method according to claim 7 or 8, characterized in that: The method further comprises: The card rendering service sends a card information acquisition request to the target system service, wherein the card information acquisition request is used to request the card information; The target system service verifies the permission of the second application; In response to the permission check of the second application being passed, the target system service sends the card information to the card rendering service.

11. The method according to claim 9 or 10, characterized in that: After the card rendering service obtains the card information, it further includes: The card rendering service sends the graphic node tree and the card information to the first application; The first application displays the card of the second application, including: The first application displays the card according to the graphic node tree and the information of the card.

12. The method according to any one of claims 3 to 11, characterized in that: The method further comprises: The second application calls the registration interface of the authentication service to register the verification information of the second application; The card rendering service calls the registration interface to register the verification information of the card rendering service.

13. The method according to any one of claims 3 to 12, characterized in that: The verification information of the second application is a token, the verification information of the card rendering service is a token, and the identifier of the virtual machine corresponding to the second application is the thread number of the thread in the virtual machine corresponding to the second application.

14. An electronic device, characterized in that: include: Processor and memory; The memory stores computer instructions; The processor executes the computer instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 13.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Card management method and device, terminal and computer readable storage medium

    CN109656592A

  • Card rendering method and electronic equipment

    CN112559098A

  • Data processing method and device and storage medium

    CN115309416A

  • Card updating method, electronic equipment and computer readable storage medium

    CN116755748A

  • Dynamic Virtual Device Failure Recovery

    US20120081355A1

Cited By

  • Card display method, device and equipment

    CN119902847A