Terminal equipment and data acquisition method

By building a data proxy module in the terminal device, the development difficulty and cost problems of calendar applications due to inconsistent data formats are solved, and the unified format and efficient acquisition of data are achieved.

CN119862230APending Publication Date: 2025-04-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311376008.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the prior art, when calendar applications need to obtain weather and motion data from different databases, due to inconsistent data formats, developers need to develop multiple data analysis modules, which increases the development difficulty and cost.

Method used

It provides a terminal device with a built-in data proxy module, which can uniformly write the service data of the application to the corresponding service database, and enable multiple applications to access through an open interface, realizing data proxy and unified format.

Benefits of technology

Through the data proxy module, calendar applications do not need to parse data formats of different databases, and directly obtain and use data, simplifying the development process, reducing development difficulty and cost, and improving data acquisition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862230A_ABST
    Figure CN119862230A_ABST
Patent Text Reader

Abstract

The invention provides terminal equipment and a data acquisition method, and the terminal equipment comprises a data agent module which is used for writing data of a first application program into a first database and writing data of a second application program into a second database; the data agent is further used for obtaining second data in the second database, and the second data is used for refreshing a first user interface of the first application program. The data acquisition cost of the application can be reduced, and application programs such as a calendar can conveniently carry out data source extension.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a terminal device and a method for acquiring data. Background Art

[0002] With the continuous development of terminal technology, the monthly view of the calendar can display other data such as weather and sports in addition to regular data such as dates and holidays, making the calendar increasingly powerful and playable. For example, the monthly view of the calendar can display weather data, which can better facilitate users to plan or adjust their schedules when editing or viewing schedules. It can also create schedules to remind users to bring umbrellas or add clothes when it rains or the temperature drops sharply.

[0003] The calendar needs to obtain the above-mentioned weather data and sports data from the weather database and the sports health database respectively before it can be displayed. In the related art, due to the inconsistency of data formats in different databases, calendar developers need to develop a data parsing module that is compatible with the weather database, and then parse the weather data from the weather database into data that they can read and use. It is also necessary to develop a data parsing module that is compatible with the sports health database, and then parse the sports data from the sports health database into data that they can read and use. The more databases connected to the calendar, the more data parsing modules the calendar developers need to develop. The above reasons make the cost of data acquisition too high, which is unfavorable to the data source expansion of the calendar. Summary of the invention

[0004] The embodiments of the present application provide a terminal device and a method for acquiring data, which can reduce the data acquisition cost of an application and facilitate data source expansion for applications such as calendars.

[0005] In a first aspect, a terminal device is provided, comprising: a data proxy module, used to write data of a first application into a first database, and write data of a second application into a second database; the data proxy module is also used to obtain second data in the second database, wherein the second data is used to refresh a first user interface of the first application.

[0006] The terminal device provided in the embodiment of the present application is built with a data proxy module. As the basic capability of the terminal device software system, the data proxy module has an open interface, which can be accessed by multiple applications such as the first application and the second application. The data proxy module can perform data proxy for each accessed application, and can write the business data of each application into its corresponding business database. For example, the business data (such as the first data) of the first application can be written into the first database, and the business data (such as the second data) of the second application can be written into the second database. Since the data proxy module is used to write to the database, the format of the first data and the second data can be the same, that is, the data format of the relevant data in different databases can be unified. After the data proxy module obtains the second data from the second database, the first user interface of the first application can be refreshed directly through the second data without performing data parsing, thereby making it possible for the developer of the first application to develop a data parsing module that is compatible with the second database, and the second data can be easily obtained by using (inheriting) the ability of the data proxy module, thereby simplifying the development process of the first application and reducing the development difficulty and development cost of the first application. The terminal device provided in the embodiment of the present application can reduce the cost of data acquisition and facilitate the first application to expand the data source. The data proxy module provided in the embodiment of the present application can realize the integration and intercommunication between multiple application data, and provide users with a complete ecological closed-loop service based on the data of different applications in the terminal and mobilizing the characteristic capabilities of different applications.

[0007] In addition, since the first application and the second application can use the data proxy module to manage their own databases, the data proxy module can be used to centrally perform permission management and data security management, such as proxying the access requests of each application to its own business database, so that each application connected to the data proxy module does not need to develop its own Provider class, thereby simplifying the development process of each application and reducing the difficulty of development. It can also effectively reduce the code duplication rate (redundancy), avoid repeated code development, effectively improve application development efficiency, save development labor costs, and shorten the application development cycle.

[0008] Optionally, the multiple applications may include platform applications and / or third-party applications. For example, the first application may be a platform application or a third-party application, and the second application may be a platform application or a third-party application. The first application and / or the second application may be pre-installed on the terminal device before the device leaves the factory, or may be downloaded and installed on the terminal device by the user from the application market after the device is sold. During the installation process of the first application and the second application, the data proxy module can be automatically connected so that the data proxy module can provide data proxy services for the first application and the second application.

[0009] Optionally, the first application and the second application may both be applications with a month view, the first user interface is the month view of the first application, and the second user interface is the month view of the second application. The first data may be data related to the first user interface, for example, the first data can be used to refresh or display the first user interface; the second data may be data related to the second user interface, for example, the second data can be used to refresh or display the second user interface. At this time, the data proxy module can obtain the second data, so that the month view of the first application can be refreshed by the second data, that is, the first user interface is refreshed, so that the first data can be displayed on the first user interface while the second data can also be displayed.

[0010] For example, the first application may be a calendar, the first user interface is a monthly view of the calendar, and the first data is calendar data. The second application may be an application such as weather, sports health, or conference, the second user interface is a monthly view of weather, sports health, or conference, and the second data may be weather data, sports data, or conference data. The data proxy module may obtain the above data and refresh the monthly view of the calendar according to the obtained data, for example, displaying weather data, sports data, or conference data on the monthly view of the calendar.

[0011] For another example, the first application may be a theme or wallpaper program, the first user interface may be a desktop wallpaper, a screen saver wallpaper or an off-screen wallpaper, the second application may be weather, and the second data may be weather data. The data proxy module obtains weather data and refreshes any of the above wallpapers according to the weather data. Optionally, different weather conditions may correspond to different wallpapers, for example, the wallpaper corresponding to a sunny day has the sun, blue sky and white clouds, while the wallpaper corresponding to a rainy day has dark clouds and raindrops, and any of the above types of wallpapers may be refreshed (selected) according to weather data. Optionally, the above wallpaper may be a dynamic wallpaper, which displays a specific outdoor scene (such as a lawn or a green hill). On this basis, the dynamic wallpaper may display the weather conditions in real time according to the weather data, for example, the sun and blue sky and white clouds are displayed on the wallpaper on a sunny day, and the white clouds may float; a dynamic rainy scene is displayed on the wallpaper on a rainy day.

[0012] For another example, the first user interface may be the desktop of the electronic device (e.g., the interface of the negative first screen or the main screen), the second application may be weather, and the second data is weather data. The data proxy module obtains weather data, and updates weather-related cards or icons on the desktop according to the weather data. Alternatively, the second application may be sports health, and the second data is sports data (e.g., step count data). The data proxy module obtains sports data, and updates sports-related cards or icons on the desktop according to the sports data.

[0013] Optionally, the second application in the embodiment of the present application may be one application, or may be (include) multiple applications, which is not limited in the present application. For example, the second application may be one application, such as weather, sports health, or meeting, in which case the first user interface may be refreshed according to weather data, sports data, or meeting data. The second application may also be (include) multiple applications, in which case the first user interface may be refreshed together by multiple second data corresponding to the multiple applications. For example, the second application may include weather and sports health, in which case the first user interface may be refreshed according to weather data and sports data.

[0014] Optionally, "the data proxy module obtains the second data, wherein the second data is used to refresh the first user interface of the first application". The specific implementation method of the refresh may be to refresh the first user interface by the first application itself, or to refresh the first user interface by the data proxy module. This application does not limit this. The following will introduce these two refresh methods in detail. In addition, the acquisition of the second data may be to obtain the second data at the request of the first application, or the data proxy module may actively obtain the second data in response to the monitored changes in the database. This application does not limit this either.

[0015] The above two acquisition methods and two refresh methods can be combined arbitrarily, that is, four situations can be combined. The first situation is that the data proxy module obtains the second data at the request of the first application, and provides the second data to the first application, and the first application refreshes the first user interface according to the second data. The second situation is that the data proxy module obtains the second data at the request of the first application, and the data proxy module directly refreshes the first user interface according to the second data. The third situation is that the data proxy module actively obtains the second data in response to the monitored changes in the database, and provides the second data to the first application (starting the process of the first application), and the first application refreshes the first user interface according to the second data. The fourth situation is that the data proxy module actively obtains the second data in response to the monitored changes in the database, and the data proxy module directly refreshes the first user interface according to the second data (without starting the process of the first application).

[0016] Optionally, the first user interface may include one or more controls, such as UI controls, and refreshing the first user interface by using the second data may be refreshing one or more controls on the first user interface by using the second data.

