Data access method and electronic device

By introducing a data proxy service into electronic devices, the system power consumption problem caused by frequent card refreshes is solved, achieving low power consumption and high performance display during the card refresh process.

WO2024234724A1PCT designated stage expired Publication Date: 2024-11-21HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/073882
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-16
Filing Date
2024-01-24
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

Frequent card refreshes cause the card provider and data provider processes to be launched frequently, increasing system power consumption and putting pressure on the performance of electronic devices.

Method used

By resident in electronic devices through a data proxy service, configuration data from card providers and data providers can be obtained to refresh cards without waking up the data producer, thus reducing system power consumption.

Benefits of technology

This effectively reduces the power consumption and performance loss caused by frequently waking up data producers during card refresh, thus improving the performance and security of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024073882_21112024_PF_FP_ABST
    Figure CN2024073882_21112024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals, and provides a data access method and an electronic device. The present application, by means of a data proxy service, refreshes a card display without frequently pulling up a data producer, thereby reducing system power consumption. The method comprises: in response to an operation of a user to create a card, the data proxy service acquires a data processing template configured by a card provider and display data information configured by a data provider, the data proxy service having permission to reside permanently in the electronic device; a first card is displayed, first card display data of the first card corresponding to first display data indicated by the data processing template and the display data information; in response to a preset condition being satisfied, the data proxy service refreshes the first card, the data proxy service determining second card display data of the refreshed first card according to second display data indicated by the data processing template and the display data information; and the refreshed first card is displayed according to the second card display data.
Need to check novelty before this filing date? Find Prior Art

Description

Data access method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on May 16, 2023, with application number 202310554186.4 and application name “Data Access Method and Electronic Device”, 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 data access method and electronic device. Background Art

[0003] With the advancement of terminal technology, card types are becoming increasingly diverse, and users are using them more frequently. When displaying a card, electronic devices refresh the card display based on a specific period or trigger condition. During a card refresh, the electronic device first launches the card provider process, which then launches the data provider process to obtain the latest card display data. Frequent card refreshes result in frequent launches of both the card provider and data provider processes, increasing system power consumption and putting pressure on the electronic device's performance.

[0004] Summary of the Invention

[0005] To solve the above technical problems, the present application provides a data access method and electronic device. The technical solution provided by the present application uses a data proxy service to achieve card refresh display without frequently pulling up data producers, thereby reducing system power consumption.

[0006] In order to achieve the above technical objectives, this application provides the following technical solutions:

[0007] In a first aspect, a data access method is provided, which is applied to an electronic device, the electronic device including a data proxy service, the data proxy service having permission to reside in the electronic device. The method includes: in response to a user creating a card, the data proxy service obtaining a data processing template configured by a card provider and display data information configured by the data provider. A first card is displayed, wherein first card display data of the first card corresponds to first display data indicated by the data processing template and the display data information. In response to a preset condition being met, the data proxy service refreshes the first card, wherein the data proxy service determines second card display data of the refreshed first card based on the data processing template and second display data indicated by the display data information. The refreshed first card is displayed based on the second card display data.

[0008] In some examples, during the card refresh process, the electronic device does not run the card provider and / or data provider.

[0009] In some embodiments, during the card creation process, the data producer publishes card-related data, such as data processing templates and display data information, to the data proxy service. Subsequently, during the card refresh process, the data proxy service can directly determine the card display data based on the card-related data and trigger the card refresh without having to wake up the data producer.

[0010] In this way, since the data proxy service has the authority to reside in the electronic device, it does not need to be pulled up and stopped, saving the power consumption and performance of managing the data producer's life cycle, device resource allocation and recycling caused by frequently pulling up the data producer during the card refresh process.

[0011] According to the first aspect, or any implementation of the first aspect above, the preset condition includes: the data proxy service receiving a first instruction to modify display data indicated by display data information; or the data proxy service determining that a refresh timing has been met; or the data proxy service receiving a second instruction from a card host to refresh a first card, the card host being configured to display the first card.

[0012] For example, a calendar card displays a meeting reminder. The data provider for the calendar card is a calendar application, and the conference application has write permission to the calendar data provided by the calendar application, allowing users to add, delete, or modify meeting schedules in the calendar data. For example, in response to a user action, the electronic device determines that a meeting originally scheduled for tomorrow morning from 10:00 AM to 11:00 AM has been canceled. In response to the cancellation, the conference application may send a first indication to the data proxy service, including the data identifier and control parameters of the calendar data. Accordingly, based on the received first indication, the data proxy service determines that the conference application has instructed the user to modify the meeting schedule in the calendar data indicated by the display data information corresponding to the calendar card. Based on the permissions configured by the calendar application during the calendar data publishing process, the data proxy service determines that the conference application has write permission to the calendar data. The data proxy service then modifies the corresponding meeting schedule based on the first indication. Subsequently, based on the modified meeting schedule, the data proxy service may generate second card display data for the calendar card based on the card layout information indicated by the data processing template corresponding to the currently displayed calendar card and the second display data (i.e., the modified schedule data) indicated by the display data information, thereby triggering a refresh of the displayed calendar card.

[0013] For another example, the data processing template also includes a scheduler, which is used to enable the data proxy service to determine whether a refresh opportunity has been met. For example, the card provider configures a cyclical triggering card refresh event through the scheduler, such as triggering a refresh of the calendar card at 6:00 PM each day to display the next day's schedule. In this process, the data proxy service responds to the refresh event indicated by the scheduler, determines that the preset conditions have been met, rereads the corresponding second display data based on the display data information, matches the second display data based on the layout information indicated by the data processing template corresponding to the displayed card, determines the second card display data, and refreshes the card display.

[0014] For another example, when the electronic device is displaying the first interface of the desktop, it detects a user's sliding operation and determines that the user indicates to display the second interface of the desktop. Wherein, the second interface to be displayed includes a first card, then the desktop (i.e., the card host) can send a second indication to the data proxy service, and carry the card ID of the first card and the ID of the data processing template corresponding to the style of the first card to be displayed in the second indication. Accordingly, after receiving the second indication, the data proxy service can determine that the preset conditions are met, then the data proxy service obtains the display template corresponding to the card ID and the data processing template corresponding to the data processing template ID, and determines the URI indicated by the display template ID to determine the corresponding display data information, and queries the second display data in the display data indicated by the display data information according to the query conditions carried by the data processing template. After that, the data proxy service matches the data processing template and the second display data to obtain the second card display data, and feeds back the second display data to the card host, thereby triggering the refresh of the card, such as displaying the first card on the second interface.

[0015] In this way, card refresh is triggered in multiple ways, and during the card refresh process, there is no need to wake up the card provider and the data provider, thereby effectively reducing power consumption and improving the performance of the electronic device.

[0016] According to the first aspect, or any implementation of the first aspect above, in response to a user creating a card, the data proxy service obtains a data processing template and display data information configured by the card provider. This includes: in response to the user creating a card, the card provider configures a data processing template corresponding to the first card, and the data provider configures display data information corresponding to the display data accessed by the first card. The card provider sends the data processing template to the data proxy service, and the data provider sends the display data information to the data proxy service.

[0017] In some embodiments, during the card creation process, the card provider (e.g., a calendar application) configures the card's display template, including, for example, the data identifier and layout information of the card data to be displayed. The data provider (e.g., a calendar application) configures the card's display data information, including, for example, the data identifier and read / write permissions of the card's display data to be displayed. Optionally, the data identifier is, for example, a uniform resource indicator (URI) for display data, which indicates the storage location of the display data.

[0018] Optionally, after the card is created, the data consumer can display the card. Furthermore, after the card is configured, the data proxy service can obtain the display template and card display information published by the data producer (such as the card provider and the data provider).

[0019] In this way, the data proxy service obtains the data processing template published by the card provider and the display data information published by the data provider in advance, and can refresh the card without waking up the card provider and the data provider during the card refresh process, thereby decoupling the cycles of the card provider and the data provider, effectively reducing the power consumption of electronic devices and improving the performance of electronic devices.

[0020] According to the first aspect, or any implementation of the first aspect above, the data processing template includes a query condition, and the query condition is used by the data proxy service to query the second display data in the display data indicated by the display data information.

[0021] For example, the same card may have different display styles, and cards of different styles may correspond to different data processing templates. The data proxy service searches the display data indication information for corresponding display data based on the query conditions carried in the data processing template to refresh and display the card of the corresponding style.

[0022] For example, the calendar card currently to be refreshed is used to display today's and tomorrow's schedules. Then, in the process of publishing the calendar card data, the calendar application configures the corresponding data processing template 1, and the corresponding query condition 1 is to query the schedule data within the timestamp range from today to tomorrow in the schedule data. Subsequently, when refreshing the calendar card, the data proxy service can query the schedule data within the timestamp range from today to tomorrow (such as the second display data) in the calendar data indicated by the display data information according to the query condition 1. Afterwards, the data proxy service refreshes the display of the calendar card based on the queried second display data and the data processing template 1.

