Data access method and electronic equipment
By obtaining the configuration data of the card provider and the data provider through the data proxy service that is permanently resident in electronic devices, and directly refreshing the card display, it solves the problem of increased power consumption caused by frequent card refreshes and improves the performance of electronic devices.
Patent Information
- Application Number
- CN202310554186.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2024-11-22
AI Technical Summary
Frequent card refreshes lead to increased power consumption of electronic devices and increased performance pressure, making it difficult for the prior art to effectively reduce system power consumption.
Resident in electronic devices through data proxy services, obtain the configuration data of card providers and data providers, avoid frequent awakening of data producers, directly refresh the card display based on cached data, and decouple the life cycle of card providers and data providers. .
It effectively reduces the power consumption of data producer management life cycle and equipment resource allocation during card refresh process, and improves the performance of electronic devices and card display efficiency.
Smart Images

Figure CN119003048A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to a data access method and an electronic device. Background Art
[0002] With the development of terminal technology, the types of cards are becoming more and more abundant, and users are using cards more and more frequently. When displaying a card, the electronic device refreshes the card display according to a certain period or trigger condition. When refreshing the card, the electronic device first pulls up the card provider process, and then the card provider process pulls up the data provider process to obtain the latest card display data. Frequent card refreshes lead to frequent pull-ups of the card provider process and the data provider process, which increases system power consumption and causes performance pressure on electronic devices. Summary of the invention
[0003] In order to solve the above technical problems, the present application provides a data access method and an electronic device. The technical solution provided by the present application realizes the refresh display of the card by using the data proxy service while avoiding the frequent pulling up of the data producer, thereby reducing the system power consumption.
[0004] In order to achieve the above technical objectives, this application provides the following technical solutions:
[0005] In a first aspect, a data access method is provided, which is applied to an electronic device, wherein the electronic device includes a data proxy service, and the data proxy service has the authority to reside in the electronic device. The method includes: 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. 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 according to the data processing template and the second display data indicated by the display data information. According to the second card display data, the refreshed first card is displayed.
[0006] In some examples, during the card refresh process, the electronic device does not run a card provider and / or a data provider.
[0007] In some embodiments, during the card creation process, the data producer publishes the card's relevant data, such as data processing templates and display data information, to the data proxy service. Thus, during the subsequent card refresh process, the data proxy service can directly determine the card display data based on the card's relevant data and trigger the card refresh without waking up the data producer.
[0008] 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.
[0009] According to the first aspect, or any implementation of the first aspect above, the preset condition includes: the data proxy service receives a first indication of display data indicated by modifying display data information. Alternatively, the data proxy service determines that a refresh timing is met. Alternatively, the data proxy service receives a second indication from a card host indicating to refresh a first card, and the card host is used to display the first card.
[0010] For example, a meeting reminder is displayed on a calendar card, that is, the data provider corresponding to the calendar card is a calendar application, and the conference application has write permission to 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, the electronic device determines to cancel the meeting originally scheduled from 10:00 am to 11:00 am tomorrow in response to the user operation. In response to the cancellation of the meeting, the conference application can send a first indication to the data proxy service, and carry the data identifier and control parameters of the calendar data in the first indication. Correspondingly, the data proxy service determines that the conference application indicates to modify the meeting schedule in the calendar data indicated by the display data information corresponding to the calendar card according to the received first indication. The data proxy service determines that the conference application has the write permission for the calendar data according to the permissions configured by the calendar application in the process of publishing 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 the second card display data of 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, so as to trigger the refresh of the displayed calendar card.
[0011] For another example, the data processing template also includes a scheduler, and the scheduler is used to enable the data proxy service to determine whether the refresh timing is met. For example, the card provider configures the cyclic trigger card refresh timing through the scheduler, such as the calendar card triggers the refresh display of the next day's schedule 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.
[0012] For another example, when the electronic device is displaying the first interface of the desktop, it detects the 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 the 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, and then 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.
[0013] In this way, the card refresh is triggered in a variety of 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.
[0014] According to the first aspect, or any implementation of the first aspect above, 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 the user's operation of creating a card, the card provider configures the 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.
[0015] In some embodiments, during the card creation process, the card provider (such as a calendar application, etc.) configures the display template of the card, such as the data identifier of the card data to be displayed, layout information, etc. The data provider (such as a calendar application, etc.) configures the display data information of the card, such as the data identifier of the display data of the card to be displayed, read and write permissions, etc. Optionally, the data identifier is, for example, a uniform resource indicator of the display data, which is used to indicate the storage location of the display data.
[0016] Optionally, after the card is created, the data consumer can display the card. Also, after the card is configured, the data proxy service can obtain the display template and card display information published by the data producer (eg, including the card provider and the data provider).
[0017] 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.
[0018] 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.
[0019] For example, the same card has different display styles, and cards of different styles may correspond to different data processing templates. The data proxy service queries the corresponding display data in the display data indication information according to the query conditions carried in the data processing template to refresh and display the card of the corresponding style.
[0020] For example, the calendar card to be refreshed 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 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 according to the queried second display data and the data processing template 1.
[0021] In this way, different styles of display of the same card can be achieved through query conditions.
[0022] 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 according to 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 according to 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.
[0023] According to the first aspect, or any implementation of the first aspect above, 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.
[0024] 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 a data provider.
[0025] 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.
[0026] In this way, the security of displayed data is guaranteed by data permissions. In addition, data configured with write permissions can trigger the writing of displayed data, thereby triggering the data proxy service to refresh the display of the corresponding card according to the newly written data.
[0027] According to the first aspect, or any implementation 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 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.
[0028] For example, in response to a user's operation of creating a calendar card, the card provider may configure a display template corresponding to the calendar card, and the display template includes multiple data processing templates corresponding to the calendar card. The electronic device may display the calendar card indicated by the current user operation according to one of the data processing templates. In response to a subsequent operation in which the user instructs to create a calendar card of another style, the card provider may no longer need to publish the data processing template to the data proxy service. Alternatively, in response to a user's operation of creating a card, the card provider separately configures the corresponding data processing template and publishes the data processing template to the data proxy service.
[0029] According to the first aspect, or any implementation of the first aspect above, 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 display data information includes the data directory, and in response to meeting a preset condition, the data proxy service refreshes the first card, including: in response to meeting the preset condition, the data proxy service determines the 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.
[0030] Optionally, the data proxy service may be a sub-service in the distributed data management service. Of course, in practical applications, the data proxy service may also be other system services associated with the distributed data management service.
[0031] Exemplarily, during the process of data publishing by the data producer, the data proxy service can obtain the data directory of the display data and implement storage management of the display data. Therefore, during 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, and can also obtain the display data, thereby effectively reducing the wake-up frequency of the data provider and thus reducing device power consumption.
[0032] According to the first aspect, or any implementation of the first aspect above, 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 the preset condition, the data proxy service obtains the data directory from the system service. The data proxy service determines the 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.
[0033] Optionally, the above 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.
[0034] For example, when the data proxy service determines that the preset conditions are met and the display of the card needs to be refreshed, it can request the distributed data management service to obtain the data directory corresponding to the card to be displayed, so as to obtain the second display data according to the storage location indicated by the data directory. Therefore, during the card refresh process, the display data can be obtained without waking up the data provider, which effectively reduces the wake-up frequency of the data provider, thereby reducing the power consumption of the device.
[0035] 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 according to the data processing template and the second display data indicated by the display data information. According to the second card display data, the refreshed first card is displayed.
[0036] According to the second aspect, during the card refresh process, the electronic device does not run the card provider and / or the data provider.
[0037] According to the second aspect, or any implementation of the second aspect above, the preset condition includes: the data proxy service receives a first indication of display data indicated by modifying display data information. Alternatively, the data proxy service determines that a refresh timing is met. Alternatively, the data proxy service receives a second indication from a card host indicating to refresh a first card, and the card host is used to display the first card.
[0038] According to the second aspect, or any implementation of the second aspect above, 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 the user's operation of creating a card, the card provider configures the 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.
[0039] According to the second aspect, or any implementation of the second aspect, 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.
[0040] According to the second aspect, or any implementation method of the second 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.
[0041] According to the second aspect, or any implementation of the second aspect above, 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.
[0042] 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 a data provider.
[0043] According to the second aspect, or any implementation of the second 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 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.
[0044] According to the second aspect, or any implementation of the second aspect above, 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 display 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 the preset condition, the data proxy service determines the 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.
[0045] According to the second aspect, or any implementation of the second aspect above, 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 the preset condition, the data proxy service obtains the data directory from the system service. The data proxy service determines the 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.
[0046] 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.
[0047] 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 functions.
[0048] The technical effects corresponding to the third aspect and any one of the implementation methods of the third aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any one of the implementation methods of the first aspect, and will not be repeated here.
[0049] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as an instruction or code), and when the computer program is executed by an electronic device, the electronic device executes the method of the first aspect or any one of the implementations of the first aspect.
[0050] The technical effects corresponding to the fourth aspect and any one of the implementation methods of the fourth aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any one of the implementation methods of the first aspect, and will not be repeated here.
[0051] According to 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 according to the first aspect or any one of the implementations of the first aspect.
[0052] The technical effects corresponding to the fifth aspect and any one of the implementation methods of the fifth aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any one of the implementation methods of the first aspect, and will not be repeated here.
[0053] According to a sixth aspect, a circuit system is provided, the circuit system comprising a processing circuit, wherein the processing circuit is configured to execute the method according to the first aspect or any one of the embodiments of the first aspect.
[0054] The technical effects corresponding to the sixth aspect and any one of the implementation methods of the sixth aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any one of the implementation methods of the first aspect, and will not be repeated here.
[0055] 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, and 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.
[0056] The technical effects corresponding to the seventh aspect and any one of the implementation methods of the seventh aspect can be found in the technical effects corresponding to the above-mentioned first aspect and any one of the implementation methods of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A schematic diagram of a card display provided in an embodiment of the present application;
[0058] Figure 2 A schematic diagram of a card refresh display process provided in an embodiment of the present application;
[0059] Figure 3 A schematic diagram of a calendar card refresh display process provided in an embodiment of the present application;
[0060] Figure 4 A schematic diagram of electronic equipment types provided in an embodiment of the present application;
[0061] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of a software structure block diagram of an electronic device provided in an embodiment of the present application;
[0063] Figure 7A schematic diagram of the card data publishing and card refresh display process provided in an embodiment of the present application;
[0064] Figure 8 A schematic diagram of a calendar card style provided in an embodiment of the present application;
[0065] Fig. 9 A schematic diagram of a newly added schedule scenario provided in an embodiment of the present application;
[0066] Fig.10 A schematic diagram of calendar card display changes provided in an embodiment of the present application;
[0067] Fig.11 A flowchart of a data access method provided in an embodiment of the present application;
[0068] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] The technical solutions in the embodiments of the present application are described below in conjunction with the accompanying drawings in the embodiments of the present application. Wherein, 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 the 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).
[0070] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear 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 other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0071] In the embodiments of the present application, the words "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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0072] In some embodiments, the electronic device displays cards in a variety of ways, and the types of cards are becoming more and more 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.
[0073] For example, Figure 1 As shown in (a), the electronic device displays a calendar card 11 on the desktop, and the calendar card 11 can be used to display data from a calendar application, such as date, schedule, etc. Alternatively, the calendar card 11 can also display data from other applications, such as meeting reminders from a meeting application.
[0074] As another example, Figure 1 As shown in (b), the electronic device displays various types of cards on the negative first screen, such as calendar cards 12, sports and health cards 13, etc.
[0075] In some embodiments, during the card display process, the electronic device needs to refresh the card display. The card refresh depends on the application accessing the data to pull up the application where the accessed data is located through the card management service to obtain the latest card display data. The application accessing the data can be called a data consumer or a data accessor; the application where the accessed data is located, or the application providing the data, can be called a data producer, a data provider, or a data source application. The data consumer (or data producer) is a system application and / or a third-party application. Figure 2 As shown, the data producer may include a card provider and a data provider, wherein the card provider is used to create a card and configure the layout information of the card, etc., and the data provider is used to provide the display data of the card. The card provider and the data provider may be the same application, for example, the card provider is a calendar application, which is used to create a calendar card, and the data provider is also a calendar application, which is used to provide calendar data displayed on the calendar card. Alternatively, the card provider and the data provider are different applications, for example, the card provider is a local music application, which is used to create a music card, and the data provider is a third-party music application installed on the electronic device, which is used to provide audio data for playing the music card.
[0076] For example, Figure 2As shown, the card management service is used to manage the refresh of the card. When the card needs to be refreshed, the card management service pulls up the card provider process, and then the card provider process pulls up the data provider process. The data provider process can obtain the latest card display data from the database. After that, the data provider process feeds back the obtained card display data to the card management service through the card provider process. After the card management service obtains the card display data, it sends the card display data to the card host (such as the desktop, negative one screen, etc.), thereby realizing the refresh display of the card.
[0077] 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.
[0078] For example, taking the refresh process of the calendar card as an example, Figure 1 As shown in the figure, the calendar card displays information such as date and schedule reminder. The calendar card is refreshed in various ways such as schedule changes and fixed-point reminders, such as refreshing reminders before a meeting starts and refreshing subsequent schedules according to preset time. Figure 3 As shown, a calendar card is displayed on the desktop. Applications such as calendar applications or conference applications can add data corresponding to the components displayed on the calendar card. The calendar data provider can obtain this data and save it in the database. The calendar data provider sends the corresponding schedule reminder to the calendar application through static broadcasting or other methods. The calendar application, as a calendar card provider, can generate a timed reminder corresponding to the card. Subsequently, when the card management service determines that the calendar card needs to be refreshed (such as at the timing indicated by the timed reminder), it starts the process of the calendar application, and through the process of the calendar application, it starts the calendar data provider process to obtain the corresponding card display calendar card display data from the database. Afterwards, after the card management service obtains the calendar card display data, it sends the calendar card display data to the desktop, so that the desktop can refresh the display of the calendar card, such as displaying a meeting reminder on the calendar card.
[0079] 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 makes it unnecessary for the data proxy service to be frequently started or shut down, thereby reducing system power consumption and improving electronic device performance.
[0080] Optionally, the data access method provided in the embodiment of the present application can be applied to the electronic device 100. For example, Figure 4As shown, the electronic device 100 may 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 or other terminal device. The operating system installed in the electronic device 100 includes but is not limited to Or other operating systems. This application does not limit the specific type of the electronic device 100 and the installed operating system.
[0081] Optional, Figure 5 1 shows a schematic diagram of the structure of the electronic device 100. Figure 5 As shown, 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 screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0082] It is to be understood that the structure illustrated in the embodiment of the present application does 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 in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0083] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0084] 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.
[0085] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0086] In some embodiments, the processor 110 may include one or more interfaces. The interface 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, etc.
[0087] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0088] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0089] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic 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 in the above embodiments, or a combination of multiple interface connection methods.
[0090] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0091] 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 supplies power to the processor 110, the internal memory 121, the display screen 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 number, battery health status (leakage, impedance), etc. 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.
[0092] 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.
[0093] 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 the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0094] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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.
[0095] 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 integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0096] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The 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, etc. 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).
[0097] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0098] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD), such as 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), Mini-led, Micro-led, Micro-oled, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0099] 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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.
[0100] 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 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0101] 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.
[0102] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110. The electronic device 100 can use the audio module 170, such as music playing, recording, etc. The audio module 170 can include a speaker, a receiver, a microphone, a headphone interface, and an application processor to implement audio functions.
[0103] 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.
[0104] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0105] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
[0106] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0107] Figure 6 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0108] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0109] The application layer can include a series of application packages.
[0110] like Figure 6 As shown, the application package may include applications such as calendar, contacts, memo, sports health, clipboard, gallery, map, camera, video, etc.
[0111] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0112] like Figure 6 As shown, the application framework layer may include card management services, data proxy services, window managers, content providers, view systems, phone managers, resource managers, notification managers, and the like.
[0113] The card management service is used to manage cards, such as controlling the refresh of cards.
[0114] The data proxy service is used to manage the card templates created by the application. The 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.
[0115] In some examples, the data proxy service may have higher system permissions, so as to provide a unified proxy to the data producer. 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 pulling up the data producer. Optionally, the data proxy service may have the permission to reside in the electronic device, so that the data proxy service does not need to be frequently pulled up or shut down, which can reduce the power consumption of the electronic device.
[0116] In some examples, the application framework layer also includes a distributed data management service, which can isolate the data of different applications to ensure that the data between different applications cannot access each other. The application can create a database by calling the distributed data service interface, and the database can include the data in the database. The distributed data management service module can also provide the application with database distribution capabilities between different devices. Between trusted devices, the distributed data management service module can support application data synchronization and provide a consistent data access experience on multiple devices.
[0117] 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.
[0118] 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 located below the application layer to illustrate the interaction process of each module during the card display process, wherein the service layer may 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 size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0119] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0120] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0121] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0122] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0123] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. The notification manager can also be a notification that appears in the system top status bar in the form of an icon or scroll bar text.
[0124] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0125] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0126] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0127] The system library may 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.
[0128] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0129] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0130] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0131] A 2D graphics engine is a drawing engine for 2D drawings.
[0132] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0133] In some embodiments, the present application provides a data sharing system. Figure 7 As shown, the data sharing system includes data consumers, data producers and data proxy services. The data consumers and the data proxy services can communicate with each other through the card management service.
[0134] Data consumers, such as Figure 7 The data consumer may include system applications and / or third-party applications. For example, the data consumer is a desktop or a negative screen. The data consumer can access the data provided by the data provider across applications to display the card.
[0135] Data producers, such as Figure 7 The data producers include system applications and / or third-party applications. The data producers’ data can be accessed by data consumers through cross-application access.
[0136] For example, Figure 7 As shown, the data producer includes a card provider and a data provider. The card provider is used to configure the display template of the card, such as the layout information of the card. The data provider is used to configure the display data information of the card, such as the storage directory for indicating the display data of the card. The following is a detailed introduction to the process of configuring the display template and display data information by the card provider and the data provider, which will not be repeated here.
[0137] 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.
[0138] The data proxy service may have higher system permissions, so as to provide a unified proxy to the data producer. In some embodiments, 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 pulling up the data producer. In some embodiments, the data proxy service may have the permission to reside in the electronic device, so that the proxy service does not need to be frequently pulled up or shut down, which can reduce the power consumption of the electronic device.
[0139] In some embodiments, the data proxy service can be implemented as a system service, so that it can have the above-mentioned authority to reside in the electronic device and the authority to directly access the data producer. The data proxy service can be registered as a system service in the system service management service and register the functions of the system service, so that the system service management service can start and manage the data proxy service as a system service and the functions of the system service.
[0140] 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, and the data directory used by the data producer to find the data is also generated by the distributed data management service, the data proxy service is deployed in the distributed data management service, and can more conveniently obtain the data directory of the data producer, and then can access the data of the data producer in the same way as the data producer accesses the data of the data producer. For example, Figure 7 As shown, the data proxy service is used to store and manage the data provided by the data producer.
[0141] 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.
[0142] Based on the above data sharing system, the embodiment of the present application provides a method for accessing data. In this method, data consumers can access the data of data producers through data proxy services without having to pull up the data producer, which can improve or avoid the problem of frequently pulling up data source applications, and further improve other problems such as high power consumption caused by frequently pulling up data source applications.
[0143] It should be noted that, in actual applications, after the electronic device has completed configuring 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.
[0144] In some embodiments, the data producer is used to provide data such as display data and display templates of the card, and publishes this data to the data proxy service. In this way, the data proxy service resident in the service layer will manage this data later, and the data consumer can directly access this data through the data proxy service, thereby avoiding frequent wake-up of the data producer. Figure 7 As shown, the data producer includes a data provider for providing display data and a card provider for providing display templates. Through a unified data agent, the life cycles of the data provider and the card provider are decoupled to achieve card refresh that is independent of the data producer.
[0145] In some embodiments, the 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 card displayed by the data consumer. For example, the data sharing system includes the following: Figure 7 It is understood that in practical applications, cross-application and cross-process communication can also be achieved through other means, rather than necessarily relying on shared storage space.
[0146] For example, Figure 7As shown, the data proxy service provides a software development kit (SDK) interface to the application in the application layer, and the data producer can realize the 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, the data permissions are defined by the data producer, the data subscriber is the data consumer (such as the card host) who subscribes to the corresponding data, and the life cycle management includes the life cycle management of the card. In 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 calendar and contacts, and process data includes data with high update frequency such as step counting and weather.
[0147] It should be understood that the structure illustrated in the embodiment 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 some modules, or split some modules, or arrange the modules differently.
[0148] Optionally, during the data publishing process, the data provider may be used to configure the data identification, read and write permissions, and data source information of the data.
[0149] In some embodiments, the electronic device may include multiple applications, and the electronic device can allocate corresponding storage space to each application, and the storage space can be used to store the data of the application corresponding to the storage space. For the security of data, the data of different applications are isolated from each other by means of sandboxes, etc., 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.
[0150] In some embodiments, in order 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 may access the data published by the data producer through the SDK of the data proxy service.
[0151] Exemplarily, 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.
[0152]
[0153] Optionally, during the data publishing process, the card provider can be used to configure a display template for the data. Exemplarily, an example of data published by a card provider is shown below. The data identifier corresponds to the data identifier in the data published by the data provider, and the data proxy service can determine the corresponding data source information based on the data identifier, thereby reading the corresponding data. Afterwards, the data proxy service can match the acquired data with the display template, and the data consumer can subscribe to the matched card display data to display the card. The display template is generally in XML format or other formats, which is used to indicate the display format and display parameters of the card. For example, the card provider configures the layout information of the card display through the display template, such as information including components displayed on the card, component display positions, and other information. The data proxy service matches the layout information with the data identifier so that the components can be displayed at the corresponding positions of the card later. For example, Figure 8 For the calendar card shown in (a), the data proxy service determines the layout information of the calendar card, and determines the data identifier corresponding to the date displayed on the calendar card, and the data identifier corresponding to the meeting reminder.
[0154]
[0155] In some embodiments, after the data proxy service obtains the data published by the data provider and the card provider and matches the data, it can configure the corresponding card ID. Subsequently, the card management service can query the matched data according to the corresponding card ID, and after sending these data to the data consumer, the card display can be realized. Optionally, the card ID can also be configured by the card provider. The subsequent data proxy service determines the corresponding display template according to the card ID sent by the card management service, and determines the data identifier of the data required for the display template, and then reads the corresponding card display data from the database to realize the refresh display of the card.
[0156] For example, Figure 7As shown, 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, the electronic device detects the user's sliding operation on the desktop and determines that the interface to be displayed includes a calendar card. Then the desktop can send a card display request to the card management service, and carry the calendar card ID in the card display request. Then the card management service can forward the card display request carrying the calendar card ID to the data proxy service. Correspondingly, the data proxy service determines the data identifier indicated in the corresponding display template based on the calendar card ID, thereby reading the corresponding data from the database based on the data identifier, and 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, device resource allocation and recycling of the data producer caused by frequently pulling up the data producer. In addition, 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, device resource allocation and recycling of multiple data producers 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. Therefore, 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 malicious attacks on the electronic device, and further ensure the performance of the electronic device.
[0158] In some embodiments, since the data proxy service may reside in the electronic device, as long as the data consumer obtains the identity information of the data proxy service, the data consumer may 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, which can ensure that the data consumer who has passed the connection authentication has the authority to connect to the data proxy service and / or the data producer; and performs access authentication on the data consumer, which can ensure that the data consumer who has passed the access authentication has the authority 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 behavior can be ensured.
[0160] In some examples, when the data proxy service performs connection authentication on the data consumer, the data proxy service can detect whether the configuration file of the data consumer includes the first permission information. If the first permission information is included, it can be determined that the connection authentication is passed, otherwise it is determined that the connection authentication is not passed. For example, the first permission information can be used to indicate that the data consumer has the permission to connect to the data proxy service.
[0161] It should be noted that the first permission information can be added in advance to the configuration file of the data consumer by the developer of the data consumer. Of course, the data consumer can also obtain the first permission information through other methods 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 the data proxy service performs access authentication on the data consumer, the data proxy service can detect whether the configuration file of the data consumer includes the second permission information and whether the configuration file of the proxy service includes the third permission information corresponding to the second permission information. The second permission information can be used to declare the permission to access the proxy service, and the third permission information can be used to indicate that the proxy service defines the permission declared by the second permission information. If the second permission information and the third permission information are detected, it can be determined that the access authentication of the data consumer is passed, otherwise it is determined that the access authentication of the data consumer is not passed.
[0163] It should be understood that the data proxy service may also perform connection authentication and access authentication in other ways.
[0164] In addition, the data proxy service performs connection authentication and access authentication on the data consumer as an optional step, that is, the data proxy service may not perform connection authentication and / or access authentication on the data consumer. By omitting connection authentication and / or access authentication, the access efficiency can be improved.
[0165] In some embodiments, the same card may have multiple display styles. Figure 8 As shown in (a), (b), and (c), the calendar card has a variety of different display styles, and different display styles can correspond to different data processing templates. When adding a calendar card, the card provider can 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. Then, accordingly, during the card subscription process, the card management service can 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 of 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 condition corresponding to each data processing template. The query condition is used to indicate the condition for querying the required data in the data source. For example, the card provider configures the query condition of the data processing template corresponding to the calendar card as today's or tomorrow's timestamp range.
[0167] For example, Figure 8 As shown in (a), the 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 time stamp range from today to tomorrow in the schedule data. For another example, Figure 8 As shown in (b), the calendar card is used to display the calendar of the current month. Then, in the process of publishing the data of the calendar card, the calendar application configures the corresponding data processing template 2, and the corresponding query condition 2 is to query the date data within the timestamp range of this month in the schedule data. For another example, Figure 8 As shown in (c), the calendar card is used to display the latest holiday information. Then, in the process of publishing the data of the calendar card, the calendar application configures the corresponding data processing template 3, and the corresponding query condition 3 is to query the holiday data closest to the current timestamp in the schedule data. That is, the calendar card corresponds to three data processing templates. In response to the user operation, the electronic device can display the calendar card, so that the data consumer can determine the data processing template used to display the current calendar card.
[0168] Correspondingly, such as Figure 7 As shown, 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. The data proxy service determines the data identifier indicated in the corresponding display template according to the calendar card ID, and determines the corresponding query condition according to the data processing template ID, thereby reading the corresponding data from the database according to the data identifier and the query condition, and feeding the read data back to the card management service. Afterwards, the card management service can send the acquired data to the data consumer, and the data consumer can realize the refresh display of the card according to the acquired data.
[0169] In some embodiments, during the process of adding or editing a card, the card provider may configure a corresponding scheduler in the data processing template. The scheduler is a structured query language (SQL) used to preset business processing functions. Based on the scheduler, the data proxy service may trigger data notifications, such as triggering the card management service to refresh the display of the card.
[0170] For example, if a calendar card configured by a calendar application displays a schedule reminder, then during the process of configuring a 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] Exemplarily, the following example shows the SQL statement corresponding to the configured scheduler in a calendar card display scenario. The scheduler is used to make data notifications at a specified time, thereby realizing the 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 is in progress is found. In addition, at 18:00 every day, notification is triggered for schedules between the current time and the timestamp range of 23:59 the next day, such as schedules whose start time or end time is within the current timestamp range.
[0172] SELECT MIN(min_time),reminderTimer(min_time)FROM(
[0173] SELECT MIN(BEGIN_TIME)as min_time FROM TABLENAME WHERE Before
[0174] UNION
[0175] SELECT MIN(END_TIME)as min_time FROM TABLENAME WHERE Between
[0176] UNION
[0177] SELECT(CASE WHEN datetime('now','localtime')<18:00THEN 18:00ELSEdatetime(18:00+1day)END)AS min_time
[0178] For example, if a map card configured by a map application displays an important location reminder, then in the process of configuring a 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.
[0179] The above describes the process of triggering the card refresh display by the scheduler using time or location as the trigger condition for configuring the scheduler. It should be understood that the card provider can also configure other scheduler trigger conditions, for example, the card provider configures the scheduler of the data processing template to trigger the notification card refresh within the reminder time and at an important location.
[0180] In some embodiments, the card provider configures a corresponding scheduler in the data processing template configuration, and 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 responds to user operations and adds corresponding schedules. 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 the cyclic triggering card refresh timing 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 on the next day based on the reset scheduler.
[0181] 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, and after the data is modified, the data proxy service can determine whether to refresh the triggering timing of the corresponding scheduler.
[0182] like Fig. 9 In the interface 901 shown in (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 schedule, and can display the following Fig. 9Interface 902 shown in (b). On interface 902, the user can edit the newly added schedule, such as the time of the newly added schedule is 16:00 this afternoon - 17:00 this afternoon. 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 according to 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 whether the corresponding newly added data will trigger the corresponding card refresh according to the data identifier.
[0183] For example, Figure 7 As shown, the data proxy service determines that the newly added schedule data satisfies the scheduler based on the scheduler of the data processing template corresponding to the currently displayed calendar card. For example, the data proxy service determines that the scheduler is a schedule within the timestamp range from today to tomorrow that triggers notification. Then, the data proxy service can notify the card management service to trigger the card refresh. After receiving the notification, the card management service can send the calendar card ID and the data processing template ID to the data proxy service. The data proxy service can query the corresponding data based on the query conditions in the data processing template ID. The data includes the schedule data that is newly added by the calendar application in response to user operations. Afterwards, the data proxy service can send the queried data to the card management service, and then the card management service can send the received data to the desktop. After receiving the data, the desktop can send the following information: Fig.10 The calendar card in the interface 1001 shown in (a) can be refreshed to display as follows: Fig.10 The calendar card in the interface 1002 shown in (b) includes a newly added schedule reminder in the refreshed calendar card.
[0184] The above example takes the case where both the card provider and the data provider are calendar applications to introduce the triggering of the scheduler. It should be understood that the data proxy service provides an SDK interface to the applications in the application layer. For data with write permissions, other applications can also modify the data through the SDK interface, so the modification of data by these applications can also trigger the scheduler.
[0185] 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.
[0186] 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.
[0187] Optionally, the above indication information may also 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 carried in the URI or may be independent of the URI. Of course, in actual applications, application A may also send the data identifier of the data to be accessed and at least one control parameter to the data proxy service through multiple messages.
[0188] Optionally, the at least one control parameter includes an operation type identifier, and the operation type identifier 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.
[0189] In some embodiments, after receiving the indication information sent by application A, the data proxy service determines the corresponding data to be accessed according to the URI carried in the indication information, and determines the operation process indicated by application A according to the control parameters therein. Figure 7 As shown, the data proxy service is used to perform permission control management on the data published by the data provider. After the data proxy service determines the operation 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 permission to perform the corresponding operation. If application A has the permission 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.
[0190] For example, Fig.10The calendar card in the interface 1002 shown in (b) shows a date and a meeting reminder, that is, the data provider corresponding to the calendar card is the calendar application, and the conference application has write permission to 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, the electronic device determines to cancel the meeting originally scheduled from 10:00 am to 11:00 am tomorrow in response to the user operation. In response to the cancellation of the meeting, the conference application can send an indication message to the data proxy service, and carry the data identifier and control parameters of the calendar data in the indication message. Accordingly, the data proxy service determines that the conference application indicates to modify the meeting schedule in the calendar data according to the received indication message. The data proxy service determines that the conference application has the write permission of the calendar data according to the permissions configured by the calendar application in the process of publishing the calendar data. Then, the data proxy service modifies the corresponding meeting schedule according to the indication message. In addition, the data proxy service determines the corresponding display template and data processing template according to the data identifier, and can determine the scheduler corresponding to the data processing template, so as to determine to notify the card management service to refresh the card display according to the scheduler. Correspondingly, the card management service obtains the latest card display data based on the notification and sends it to the desktop, after which the desktop can refresh the display as follows Fig.10 The calendar card in the interface 1003 shown in (c) no longer includes the canceled tomorrow meeting reminder in the refreshed calendar card. In this way, the life cycle of the card provider and the data provider are decoupled, and the data proxy service provides a unified proxy for the data producer's data.
[0191] 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 reducing the power consumption of electronic devices while meeting the card display requirements.
[0192] 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, and the data proxy service determines whether to actively trigger a card refresh based on the configuration of the scheduler.
[0193] In some embodiments, the data proxy service is also used to perform lifecycle management on the card.
[0194] In some examples, after the electronic device determines the newly added card, 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 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.
[0195] 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 a scheduler based on the data processing template ID, and can determine that no active notification to refresh the display of the card will be triggered later. 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 certain card is no longer displayed on the interface after the sliding, then the desktop or the negative one screen can unsubscribe from the card.
[0196] In some examples, the electronic device determines to completely clear the card in response to the user operation. Then, the card management service can send an instruction message to the card provider to instruct the deletion of the corresponding card data, such as display templates, data processing templates, etc. After deleting the display template and data processing template, the card provider sends an instruction message to the data proxy service, and the instruction message may carry the card ID, data processing template ID, etc. After receiving the instruction message, the data proxy service can clear the information configured by the card provider and the data provider for the card currently indicated to be cleared based on the card ID and data processing template ID, thereby avoiding the subsequent triggering of the display data call of the cleared card.
[0197] Optionally, the card provider may also send an indication message to the data provider, and the data provider determines whether the data corresponding to the currently cleared card is only used to display the card according to the indication message. If so, the data provider may clear the corresponding data in the database. If not, the data provider may retain the corresponding data in the database.
[0198] In this way, the life cycle of the card 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.
[0199] In some experimental examples, in the existing card refresh process, the power consumption required for refreshing a card once is about 0.02-0.3 milliampere hours (mAh); the startup of a single process causes the memory usage to increase by about 20 megabytes (MB); if the data source is a cloud server and a network request is required, the power consumption required for a single network request is about 0.01-0.02 mAh. However, by adopting 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 is reduced by about 0.015-0.02 mAh, the peak memory is reduced by about 25-30 MB, and the card refresh delay is increased by 230-300 milliseconds (ms).
[0200] 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.
[0201] For example, Fig.11 A flow chart of a data access method provided in an embodiment of the present application. Fig.11 As shown, the method includes the following steps.
[0202] 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.
[0203] Among them, the data proxy service has the authority to reside in the electronic device.
[0204] In some embodiments, 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. Afterwards, 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.
[0205] Optionally, the display data information includes a data identifier, read and write permissions, and data source information of the display data configured by a data provider.
[0206] Optionally, 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 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.
[0207] Exemplarily, the card provider determines to create a card in response to a user creation operation. The creation of the card may be to create 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 card such as Figure 8Alternatively, the creation of a card may also be to create a card in a different style than the style of the card that has been displayed to the consumer. For example, Figure 8 In the case of the calendar card shown in (a), in response to the user's operation of creating a card on the desktop, the calendar application creates a calendar card such as Figure 8 Another style of calendar card shown in (b).
[0208] During the card creation process, the card provider (such as a calendar application, etc.) configures the display template of the card, such as the data identifier of the card data to be displayed, layout information, etc. The data provider (such as a calendar application, etc.) configures the display data information of the card, such as the data identifier of the display data of the card to be displayed, read and write permissions, etc. Optionally, the data identifier is, for example, a URI of the display data, which is used to indicate the storage location of the display data.
[0209] Optionally, after the card is created, the data consumer can display the card. Also, after the card is configured, the data proxy service can obtain the display template and card display information published by the data producer (eg, including the card provider and the data provider).
[0210] For example, Figure 7 As shown in the figure, data producers, data proxy services, and data consumers form a data sharing system. Data producers are used to provide card display data and display templates, and publish these data to data proxy services. In this way, the data proxy services resident in the service layer will manage these data in the future, and data consumers can directly access these data through the data proxy services, thus avoiding frequent wake-up of data producers. Through a unified data proxy, the life cycles of data providers and card providers are decoupled, and card refresh is achieved without relying on data producers.
[0211] S1102: The electronic device displays a first card, and first card display data of the first card corresponds to the data processing template and first display data indicated by the display data information.
[0212] 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, and the first display data is part or all of the display data provided by the data provider for the card to access. 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 realizing the display of the card.
[0213] For example, in response to a user 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 and 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 the data identifier, read and write permissions, etc. Figure 8 As shown, the electronic device can display calendar cards of multiple 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 according to the data processing template corresponding to the style of the calendar card currently selected by the user and the first display data indicated by the display data information, so as to display the first card.
[0214] S1103. In response to satisfying a preset condition, 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.
[0215] During the card refresh process, the electronic device does not run the card provider and / or the data provider.
[0216] In some embodiments, through the above step S1101, during the card creation process, the card provider and the data provider have published the relevant data of the card to the data proxy service. Then, in the subsequent card refresh process, in response to determining that the preset conditions are met, the data proxy service can directly obtain these relevant data without having to start the card provider and the data provider again, thereby achieving the decoupling of the card provider and the data provider life cycle, and reducing the power consumption caused by frequent wake-up of the card provider and the data provider due to card refresh.
[0217] In some embodiments, the data processing template includes a query condition, and the query condition is used for the data proxy service to query the second display data in the display data indicated by the display data information.
[0218] For example, Figure 8 As shown, 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 corresponding display data in the display data indication information according to the query conditions carried in the data processing template to refresh and display the card of the corresponding style.
[0219] For example, Figure 8As shown in (a), the calendar card is used to display today's and tomorrow's schedules. Then, when the calendar application publishes the data of the calendar card, it 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. Figure 8 When the calendar card shown in (a) is displayed, the calendar data indicated by the display data information can be queried according to query condition 1 to find the schedule data within the time stamp range from today to tomorrow (such as the second display data). Figure 8 The display of the calendar card shown in (a) above.
[0220] In some embodiments, the preset condition includes: the data proxy service receives a first indication of display data indicated by modifying display data information. Alternatively, the data proxy service determines that a refresh timing is met. Alternatively, the data proxy service receives a second indication from a card host indicating to refresh a first card, and the card host is used to display the first card.
[0221] 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.
[0222] For example, Fig.10 A meeting reminder is displayed on the calendar card in the interface 1002 shown in (b), that is, the data provider corresponding to the calendar card is the calendar application, and the conference application has write permission to the calendar data provided by the calendar application, such as adding a new meeting schedule, deleting a meeting schedule, modifying a meeting schedule, etc. in the calendar data. For example, in response to a user operation, the electronic device determines to cancel the meeting originally scheduled for 10:00 am to 11:00 am tomorrow. In response to the cancellation of the meeting, the conference application may send a first indication to the data proxy service, and carry the data identifier and control parameters of the calendar data in the first indication. Accordingly, the data proxy service determines, based on the first indication received, 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 in the process of publishing the calendar data, that the conference application has write permission to 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 of 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, so as to trigger the display of the calendar card in the refresh interface 1002, such as displaying Fig.10 The refreshed calendar card shown in (c).
[0223] 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 a calendar card that triggers the refresh display 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 refresh 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.
[0224] For another example, when the electronic device is displaying the first interface of the desktop, it detects the sliding operation of the user and determines that the user indicates to display the second interface of the desktop. Wherein, the second interface to be displayed includes the 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 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 of the desktop.
[0225] In this way, the card refresh is triggered in a variety of 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.
[0226] In some embodiments, 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, and the display data information includes the data directory. Then, in response to meeting the preset condition, the data proxy service determines the 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.
[0227] Optionally, the data proxy service may be a sub-service in the distributed data management service. Of course, in practical applications, the data proxy service may also be other system services associated with the distributed data management service.
[0228] For example, Figure 7 As shown, 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. Therefore, 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, and can also obtain the display data, effectively reducing the wake-up frequency of the data provider, thereby reducing device power consumption.
[0229] In some other embodiments, the electronic device further includes a system service, and the system service is further used to provide data storage services to the data provider, and the system service includes a data directory corresponding to the data provider. Then, in response to satisfying the preset condition, the data proxy service obtains the data directory from the system service. Thereafter, the data proxy service determines the 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.
[0230] Optionally, the above 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.
[0231] For example, when the data proxy service determines that the preset conditions are met and the display of the card needs to be refreshed, it can request the distributed data management service to obtain the data directory corresponding to the card to be displayed, so as to obtain the second display data according to the storage location indicated by the data directory. Therefore, during the card refresh process, the display data can be obtained without waking up the data provider, which effectively reduces the wake-up frequency of the data provider, thereby reducing the power consumption of the device.
[0232] S1104: The electronic device displays the refreshed first card according to the second card display data.
[0233] 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.
[0234] 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.
[0235] 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.
[0236] 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 a data proxy service can reduce the damage that data producers may cause to electronic devices, reduce the risk of electronic devices being maliciously attacked, and further ensure the performance of electronic devices.
[0237] Combination of the above Figure 7-Figure 11 The data access method provided by the embodiment of the present application is described in detail. Fig.12 The electronic device provided by the embodiments of the present application is described in detail.
[0238] In one possible design, Fig.12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.12 As shown, the electronic device 1200 may include: a transceiver unit 1201, a processing unit 1202, and a display unit 1203. The electronic device 1200 may be used to implement the functions of the electronic device involved in the above method embodiment.
[0239] Optionally, the transceiver unit 1201 is used to support the electronic device 1200 to execute Fig.11 S1101 in.
[0240] Optionally, the processing unit 1202 is used to support the electronic device 1200 to execute Fig.11 S1102 and S1103 in.
[0241] Optionally, the display unit 1203 is used to support the electronic device 1200 to display a card; and / or to support the electronic device 1200 to execute Fig.11 S1102 and S1104 in.
[0242] Among them, the transceiver unit may include a receiving unit and a sending 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 to implement the corresponding process 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, and for the sake of brevity, they will not be repeated here.
[0243] Optionally, Fig.12The electronic device 1200 shown may also include a storage unit ( Fig.12 (not shown), the storage unit stores a program or instruction. When the transceiver unit 1201, the processing unit 1202 and the display unit 1203 execute the program or instruction, Fig.12 The electronic device 1200 shown can execute the data access method described in the above method embodiment.
[0244] Fig.12 The technical effects of the electronic device 1200 shown can refer to the technical effects of the data access method described in the above method embodiment, and will not be repeated here.
[0245] In addition to being in the form of the electronic device 1200, the technical solution provided in the present application may also be a functional unit or chip in the electronic device, or a device used in conjunction with the electronic device.
[0246] 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.
[0247] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0248] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, 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 may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
[0249] Exemplarily, the chip system can 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.
[0250] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. 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.
[0251] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run on a computer, the computer executes the above-mentioned related steps to implement the data access method in the above-mentioned embodiment.
[0252] The embodiment of the present application also 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.
[0253] In addition, an embodiment of the present application further provides a device. The device may be a component or a module, and the device may include one or more processors and a memory connected to each other. The memory is used to store a computer program. When the computer program is executed by one or more processors, the device performs the data access method in each of the above method embodiments.
[0254] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0255] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in hardware or by executing software instructions by a processor. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs 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).
[0256] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0257] In the several embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The device embodiments described above are merely schematic. 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.
[0258] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0259] 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 codes.
[0260] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope 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
Cited By
Data access method and electronic device
EP4647904A1
Data access method and electronic device
WO2024234724A1