[0017] Optionally, the second data corresponds to at least one control on the second user interface, and the at least one control on the second user interface can be refreshed according to the second data. In addition, the second data also corresponds to at least one control on the first user interface, and the at least one control on the first user interface has a corresponding relationship with the at least one control on the second user interface (for example, they can correspond one to one), for example, two controls on different interfaces can correspond to the same date. In this case, the at least one control on the first user interface can be refreshed by the second data.

[0018] For example, the second data is "cloudy, 22-33°C", which corresponds to the control for September 1 on the weather month view (e.g., control #21 in Table 2). Therefore, the control corresponding to September 1 on the calendar month view (e.g., control #11 in Table 1) can be refreshed by the second data, and the control for September 1 on the weather month view (control #21) and the control for September 1 on the calendar month view (control #11) can be regarded as having a corresponding relationship.

[0019] In a possible implementation manner, the data proxy module is further used to refresh the first user interface according to the second data.

[0020] After acquiring the second data, the data proxy module can refresh the first user interface according to the second data, so that the refresh of the first user interface does not need to start the process of the first application, that is, the refresh of the first user interface does not need to be implemented by the first application itself, while reducing the power consumption of the terminal device, it can also achieve efficient and low-latency refresh of the first user interface.

[0021] In one possible implementation, the data proxy module is specifically used to: determine at least one control corresponding to the storage location of the second data based on a mapping relationship, wherein the mapping relationship is used to indicate the correspondence between the control and the storage location within the second database; and refresh the at least one control on the first user interface based on the second data.

[0022] After the data proxy module obtains the second data, it first determines which one or more controls on the first user interface the second data corresponds to, for example, determines which one or more controls on the first user interface the second data is to be refreshed, that is, determines which (which) controls are required to display the second data. Considering specific application scenarios such as the month view, the second data is displayed on a certain (certain) control of the second application, and can also be displayed by the corresponding control on the first user interface. Here, the corresponding controls can be two controls corresponding to the same date. Therefore, first, at least one control on the first user interface corresponding to the storage location of the second data can be determined from the preset mapping relationship, and the determined at least one control is the control for displaying the second data. After that, the data proxy module can display the second data through the at least one control on the first user interface, that is, refresh the view of the at least one control and refresh the first user interface. The above refresh logic is simple, efficient, and reliable, and can realize automatic refresh of the first user interface.

[0023] In a possible implementation, before determining at least one control corresponding to the storage location of the second data according to the mapping relationship, the data proxy module is also used to: receive registration information of the second application for the data proxy module; and obtain the mapping relationship according to the registration information.

[0024] After receiving the registration information of the second application to the data proxy module, the data proxy module can obtain (determine) the mapping relationship between the control and the storage location in the second database according to the registration information. For example, the mapping relationship can be actively generated by the data proxy module for the second application based on the registration information, or it can be obtained by the second application itself through configuration (i.e., the registration information of the second application includes relevant configuration information, or includes the mapping relationship), but is not limited thereto.

[0025] In a possible implementation manner, the data proxy module is specifically configured to: obtain the second data in response to monitored data changes in the second database.

[0026] The data proxy module provided in the embodiment of the present application can also monitor the second database (for example, the corresponding library table fields) during the process of data proxy. When it is monitored that the data changes in the second database occur, it can actively obtain the second data to initiate a refresh of the first user interface, thereby making the refresh of the first user interface more timely and efficient, and improving the user experience of the first application.

[0027] In a possible implementation, the data proxy module is specifically configured to obtain the second data in response to a data request from the first application.

[0028] Optionally, in response to a data request from the first application, the data proxy module obtains the second data, and the data proxy module refreshes the first user interface according to the second data.

[0029] In a possible implementation, the data proxy module is further used to: obtain the second data in response to a data request of the first application; and provide the second data to the first application so that the first application refreshes the first user interface through the second data.

[0030] Specifically, when the first user interface of the first application needs to display the second data or needs to refresh the interface through the second data, for example, the first user interface of the first application is opened by the user for the first time, or the relevant virtual button on the first user interface is used to touch. At this time, the first application can send a data request to the data proxy module, and the data request is used to request the second data in the second database. After receiving the data request, the data proxy module obtains the second data from the second database and returns the second data to the first application. After the first application receives the second data, it can refresh the first user interface according to the preset refresh logic. For example, the user interface control corresponding to the second data can be first determined, and then the corresponding control on the first user interface can be refreshed through the second data, for example, the second data can be displayed through the control.

[0031] In a possible implementation, the data proxy module is further configured to refresh a second user interface of the second application according to the second data.

[0032] In a possible implementation, the data proxy module is further used to write the second data into the first database to facilitate the first application to refresh the first user interface based on the second data.

[0033] That is to say, after the second data is written into the first database by the data proxy module, the first application can refresh the first user interface based on the preset refresh logic. For example, in combination with the relevant contents of Tables 1-3, after the second data is written into a storage location in the first database, since the interface between the storage location and the control is pre-customized, the control corresponding to the storage location can be directly refreshed through the second data, that is, the control on the interface is refreshed based on the preset mapping relationship between the storage location and the control.

[0034] Optionally, when the second data is written into the first database by the data proxy module, the first user interface may not be opened by the user, and when the user opens the first user interface in subsequent use, the first user interface can be refreshed according to the second data.

[0035] Optionally, in other implementations, after acquiring the second data, the data proxy module may directly refresh the first user interface without storing the second data in the first database.

[0036] In a possible implementation, the first application is a calendar, and the first user interface is a month view.

[0037] In a second aspect, a method for acquiring data is provided, which is applied to a terminal device, wherein the terminal device includes a data proxy module, and the data proxy module is used to write data of a first application into a first database, and write data of a second application into a second database; the acquisition method includes: the data proxy module writes second data from the second application into the second database; the data proxy module acquires the second data, wherein the second data is used to refresh a first user interface of the first application.

[0038] In a possible implementation manner, the acquisition method further includes: the data proxy module refreshing the first user interface according to the second data.

[0039] In a possible implementation, the data proxy module refreshes the first user interface according to the second data, including: the data proxy module determines at least one control corresponding to the storage location of the second data according to a mapping relationship, and the mapping relationship is used to indicate the correspondence between the control and the storage location in the second database; the data proxy module refreshes the at least one control on the first user interface according to the second data.

[0040] In a possible implementation, before the data proxy module determines at least one control corresponding to the storage location of the second data based on a mapping relationship, the method also includes: the data proxy module receives registration information of the second application to the data proxy module; and the data proxy module obtains the mapping relationship based on the registration information.

[0041] In a possible implementation, the data proxy module obtains the second data, including: in response to a monitored data change in the second database, the data proxy module obtains the second data.

[0042] In a possible implementation, the data proxy module obtains the second data, including: in response to a data request of the first application, the data proxy module obtains the second data.

[0043] In one possible implementation, the data proxy module obtains the second data, including: in response to a data request from the first application, the data proxy module obtains the second data; the acquisition method also includes: the data proxy module provides the second data to the first application, so that the first application refreshes the first user interface through the second data.

[0044] In a possible implementation manner, the acquisition method further includes: the data proxy module refreshing a second user interface of the second application according to the second data.

[0045] In a possible implementation manner, the acquisition method further includes: the data proxy module writing the second data into the first database.

[0046] In a possible implementation, the first application is a calendar, and the first user interface is a month view.

[0047] In a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program runs on an electronic device, the electronic device executes the acquisition method provided by any possible implementation of the second aspect.

[0048] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on an electronic device, enables the electronic device to execute the acquisition method provided by any possible implementation of the second aspect.

[0049] In a fifth aspect, an electronic device is provided, comprising: a memory storing instructions; and a processor, wherein when the instructions are executed by the processor, the electronic device executes the acquisition method provided by any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a schematic diagram of the month view control provided in an embodiment of the present application.

[0051] Figure 2 A number of month views corresponding to a number of different applications are shown.

[0052] Figure 3 It is a schematic diagram of the process of multiple different applications writing data to the database.

[0053] Figure 4 This is a diagram showing weather data in the month view of the calendar.

[0054] Figure 5 This is a flowchart of how the calendar obtains weather data from the weather application's database.

[0055] Figure 6 This is a process interaction diagram of an example of a data proxy module performing data proxy for multiple applications.

[0056] Figure 7 This is another process interaction diagram of an example in which the data proxy module performs data proxy for multiple applications.

[0057] Figure 8 It is a schematic diagram of the user interface of the negative one screen of an electronic device.

[0058] Fig. 9 It is a structural diagram of a terminal device provided in an embodiment of the present application.

[0059] Fig.10 It is a software structure block diagram of an example of a terminal device according to an embodiment of the present application.

[0060] Fig.11 It is a software structure block diagram of another example of the terminal device of the embodiment of the present application.

[0061] Fig.12 This is a software structure block diagram of another example of a terminal device according to an embodiment of the present application.

[0062] Fig.13 This is a flowchart of an example of a method for obtaining data provided in an embodiment of the present application.

[0063] Fig.14 This is a flowchart of another example of the method for obtaining data provided in an embodiment of the present application.

[0064] Fig.15 This is a flowchart of another example of the method for obtaining data provided in the embodiment of the present application. DETAILED DESCRIPTION

[0065] The technical solution in the present application will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0066] The term "include" herein indicates the presence of the described features, integral bodies, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integral bodies, steps, operations, elements, components and / or their collections. The terms "include", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0067] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0068] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0069] With the continuous development of technology, more and more applications (APPs) are installed on terminal devices. Applications can also be called applications or APPs. Each application has its own user interface (UI) to realize the interaction between the application and the user. The user interface can also be called UI or UI interface. It is the medium for interaction and information exchange between the application or operating system and the user. It realizes the conversion between the internal form of information and the form acceptable to humans. The commonly used form of user interface is graphical user interface (GUI), which refers to the user interface related to computer operation displayed in graphical form.