[0023] In this way, the same card can be displayed in different styles through query conditions.

[0024] According to the first aspect, or any implementation method of the first aspect above, the data proxy service determines the second card display data of the refreshed first card based on the second display data indicated by the data processing template and the display data information, including: the data proxy service generates the second card display data based on the second display data and the data processing template, and the data processing template is used to indicate the layout information of the second display data.

[0025] According to the first aspect, or any implementation of the first aspect above, the data processing template further includes a scheduler, and the scheduler is used to enable the data proxy service to determine whether a refresh opportunity is met.

[0026] According to the first aspect, or any implementation of the first aspect above, the display data information includes a data identifier, read and write permissions, and data source information of the display data configured by the data provider.

[0027] In some examples, the read and write permissions are used to indicate whether the application has permission to read the display data indicated by the data identifier, and whether the application data has permission to write data in the display data indicated by the data identifier, such as adding data, deleting data, and modifying data.

[0028] In this way, the security of displayed data is guaranteed by data permissions. In addition, data with write permissions can trigger the writing of displayed data, which in turn triggers the data proxy service to refresh the display of the corresponding card according to the newly written data.

[0029] According to the first aspect, or any implementation method of the first aspect above, the card provider is also used to configure a display template corresponding to the first card, the display template includes data identification and layout information of the display data corresponding to the first card, and the display template includes one or more styles of data processing templates corresponding to the first card.

[0030] For example, in response to a user creating a calendar card, the card provider may configure a display template corresponding to the calendar card. This display template includes multiple data processing templates corresponding to the calendar card. The electronic device may then display the calendar card indicated by the current user operation based on one of the data processing templates. Subsequently, in response to a user instruction to create a calendar card of a different design, the card provider may not need to publish the data processing template to the data proxy service. Alternatively, in response to the user creating a card, the card provider may configure the corresponding data processing template and publish it to the data proxy service.

[0031] According to the first aspect, or any implementation of the first aspect above, the data proxy service is further configured to provide data storage services to the data provider, the data proxy service includes a data directory corresponding to the data provider, the display data information includes the data directory, and in response to a preset condition being met, the data proxy service refreshes the first card, including: in response to the preset condition being met, the data proxy service determines, based on the data directory, a storage location of the second display data. The data proxy service obtains the second display data based on the storage location.

[0032] Optionally, the data proxy service may be a sub-service in the distributed data management service. Of course, in actual applications, the data proxy service may also be other system services associated with the distributed data management service.

[0033] For example, during the data producer's data publishing process, the data proxy service can obtain the data directory of the display data and implement storage management of the display data. In the subsequent card refresh process, the data proxy service can directly obtain the display data stored in the corresponding storage location according to the data directory without having to wake up the data provider. The display data can also be obtained, effectively reducing the wake-up frequency of the data provider and thus reducing device power consumption.

[0034] According to the first aspect, or any implementation of the first aspect above, the electronic device further includes a system service, the system service further configured to provide data storage services to a data provider, the system service including a data directory corresponding to the data provider, and in response to a preset condition being met, the data proxy service refreshing the first card, including: in response to the preset condition being met, the data proxy service obtaining the data directory from the system service. The data proxy service determining a storage location of the second display data based on the data directory. The data proxy service obtaining the second display data based on the storage location.

[0035] Optionally, the above-mentioned system service is, for example, a distributed data management service, and the distributed data management service and the data proxy service may be two independent system services.

[0036] For example, when the data proxy service determines that a card display refresh is required due to pre-set conditions, it can request the distributed data management service to obtain the data directory corresponding to the card to be displayed, thereby retrieving the second display data from the storage location indicated by the data directory. This allows the data provider to be retrieved during the card refresh process without having to wake up the data provider, effectively reducing the frequency of waking up the data provider and thus lowering device power consumption.

[0037] In a second aspect, an electronic device is provided. The electronic device includes: a processor, a memory, and a display screen. The memory and the display screen are coupled to the processor. The memory is used to store computer program code. The computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes: in response to the user's operation of creating a card, the data proxy service obtains the data processing template configured by the card provider and the display data information configured by the data provider. The data proxy service has the authority to reside in the electronic device. A first card is displayed, and the first card display data of the first card corresponds to the first display data indicated by the data processing template and the display data information. In response to meeting a preset condition, the data proxy service refreshes the first card, wherein the data proxy service determines the second card display data of the refreshed first card based on the data processing template and the second display data indicated by the display data information. Based on the second card display data, the refreshed first card is displayed.

[0038] According to the second aspect, during the card refresh process, the electronic device does not run the card provider and / or the data provider.

[0039] According to the second aspect, or any implementation of the second aspect, the preset condition includes: the data proxy service receiving a first instruction to modify display data indicated by display data information; or the data proxy service determining that a refresh opportunity has been met; or the data proxy service receiving a second instruction from a card host to refresh a first card, the card host being configured to display the first card.

[0040] According to the second aspect, or any implementation of the second aspect above, in response to a user creating a card, the data proxy service obtains a data processing template and display data information configured by the card provider. This includes: in response to the user creating a card, the card provider configures a data processing template corresponding to a first card, and the data provider configures display data information corresponding to display data accessed by the first card. The card provider sends the data processing template to the data proxy service, and the data provider sends the display data information to the data proxy service.

[0041] According to the second aspect, or any implementation of the second aspect above, the data processing template includes a query condition, and the query condition is used by the data proxy service to query the second display data in the display data indicated by the display data information.

[0042] According to the second aspect, or any implementation method of the above second aspect, the data proxy service determines the second card display data of the refreshed first card based on the second display data indicated by the data processing template and the display data information, including: the data proxy service generates the second card display data based on the second display data and the data processing template, and the data processing template is used to indicate the layout information of the second display data.

[0043] According to the second aspect, or any implementation of the second aspect above, the data processing template further includes a scheduler, and the scheduler is used to enable the data proxy service to determine whether a refresh opportunity is met.

[0044] According to the second aspect, or any implementation of the second aspect above, the display data information includes a data identifier, read and write permissions, and data source information of the display data configured by the data provider.

[0045] According to the second aspect, or any implementation method of the above second aspect, the card provider is also used to configure a display template corresponding to the first card, the display template includes data identification and layout information of the display data corresponding to the first card, and the display template includes one or more styles of data processing templates corresponding to the first card.

[0046] According to the second aspect, or any implementation of the second aspect above, the data proxy service is further configured to provide data storage services to the data provider, the data proxy service includes a data directory corresponding to the data provider, the display data information includes the data directory, and in response to a preset condition being met, the data proxy service refreshes the first card, including: in response to the preset condition being met, the data proxy service determines, based on the data directory, a storage location of the second display data. The data proxy service obtains the second display data based on the storage location.

[0047] According to the second aspect, or any implementation of the second aspect above, the electronic device further includes a system service, the system service further configured to provide data storage services to a data provider, the system service including a data directory corresponding to the data provider, and in response to a preset condition being met, the data proxy service refreshing the first card, including: in response to the preset condition being met, the data proxy service obtaining the data directory from the system service. The data proxy service determining a storage location of the second display data based on the data directory. The data proxy service obtaining the second display data based on the storage location.

[0048] The technical effects corresponding to the second aspect and any implementation method of the second aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any implementation method of the first aspect, and will not be repeated here.

[0049] In a third aspect, an electronic device is provided, which has the function of implementing the data access method described in the first aspect and any possible implementation thereof. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.

[0050] The technical effects corresponding to the third aspect and any implementation method of the third aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any implementation method of the first aspect, and will not be repeated here.

[0051] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as instructions or code), which, when executed by an electronic device, causes the electronic device to perform the method of the first aspect or any one of the embodiments of the first aspect.

[0052] The technical effects corresponding to the fourth aspect and any implementation method of the fourth aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any implementation method of the first aspect, and will not be repeated here.

[0053] In a fifth aspect, a computer program product is provided. When the computer program product is run on an electronic device, the electronic device executes the method of the first aspect or any one of the embodiments of the first aspect.

[0054] The technical effects corresponding to the fifth aspect and any implementation method of the fifth aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any implementation method of the first aspect, and will not be repeated here.

[0055] In a sixth aspect, a circuit system is provided, the circuit system including a processing circuit, the processing circuit being configured to execute the method of the first aspect or any one of the embodiments of the first aspect.

[0056] The technical effects corresponding to the sixth aspect and any implementation method of the sixth aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any implementation method of the first aspect, and will not be repeated here.

[0057] In the seventh aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor executes the method of the first aspect or any one of the embodiments of the first aspect.

[0058] The technical effects corresponding to the seventh aspect and any implementation method of the seventh aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any implementation method of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] FIG1 is a schematic diagram of a card display provided in an embodiment of the present application;