[0070] The user interface can be a source code written in a specific computer language such as Java or extensible markup language (XML). The interface source code is parsed and rendered on the terminal device and finally presented as interface elements in the user interface. The user interface includes interface elements such as icons, windows, and UI controls. Among them, controls are also called widgets. Typical UI controls can include buttons, menus, tabs, text boxes, dialog boxes, toolbars, status bars, navigation bars, scroll bars, lists, month views, pictures, and text, etc.

[0071] UI controls can also be referred to as controls for short. UI controls are not only used to implement the display function of the application, but can also serve as a target for user input to receive user instructions. A user interface can usually include multiple UI controls. During use, when a user clicks a UI control on the user interface, the application will automatically execute the code corresponding to the UI control. For example, a UI control can be a confirmation button displayed on the user interface. When the confirmation button receives a click operation from the user, the program automatically executes the code corresponding to the confirmation button to enable the corresponding function to be implemented.

[0072] The MonthView control is a common control that can be used to generate month views for applications such as calendars. Figure 1 is a schematic diagram of a month view control provided in an embodiment of the present application. Figure 1 As shown, the month view control as a whole forms a table structure with seven columns and four or five rows. Each column from left to right corresponds to Sunday to Saturday, and each row from top to bottom corresponds to the first to fourth (fifth) week of the month. A grid in the month view corresponds to a date (i.e., a day). For example, Figure 1The sixth square in the first row (Friday) corresponds to the first day of September 2023, September 1, and the seventh square in the first row (Saturday) corresponds to September 2, and so on, until Figure 1 The seventh box in the fifth row corresponds to September 30, the last day of September.

[0073] Month view is a common user interface. In addition to the calendar, other applications such as weather, sports and health, and conferences will also have corresponding month views. The month views of these applications are all generated based on the above-mentioned open source month view control. In other words, the month views of these applications all include the above-mentioned month view control, making the month views of these applications basically the same. Figure 2 Multiple monthly views corresponding to multiple different applications are shown, wherein: Figure 2 Part (a) is the month view of the calendar. Figure 2 Part (b) is the monthly view of the weather. Figure 2 Part (c) is the monthly view of sports health.

[0074] like Figure 2 As shown, the program developer can fill and display data in the grid of the above month view control according to actual business needs to obtain the corresponding month view. Figure 1 Based on the month view control shown, for the calendar month view, the grid can be filled with data such as lunar calendar dates, holidays, schedules, etc.; for the weather month view, the grid can be filled with data including weather conditions (cloudy or sunny, etc.) and temperature; for the sports health month view, the grid can be filled with data including step count, exercise intensity, and energy consumption.

[0075] The above data can be displayed in the form of UI controls, that is, each grid can correspond to, include or represent a UI control, that is, the month view can be composed of multiple UI controls (for example, 30), and the multiple UI controls are aligned and arranged in the form of a table to form a Figure 2 The UI control not only displays the above data, but also allows users to click and touch it. After receiving the user's click operation, the application can refresh the page or pop up a new window to display more relevant information according to the corresponding code.

[0076] Furthermore, each UI control (grid) in the month view can establish a mapping relationship with the storage path (location) of the database (i.e., provide a customized interface from the database table to the UI control on the interface), and each UI control can display the data stored on the corresponding storage path, that is, the month view can be displayed and refreshed with the help of the data stored in the business database of the application. The application can write, delete or update the database through the above mapping relationship, and then update the content displayed in the month view.

[0077] The following is an introduction to the data writing process of the database with the help of the attached figure. Different applications can write their own data into their corresponding business database. Figure 3 This is a schematic diagram of the process of multiple different applications writing data to the database, where: Figure 3 Part (a) is a diagram of the calendar data writing process. Figure 3 Part (b) is a schematic diagram of the weather data writing process. Figure 3 Part (c) is a schematic diagram of the data writing process of sports health.

[0078] like Figure 3 As shown in part (a), the calendar is connected to its own database through its own Provider class. The Provider class is used to look after the database and write, delete, or update the database at the request of the calendar. The calendar can write relevant data to its own database through the Provider class to refresh its own month view. Specifically, when there is data that needs to be written, the calendar can initiate a write request to its own Provider class. The calendar's Provider class writes data to the calendar's database in response to the request, and then can update (refresh) the calendar's month view in response to changes in the database data. The data written may include, for example, information such as lunar calendar dates, holidays, notes, and schedules, but is not limited to this.

[0079] Table 1 is an example of the mapping relationship between the controls and storage locations of the calendar. As shown in Table 1, controls #11 to #19 in the second column represent different display locations in the calendar month view, and controls #11 to #19 correspond one-to-one to the dates September 1st to 9th in the first column. For example, control #1 is used to display data on September 1st, and control #9 is used to display data on September 9th. Library table #1 is used to store calendar data, and storage locations #11 to #19 in the third column represent different storage locations in library table #1 (for example, different library table fields). The fourth column represents the calendar data stored at the corresponding storage location.

[0080] Table 1: Example of mapping between calendar controls and storage locations

[0081]

[0082] There is a one-to-one mapping relationship between controls #11 to controls #19 and storage locations #11 to #19 in library table #1 (i.e., calendar database). For example, control #11 is used to display the data stored in storage location #11 (i.e., calendar data for September 1), and control #12 is used to display the data stored in location #12 (i.e., calendar data for September 2), and so on. The calendar can use its own Provider class to write the data displayed in the fourth column of Table 1 into storage locations #11 to #19 in its own database in sequence, where Arabic numerals 1 to 9 represent dates, 17 to 25 represent lunar calendar dates, and Bailu represents festivals. In this way, the month view of the calendar can display the date, festival and other data of each day in the calendar month view based on the written data and the mapping relationship for users to view.

[0083] like Figure 3 As shown in part (b) of the diagram, Weather is connected to its own database through its own Provider class. Weather can write relevant data into its own database through the Provider class to refresh its own monthly view. Specifically, when there is data that needs to be written, Weather can initiate a write request to its own Provider class. The Provider class of Weather writes data to the Weather database in response to the request, and then can update (refresh) the Weather monthly view in response to changes in the database data. The data written may include, for example, weather conditions (sunny, cloudy, overcast or rainy, etc.), temperature and other information, but is not limited to this. The above data can come from the Internet, such as from a cloud server.

[0084] Table 2 is an example of the mapping relationship between weather controls and storage locations. As shown in Table 2, controls #21 to #29 in the second column represent different display locations in the weather month view, and controls #21 to #29 correspond one-to-one to the dates September 1 to 9 in the first column. For example, control #21 is used to display data on September 1, and control #29 is used to display data on September 9. Library table #2 is used to store weather data, and storage locations #21 to #29 in the third column represent different storage locations in library table #2 (e.g., different library table fields). The fourth column represents the weather data stored at the corresponding storage location.

[0085] There is a one-to-one mapping relationship between controls #21 to controls #29 and storage locations #21 to #29 in library table #2. For example, control #21 is used to display the data stored in location #21 (i.e., weather data on September 1), and control #22 is used to display the data stored in storage location #22 (i.e., weather data on September 2), and so on. Weather can use its own Provider class to write the data displayed in the fourth column of Table 2 into storage locations #21 to #29 in library table #2 (i.e., weather database) in sequence, where Arabic numerals 1 to 9 represent dates, cloudy, sunny, etc. represent weather conditions, and 22 to 33, etc. represent temperatures (in degrees Celsius). In this way, the weather month view can display the weather information of each day in the weather month view based on the written data and the mapping relationship for users to view.

[0086] Table 2: Example of mapping between weather controls and storage locations

[0087]

[0088] like Figure 3 As shown in part (c), Sports Health is connected to its own database through its own Provider class. Sports Health can write relevant data into its own database through the Provider class to refresh its own monthly view. Specifically, when there is data that needs to be written, Sports Health can initiate a write request to its own Provider class, and the Provider class of Sports Health responds to the request to write data to the database of Sports Health, and then can respond to the data changes in the database to update (refresh) the monthly view of Sports Health. The data written may include, for example, information such as the number of steps, exercise intensity, and energy consumption, but is not limited to this. The above data can come from the sensor of the terminal device.

[0089] Table 3 is an example of the mapping relationship between the controls and storage locations of sports health. As shown in Table 3, controls #31 to #39 in the second column represent different display positions in the sports health monthly view, and controls #31 to #39 correspond one-to-one with the dates September 1st to 9th in the first column, for example, control #31 is used to display the data on September 1st, and control #39 is used to display the data on September 9th. Library table #3 is used to store sports data, and storage locations #31 to #39 in the third column represent different storage locations (e.g., different library table fields) in library table #2. The fourth column represents the sports data stored at the corresponding storage location.

[0090] As shown in Table 3, there is a one-to-one mapping relationship between controls #31 to controls #39 and storage locations #31 to storage locations #39 in library table #3. For example, control #31 is used to display the data stored at storage location #31 (i.e., the exercise data on September 1), and control #32 is used to display the data stored at location #32 (i.e., the exercise data on September 2), and so on. Sports health can use its own Provider class to write the various data displayed in the fourth column of Table 3 into storage locations #31 to storage locations #39 in library table #3 (i.e., sports health database) in sequence, where Arabic numerals 1 to 4 represent the date, 4600, 4093, etc. represent the number of steps, 16, 8, etc. represent the duration of medium and high intensity exercise (minutes), and 136, 113, etc. represent the calories consumed by the activity (kcal). In this way, the monthly view of sports health can display the exercise information of each day in the sports health monthly view based on the written data and the mapping relationship for users to view.

[0091] Table 3: Example of mapping relationship between sports health controls and storage locations

[0092]

[0093] By comparing Tables 1 to 3 above, it can be found that no matter it is calendar, weather or sports health, they all have 9 controls corresponding to the date, namely control #11 to control #19, control #21 to control #29, control #31 to control #39, and each of the above controls corresponds to the storage location in different library tables. The difference is that different applications store different data in the corresponding storage location. The above characteristics enable business data between different applications to be exchanged and shared in some cases.

[0094] For example, in recent years, the calendar's month view can display weather, step count and other data in addition to regular information such as dates and holidays, making the calendar's functions increasingly powerful and its playability gradually enhanced. Figure 4 This is a diagram showing the weather data in the month view of the calendar. Figure 4 As shown, the month view of the calendar can also display weather data, so that when the user edits or views the schedule, it can be more convenient for the user to plan or adjust the schedule. In addition, a schedule can be created to remind the user to bring an umbrella or add clothes when it rains or the temperature drops sharply.

[0095] The calendar needs to obtain weather data from the weather application's database before it can display it in its own month view. The following describes the process of the calendar obtaining weather data. Figure 5 This is a flowchart of how the calendar obtains weather data from the weather application's database.

[0096] like Figure 5 As shown, when the calendar needs to display weather information, for example, when the relevant button on the month view is touched (opened) by the user, the calendar can pull up the weather application, and then request data from the weather database (such as the aforementioned library table #2) through the weather Provider class, and the weather Provider class returns the requested weather data to the calendar. At this time, the calendar can refresh the calendar's month view according to the weather data, so that the calendar's month view can display weather information in addition to basic information such as the date, thereby making it convenient for users to arrange their schedules according to the weather.

[0097] Combining the above Figure 3 From the analysis, it can be known that in the current technology, different applications each use their own Provider class to write data to their own database. For example, the calendar uses the calendar's Provider class to write data to the calendar's database (such as the aforementioned library table #1), the weather uses the weather Provider class to write data to the weather database (such as the aforementioned library table #2), and the sports health uses the sports health Provider class to write data to the sports health database (such as the aforementioned library table #3). Because different applications may have different developers, the Provider classes of different applications may have different data writing logics, and the difference in writing logic will further lead to different data formats or specifications written into different databases.

[0098] In this way, after the calendar obtains weather data from the weather database, it needs to first use the data parsing module to parse the weather data into data that it can read and use (for example, convert the data specifications), and then refresh the calendar's month view with the parsed weather data.

[0099] When the calendar needs to display weather information, the calendar developer needs to develop a data parsing module that is compatible with the weather application, and then parse the weather data from the weather database into data that can be read and used by the calendar developer. When the calendar needs to display sports information, the calendar developer also needs to develop a data parsing module that is compatible with sports health, and then parse the sports data from the sports health database into data that can be read and used by the calendar developer.

[0100] In other words, due to the inconsistency of different application data formats, calendar developers need to customize different data formats, that is, develop data parsing modules that are compatible with different application databases. The more databases connected, the more data parsing modules need to be developed. The above reasons make the cost of data acquisition too high, which is disadvantageous to the data source expansion of the calendar.

[0101] In view of the above problems, an embodiment of the present application provides a terminal device, which has a built-in data proxy module. The data proxy module has an open interface, which can be accessed by applications such as calendar, weather, sports and health. The data proxy module can perform data proxy for each accessed application, for example, it can write the business data of each application into its corresponding business database. Since the data proxy module is used to write to the database, the format of the data related to the month view in each database can be the same, that is, the data format of the data related to the month view in different databases can be unified, for example, the data of the aforementioned calendar database, weather database and sports and health database can be unified, or the data format in the aforementioned library table #1, library table #2 and library table #3 can be unified.

[0102] In this way, after the calendar obtains weather data from the weather database and sports data from the sports health database, it can be used directly without parsing, so that the calendar developer does not need to develop data parsing modules that are compatible with the databases of different applications, and can easily obtain weather, sports and other data by using (inheriting) the capabilities of the data proxy module, thereby simplifying the calendar development process and reducing the difficulty and cost of calendar development. The terminal device provided in the embodiment of the present application can reduce the cost of data acquisition and facilitate data source development for applications such as calendars.

[0103] In addition, since calendar, weather, sports and health applications can use the data proxy module to manage their own databases, the data proxy module can be used centrally to perform permission management and data security management, such as proxying the access requests of each application to its own business database, so that each application connected to the data proxy module does not need to develop its own Provider class, thereby simplifying the development process of each application and reducing the difficulty of development. It can also effectively reduce the duplication rate (redundancy) of code, avoid repeated code development, effectively improve application development efficiency, save development labor costs, and shorten the application development cycle.

[0104] The data proxy module in the embodiment of the present application is further introduced below in conjunction with the accompanying drawings. Figure 6 This is a flow diagram of an example of a data proxy module performing data proxy for multiple applications. Figure 6 As shown, the data proxy module can be a software or hardware device built into the terminal device, or can be a combination of software and hardware devices. When the data proxy module is a software, it can be a process or a code module.

[0105] Applications such as calendar, weather, sports health, etc. can access the data proxy module, and the data proxy module can perform data proxy for each accessed application, for example, it can assist the calendar to write calendar data to the calendar database, assist the weather to write weather data to the weather database, and assist sports health to write sports data to the sports health database. When the calendar's monthly view needs to display weather data or sports data, a data request can be sent to the data proxy module to obtain weather data in the weather database (such as library table #2) through the data proxy module, and obtain sports data in the sports health database (such as library table #3) through the data proxy module. After the calendar obtains the above data, it can be used directly without parsing, that is, the calendar month view can be directly refreshed through the built-in refresh logic to display the above data. In other words, this application can simplify the development process of applications such as calendars by pre-setting the data proxy module in the terminal device in advance, reduce the cost of data acquisition, and facilitate data sourcing for applications such as calendars.

[0106] Figure 7 FIG. 1 is another example of a flow chart of a data proxy module performing data proxy for multiple applications. Figure 7 As shown, relative to the aforementioned Figure 6 In the embodiment shown, the data proxy module in this embodiment can actively initiate a refresh of the calendar month view after monitoring (detecting) a data change event in a database table related to the month view (e.g., the aforementioned table #1, table #2, or table #3). At this time, there is no need to start the calendar process, that is, the refresh of the calendar month view does not need to be implemented by the calendar application itself. For example, the calendar month view can be Figure 8 The calendar card shown is located on the negative one screen.

[0107] Specifically, while performing data proxy, the data proxy module can also monitor the library tables related to the month view in the business database. When it detects that data changes have occurred in the relevant library table fields in the calendar database, weather database or sports health database (for example, new data is written or data is updated), the calendar data, weather data or sports data can be obtained from the corresponding database based on the data change. The data proxy module further refreshes the calendar month view with the acquired data based on the preset refresh logic.

[0108] Figure 8 It is a user interface diagram of the negative first screen of an electronic device. Figure 8 As shown, the calendar month view can be a calendar card displayed on the negative one screen. At this time, there is no need to rely on the calendar application itself to refresh the calendar month view, that is, there is no need to additionally pull up the calendar process to achieve the refresh of the calendar month view. While achieving the purpose of saving device energy consumption, it can also achieve efficient and low-latency refresh of the calendar month view.

[0109] Based on the foregoing content, the terminal device provided by the embodiment of the present application is further introduced below in conjunction with the accompanying drawings. The embodiment of the present application provides a terminal device having the aforementioned data proxy module, and the terminal device can be, for example, a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, a personal computer (PC), a netbook, a personal digital assistant (PDA), etc., or can be other devices or devices capable of displaying an interface. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.

[0110] For example, Fig. 9 1 is a schematic diagram of the structure of a terminal device 100 provided in an embodiment of the present application. The terminal device 100 may include a processor 110, an internal memory 120, an antenna 1, an antenna 2, a mobile communication module 130, a wireless communication module 140, a sensor module and a display screen 150. The sensor module may include a touch sensor 161 and a pedometer sensor 162, etc.

[0111] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal 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.

[0112] 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 memory, 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.

[0113] The controller may be the nerve center and command center of the terminal device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0114] 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.

[0115] The internal memory 120 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the terminal device 100 by running the instructions stored in the internal memory 120. The internal memory 120 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), and the like. In addition, the internal memory 120 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), and the like.