[0060] FIG2 is a schematic diagram of a card refresh display process provided in an embodiment of the present application;

[0061] FIG3 is a schematic diagram of a calendar card refresh display process provided by an embodiment of the present application;

[0062] FIG4 is a schematic diagram of electronic device types provided in an embodiment of the present application;

[0063] FIG5 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0064] FIG6 is a schematic diagram of a software structure block diagram of an electronic device provided in an embodiment of the present application;

[0065] FIG7 is a schematic diagram of a card data publishing and card refresh display process according to an embodiment of the present application;

[0066] FIG8 is a schematic diagram of a calendar card format provided in an embodiment of the present application;

[0067] FIG9 is a schematic diagram of a new schedule scenario provided in an embodiment of the present application;

[0068] FIG10 is a schematic diagram of display changes of a calendar card provided in an embodiment of the present application;

[0069] FIG11 is a flow chart of a data access method provided in an embodiment of the present application;

[0070] FIG12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] The technical solutions in the embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to include expressions such as "one or more", unless there is a clear indication to the contrary in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two).

[0072] References to "one embodiment" or "some embodiments" etc. described in this specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.

[0073] In the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0074] In some embodiments, electronic devices display cards in a variety of ways, and the types of cards are becoming increasingly diverse. For example, some system applications or third-party applications can create corresponding cards, and the cards can display data from one or more applications.

[0075] For example, as shown in FIG1(a), the electronic device displays a calendar card 11 on the desktop. The calendar card 11 can be used to display data from a calendar application, such as dates, schedules, etc. Alternatively, the calendar card 11 can also display data from other applications, such as meeting reminders from a meeting application.

[0076] As another example, as shown in FIG1( b ), the electronic device displays multiple types of cards on the negative first screen, such as a calendar card 12 , a sports and health card 13 , and the like.

[0077] In some embodiments, during the card display process, the electronic device needs to refresh the card display. This card refresh relies on the application accessing the data to pull up the application containing the accessed data through the card management service to obtain the latest card display data. The application accessing the data can be referred to as a data consumer or data accessor; the application containing the accessed data, or the application providing the data, can be referred to as a data producer, data provider, or data source application. Data consumers (or data producers) can be system applications and / or third-party applications. As shown in Figure 2, data producers can include card providers and data providers. The card provider is responsible for creating cards and configuring card layout information, while the data provider is responsible for providing card display data. The card provider and data provider can be the same application. For example, the card provider is a calendar application that creates calendar cards, and the data provider is also a calendar application that provides calendar data for display on the calendar card. Alternatively, the card provider and data provider can be different applications. For example, the card provider is a local music application that creates music cards, and the data provider is a third-party music application installed on the electronic device that provides the audio data for playing the music cards.

[0078] For example, as shown in Figure 2, the Card Management Service manages card refreshes. When a card refresh is needed, the Card Management Service launches the Card Provider process, which in turn launches the Data Provider process. The Data Provider process retrieves the latest card display data from the database. The Data Provider process then feeds the acquired card display data back to the Card Management Service via the Card Provider process. After receiving the card display data, the Card Management Service sends it to the card host (e.g., the desktop, the negative one screen, etc.), thereby refreshing the card display.

[0079] It can be seen that frequent card refreshes result in frequent startup of the card provider process and the data provider process, which increases system power consumption and causes performance pressure on electronic devices.

[0080] For example, take the calendar card refresh process as an example. As shown in Figure 1, a calendar card displays information such as the date and schedule reminders. Calendar cards are refreshed in various ways, including schedule changes and fixed-point reminders. For example, reminders are refreshed before a meeting begins and subsequent schedules are refreshed at a preset time. As shown in Figure 3, a calendar card is displayed on the desktop. Applications such as calendar applications and meeting applications can add data corresponding to the components displayed on the calendar card. The calendar data provider can obtain this data and store it in a database. The calendar data provider sends the corresponding schedule reminders to the calendar application through static broadcasts or other methods. As the calendar card provider, the calendar application can generate timed reminders corresponding to the card. Subsequently, when the card management service determines that a calendar card needs to be refreshed (e.g., at the time indicated by the timed reminder), it launches the calendar application process. Through the calendar application process, it launches the calendar data provider process to retrieve the corresponding calendar card display data from the database. After obtaining the calendar card display data, the card management service sends it to the desktop, allowing the desktop to refresh the calendar card display, such as displaying a meeting reminder on the calendar card.

[0081] Therefore, the present application provides a data access method, which implements access to data of a data source application through a data proxy service. The data proxy service has the authority to reside in the electronic device, which means that the data proxy service does not need to be frequently started or shut down, thereby reducing system power consumption and improving electronic device performance.

[0082] Optionally, the data access method provided in the embodiment of the present application can be applied to an electronic device 100. For example, as shown in FIG4 , the electronic device 100 can be a mobile phone 41, a tablet computer 42, a wearable device 43, a smart screen 44, a laptop computer 45, a vehicle-mounted device 46, a computer, a computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an artificial intelligence (AI) device, and other terminal devices. The operating system installed in the electronic device 100 includes but is not limited to This application does not limit the specific type of the electronic device 100 or the installed operating system.

[0083] Optionally, FIG5 shows a schematic structural diagram of the electronic device 100. As shown in FIG5, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195, etc.

[0084] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0085] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0086] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0087] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0088] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0089] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0090] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0091] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0092] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0093] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0094] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0095] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0096] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0097] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0098] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with a network and other devices via wireless communication technology. Wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0099] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0100] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD), for example, an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-LED, a Micro-OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 can include one or N display screens 194, where N is a positive integer greater than one.

[0101] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0102] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0103] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0104] The audio module 170 is used to convert digital audio information into analog audio signals for output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110. The electronic device 100 can use the audio module 170 for functions such as music playback and recording. The audio module 170 can include a speaker, a receiver, a microphone, a headphone jack, and an application processor to implement audio functions.

[0105] The sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0106] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0107] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or touch vibration feedback. Indicator 192 can be an indicator light that can be used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. Electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0108] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0109] FIG6 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.

[0110] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0111] The application layer can include a series of application packages.

[0112] As shown in FIG6 , the application package may include applications such as calendar, contacts, memo, sports health, clipboard, gallery, map, camera, video, etc.

[0113] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0114] As shown in FIG6 , the application framework layer may include a card management service, a data proxy service, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0115] The card management service is used to manage cards, such as controlling card refreshes.

[0116] The data proxy service is used to manage the card templates created by the application. Data consumers at the application layer can access the data corresponding to the card templates created by the data producers managed by the data proxy service by calling the card management service interface, thereby realizing the display of the card.

[0117] In some examples, the data proxy service can have higher system permissions, thereby providing a unified proxy for data producers. Optionally, the data proxy service has the permission to directly access the data producer, that is, the data proxy service can access the data producer's data in the same way as the data producer accesses the data producer's data, which makes it possible to access the data producer's data without launching the data producer. Optionally, the data proxy service can have the permission to reside in the electronic device, so that the data proxy service does not need to be frequently launched or shut down, which can reduce the power consumption of the electronic device.

[0118] In some examples, the application framework layer also includes a distributed data management service, which can isolate the data of different applications, ensuring that data between different applications cannot be accessed by each other. Applications can create databases by calling the distributed data service interface, which can include the data in the database. The distributed data management service module can also provide applications with database distribution capabilities across different devices. The distributed data management service module can support application data synchronization between trusted devices, providing a consistent data access experience across multiple devices.

[0119] Optionally, the distributed data management service may include the above-mentioned data proxy service. Alternatively, the data proxy service is a service independent of the distributed data management service.

[0120] In some examples, the card management service, data proxy service, and distributed data management service may also be located in other software layers of the electronic device, which is not limited in the embodiments of the present application. For example, the card management service, data proxy service, and distributed data management service may be located in the system library. For ease of description, the following takes the card management service, data proxy service, and distributed data management service as an example of a service layer below the application layer to illustrate the interaction process of each module during the card display process, where the service layer can be an application framework layer or a system library, etc. The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0121] Content providers are used to store and retrieve data and make it accessible to applications. This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0122] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0123] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0124] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0125] The notification manager allows applications to display notification information in the status bar. It can be used to convey informational messages and can disappear automatically after a short stay without user interaction. The notification manager can also be a notification that appears in the top status bar of the system in the form of an icon or scrolling text bar.

[0126] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.

[0127] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0128] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0129] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0130] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0131] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0132] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0133] A 2D graphics engine is a drawing engine for 2D drawings.

[0134] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0135] In some embodiments, embodiments of the present application provide a data sharing system. As shown in FIG7 , the data sharing system includes data consumers, data producers, and a data proxy service. The data consumers and the data proxy service can communicate with each other through a card management service.

[0136] Data consumers, for example, are applications in the application layer in Figure 7. Data consumers can include system applications and / or third-party applications. For example, a data consumer is a desktop or a negative screen. Data consumers can access data provided by data providers across applications to display cards.