[0116] In the embodiment of the present application, the program storage area can store (codes of) applications with a month view, such as calendar, weather, and sports health. The data storage area can store data created during the use of the terminal device 100 (such as audio data, phone book, etc.). In the embodiment of the present application, the data storage area can store business data of applications such as calendar, weather, and sports health, for example, data related to the month view.

[0117] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 130, the wireless communication module 140, the modem processor and the baseband processor.

[0118] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 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.

[0119] The mobile communication module 130 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 130 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 130 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 130 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 130 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 130 can be set in the same device as at least some of the modules of the processor 110.

[0120] The modulation and demodulation processor may include a modulator and a demodulator, wherein the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal, and the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.

[0121] The wireless communication module 140 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 terminal device 100. The wireless communication module 140 can be one or more devices integrating at least one communication processing module. The wireless communication module 140 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 140 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0122] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 130, and the antenna 2 is coupled to the wireless communication module 140, so that the terminal 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. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0123] In an embodiment of the present application, the terminal device 100 can receive weather data from a cloud server with the help of the above-mentioned mobile communication module 130 and / or wireless communication module 140 to display it on the monthly view of the weather, or on the monthly view of other applications such as a calendar.

[0124] The terminal device 100 implements the display function through a GPU, a display screen 150, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 150 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, which execute program instructions to generate or change display information.

[0125] The display screen 150 is used to display images, videos, etc. The display screen 150 includes a display panel. The display panel can be a liquid crystal display (LCD), 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), Miniled, MicroLED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 150.

[0126] The touch sensor 161 is also called a "touch panel". The touch sensor 161 can be arranged on the display screen 150, and the touch sensor 161 and the display screen 150 form a touch screen, also called a "touch screen". The touch sensor 161 is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 150. In other embodiments, the touch sensor 161 can also be arranged on the surface of the terminal device 100, which is different from the position of the display screen 150.

[0127] In the embodiment of the present application, the display screen 150 is used to display the user interface UI of the system or application, for example, it can display the monthly view of the calendar, weather, sports and health applications, etc. The touch sensor 161 can realize the interaction with the user, for example, receiving the user's touch command to operate or control the UI controls on the user interface.

[0128] The pedometer sensor 162 is used to obtain the user's step count and other motion data. For example, the pedometer sensor 162 can be a pedometer or an acceleration sensor, but is not limited thereto. The motion data obtained by the pedometer sensor 162 can be used to refresh the monthly view of the sports health or calendar.

[0129] The software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of a layered architecture as an example to exemplify the software structure of the terminal device 100.

[0130] Fig.10 It is a software structure block diagram of an example of the terminal device 100 according to an embodiment of the present application.

[0131] like Fig.10 As shown, the software system using a layered architecture is divided into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software system can be divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android Runtime) and the system library, and the kernel layer.

[0132] The application layer may include applications such as camera, gallery, calendar, weather, sports health, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0133] 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 may include some predefined functions.

[0134] For example, the application framework layer includes a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the aforementioned data proxy module.

[0135] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, and capture the screen.

[0136] Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, and phone books.

[0137] The view system includes visual controls, such as controls for displaying text and controls for displaying images. 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.

[0138] The phone manager is used to provide communication functions of the device, such as management of call status (connected or hung up).

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

[0140] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used for download completion notifications and message reminders. The notification manager can also manage notifications that appear in the system's top status bar in the form of icons or scrolling text, such as notifications from applications running in the background. The notification manager can also manage notifications that appear on the screen in the form of dialog windows, such as prompting text messages in the status bar, emitting reminder sounds, vibrating electronic devices, and flashing indicator lights.

[0141] The data proxy module is used to provide data proxy services for multiple applications such as calendar, weather, sports and health, and to centrally or uniformly manage permissions and data security for the databases of each application. For example, it can proxy each application's access request to its own business database, which can be, for example, a data write request, a data update request, a data delete request, and a data acquisition (read or copy) request. The data proxy module can assist each application in writing business data into its own database. For data related to the month view, such as data used to refresh the month view, the format of the above data in different databases is the same.

[0142] For example, the data formats (specifications) of the calendar data, weather data, and sports data related to the month view written by the data proxy module in different databases are the same, that is, the data formats of the calendar data written by the data proxy module in library table #1, the weather data written in library table #2, and the sports data written in library table #3 are the same. In this way, after the calendar obtains weather data or sports health data through the data proxy module, it can be directly read and used without parsing, so that the calendar developer does not need to develop the corresponding data parsing module, thereby reducing the data acquisition cost of the calendar and facilitating the data source expansion of the calendar.

[0143] Furthermore, after listening to (monitoring) data change events in the database table related to the month view in the database, the data proxy module can also obtain calendar data, weather data or sports data from the corresponding database based on the data change, and the data proxy module further refreshes the calendar month view (such as the calendar card on the negative one screen) through the obtained data based on the preset refresh logic. The above-mentioned refresh of the calendar month view does not require the process of pulling up the calendar, that is, the refresh of the calendar month view does not need to be implemented by the calendar application itself, and while reducing the operating power consumption of the terminal device 100, it can also achieve low-latency refresh of the calendar month view.

[0144] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.

[0145] 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.

[0146] The application layer and the application framework layer run in the 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.

[0147] The system library may include multiple functional modules, such as: surface manager, media library, 3D graphics processing library (such as open graphics library for embedded systems (OpenGL ES)) and 2D graphics engine (such as skia graphics library (SGL)).

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

[0149] The media library supports playback and recording of multiple audio formats, playback and recording of multiple video formats, and still image files. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, moving picture experts group audio layer III (MP3), advanced audio coding (AAC), adaptive multi-rate (AMR), joint photographic experts group (JPG) and portable network graphics (PNG).

[0150] The 3D graphics processing library can be used to implement 3D graphics drawing, image rendering, compositing and layer processing.

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

[0152] The kernel layer is the layer between hardware and software. The kernel layer can include driver modules such as display driver, camera driver, audio driver and sensor driver.

[0153] The foregoing Fig. 9 and Fig.10The hardware structure and software system of the terminal device 100 are introduced respectively. Fig. 9 and Fig.10 The relevant contents of the terminal device 100 and the data proxy module are introduced in combination with the above-mentioned relevant introduction of the data proxy module, and the technical problems proposed in this application are analyzed and solved in detail below. That is, the contents related to the terminal device 100 and the data proxy module are introduced in detail.

[0154] Fig.11 FIG. 1 is a software structure diagram of another example of the terminal device 100 of the embodiment of the present application. Fig.11 As shown, the terminal device 100 provided in the embodiment of the present application also includes a data proxy module with an open interface. The data proxy module is a basic capability of the software system of the terminal device 100, which is used for access by the application installed on the terminal device 100 and provides data proxy services to the accessed application. The data proxy module is located between the application and the business database, and is used to proxy the application's access request to the business database. For example, the data proxy module first receives the access request from the application, and forwards the access request to the corresponding business database, and finally returns the access result to the application. The access request can be, for example, a data write request, a data update request, a data delete request, and a data acquisition (read or copy) request, but is not limited thereto.

[0155] Specifically, the data proxy module is used to access multiple applications installed on the terminal device 100 so that the multiple applications can write business data into their own business databases. The multiple applications include a first application and a second application, and the business databases corresponding to the first application and the second application are the first database and the second database respectively.

[0156] The data proxy module can provide a data proxy service for the first application, that is, it is used to proxy the first application's access request to the first database. For example, the data proxy module can convert the business data of the first application (such as Fig.11 The data proxy module can also provide a data proxy service for the second application, that is, it is used to proxy the access request of the second application to the second database. For example, the data proxy module can write the business data of the second application (such as the second data) into the second database.

[0157] Optionally, the multiple applications may include platform applications and / or third-party applications. For example, the first application may be a platform application or a third-party application, and the second application may be a platform application or a third-party application. The first application and / or the second application may be pre-installed on the terminal device 100 before the device leaves the factory, or may be downloaded and installed on the terminal device 100 by the user from the application market after the device is sold. During the installation process of the first application and the second application, the data proxy module can be automatically connected so that the data proxy module can provide data proxy services for the first application and the second application.

[0158] Fig.11 Only two applications accessing the data proxy module are shown, that is, only the first application and the second application are shown. In fact, the data proxy module can be accessed by a larger number of applications and can provide data proxy services for a larger number of applications. For example, during use, a user can download a third application (not shown in the figure) from the application market, and the third application can automatically access the data proxy module during the installation process, so that the data proxy module can proxy the third application's access request to its own business database (referred to as the third database), such as writing the business database of the third application into the third database.

[0159] Furthermore, the data proxy module is also used to obtain the second data in the second database to refresh the first user interface of the first application program through the second data. For example, the first user interface can be displayed or opened according to the second data, or the first user interface currently displayed or opened can be refreshed (or updated) according to the second data.

[0160] Specifically, the first application has a first user interface, and the first user interface needs to use the relevant business data of the second application, that is, it needs to use the second data in the second database to display or refresh the view. Here, the first user interface can be any view that needs to be refreshed or displayed with the help of data from other applications (such as the second application). For example, the first user interface can be the aforementioned month view, but is not limited to this. The data proxy module can obtain the second data to refresh the first user interface of the first application through the second data, for example, the second data can be displayed on the first user interface.

[0161] Optionally, the first application and the second application may both be applications with a month view, the first user interface is the month view of the first application, and the second user interface is the month view of the second application. The first data may be data related to the first user interface, for example, the first data can be used to refresh or display the first user interface; the second data may be data related to the second user interface, for example, the second data can be used to refresh or display the second user interface. At this time, the data proxy module can obtain the second data, so that the month view of the first application can be refreshed by the second data, that is, the first user interface is refreshed, so that the first data can be displayed on the first user interface while the second data can also be displayed.

[0162] For example, the first application may be a calendar, the first user interface is a monthly view of the calendar, and the first data is calendar data. The second application may be an application such as weather, sports health, or conference, the second user interface is a monthly view of weather, sports health, or conference, and the second data may be weather data, sports data, or conference data. The data proxy module may obtain the above data and refresh the monthly view of the calendar according to the obtained data, for example, displaying weather data, sports data, or conference data on the monthly view of the calendar.

[0163] For another example, the first application may be a theme or wallpaper program, the first user interface may be a desktop wallpaper, a screen saver wallpaper or an off-screen wallpaper, the second application may be weather, and the second data may be weather data. The data proxy module obtains weather data and refreshes any of the above wallpapers according to the weather data. Optionally, different weather conditions may correspond to different wallpapers, for example, the wallpaper corresponding to a sunny day has the sun, blue sky and white clouds, while the wallpaper corresponding to a rainy day has dark clouds and raindrops, and any of the above types of wallpapers may be refreshed (selected) according to weather data. Optionally, the above wallpaper may be a dynamic wallpaper, which displays a specific outdoor scene (such as a lawn or a green hill). On this basis, the dynamic wallpaper may display the weather conditions in real time according to the weather data, for example, the sun and blue sky and white clouds are displayed on the wallpaper on a sunny day, and the white clouds may float; a dynamic rainy scene is displayed on the wallpaper on a rainy day.

[0164] For another example, the first user interface may be the desktop of the electronic device (e.g., the interface of the negative first screen or the main screen), the second application may be weather, and the second data is weather data. The data proxy module obtains weather data, and updates weather-related cards or icons on the desktop according to the weather data. Alternatively, the second application may be sports health, and the second data is sports data (e.g., step count data). The data proxy module obtains sports data, and updates sports-related cards or icons on the desktop according to the sports data.

[0165] It is worth mentioning that the second application in the embodiment of the present application can be one application or (includes) multiple applications, which is not limited in the present application. For example, the second application can be one application, such as weather, sports health or meeting, in which case the first user interface can be refreshed according to weather data, sports data or meeting data. The second application can also be (includes) multiple applications, in which case the first user interface can be refreshed together by multiple second data corresponding to the multiple applications. For example, the second application can include weather and sports health, in which case the first user interface can be refreshed according to weather data and sports data.

[0166] Optionally, "the data proxy module obtains the second data, wherein the second data is used to refresh the first user interface of the first application". The specific implementation method of the refresh may be to refresh the first user interface by the first application itself, or to refresh the first user interface by the data proxy module. This application does not limit this. The following will introduce these two refresh methods in detail. In addition, the acquisition of the second data may be to obtain the second data at the request of the first application, or the data proxy module may actively obtain the second data in response to the monitored changes in the database. This application does not limit this either.

[0167] The above two acquisition methods and two refresh methods can be combined arbitrarily, that is, four situations can be combined. The first situation is that the data proxy module obtains the second data at the request of the first application, and provides the second data to the first application, and the first application refreshes the first user interface according to the second data. The second situation is that the data proxy module obtains the second data at the request of the first application, and the data proxy module directly refreshes the first user interface according to the second data. The third situation is that the data proxy module actively obtains the second data in response to the monitored changes in the database, and provides the second data to the first application (starting the process of the first application), and the first application refreshes the first user interface according to the second data. The fourth situation is that the data proxy module actively obtains the second data in response to the monitored changes in the database, and the data proxy module directly refreshes the first user interface according to the second data (without starting the process of the first application).

[0168] Optionally, the first user interface may include one or more controls, which may be, for example, UI controls. Refreshing the first user interface using the second data may be refreshing one or more controls on the first user interface using the second data.

[0169] Optionally, the second data corresponds to at least one control on the second user interface, and the at least one control on the second user interface can be refreshed according to the second data. In addition, the second data also corresponds to at least one control on the first user interface, and the at least one control on the first user interface has a corresponding relationship with the at least one control on the second user interface (for example, they can correspond one to one). For example, two controls on different interfaces can correspond to the same date. In this case, the at least one control on the first user interface can be refreshed by the second data.