[0137] Data producers, for example, are applications in the application layer in Figure 7. Data producers may include system applications and / or third-party applications. Data producers' data can be accessed by data consumers through cross-application access.

[0138] For example, as shown in Figure 7, data producers include card providers and data providers. The card provider is responsible for configuring the card's display template, including, for example, the card's layout information. The data provider is responsible for configuring the card's display data information, such as the storage directory for the card's display data. The process of configuring the display template and display data information by the card provider and data provider is described in detail below and will not be repeated here.

[0139] Optionally, the card provider is a system application such as a calendar application, a weather application, a contact application, etc. Alternatively, the card provider is a third-party application such as a third-party music application, a conference application, etc. Optionally, the data provider is a system application such as a calendar application, a weather application, etc. Alternatively, the data provider is a third-party application such as a third-party music application, a conference application, etc. Optionally, the card provider and the data provider can be the same application or different applications. For example, the card provider is a calendar application for creating calendar cards, and the data provider is also a calendar application for providing calendar data displayed on the calendar card. Alternatively, the card provider is a local music application for creating music cards, and the data provider is a third-party music application installed on the electronic device for providing audio data for playing music cards. The embodiments of the present application do not limit whether the card provider and the data provider are the same application.

[0140] The data proxy service can have higher system permissions, thereby providing a unified proxy for data producers. In some embodiments, the data proxy service has direct access to the data producer, that is, the data proxy service can access the data producer's data in the same way as the data producer accesses the data producer's data, which makes it possible to access the data producer's data without launching the data producer. In some embodiments, the data proxy service can have permission to reside in the electronic device, which means that the proxy service does not need to be frequently launched or shut down, which can reduce the power consumption of the electronic device.

[0141] In some embodiments, the data proxy service can be implemented as a system service, thereby having the aforementioned rights to reside in the electronic device and to directly access the data producer. The data proxy service can be registered as a system service and register the functions of the system service in the system service management service, so that the system service management service can start and manage the data proxy service and the functions of the system service.

[0142] In some embodiments, the data proxy service is deployed in a distributed data management service of the application framework layer (such as the service layer). Since the data producer creates the data of the data producer through the distributed data management service, the data directory used by the data producer to find the data is also generated by the distributed data management service. Therefore, the data proxy service is deployed in the distributed data management service, which can more conveniently obtain the data directory of the data producer and then access the data of the data producer in the same way as the data producer accesses the data of the data producer. For example, as shown in Figure 7, the data proxy service is used to store and manage the data provided by the data producer.

[0143] It is understandable that the implementation of the data proxy service is not limited to the above-mentioned method. In some embodiments, the data proxy service may also be deployed in other modules independent of the distributed data management service in the application framework layer (such as the service layer). Alternatively, the data proxy service may also be deployed in other functional modules in the application framework layer (such as the service layer). Then the data proxy service can obtain the data directory of the data producer through the distributed data management service, and then access the data of the data producer based on the data directory.

[0144] Based on the above-mentioned data sharing system, embodiments of the present application provide a method for accessing data. In this method, data consumers can access the data of data producers through a data proxy service without having to launch the data producer. This can improve or avoid the problem of frequently launching data source applications, and further improve other issues such as high power consumption caused by frequently launching data source applications.

[0145] It should be noted that, in actual applications, after the electronic device completes the configuration of the data sharing system, it can execute the following embodiments multiple times to access data without having to configure the data sharing system each time it accesses data; or, in other implementations, the electronic device has completed the configuration of the data sharing system before leaving the factory, and when the electronic device is turned on, there is no need to configure the data sharing system again.

[0146] In some embodiments, a data producer provides card display data, display templates, and other data, and publishes this data to a data proxy service. This data is then managed by a data proxy service resident in the service layer, allowing data consumers to access it directly through the data proxy service, thus avoiding the need to frequently wake up the data producer. As shown in Figure 7, the data producer includes a data provider for display data and a card provider for display templates. Through a unified data proxy, the lifecycles of the data and card providers are decoupled, enabling card refreshes that are independent of the data producer.

[0147] In some embodiments, the above-mentioned data sharing system may further include a shared storage space, which may be used to implement cross-application and cross-process communication, such as communication between data consumers and data proxy services, communication between data producers and data proxy services, etc. Data producers may store data that needs to be sent to data consumers in the shared storage space, and the data proxy service obtains the data published by the data producer from the shared storage space to refresh the cards displayed by the data consumers. For example, the data sharing system includes a database as shown in FIG7 . It is understood that, in actual applications, cross-application and cross-process communication may also be implemented in other ways, rather than necessarily relying on shared storage space.

[0148] For example, as shown in FIG7 , the data proxy service provides a software development kit (SDK) interface to the application in the application layer, and the data producer can implement data publishing by calling the SDK interface. After receiving the data published by the data producer, the data proxy service can manage the data. For example, the data proxy service can manage the permissions, subscribers, and life cycle of the data. Among them, data permissions are defined by the data producer, data subscribers are data consumers who subscribe to the corresponding data (such as card hosts), and life cycle management includes card life cycle management. During the data publishing process, the data producer can indicate the uniform resource identifier (URI) of the published data, and the data proxy service can directly access the corresponding data in the database through the URI. These data include persistent data and process data. Among them, persistent data includes data with low update frequency such as calendars and contacts, and process data includes data with high update frequency such as step counting and weather.

[0149] It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the data proxy service. In other embodiments of the present application, the data proxy service may include more or fewer modules than shown, or combine or split certain modules, or arrange the modules differently.

[0150] Optionally, during the data publishing process, the data provider can be used to configure the data identification, read and write permissions, and data source information of the data.

[0151] In some embodiments, an electronic device may include multiple applications, and the electronic device may allocate corresponding storage space to each application, and the storage space may be used to store data of the application corresponding to the storage space. For the security of data, the data of different applications are isolated from each other through sandboxes and other means, so that the data of one application cannot be directly accessed by other applications, wherein the access described here includes operations such as adding, deleting, modifying and querying data. In order to provide users with a richer experience, different applications may need to share data. For example, the calendar application stores calendar data set by the user, and the conference application can access the calendar data to add or delete the corresponding meeting schedule. Optionally, the calendar application can configure the permissions of the calendar data, such as whether to allow the conference application to write new meeting schedules in the calendar data.

[0152] In some embodiments, to ensure the security of cross-application access, the data proxy service may provide an SDK to the application. After the data producer publishes data to the data proxy service, other applications can access the data published by the data producer through the SDK of the data proxy service.

[0153] For example, the following example shows an example of data published by a data provider. The data identifier is used to identify the corresponding data source, such as the URI of the data (such as "meeting"). The read and write permissions of the data are used to indicate the read permission and write permission of the data source. For example, a data consumer with read permission can read the corresponding data source. An application with write permission can modify the data source and trigger the corresponding data consumer to access the modified data source. The data source information ("metadata") is used to indicate information such as the database path where the data source is stored, the data source type (such as persistent data or process data), and the data source name.

[0154] Optionally, during the data publishing process, the card provider can configure the data display template. For example, the following example illustrates data published by a card provider. The data identifier corresponds to the data identifier in the data published by the data provider. Based on this data identifier, the data proxy service can determine the corresponding data source information, thereby accessing the corresponding data. The data proxy service then matches the acquired data with the display template, and data consumers can subscribe to the matched card display data to display the card. The display template is typically in XML or other formats and specifies the card's display format and display parameters. For example, the card provider uses the display template to configure the card's layout information, including information such as the components displayed on the card and their display locations. The data proxy service matches the layout information with the data identifier so that the components can be displayed in the corresponding locations on the card. For example, in the case of the calendar card shown in Figure 8(a), the data proxy service determines the calendar card's layout information and determines the data identifiers corresponding to the dates displayed on the calendar card, as well as the data identifiers corresponding to the meeting reminders.

[0155] In some embodiments, after acquiring and matching data published by the data provider and the card provider, the data proxy service can configure the corresponding card ID. Subsequently, the card management service can query the matched data based on the corresponding card ID and send this data to the data consumer to enable card display. Alternatively, the card provider can also configure the card ID. The data proxy service then determines the corresponding display template based on the card ID sent by the card management service and the data identifiers for the data required for the display template. It then reads the corresponding card display data from the database to refresh the card display.

[0156] For example, as shown in FIG7 , the card management service determines that the calendar card displayed on the desktop needs to be refreshed and can send the calendar card ID to the data proxy service. For example, if the electronic device detects a user sliding operation on the desktop and determines that the interface to be displayed includes a calendar card, the desktop can send a card display request to the card management service and carry the calendar card ID in the card display request. The card management service can then forward the card display request carrying the calendar card ID to the data proxy service. Accordingly, the data proxy service determines the data identifier indicated in the corresponding display template based on the calendar card ID, and reads the corresponding data from the database based on the data identifier. It then generates card display data based on the read data and the display template, and feeds the card display data back to the card management service. Afterwards, the card management service can send the acquired card display data to the data consumer, and the data consumer can display the card based on the acquired card display data.