[0170] For example, the second data is "cloudy, 22-33°C", which corresponds to the control for September 1 on the weather month view (e.g., control #21 in the aforementioned Table 2). Therefore, the control corresponding to September 1 on the calendar month view (e.g., control #11 in the aforementioned Table 1) can be refreshed by the second data, and the control for September 1 on the weather month view (control #21) and the control for September 1 on the calendar month view (control #11) can be regarded as having a corresponding relationship.

[0171] The terminal device 100 provided in the embodiment of the present application is built with a data proxy module. As the basic capability of the software system of the terminal device 100, the data proxy module has an open interface, which can be accessed by multiple applications such as the first application and the second application. The data proxy module can perform data proxy for each accessed application, and can write the business data of each application into its corresponding business database. For example, the business data (such as the first data) of the first application can be written into the first database, and the business data (such as the second data) of the second application can be written into the second database. Since the data proxy module is used to write to the database, the format of the first data and the second data can be the same, that is, the data format of the relevant data in different databases can be unified. After the data proxy module obtains the second data from the second database, the first user interface of the first application can be refreshed directly through the second data without performing data parsing, thereby making it possible for the developer of the first application to develop a data parsing module that is compatible with the second database, and the second data can be easily obtained by using (inheriting) the capabilities of the data proxy module, thereby simplifying the development process of the first application and reducing the development difficulty and development cost of the first application. The terminal device 100 provided in the embodiment of the present application can reduce the cost of data acquisition and facilitate the first application to expand the data source. The data proxy module provided in the embodiment of the present application can realize the integration and intercommunication between multiple application data, and provide users with a complete ecological closed-loop service based on the data of different applications in the terminal and mobilizing the characteristic capabilities of different applications.

[0172] In addition, since the first application and the second application can use the data proxy module to manage their own databases, the data proxy module can be used to centrally perform permission management and data security management, such as proxying the access requests of each application to its own business database, so that each application connected to the data proxy module does not need to develop its own Provider class, thereby simplifying the development process of each application and reducing the difficulty of development. It can also effectively reduce the code duplication rate (redundancy), avoid repeated code development, effectively improve application development efficiency, save development labor costs, and shorten the application development cycle.

[0173] Combine the following Fig.11 The technical solution provided in the embodiment of the present application is further introduced. Fig.11 As shown, in the embodiment of the present application, the terminal device includes a first application, a second application, a first database, a second database, and the aforementioned data proxy module, and specifically can perform the following action interaction process:

[0174] Step ①, the data proxy module receives a data request for second data from the first application.

[0175] Step ②, in response to the data request of the first application, the data proxy module obtains the second data.

[0176] Step ③: The data proxy module provides the second data to the first application, so that the first application can refresh the first user interface through the second data.

[0177] Step ④: The first application refreshes the first user interface according to the second data in combination with its own refresh logic.

[0178] Specifically, when the first user interface of the first application needs to display the second data or needs to refresh the interface through the second data, for example, the first user interface of the first application is opened by the user for the first time, or the relevant virtual button on the first user interface is used to touch. At this time, the first application can send a data request to the data proxy module, and the data request is used to request the second data in the second database. After receiving the data request, the data proxy module obtains the second data from the second database and returns the second data to the first application. After the first application receives the second data, it can refresh the first user interface according to the preset refresh logic. For example, the control corresponding to the second data can be first determined, and then the corresponding control on the first user interface can be refreshed through the second data, for example, the second data can be displayed through the control.

[0179] Alternatively, if Fig.11 As shown, the data proxy module is also used to:

[0180] Step ⑤, writing the second data into the first database to facilitate the first application to refresh the first user interface based on the second data.

[0181] That is to say, step ⑤ can occur before the aforementioned step ④. After the second data is written into the first database by the data proxy module, the first application can refresh the first user interface based on the preset refresh logic. For example, in combination with the relevant contents of the aforementioned Tables 1-3, after the second data is written into a storage location in the first database, since the interface between the storage location and the interface user interface control is pre-customized, the control corresponding to the storage location can be directly refreshed through the second data, that is, the control on the interface is refreshed based on the preset mapping relationship between the storage location and the control.

[0182] Optionally, when the second data is written into the first database by the data proxy module, the first user interface may not be opened by the user, and when the user opens the first user interface in subsequent use, the first user interface can be refreshed according to the second data.

[0183] Optionally, in other implementations, after acquiring the second data, the data proxy module may directly refresh the first user interface without storing the second data in the first database.

[0184] Optionally, in other implementations, after acquiring the second data, the data proxy module may directly refresh the first user interface through the data proxy module without going through the first application program.

[0185] Specifically, the data proxy module can be built-in with refresh logic in advance, and after the data proxy module obtains the second data, the data proxy module directly refreshes the first user interface. Through the above settings, the refresh of the first user interface of the first application does not need to pull up the process of the first application, that is, the refresh of the first user interface does not need to be implemented by the first application itself, while reducing the operating power consumption of the terminal device 100, it can also achieve low-latency refresh of the first user interface.

[0186] The following will further introduce how the data proxy module refreshes the first user interface in conjunction with specific embodiments. Fig.12 FIG. 1 is a software structure diagram of another example of the terminal device 100 of the embodiment of the present application. Fig.12 As shown, the terminal device 100 provided in the embodiment of the present application includes a data proxy module with an open interface, and the data proxy module is used for access by applications installed on the terminal device 100 and provides data proxy services for the accessed applications.

[0187] The data proxy module is used to access multiple applications installed on the terminal device 100 so that the multiple applications can write business data into their own business databases. The multiple applications include a first application and a second application, and the business databases corresponding to the first application and the second application are the first database and the second database respectively.

[0188] The data proxy module can provide a data proxy service for the first application, that is, it is used to proxy the first application's access request to the first database. For example, the data proxy module can write the business data of the first application (such as the first data) into the first database. The data proxy module can also provide a data proxy service for the second application, that is, it is used to proxy the second application's access request to the second database. For example, the data proxy module can write the business data of the second application (such as the second data) into the second database.

[0189] The first application has a first user interface, and the second application has a second user interface. The first user interface and the second user interface include one or more corresponding controls (this application uses multiple controls as examples for illustration). For example, the first user interface (such as a monthly view of a calendar) and the second user interface (such as a monthly view of weather) are both monthly views of September. At this time, the first user interface and the second user interface each have 30 controls, and the 30 controls on the first user interface correspond one-to-one to the 30 controls on the second user interface, and correspond one-to-one to September 1-September 30.

[0190] In the process of the first application and the second application accessing the data proxy module for the first time (for example, the application installation process), the first application and the second application can initiate a registration process to the data proxy module, for example, by registering the ID of the corresponding control, the application information where the control is located, the library table information associated with the control (for example, the aforementioned library table #1, library table #2, and library table #3), the mapping relationship between the control and the storage location in the library table, and other information in the background service of the data proxy module.

[0191] Among them, the mapping relationship between the registered control and the storage location in the library table is to facilitate the data proxy module to perform data proxy work, such as data writing and acquisition operations. After the data proxy module receives data from the first application or the second application, the data displayed by the control can be written to the corresponding storage location according to the mapping relationship. For example, after the data proxy module receives the first data from the first application that needs to be displayed by control #11, the first data can be stored in the storage location #11 corresponding to control #11 in the library table #1 of the first database. When the data proxy module receives the second data from the second application that needs to be displayed by control #21, the second data can be stored in the storage location #21 corresponding to control #21 in the library table #2 of the second database.

[0192] Here, after receiving the registration information of the second application to the data proxy module, the data proxy module can obtain (determine) the mapping relationship between the control and the storage location in the second database according to the registration information. For example, the mapping relationship can be actively generated by the data proxy module for the second application based on the registration information, or it can be obtained by the second application itself through configuration (i.e., the registration information of the second application includes relevant configuration information, or includes the mapping relationship), but is not limited thereto.

[0193] Similarly, after receiving the registration information of the first application or any other application for the data proxy module, the data proxy module can obtain the mapping relationship between the control and the storage location in the first database according to the registration information. For example, the mapping relationship can be actively generated by the data proxy module for the first application based on the registration information, or it can be obtained by the first application through its own configuration (i.e., the registration information of the first application includes relevant configuration information, or includes the mapping relationship).

[0194] Table 4 is an example of the mapping relationship between controls and storage locations in multiple databases. Among them, the first column represents the date, controls #11 to #19 in the second column are controls on the first user interface, and controls #21 to #29 in the third column are controls on the second user interface. Table 4 can correspond to the aforementioned Tables 1 to 3. Storage locations #11 to #19 in the fourth column are 9 storage locations in the library table #1 of the first database, and correspond one-to-one with controls #11 to #19 (that is, one-to-one with controls #21 to #29 and dates from September 1st to 9th). Storage locations #21 to #29 in the fifth column are 9 storage locations in the library table #2 of the second database, and correspond one-to-one with controls #21 to #29 (that is, one-to-one with controls #11 to #19 and dates from September 1st to 9th). As shown in Table 4, the first user interface and the second user interface each have 9 controls, and the 9 controls on the two interfaces correspond one to one. For example, the 9 controls may be controls corresponding one to one between September 1 and September 9 in the month view. The difference is that the corresponding pair of controls display different data (content) on different user interfaces. For example, control #11 displays the first data (calendar data) on the first user interface, and control #21 displays the second data (weather data) on the second user interface.

[0195] It is worth mentioning that the table shown in the specification of this application is only a way to implement the mapping relationship, and does not constitute a specific limitation on the mapping relationship. In a specific implementation, the mapping relationship can be implemented by any matrix, code, etc., that is, such a table may not actually exist in a specific implementation. This application uses a table to illustrate the mapping relationship, and one of the purposes is to improve the readability of the application document and facilitate the understanding of the technical solution of this application.

[0196] Table 4: Example of mapping between controls and storage locations in multiple databases

[0197]

[0198] Furthermore, if Fig.12 As shown, in the embodiment of the present application, the data proxy module is specifically used for:

[0199] Step ①, the data proxy module monitors the second database, for example, monitors the preset library table fields in the database.

[0200] Step ②, in response to the monitored data change of the second database, the data proxy module obtains the second data.

[0201] Step ③, the data proxy module refreshes the first user interface of the first application according to the second data.

[0202] Specifically, in the process of providing data proxy for the first application and the second application, the data proxy module can also monitor the database related to the first user interface in the second database, that is, monitor the second database, for example, the preset library table field (for example, library table #2) of the second database can be monitored, and the preset library table field can be obtained by registering in the data proxy module background service in the aforementioned registration process. When it is monitored that the second database or the preset library table field has a data change, the second data can be obtained based on the data change. For example, the second data can be the newly written data in the second database or the preset library table field, or the changed data. After obtaining the second data, the data proxy module can refresh the first user interface of the first application according to the second data.

[0203] Alternatively, if Fig.12 In step ④, after acquiring the second data, the data proxy module can also refresh the second user interface of the second application according to the second data.

[0204] Optionally, the data proxy module can also monitor the first database or a preset library table field therein, and in response to the monitored data changes in the first database or the preset library table field, the data proxy module obtains the first data and refreshes the first user interface based on the first data.

[0205] The data proxy module provided in the embodiment of the present application can also monitor the second database or the preset library table field therein during the data proxy process. When it is monitored that the second database or the preset library table has a data change, it can actively obtain the second data to initiate a refresh of the first user interface, so that the refresh of the first user interface is more timely and efficient, and the user's experience of the first application is improved. Furthermore, after obtaining the second data, the data proxy module can refresh the first user interface according to the second data, so that the refresh of the first user interface does not need to pull up the process of the first application, that is, the refresh of the first user interface does not need to be implemented by the first application itself, while reducing the operating power consumption of the terminal device 100, it can also achieve efficient and low-latency refresh of the first user interface.

[0206] Further, in terms of refreshing the first user interface according to the second data, the data proxy module is specifically used to:

[0207] The data proxy module determines at least one control corresponding to the storage location of the second data according to a preset mapping relationship, where the mapping relationship is used to indicate the corresponding relationship between the control on the first interface and the storage location in the second database.

[0208] The data proxy module refreshes the at least one control on the first user interface according to the second data.

[0209] Specifically, after the data proxy module obtains the second data, it first determines which one or more controls on the first user interface the second data corresponds to, for example, determines which one or more controls on the first user interface the second data is to be refreshed, that is, determines which (which) controls are required to display the second data. Taking into account specific application scenarios such as the month view, the second data is displayed on a certain (certain) control of the second application, and can also be displayed by the corresponding control on the first user interface. Therefore, firstly, at least one control on the first user interface corresponding to the storage location of the second data can be determined from the preset mapping relationship, and the determined at least one control is the control for displaying the second data. After that, the data proxy module can display the second data through the at least one control on the first user interface, that is, refresh the view of the at least one control and refresh the first user interface. The above refresh logic is simple, efficient, and reliable, and can realize automatic refresh of the first user interface.

[0210] As an example, the data proxy module can monitor the library table #2 in the second database in Table 4, or it can monitor the entire second database. After monitoring that a data change occurs in library table #2, such as new data being written or modified, such as writing the second data to storage location #21, the data proxy module can obtain the second data based on the data change. Then, control #11 is determined based on the storage location of the second data (storage location #21) and the mapping relationship shown in Table 4, and then control #11 on the first user interface can be refreshed based on the second data, that is, the second data is displayed on control #11 to achieve a refresh of the first user interface.

[0211] As a more specific example, in conjunction with Table 4, the first application is a calendar, the second application is a weather, the first user interface is a calendar month view, and the second user interface is a weather month view. Controls #11-controls #19 in Table 4 are controls corresponding to September 1 to September 9 on the first user interface, and controls #21-controls #29 in Table 4 are controls corresponding to September 1 to September 9 on the second user interface. When the data proxy module monitors that the data in the library table #2 has changed, for example, the new weather data "cloudy, 22-33°C" (i.e., the second data) is written (updated) to the storage location #21, the data proxy module can obtain the weather data based on the data change. Then, according to the storage location of the weather data (storage location #21) and the mapping relationship shown in Table 4, the control #11 (i.e., the control corresponding to September 1 in the first user interface) is determined, and then the control #11 on the first user interface can be refreshed according to the weather data, that is, "cloudy, 22-33°C" is displayed on the control #11 to achieve the refresh of the first user interface.

[0212] In conjunction with the above-mentioned terminal device 100, the embodiment of the present application further provides a method for acquiring data, which can be applied to the terminal device 100 provided in the above-mentioned embodiment, or to the chip or chip system in the terminal device 100. The following is a method embodiment provided by the present application, which corresponds to the above-mentioned product (device) embodiment.

[0213] Fig.13 It is a flowchart of a method 300 for acquiring data provided in an embodiment of the present application. The acquisition method can be applied to the aforementioned terminal device 100, which includes a data proxy module. The data proxy module is used to access an application installed on the terminal device 100 so that the application can write business data into its own business database. The application includes a first application and a second application. The business databases corresponding to the first application and the second application are a first database and a second database, respectively. For example, the data proxy module is used to write the data of the first application into the first database, and write the data of the second application into the second database. Fig.13 As shown, and combined Fig.11 The acquisition method 300 includes the following steps:

[0214] Step 310, the data proxy module writes the second data from the second application into the second database;

[0215] Step 320: The data proxy module obtains second data, wherein the second data is used to refresh the first user interface of the first application.

[0216] Optionally, the first application is a calendar, the first user interface is a month view, and the second application is an application with a month view such as weather, sports health, or conference.

[0217] Fig.14 4 is a flow chart of a method 400 for acquiring data provided in an embodiment of the present application. Fig.14 As shown, and combined Fig.11 The acquisition method 400 includes the following steps:

[0218] Step 410, the data proxy module writes the second data from the second application into the second database;

[0219] Step 420: The data proxy module receives a data request from the first application for the second data;

[0220] Step 430, in response to the data request, the data proxy module obtains the second data;

[0221] Step 440: The data proxy module provides the second data to the first application, so that the first application refreshes the first user interface through the second data.

[0222] Optionally, the acquisition method 400 further includes: the data proxy module writes the second data into the first database.

[0223] Fig.15 5 is a flow chart of a method 500 for acquiring data provided in an embodiment of the present application. Fig.15 As shown, and combined Fig.12 The acquisition method 500 includes the following steps:

[0224] Step 510, the data proxy module writes the second data from the second application into the second database;

[0225] Step 520: the data proxy module monitors the second database, for example, monitors a preset database table field of the second database;

[0226] Step 530: In response to the monitored data change in the second database, the data proxy module obtains the second data.

[0227] Step 540: The data proxy module refreshes the first user interface according to the second data.

[0228] Optionally, the data proxy module refreshes the first user interface according to the second data, including:

[0229] The data proxy module determines at least one control on the first user interface corresponding to the storage location of the second data according to a mapping relationship, where the mapping relationship is used to indicate a corresponding relationship between the control and the storage location in the second database;

[0230] The data proxy module refreshes the at least one control on the first user interface according to the second data.

[0231] Optionally, before the data proxy module determines, according to the mapping relationship, at least one control of the first user interface corresponding to the storage location of the second data, the acquisition method 500 further includes:

[0232] The data proxy module receives registration information of the second application program to the data proxy module;

[0233] The data proxy module obtains the mapping relationship according to the registration information.

[0234] Optionally, the acquisition method 500 further includes: in response to a data request of the first application, the data proxy module acquires the second data.

[0235] Optionally, the acquisition method 500 further includes: the data proxy module refreshing the second user interface of the second application according to the second data.

[0236] Regarding the above Figure 13-Figure 15 For the introduction of the acquisition method 300, the acquisition method 400 and the acquisition method 500 shown, please refer to the description of the corresponding content above, which will not be repeated here.

[0237] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed on an electronic device, the electronic device executes the acquisition method 300, the acquisition method 400 or the acquisition method 500 provided in the foregoing embodiment.

[0238] An embodiment of the present application further provides a computer program product, including: a computer program code, when the computer program code is executed on an electronic device, the electronic device executes the acquisition method 300, the acquisition method 400 or the acquisition method 500 provided in the above-mentioned embodiment.

[0239] The embodiment of the present application further provides an electronic device, including: a memory storing instructions; a processor, when the instructions are executed by the processor, the electronic device executes the acquisition method 300, acquisition method 400 or acquisition method 500 provided in the above embodiment. The electronic device may be, for example, the above terminal device 100.

[0240] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which 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 terminal device, characterized in that: include: A data proxy module, used to write data of a first application into a first database, and write data of a second application into a second database; The data proxy module is further used to obtain second data in the second database, wherein the second data is used to refresh the first user interface of the first application.

2. The terminal device according to claim 1, characterized in that: The data proxy module is further used to refresh the first user interface according to the second data.

3. The terminal device according to claim 2, characterized in that: The data proxy module is specifically used for: Determine at least one control corresponding to the storage location of the second data according to a mapping relationship, wherein the mapping relationship is used to indicate a corresponding relationship between a control and a storage location in the second database; Refresh the at least one control on the first user interface according to the second data.

4. The terminal device according to claim 3, characterized in that: Before determining at least one control corresponding to the storage location of the second data according to the mapping relationship, the data proxy module is further used to: receiving registration information of the second application program to the data proxy module; The mapping relationship is acquired according to the registration information.

5. The terminal device according to any one of claims 2 to 4, characterized in that: The data proxy module is specifically used for: In response to the monitored data change of the second database, the second data is acquired.

6. The terminal device according to any one of claims 2 to 4, characterized in that: The data proxy module is specifically used for: In response to a data request from the first application, the second data is acquired.

7. The terminal device according to claim 1, characterized in that: The data proxy module is also used for: In response to a data request of the first application, acquiring the second data; The second data is provided to the first application, so that the first application refreshes the first user interface according to the second data.

8. The terminal device according to any one of claims 1 to 7, characterized in that: The data proxy module is further used to refresh the second user interface of the second application according to the second data.

9. The terminal device according to any one of claims 1 to 8, characterized in that: The data proxy module is further used to write the second data into the first database.

10. The terminal device according to any one of claims 1 to 9, characterized in that: The first application is a calendar, and the first user interface is a month view.

11. A method for acquiring data, characterized in that: Applied to a terminal device, the terminal device comprises a data proxy module, the data proxy module is used to write data of a first application into a first database, and write data of a second application into a second database; The acquisition method comprises: The data proxy module writes the second data from the second application into the second database; The data proxy module obtains the second data, wherein the second data is used to refresh the first user interface of the first application.

12. The acquisition method according to claim 11, characterized in that: The acquisition method further includes: The data proxy module refreshes the first user interface according to the second data.

13. The acquisition method according to claim 12, characterized in that: The data proxy module refreshes the first user interface according to the second data, including: The data proxy module determines at least one control corresponding to the storage location of the second data according to a mapping relationship, wherein the mapping relationship is used to indicate a corresponding relationship between a control and a storage location in the second database; The data proxy module refreshes the at least one control on the first user interface according to the second data.

14. The acquisition method according to claim 13, characterized in that: Before the data proxy module determines at least one control corresponding to the storage location of the second data according to the mapping relationship, the method further includes: The data proxy module receives registration information of the second application program to the data proxy module; The data proxy module obtains the mapping relationship according to the registration information.

15. The acquisition method according to any one of claims 12 to 14, characterized in that: The data proxy module obtains the second data, including: In response to the monitored data change of the second database, the data proxy module obtains the second data.

16. The acquisition method according to any one of claims 12 to 14, characterized in that: The data proxy module obtains the second data, including: In response to a data request from the first application, the data proxy module obtains the second data.

17. The acquisition method according to claim 11, characterized in that: The data proxy module obtains the second data, including: In response to a data request from the first application, the data proxy module obtains the second data; The acquisition method further includes: The data proxy module provides the second data to the first application, so that the first application refreshes the first user interface through the second data.

18. The acquisition method according to any one of claims 11 to 17, characterized in that: The acquisition method further includes: The data proxy module refreshes the second user interface of the second application according to the second data.

19. The acquisition method according to any one of claims 11 to 18, characterized in that: The acquisition method further includes: The data proxy module writes the second data into the first database.

20. The acquisition method according to any one of claims 11 to 19, characterized in that: The first application is a calendar, and the first user interface is a month view.

21. An electronic device, characterized in that: include: A memory storing instructions; The processor, when the instructions are executed by the processor, causes the electronic device to execute the method as described in any one of claims 11-20.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 11 to 20.