[0157] In this way, since the data proxy service has the authority to reside in the electronic device, it does not need to be pulled up and stopped, saving the power consumption and performance of the management life cycle of the data producer, device resource allocation and recycling caused by frequently pulling up the data producer. Moreover, access to the data of multiple data producers can be achieved through a data proxy service, further saving the power consumption and performance of the management life cycle of multiple data producers, device resource allocation and recycling caused by pulling up multiple data producers. In addition, if the application carries malicious files such as Trojans or viruses, the damage caused to the electronic device when the application is pulled up may be far greater than the damage caused to the electronic device by the data of the application. Then, providing a unified access agent through the data proxy service can reduce the damage that the data producer may cause to the electronic device, reduce the risk of the electronic device being maliciously attacked, and further ensure the performance of the electronic device.

[0158] In some embodiments, since the data proxy service can reside in the electronic device, as long as the data consumer obtains the identity information of the data proxy service, the data consumer can communicate with the data proxy service based on the identity information at any time to improve access efficiency.

[0159] In some embodiments, when the data proxy service receives a card display request forwarded by the card management service, the data proxy service performs connection authentication on the data consumer to ensure that the data consumer that passes the connection authentication has permission to connect to the data proxy service and / or the data producer. Furthermore, the data proxy service performs access authentication on the data consumer to ensure that the data consumer that passes the access authentication has permission to access the data proxy service and / or the data producer. By performing connection authentication and access authentication on the data consumer, the security of data access can be ensured.

[0160] In some examples, when the data proxy service performs connection authentication on a data consumer, the data proxy service may detect whether the data consumer's configuration file includes first permission information. If the first permission information is included, the connection authentication may be determined to be successful; otherwise, the connection authentication may be determined to be unsuccessful. For example, the first permission information may be used to indicate that the data consumer has permission to connect to the data proxy service.

[0161] It should be noted that the first permission information can be added to the data consumer's configuration file in advance by the data consumer's developer. Of course, the data consumer can also obtain the first permission information through other means and add the first permission information to the configuration file. The embodiment of the present application does not limit the method for the data consumer to obtain the first permission information.

[0162] In some examples, when a data proxy service performs access authentication on a data consumer, the data proxy service may detect whether the data consumer's configuration file includes second permission information and whether the proxy service's configuration file includes third permission information corresponding to the second permission information. The second permission information may be used to declare permission to access the proxy service, and the third permission information may be used to indicate that the proxy service has defined the permissions declared by the second permission information. If both the second permission information and the third permission information are detected, the data consumer's access authentication may be determined to be successful; otherwise, the data consumer's access authentication may be determined to be unsuccessful.

[0163] It should be understood that the data proxy service can also perform connection authentication and access authentication through other methods.

[0164] In addition, the data proxy service's connection authentication and access authentication for the data consumer is an optional step, that is, the data proxy service may not perform connection authentication and / or access authentication for the data consumer. By omitting connection authentication and / or access authentication, access efficiency can be improved.

[0165] In some embodiments, the same card may have multiple display styles. For example, as shown in (a), (b), and (c) in Figure 8, a calendar card has multiple different display styles, and different display styles may correspond to different data processing templates. When adding a calendar card, the card provider may generate a corresponding data processing template based on the display template corresponding to the calendar card and the display style of the calendar card currently being added, and configure the corresponding data processing template ID. Accordingly, during the card subscription process, the card management service may send the corresponding card ID and data processing template ID to the data proxy service, so that the data proxy service can determine the corresponding calendar card and the corresponding data processing template to display the required card.

[0166] Optionally, as described above, the display template is used to indicate the layout information of the card and the data source information for implementing the layout information. Then, the display template of the same card can be configured with multiple data processing templates for each piece of data indicated by the data source information to achieve different display styles for the same card. For example, the card provider of a calendar card can obtain the schedule data provided by the data provider to add the corresponding calendar card. Among them, the calendar card can display today's schedule or tomorrow's schedule, and the corresponding data source is a set of schedule data provided by the data provider. Then, in the process of generating the card, the card provider can configure the data processing template corresponding to the card, and then configure the query conditions corresponding to each data processing template. The query conditions are used to indicate the conditions for querying the required data in the data source. For example, the card provider configures the query conditions of the data processing template corresponding to the calendar card to be today's or tomorrow's timestamp range.

[0167] For example, as shown in Figure 8 (a), a calendar card displays today's and tomorrow's schedules. When publishing the calendar card's data, the calendar application configures data processing template 1. Query condition 1 searches for schedule data within the timestamp range from today to tomorrow within the schedule data. For another example, as shown in Figure 8 (b), a calendar card displays the current month's calendar. When publishing the calendar card's data, the calendar application configures data processing template 2. Query condition 2 searches for date data within the timestamp range from this month within the schedule data. For another example, as shown in Figure 8 (c), a calendar card displays information about recent holidays. When publishing the calendar card's data, the calendar application configures data processing template 3. Query condition 3 searches for the holiday data closest to the current timestamp within the schedule data. In other words, the calendar card corresponds to three data processing templates. In response to a user operation, the electronic device can display the calendar card, allowing the data consumer to determine the data processing template used to display the current calendar card.

[0168] Accordingly, as shown in Figure 7, during the card refresh process, the Card Management Service can send the calendar card ID and the data processing template ID corresponding to the card to be displayed to the Data Proxy Service. Based on the calendar card ID, the Data Proxy Service determines the data identifier indicated in the corresponding display template and the corresponding query conditions based on the data processing template ID. Based on the data identifier and query conditions, the Data Proxy Service retrieves the corresponding data from the database and feeds the retrieved data back to the Card Management Service. The Card Management Service then sends the retrieved data to the Data Consumer, which can then refresh the card display based on the retrieved data.

[0169] In some embodiments, during the card addition or editing process, the card provider can configure a corresponding scheduler in the data processing template. The scheduler is a structured query language (SQL) used to pre-set business processing functions. Based on the scheduler, the data proxy service can trigger data notifications, such as triggering the card management service to refresh the card display.

[0170] For example, if a calendar card configured by a calendar application displays a schedule reminder, then during the configuration of the data processing template, the calendar application can configure a corresponding scheduler to trigger the data proxy service to notify the card management service to refresh the displayed calendar card at the corresponding reminder time.

[0171] For example, the following example shows the SQL statement corresponding to the configured scheduler in a calendar card display scenario. The scheduler is used to notify data at a specified time, thereby realizing timed notification of schedules. For example, the scheduler is used to find the minimum time within the time that meets the conditions for notification, such as triggering a card refresh when a schedule that is about to start or in progress is found. In addition, at 18:00 every day, notification is triggered for schedules between the current time and the next day's 23:59 timestamp range, such as schedules whose start time or end time is within the current timestamp range.

[0172] For example, if a map card configured by a map application displays an important location reminder, then when configuring the data processing template, the map application can configure a corresponding scheduler to trigger the data proxy service to notify the card management service to refresh the displayed map card when the electronic device is at the corresponding reminder location.

[0173] The above describes the process of triggering a card refresh display using time or location as the scheduler trigger condition. It should be understood that the card provider can also configure other scheduler trigger conditions. For example, the card provider can configure the scheduler of the data processing template to trigger the notification card refresh at the reminder time and at a key location.

[0174] In some embodiments, the card provider configures a corresponding scheduler in the data processing template configuration. The triggering time of the scheduler can be when the corresponding data changes (such as addition, deletion, modification, etc.), or after the preset processing is completed. For example, the calendar application adds a corresponding schedule in response to the user operation. Then, the data proxy service can trigger the acquisition of the corresponding newly added schedule according to the scheduler, and trigger the notification card refresh at the corresponding time. For another example, the card provider configures a cyclic triggering card refresh time through the scheduler. For example, the calendar card is triggered to refresh and display the schedule of the next day at 18:00 every day. Then, after the data proxy service triggers the refresh of the calendar card based on the scheduler at 18:00, it triggers the reset scheduler so that the data proxy service can trigger the refresh of the calendar card again at 18:00 the next day based on the reset scheduler.

[0175] For example, as described above, the data provider can configure the read and write permissions of the data during the data publishing process. The application can modify the data with write permissions. After the data is modified, the data proxy service can determine whether to refresh the trigger timing of the corresponding scheduler.

[0176] As shown in interface 901 in Figure 9 (a), during the calendar application process, the electronic device detects that the user clicks on the schedule adding control 91, determines that the user indicates to add a new schedule, and can display interface 902 as shown in Figure 9 (b). On interface 902, the user can edit the newly added schedule, such as the time of the newly added schedule is this afternoon 16:00-17:00. In response to the user clicking the save control 92, it is determined that the creation of the schedule is completed. Then, the calendar application can send an indication message to the data proxy service, and carry a data identifier in the indication message. After receiving the indication message, the data proxy service determines the corresponding display template and data processing template based on the data identifier, and determines whether the data processing template is configured with a scheduler. If the data processing template corresponds to a scheduler, it can be determined based on the data identifier whether the corresponding newly added data will trigger the corresponding card refresh.

[0177] For example, as shown in Figure 7, the data proxy service determines that the newly added schedule data meets the scheduler based on the data processing template corresponding to the currently displayed calendar card. For example, if the data proxy service determines that the scheduler triggers notifications for schedules within the timestamp range from today to tomorrow, the data proxy service may notify the card management service to trigger a card refresh. Upon receiving the notification, the card management service may send the calendar card ID and data processing template ID to the data proxy service. The data proxy service may query the corresponding data based on the query conditions in the data processing template ID, including the schedule data newly added by the calendar application in response to user operations. The data proxy service may then send the retrieved data to the card management service, which may then send the received data to the desktop. Upon receiving the data, the desktop may refresh the calendar card in interface 1001 shown in Figure 10 (a) to the calendar card in interface 1002 shown in Figure 10 (b), with the refreshed calendar card including the newly added schedule reminder.

[0178] The above example illustrates scheduler triggering, assuming both the card provider and the data provider are calendar applications. It should be understood that the data proxy service provides an SDK interface to applications in the application layer. Therefore, other applications can modify data with write permission through this SDK interface, and these data modifications can also trigger the scheduler.

[0179] In some embodiments, the application can call the SDK interface of the data proxy service based on the identity information of the data proxy service to achieve communication with the data proxy service. Optionally, the identity information of the data proxy service can include at least one of the process identifier, service identifier, and communication address corresponding to the data proxy service.

[0180] For example, application A can send indication information to the data proxy service based on the identity information of the data proxy service. The indication information may include a data identifier of the data to be accessed, and the data identifier can be used to indicate the characteristics of the data to be accessed, that is, to indicate what kind of data needs to be accessed. For example, the data identifier of the data to be accessed includes the URI of the data to be accessed. Of course, in actual applications, the data identifier can also indicate more or fewer characteristics related to the data to be accessed, and the embodiments of the present application do not limit the specific content indicated by the data identifier.

[0181] Optionally, the indication information may further include at least one control parameter, which may be used to control the specific process of accessing the data. The at least one control parameter may be included in the URI or may be independent of the URI. In practical applications, application A may also send the data identifier of the data to be accessed and the at least one control parameter to the data proxy service via multiple messages.

[0182] Optionally, the at least one control parameter includes an operation type identifier, which can be used to describe a specific operation mode for the data to be accessed, and the operation mode can be adding data, deleting data, modifying data, or querying data.

[0183] In some embodiments, after receiving the indication information sent by application A, the data proxy service determines the corresponding data to be accessed based on the URI carried in the indication information, and determines the operation process indicated by application A based on the control parameters therein. As shown in Figure 7, the data proxy service is used to perform permission control management on the data published by the data provider. Then, after the data proxy service determines the operation that needs to be performed on the data to be accessed based on the URI and control parameters, it can authenticate application A to determine whether application A has the authority to perform the corresponding operation. In the case that application A has the authority to perform the corresponding operation, the data proxy service can perform the corresponding operation on the determined data to be accessed. Optionally, after operating the data to be accessed, the data proxy service can determine whether to trigger the corresponding scheduler. If the scheduler is triggered, the card management service can be notified to refresh the corresponding card display.

[0184] For example, as shown in interface 1002 in Figure 10(b), a calendar card displays a date and a meeting reminder. This means the data provider for the calendar card is a calendar application, which has write permissions to the calendar data provided by the calendar application, allowing it to add, delete, or modify meeting schedules. For example, in response to a user action, the electronic device cancels a meeting scheduled for tomorrow morning from 10:00 AM to 11:00 AM. In response to the cancellation, the meeting application may send an indication message to the data proxy service, including the data identifier and control parameters of the calendar data. Based on the received indication message, the data proxy service determines that the meeting application has instructed it to modify the meeting schedule in the calendar data. Based on the permissions configured by the calendar application during the calendar data publishing process, the data proxy service determines that the meeting application has write permissions to the calendar data. The data proxy service then modifies the corresponding meeting schedule based on the indication message. Furthermore, the data proxy service determines the corresponding display template and data processing template based on the data identifier, and can determine the scheduler corresponding to the data processing template. Based on the scheduler, the data proxy service then notifies the card management service to refresh the card display. In response, the card management service obtains the latest card display data based on the notification and sends it to the desktop. The desktop then refreshes the calendar card, as shown in interface 1003 in Figure 10(c). The refreshed calendar card no longer includes the canceled tomorrow's meeting reminder. This decouples the lifecycles of the card provider and the data provider, allowing the data proxy service to provide a unified proxy for the data producer's data.

[0185] In this way, by configuring the scheduler, active card refresh can be achieved through the data proxy service without waking up the data producer, thereby meeting the card display requirements while reducing the power consumption of electronic devices.

[0186] It should be understood that the data processing templates corresponding to some cards may not be configured with a scheduler. For example, the data processing template corresponding to the music card is not configured with a scheduler. The data proxy service determines whether to actively trigger a card refresh based on the scheduler configuration.

[0187] In some embodiments, the data proxy service is also used to perform lifecycle management on the card.

[0188] In some examples, after the electronic device determines that a new card has been added, it can trigger the corresponding data consumer (such as the desktop, negative one screen, etc.) to subscribe to the corresponding card from the data proxy service through the card management service. During the card creation process, the data producer has already configured the corresponding card ID and data processing template ID in the data proxy service. Then, after receiving the subscription request, the data proxy service can determine the card ID and data processing template ID of the newly added card to feedback the corresponding card display data. Optionally, the data proxy service can also determine the scheduler corresponding to the newly added card to trigger the card refresh.

[0189] In some examples, the electronic device deletes the card being displayed in response to a user operation. Then, the data consumer can instruct the data proxy service to unsubscribe from the corresponding card through the card management service. Then, after receiving the instruction to unsubscribe, the data proxy service can determine the card ID and data processing template ID corresponding to the unsubscribed card, and no longer trigger the sending of the corresponding card display data. For example, the data proxy service determines that the currently unsubscribed card corresponds to the scheduler based on the data processing template ID, and can determine that no active notification to refresh the card display will be triggered subsequently. Optionally, deleting the card being displayed includes, for example, responding to a user's sliding operation on the desktop or the negative one screen, and the electronic device determines that a card is no longer displayed on the interface after the sliding, and then the desktop or the negative one screen can unsubscribe from the card.

[0190] In some examples, the electronic device, in response to a user action, determines to completely clear a card. The card management service may then send an instruction to the card provider, instructing the deletion of the corresponding card data, such as the display template and data processing template. After deleting the display template and data processing template, the card provider sends an instruction to the data proxy service. This instruction may include the card ID and data processing template ID. Upon receiving the instruction, the data proxy service may clear the information configured by the card provider and data provider for the card currently being cleared, based on the card ID and data processing template ID, thereby avoiding subsequent triggering of display data calls for the cleared card.

[0191] Optionally, the card provider may send an instruction to the data provider. Based on this instruction, the data provider determines whether the data corresponding to the currently cleared card is used only to display the card. If so, the data provider may clear the corresponding data from the database. If not, the data provider may retain the corresponding data in the database.

[0192] In this way, the card lifecycle is managed through the data proxy service. When the card is displayed or canceled, there is no need to wake up the data producer, which effectively reduces the power consumption of electronic devices.

[0193] In some experimental examples, during the existing card refresh process, the power consumption of refreshing a card once per time is approximately 0.02 to 0.3 milliampere hours (mAh); the startup of a single process causes the memory usage to increase by approximately 20 megabytes (MB); if the data source is a cloud server and a network request is required, the power consumption of a single network request is approximately 0.01 to 0.02 mAh. However, using the data access method provided in the embodiment of the present application, the data proxy service provides a unified proxy to the data producer. During the card refresh process, the power consumption of refreshing a card once per time is reduced by approximately 0.015 to 0.02 mAh, the peak memory usage is reduced by approximately 25 to 30 MB, and the card refresh latency is improved by 230 to 300 milliseconds (ms).

[0194] It can be seen that the data access method provided in the embodiment of the present application can effectively improve the card display performance of the electronic device.

[0195] For example, Figure 11 is a flow chart of a data access method provided in an embodiment of the present application. As shown in Figure 11, the method includes the following steps.

[0196] S1101. In response to a user's operation of creating a card, the data proxy service obtains a data processing template configured by a card provider and display data information configured by the data provider.

[0197] Among them, the data proxy service has the authority to reside in the electronic device.

[0198] In some embodiments, in response to a user creating a card, the card provider configures a data processing template corresponding to the first card, and the data provider configures display data information corresponding to the display data accessed by the first card. Subsequently, the card provider sends the data processing template to the data proxy service, and the data provider sends the display data information to the data proxy service.

[0199] Optionally, the display data information includes a data identifier, read and write permissions, and data source information of the display data configured by the data provider.

[0200] Optionally, the card provider is further used to configure a display template corresponding to the first card, the display template including data identification and layout information of display data corresponding to the first card, and the display template including one or more styles of data processing templates corresponding to the first card.

[0201] Exemplarily, the card provider determines to create a card in response to a user creation operation. The card creation may involve creating a card that is not displayed to the card consumer. For example, in response to a user creating a card on the desktop, the calendar application creates a calendar card as shown in FIG8(a). Alternatively, the card creation may involve creating a different style of the card than the style of the card displayed to the card consumer. For example, if the calendar card shown in FIG8(a) is already displayed on the desktop, in response to a user creating a card on the desktop, the calendar application creates a calendar card in another style as shown in FIG8(b).

[0202] During the card creation process, the card provider (e.g., a calendar application) configures the card's display template, including the data identifier and layout information of the card data to be displayed. The data provider (e.g., a calendar application) configures the card's display data information, including the data identifier and read / write permissions of the card's display data to be displayed. Optionally, the data identifier is, for example, the URI of the display data, which indicates the storage location of the display data.

[0203] Optionally, after the card is created, the data consumer can display the card. Furthermore, after the card is configured, the data proxy service can obtain the display template and card display information published by the data producer (such as the card provider and the data provider).

[0204] For example, as shown in Figure 7, a data sharing system consists of data producers, data proxy services, and data consumers. Data producers provide card display data, display templates, and other data, and publish this data to the data proxy service. This data is then managed by the data proxy service, which resides in the service layer. Data consumers can access this data directly through the data proxy service, avoiding the need to frequently activate the data producer. Through a unified data proxy, the lifecycles of data providers and card providers are decoupled, enabling card refreshes independent of data producers.

[0205] S1102: The electronic device displays a first card, where first card display data of the first card corresponds to the data processing template and first display data indicated by the display data information.

[0206] In some embodiments, during the card creation process, the card provider creates a data processing template corresponding to the card style to be displayed and determines the first display data that the data processing template needs to access. The first display data is part or all of the display data provided by the data provider for access by the card. The electronic device can determine the first display data of the card to be displayed based on the layout information of the card style to be displayed indicated by the data processing template and the first display data indicated by the display data information, thereby displaying the card.

[0207] Exemplarily, in response to the user's operation of creating a calendar card on the desktop, the card provider creates a display template for the calendar card, which is used to indicate the data identifier of the display data of the calendar card, as well as the layout information of the display data. The data provider configures the display data information of the calendar data corresponding to the calendar card, such as information including data identifier, read and write permissions, etc. As shown in FIG8 , the electronic device can display calendar cards of various styles, so the card provider can configure multiple data processing templates corresponding to the same calendar data (i.e., the same display data information), and the display template includes the multiple data processing templates. Afterwards, the electronic device can generate the first card display data based on the data processing template corresponding to the style of the calendar card currently selected by the user to create and the first display data indicated by the display data information to display the first card.

[0208] S1103. In response to a preset condition being met, the data proxy service refreshes the first card, wherein the data proxy service determines second card display data of the refreshed first card according to the data processing template and the second display data indicated by the display data information.

[0209] During the card refresh process, the electronic device does not run the card provider and / or the data provider.

[0210] In some embodiments, during the card creation process, the card provider and data provider have already published the relevant card data to the data proxy service through step S1101. Subsequently, during the card refresh process, in response to determining that the preset conditions are met, the data proxy service can directly obtain this relevant data without having to restart the card provider and data provider. This decouples the lifecycles of the card provider and data provider, reducing power consumption caused by frequent wake-ups of the card provider and data provider due to card refreshes.

[0211] In some embodiments, the data processing template includes a query condition, and the query condition is used by the data proxy service to query the display data indicated by the display data information for the second display data.

[0212] For example, as shown in Figure 8, the same calendar card has different display styles, and cards of different styles may correspond to different data processing templates. The data proxy service queries the display data indication information for the corresponding display data based on the query conditions carried in the data processing template to refresh and display the card of the corresponding style.

[0213] For example, as shown in (a) of FIG8 , a calendar card is used to display today's and tomorrow's schedules. Then, in the process of publishing the data of the calendar card, the calendar application configures the corresponding data processing template 1, and the corresponding query condition 1 is to query the schedule data within the timestamp range from today to tomorrow in the schedule data. Subsequently, when the data proxy service refreshes the calendar card shown in (a) of FIG8 , it can query the schedule data within the timestamp range from today to tomorrow (such as the second display data) in the calendar data indicated by the display data information according to the query condition 1. Afterwards, the data proxy service refreshes the display of the calendar card shown in (a) of FIG8 based on the queried second display data and the data processing template 1.

[0214] In some embodiments, the preset condition includes: the data proxy service receiving a first instruction to modify display data indicated by display data information; or the data proxy service determining that a refresh opportunity has been met; or the data proxy service receiving a second instruction from a card host to refresh a first card, the card host being configured to display the first card.

[0215] In some examples, the data proxy service generates second card display data according to the second display data and a data processing template, where the data processing template is used to indicate layout information of the second display data.

[0216] For example, as shown in FIG10(b), a meeting reminder is displayed on the calendar card in the interface 1002. That is, the data provider corresponding to the calendar card is the calendar application, and the conference application has write permission on the calendar data provided by the calendar application, such as adding a new meeting schedule, deleting a meeting schedule, and modifying a meeting schedule in the calendar data. For example, in response to a user operation, the electronic device determines to cancel the meeting originally scheduled from 10:00 a.m. to 11:00 a.m. tomorrow. In response to the cancellation of the meeting, the conference application may send a first indication to the data proxy service, and the first indication may carry the data identifier and control parameters of the calendar data. Accordingly, the data proxy service determines, based on the received first indication, that the conference application instructs to modify the meeting schedule in the calendar data indicated by the display data information corresponding to the calendar card. The data proxy service determines, based on the permissions configured by the calendar application during the process of publishing the calendar data, that the conference application has write permission on the calendar data. Then, the data proxy service modifies the corresponding meeting schedule according to the first indication. Afterwards, based on the modification of the meeting schedule, the data proxy service can generate second card display data for the calendar card according to the card layout information indicated by the data processing template corresponding to the currently displayed calendar card and the second display data (i.e., the modified schedule data) indicated by the display data information, to trigger the display of the calendar card in the refresh interface 1002, such as the refreshed calendar card shown in (c) in Figure 10.

[0217] For another example, the data processing template also includes a scheduler, which is used to enable the data proxy service to determine whether the refresh timing is met. For example, the card provider configures a cyclic trigger card refresh timing through the scheduler, such as the calendar card is triggered to refresh and display the schedule of the next day at 18:00 every day. Then in this process, the data proxy service responds to the refresh timing indicated by the scheduler, determines that the preset conditions are met, re-reads the corresponding second display data according to the display data information, and matches the second display data according to the layout information indicated by the data processing template corresponding to the displayed card, determines the second card display data, and realizes the display of the refreshed card. Optionally, after the data proxy service triggers the refresh of the calendar card based on the scheduler at 18:00, it triggers the reset scheduler, so that the data proxy service can trigger the refresh of the calendar card again at 18:00 the next day based on the reset scheduler.

[0218] For another example, when the electronic device is displaying the first interface of the desktop, it detects a user's sliding operation and determines that the user indicates to display the second interface of the desktop. Wherein, the second interface to be displayed includes a first card that is not in the first interface, then the desktop (i.e., the card host) can send a second indication to the data proxy service, and the second indication carries the card ID of the first card and the ID of the data processing template corresponding to the style of the first card to be displayed. Accordingly, after receiving the second indication, the data proxy service can determine that the preset conditions are met, then the data proxy service obtains the display template corresponding to the card ID and the data processing template corresponding to the data processing template ID, and determines the URI indicated by the display template ID to determine the corresponding display data information, and queries the display data indicated by the display data information according to the query conditions carried by the data processing template. The data proxy service then matches the data processing template and the second display data to obtain the second card display data, and feeds back the second display data to the card host, thereby triggering the refresh of the card, such as displaying the first card on the second interface of the desktop.

[0219] In this way, card refresh is triggered in multiple ways, and during the card refresh process, there is no need to wake up the card provider and the data provider, thereby effectively reducing power consumption and improving the performance of the electronic device.

[0220] In some embodiments, the data proxy service is further configured to provide data storage services to the data provider. The data proxy service includes a data directory corresponding to the data provider, and the display data information includes the data directory. In response to a preset condition being met, the data proxy service determines a storage location of the second display data based on the data directory. The data proxy service retrieves the second display data based on the storage location.

[0221] Optionally, the data proxy service may be a sub-service in the distributed data management service. Of course, in actual applications, the data proxy service may also be other system services associated with the distributed data management service.

[0222] For example, as shown in Figure 7, during the data producer's data publishing process, the data proxy service can obtain the data directory of the display data to implement storage management of the display data. In the subsequent card refresh process, the data proxy service can directly obtain the display data stored in the corresponding storage location according to the data directory without having to wake up the data provider. The display data can also be obtained, effectively reducing the wake-up frequency of the data provider and thus reducing device power consumption.

[0223] In some other embodiments, the electronic device further includes a system service, which is further configured to provide data storage services to a data provider. The system service includes a data directory corresponding to the data provider. In response to a preset condition being met, the data proxy service obtains the data directory from the system service. The data proxy service then determines a storage location for the second display data based on the data directory. The data proxy service then obtains the second display data based on the storage location.

[0224] Optionally, the above-mentioned system service is, for example, a distributed data management service, and the distributed data management service and the data proxy service may be two independent system services.

[0225] For example, when the data proxy service determines that a card display refresh is required due to pre-set conditions, it can request the distributed data management service to obtain the data directory corresponding to the card to be displayed, thereby retrieving the second display data from the storage location indicated by the data directory. This allows the data provider to be retrieved during the card refresh process without having to wake up the data provider, effectively reducing the frequency of waking up the data provider and thus lowering device power consumption.

[0226] S1104: The electronic device displays the refreshed first card according to the second card display data.

[0227] In some embodiments, after determining the second display data, the data proxy service may send the second display data to the card host to refresh the first card displayed by the card host.

[0228] In this way, since the data proxy service has the authority to reside in the electronic device, it does not need to be pulled up and stopped, saving the power consumption and performance of managing the data producer's life cycle, device resource allocation and recycling caused by frequently pulling up the data producer during the card refresh process.

[0229] In addition, a data proxy service can be used to access the data of multiple data producers (for example, the display data in a card corresponds to multiple data producers), further saving the power consumption and performance of managing the life cycle, device resource allocation and recycling of multiple data producers.

[0230] In addition, if the application carries malicious files such as Trojans or viruses, the damage caused to the electronic device when the application is launched may be far greater than the damage caused to the electronic device by the application's data. Therefore, providing a unified access agent through the data proxy service can reduce the damage that data producers may cause to the electronic device, reduce the risk of electronic devices being maliciously attacked, and further ensure the performance of the electronic device.

[0231] The data access method provided by the embodiment of the present application is described in detail above in conjunction with Figures 7 to 11. The electronic device provided by the embodiment of the present application is described in detail below in conjunction with Figure 12.

[0232] In one possible design, Figure 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in Figure 12, electronic device 1200 may include: a transceiver unit 1201, a processing unit 1202, and a display unit 1203. Electronic device 1200 may be used to implement the functions of the electronic device involved in the above method embodiments.

[0233] Optionally, the transceiver unit 1201 is used to support the electronic device 1200 to execute S1101 in Figure 11.

[0234] Optionally, the processing unit 1202 is used to support the electronic device 1200 to execute S1102 and S1103 in Figure 11.

[0235] Optionally, the display unit 1203 is configured to support the electronic device 1200 in displaying a card; and / or support the electronic device 1200 in executing S1102 and S1104 in FIG. 11 .

[0236] The transceiver unit may include a receiving unit and a transmitting unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operations and / or functions of each unit in the electronic device 1200 are respectively for implementing the corresponding processes of the data access method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit. For the sake of brevity, they are not repeated here.

[0237] Optionally, the electronic device 1200 shown in FIG12 may further include a storage unit (not shown in FIG12 ) storing a program or instruction. When the transceiver unit 1201, the processing unit 1202, and the display unit 1203 execute the program or instruction, the electronic device 1200 shown in FIG12 may execute the data access method described in the above method embodiment.

[0238] The technical effects of the electronic device 1200 shown in FIG12 may refer to the technical effects of the data access method described in the above method embodiment, and will not be repeated here.

[0239] In addition to being in the form of the electronic device 1200, the technical solution provided in this application may also be a functional unit or chip in the electronic device, or a device used in conjunction with the electronic device.

[0240] An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.

[0241] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0242] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in the embodiments of the present application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. The embodiments of the present application do not specifically limit the type of memory or the configuration of the memory and the processor.

[0243] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0244] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0245] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the computer executes the above-mentioned related steps to implement the data access method in the above-mentioned embodiment.

[0246] An embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the data access method in the above-mentioned embodiment.

[0247] In addition, embodiments of the present application further provide a device. Specifically, the device may be a component or module, and may include one or more processors and a memory connected to each other. The memory is configured to store a computer program. When the computer program is executed by one or more processors, the device performs the data access method described in each of the above method embodiments.

[0248] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above and will not be repeated here.

[0249] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disc (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).

[0250] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-mentioned systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0251] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of modules or units, which can be electrical, mechanical or other forms.

[0252] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0253] Computer-readable storage media include, but are not limited to, any of the following: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media that can store program code.

[0254] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A data access method, characterized in that: Applied to an electronic device, the electronic device includes a data proxy service, the data proxy service has permission to reside in the electronic device, the method includes: In response to the user's operation of creating a card, the data proxy service obtains the data processing template configured by the card provider and the display data information configured by the data provider; Display a first card, wherein first card display data of the first card corresponds to the data processing template and first display data indicated by the display data information; In response to satisfying a preset condition, the data proxy service refreshes the first card, wherein the data proxy service determines the second card display data of the refreshed first card according to the data processing template and the second display data indicated by the display data information; Display the refreshed first card according to the second card display data.

2. The method according to claim 1, characterized in that During the card refresh process, the electronic device does not run the card provider and / or the data provider.

3. The method according to claim 1 or 2, characterized in that: The preset conditions include: The data proxy service receives a first instruction to modify the display data indicated by the display data information; Alternatively, the data proxy service determines that a refresh opportunity is met; Alternatively, the data proxy service receives a second instruction from a card host to refresh the first card, and the card host is used to display the first card.

4. The method according to any one of claims 1 to 3, characterized in that: In response to the user's operation of creating a card, the data proxy service obtains the data processing template configured by the card provider and the display data information configured by the data provider, including: In response to a user's operation of creating a card, the card provider configures a data processing template corresponding to the first card, and the data provider configures the display data information corresponding to the display data accessed by the first card; The card provider sends the data processing template to the data proxy service, and the data provider sends the display data information to the data proxy service.

5. The method according to any one of claims 1 to 4, characterized in that: The data processing template includes a query condition, and the query condition is used by the data proxy service to query the second display data in the display data indicated by the display data information.

6. The method according to claim 5, characterized in that The data proxy service determines the refreshed second card display data of the first card according to the data processing template and the second display data indicated by the display data information, including: The data proxy service generates the second card display data according to the second display data and the data processing template, where the data processing template is used to indicate layout information of the second display data.

7. The method according to any one of claims 1 to 6, characterized in that: The data processing template further includes a scheduling program, and the scheduling program is used to enable the data proxy service to determine whether a refresh opportunity is met.

8. The method according to any one of claims 1 to 7, characterized in that: The display data information includes the data identifier, read and write permissions, and data source information of the display data configured by the data provider.

9. The method according to any one of claims 1 to 8, characterized in that: The card provider is also used to configure a display template corresponding to the first card, wherein the display template includes data identification and layout information of display data corresponding to the first card, and the display template includes one or more styles of data processing templates corresponding to the first card.

10. The method according to any one of claims 1 to 9, characterized in that: The data proxy service is further used to provide data storage services to the data provider, the data proxy service includes a data directory corresponding to the data provider, the displayed data information includes the data directory, and in response to satisfying a preset condition, the data proxy service refreshes the first card, including: In response to satisfying a preset condition, the data proxy service determines a storage location of the second display data based on the data directory; The data proxy service obtains the second display data according to the storage location.

11. The method according to any one of claims 1 to 9, characterized in that: The electronic device further includes a system service, the system service is further used to provide data storage services to the data provider, the system service includes a data directory corresponding to the data provider, and in response to satisfying a preset condition, the data proxy service refreshes the first card, including: In response to satisfying a preset condition, the data proxy service obtains the data directory from the system service; The data proxy service determines a storage location of the second display data based on the data directory; The data proxy service obtains the second display data according to the storage location.

12. An electronic device, characterized in that: include: A processor, a memory and a display screen, wherein the memory and the display screen are coupled to the processor, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the method as described in any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program, and when the computer program is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 11.

14. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Data access method and electronic equipment

    CN119003048A

  • Method for updating application program, mobile terminal, and storage medium

    CN109032648A

  • Card sharing method, device and system

    CN110572431A

  • Object data display method and system

    CN111177489A

  • Card template generation method, content display card display method and terminal

    CN112732137A