Method, server and client for aggregating and presenting data from different data sources

By using a dual-interface mechanism on both the server and client sides, the problem of dependency on multiple data source interface requests is solved, enabling faster response and reducing data redundancy, thus improving the user experience.

CN116860843BActive Publication Date: 2026-02-03INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310861978.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-13
Publication Date
2026-02-03
Estimated Expiration
2043-07-13

AI Technical Summary

Technical Problem

In existing technologies, API requests that query multiple data sources have dependencies, resulting in excessively long response times, impacting user experience, and potentially causing redundancy in the returned data, which fails to meet business needs.

Method used

A dual-interface mechanism is adopted, consisting of a server and a client. The first type of interface is used to query the cache and the primary data source, while the second type of interface is used to query other data sources, achieving a one-to-one correspondence and merging of data. The client determines the data source based on the cache flag and displays the data within the visible range of the interface.

Benefits of technology

It reduces API request and response time, avoids data redundancy, and improves user experience and API timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116860843B_ABST
    Figure CN116860843B_ABST
Patent Text Reader

Abstract

The application discloses a method for aggregating and displaying data from different data sources, a server and a client, and relates to the field of big data. The method comprises the following steps: when a first type of interface of the server finds that part of aggregated data exists in the cache according to a business application query, the first type of interface queries part of to-be-aggregated data that cannot meet business requirements and does not exist in the cache from a first data source, and returns the part of aggregated data, the part of to-be-aggregated data and a cache flag of each data to a client; a second type of interface queries other part of to-be-aggregated data corresponding to other data sources according to the part of to-be-aggregated data, corresponds and combines the part of to-be-aggregated data with the other part of to-be-aggregated data, obtains aggregated data after combination processing and returns the aggregated data to the client; and the client displays the part of aggregated data existing in the cache and the aggregated data after combination processing to a user. The application can improve the timeliness of interface request and response when aggregating and displaying data from different data sources, and improves user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data technology, and in particular to a method, server, and client for aggregating and displaying data from different data sources. Background Technology

[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.

[0003] When users submit business requests through the client, querying only one data source is insufficient to meet their needs. They must then query one or more other data sources. The server then assembles the results from these multiple data sources before returning the assembled data to the client. The requests to these multiple data sources have dependencies, which slows down the overall response time of the API and negatively impacts the user experience of the client app.

[0004] For example, an existing technical solution uses a single interface to query data from multiple tables. Step 1: Query data source A; Step 2: Use the result from Step 1 as input to request data source B; Step 3: Assemble the results from Step 1 and Step 2 and return them to the client through a backend interface. The drawbacks of this existing solution are: the multiple data source requests within the interface are sequential and dependent, leading to excessively long interface request times; when Step 1 returns a large amount of data, the response time for Step 2 increases significantly; furthermore, due to limitations in mobile screen length and user behavior, users may only see a portion of the returned data, resulting in data redundancy and impacting interface timeliness. Summary of the Invention

[0005] This invention provides a method for aggregating and displaying data from different data sources, thereby improving the timeliness of interface requests and responses when aggregating and displaying data from different data sources. The method is applied to a server, which includes a first type of interface and a second type of interface. The method includes:

[0006] When the first type of interface finds partial aggregated data in the cache based on the user's input business request, it queries the first data source for partial aggregated data that does not exist in the cache and cannot meet the business requirements. It then returns the partial aggregated data, the partial aggregated data, and a cache flag indicating whether each piece of data comes from the cache to the client. The partial aggregated data is aggregated data that meets the business requirements and has already been merged from all data sources. The cache flag indicates whether the current data is aggregated data that has already been merged from all data sources. The business request is sent by the client.

[0007] The second type of interface queries other data sources based on the partial data to be summarized, obtains other partial data to be summarized corresponding to other data sources, merges the partial data to be summarized from the first data source with other partial data to be summarized corresponding to other data sources according to data identifiers, and obtains the merged summary data. The merged summary data is then returned to the client. The partial data to be summarized is the partial data to be summarized within the visible range of the interface sent by the client when it determines from the cache flag that the current data is partial data to be summarized from the first data source. The client displays the partial summary data existing in the cache and the merged summary data to the user.

[0008] This invention provides a method for aggregating and displaying data from different data sources, thereby improving the timeliness of interface requests and responses when aggregating and displaying data from different data sources. This method is applied to a client and includes:

[0009] The user-inputted business request is sent to the server. The server includes a first type of interface and a second type of interface. The first type of interface is used to query, when partial aggregated data is found in the cache based on the business request, the partial aggregated data that does not exist in the cache and cannot meet the business requirements from the first data source, and return the partial aggregated data, the partial aggregated data, and a cache flag indicating whether each data comes from the cache to the client. The partial aggregated data is aggregated data that meets the business requirements and has been merged from all data sources. The cache flag is used to indicate whether the current data is aggregated data that has been merged from all data sources.

[0010] When the cache flag indicates that the current data is part of the data to be summarized retrieved from the first data source, the part of the data to be summarized within the visible range of the interface is sent to the second type of interface on the server. The second type of interface is used to query other data sources based on the part of the data to be summarized, obtain other parts of the data to be summarized corresponding to other data sources, and merge the part of the data to be summarized retrieved from the first data source with other parts of the data to be summarized corresponding to other data sources according to the data identifiers to obtain the merged summary data. The merged summary data is then returned to the client.

[0011] The system displays the cached summary data and the merged summary data to the user.

[0012] This invention provides a server for aggregating and displaying data from different data sources, thereby improving the timeliness of interface requests and responses when aggregating and displaying data from different data sources. The server includes:

[0013] The first type of interface is used to, when querying the cache based on a user-inputted business request and finding that some aggregated data exists in the cache, retrieve the portion of data to be aggregated from the first data source that does not exist in the cache and cannot meet the business requirements. The interface then returns the portion of aggregated data, the portion of data to be aggregated, and a cache flag indicating whether each piece of data comes from the cache to the client. The portion of aggregated data is aggregated data that meets the business requirements and has already been merged from all data sources. The cache flag indicates whether the current data is aggregated data that has already been merged from all data sources. The business request is sent by the client.

[0014] The second type of interface is used to query other data sources based on the partial data to be summarized, obtain other partial data to be summarized corresponding to other data sources, merge the partial data to be summarized from the first data source with other partial data to be summarized corresponding to other data sources according to the data identifier, obtain the merged summary data, and return the merged summary data to the client; the partial data to be summarized is the partial data to be summarized within the visible range of the interface sent by the client when it determines that the current data is partial data to be summarized from the first data source based on the cache flag; the client displays the partial summary data existing in the cache and the merged summary data to the user.

[0015] This invention provides a client for aggregating and displaying data from different data sources, thereby improving the timeliness of interface requests and responses when aggregating and displaying data from different data sources. The client includes:

[0016] The first type of interface request unit is used to send a business application to a first type of interface on the server. The server includes a first type of interface and a second type of interface. The first type of interface is used to query, when it finds that some aggregated data exists in the cache according to the business application, to query from the first data source some data that does not exist in the cache and cannot meet the business requirements, and return the partial aggregated data, the partial data to be aggregated, and a cache flag indicating whether each data comes from the cache to the client. The partial aggregated data is aggregated data that meets the business requirements and has been merged from all data sources. The cache flag is used to indicate whether the current data is aggregated data that has been merged from all data sources.

[0017] The second type of interface request unit is used to send a portion of the data to be summarized within the visible range of the interface to the second type of interface when it is determined from the cache flag that the current data is a portion of the data to be summarized retrieved from the first data source. The second type of interface is used to query other data sources based on the portion of the data to be summarized, obtain other portions of the data to be summarized corresponding to other data sources, merge the portion of the data to be summarized retrieved from the first data source with other portions of the data to be summarized corresponding to other data sources according to the data identifier, obtain the merged summary data, and return the merged summary data to the client.

[0018] The display unit is used to show users the partial summary data existing in the cache and the merged summary data.

[0019] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described method for aggregating and displaying data from different data sources.

[0020] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above for aggregating and displaying data from different data sources.

[0021] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for aggregating and displaying data from different data sources.

[0022] Compared with existing technologies that use a single backend interface to support data from different databases, resulting in low interface request and response times, the beneficial technical effects of the solution provided in this invention, which aggregates and displays data from different data sources, are as follows:

[0023] (1) First, in the prior art, the operation of multiple request data sources of the interface is dependent on each other and is serial, which leads to excessive interface request time. When a lot of data is returned in step one, the response time of step two increases significantly. In order to solve this problem, the solution of summarizing and displaying data from different data sources provided in the embodiments of the present invention includes a first type of interface and a second type of interface on the server side. The first type of interface is used for the remaining data in the first data source that is not cached. The second type of interface is used to query the data in other corresponding data sources according to the first data source and realize the one-to-one correspondence between the data in the first data source and the data in other data sources. It can realize the compatibility of different data table data without a single interface and realize the flexible summarization of data from different data sources to the client for display, reducing the interface request and response time and improving the interface timeliness.

[0024] (2) Secondly, in this embodiment of the invention, the first type of interface is also used to query whether there is some summary data in the cache. If there is summary data in the cache that meets the business requirements and has completed the merging of all data sources, then the summary data can be directly displayed to the client, saving the process of querying the data source and merging the first data source with other data sources, and further improving the timeliness of interface requests and responses.

[0025] (3) Furthermore, in the prior art, due to the limitations of mobile phone screen length and user operation behavior, the user may only see a portion of the data returned by the interface. This results in redundancy in the data returned by the interface and affects the timeliness of the interface. In order to solve this problem, in the solution of summarizing and displaying data from different data sources provided in the embodiments of the present invention, the data requested by the second type of interface is the data within the visible range of the interface, and the returned data does not have redundancy, which further improves the timeliness of the interface.

[0026] In summary, the solution for aggregating and displaying data from different data sources provided in this embodiment of the invention can improve the timeliness of interface requests and responses when aggregating and displaying data from different data sources, thereby enhancing the user experience. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0028] Figure 1 This is a system architecture diagram for aggregating and displaying data from different data sources in an embodiment of the present invention;

[0029] Figure 2 This is a flowchart illustrating a method for aggregating and displaying data from different data sources, applied to the server side in an embodiment of the present invention.

[0030] Figure 3 This is a flowchart illustrating a method for aggregating and displaying data from different data sources applied to a client in an embodiment of the present invention.

[0031] Figure 4 This is a schematic diagram illustrating the process of aggregating and displaying data from different data sources in a system according to an embodiment of the present invention;

[0032] Figure 5 This is a schematic diagram illustrating the principle of predicting data using a linear regression algorithm in an embodiment of the present invention;

[0033] Figure 6This is a schematic diagram of the server structure for aggregating and displaying data from different data sources in an embodiment of the present invention;

[0034] Figure 7 This is a schematic diagram of the structure of a client that aggregates and displays data from different data sources in an embodiment of the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0036] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.

[0037] The inventors discovered a technical problem: existing business functions cannot meet business needs by querying only one data source; it requires querying one or more other data sources (existing data sources or newly added data sources). The server then assembles the query results from multiple data sources and finally returns the assembled data to the client. The requests to multiple data sources in the interface have dependencies, which slows down the overall interface response time and affects the user experience of the client app. It was precisely because of these technical problems that the inventors proposed a solution to aggregate and display data from different data sources on the client side. This solution is described in detail below.

[0038] Figure 1 This is a system architecture diagram for aggregating and displaying data from different data sources in an embodiment of the present invention, such as... Figure 1As shown, the system includes a client 01 and a server 02. During operation: the client 01 receives a service request input by the user and sends it to the server 02; the server 02's first interface 021: when it finds partial aggregated data in the cache based on the user's input service request, it queries the first data source for partial aggregated data that does not exist in the cache and cannot meet the business requirements, and returns the partial aggregated data, the partial aggregated data, and a cache flag indicating whether each piece of data comes from the cache to the client; the partial aggregated data is aggregated data that meets the business requirements and has already been merged from all data sources, and the cache flag is used to indicate whether the current data is aggregated data that has already been merged from all data sources. According to the client 01, when it determines that the current data is a portion of the data to be summarized from the first data source based on the cache flag, it sends a portion of the data to be summarized within the visible range of the interface to the second type of interface on the server. The second type of interface 022 of the server 02 queries other data sources based on the portion of the data to be summarized, obtains other portions of the data to be summarized corresponding to the other data sources, merges the portion of the data to be summarized from the first data source with the other portions of the data to be summarized corresponding to the other data sources according to the data identifiers, obtains the merged summarized data, and returns the merged summarized data to the client. The client 01 displays the cached portion of the summarized data and the merged summarized data to the user. The following is a detailed description of the schemes for summarizing and displaying data from different data sources applied to the server and client in this system.

[0039] Figure 2 This is a flowchart illustrating a method for aggregating and displaying data from different data sources applied to a server in an embodiment of the present invention. The server includes a first type of interface and a second type of interface, such as... Figure 2 As shown, the method includes the following steps:

[0040] Step 201: When the first type of interface finds partial aggregated data in the cache based on the business request, it queries the first data source for partial aggregated data that does not exist in the cache and cannot meet the business requirements. The partial aggregated data, the partial aggregated data, and a cache flag indicating whether each piece of data comes from the cache are returned to the client. The partial aggregated data is aggregated data that meets the business requirements and has already been merged from all data sources. The cache flag indicates whether the current data is aggregated data that has already been merged from all data sources. The business request is sent by the client.

[0041] Step 202: The second type of interface queries other data sources based on the partial data to be summarized, obtains other partial data to be summarized corresponding to other data sources, merges the partial data to be summarized from the first data source with other partial data to be summarized corresponding to other data sources according to the data identifier, and obtains the merged summary data. The merged summary data is returned to the client. The partial data to be summarized is the partial data to be summarized within the visible range of the interface sent by the client when it determines that the current data is partial data to be summarized from the first data source based on the cache flag. The client displays the predicted partial summary data and the merged summary data to the user.

[0042] Compared with existing technologies that use a single backend interface to support data from different databases, resulting in low interface request and response times, the beneficial technical effects of the method for aggregating and displaying data from different data sources provided in this invention are:

[0043] (1) First, in the prior art, the operation of multiple request data sources of the interface is dependent on each other and is serial, which leads to excessive interface request time. When a lot of data is returned in step one, the response time of step two increases significantly. In order to solve this problem, the method for summarizing and displaying data from different data sources provided in the embodiments of the present invention includes a first type of interface and a second type of interface on the server side. The first type of interface is used for the remaining data in the first data source that is not cached. The second type of interface is used to query the data in other corresponding data sources according to the first data source and realize the one-to-one correspondence between the data in the first data source and the data in other data sources. It can realize the compatibility of different data table data without a single interface and realize the flexible summarization of data from different data sources to the client for display, reducing the interface request and response time and improving the interface timeliness.

[0044] (2) Secondly, in this embodiment of the invention, the first type of interface is also used to query whether there is some summary data in the cache. If there is summary data in the cache that meets the business requirements and has completed the merging of all data sources, then the summary data can be directly displayed to the client, saving the process of querying the data source and merging the first data source with other data sources, and further improving the timeliness of interface requests and responses.

[0045] (3) Furthermore, in the prior art, due to the limitation of mobile phone screen length and user operation behavior, the user may only see a portion of the data returned by the interface. This results in redundancy in the data returned by the interface and affects the timeliness of the interface. In order to solve this problem, in the method for summarizing and displaying data from different data sources provided in the embodiments of the present invention, the data requested by the second type of interface is the data within the visible range of the interface, and the returned data does not have redundancy, which further improves the timeliness of the interface.

[0046] In summary, the method for aggregating and displaying data from different data sources provided in this embodiment of the invention can improve the timeliness of interface requests and responses when aggregating and displaying data from different data sources, thereby enhancing the user experience. The method for aggregating and displaying data from different data sources will be described in detail below.

[0047] In one embodiment, the above method for summarizing and displaying data from different data sources may further include, when the first type of interface does not find some summary data in the cache according to the business application, querying the part of the data to be summarized from the first data source that cannot meet the business requirements, and returning the part of the data to be summarized and a cache flag indicating whether each piece of data comes from the cache to the client.

[0048] In practice, if the first type of interface does not find some summary data in the cache, the cache is not considered, and only the data from the first data source (e.g., table A) is returned, thus improving the flexibility of the interface response.

[0049] In one embodiment, the partial summary data existing in the cache may be partial summary data predicted in advance using a linear regression algorithm.

[0050] In practice, some of the aggregated data in the cache is data predicted in advance using a linear regression algorithm. For example, as mentioned in the following embodiment, the data of the 10 bank cards with the most applications predicted by the linear regression algorithm are put into the Redis cache, which further improves the timeliness of the interface response.

[0051] In one embodiment, the method for summarizing and displaying data from different data sources may further include predicting a portion of the summarized data in advance using a linear regression algorithm as follows:

[0052] Obtain the historical dataset corresponding to the business application;

[0053] The historical dataset is divided into a training set and a test set;

[0054] A linear regression algorithm is used to establish a prediction function from features to labels in a dataset; where there is a linear relationship between the features and labels in the dataset, and the labels in the dataset are continuous variables.

[0055] Using the prediction function in the training set, an initial linear regression prediction model is obtained;

[0056] The initial linear regression prediction model is tested using the test set to obtain the final linear regression prediction model;

[0057] The final linear regression prediction model is used to predict the aggregated data from all merged data sources that can meet business needs, and these data are then placed in the cache.

[0058] In practice, the inventors discovered a linear relationship between the features (such as likes and views) in the business application dataset and the tags. Therefore, they proposed to pre-predict some summary data using a linear regression algorithm, which is the data that has been merged from all data sources. This data is then placed in a cache. When the summary data for business applications needs to be displayed, it can be used directly without having to request the second type of interface from the server. This reduces the number of database queries and related merging operations, further improving the interface response time.

[0059] In one embodiment, the method for summarizing and displaying data from different data sources may further include: after a preset time period, re-predicting a portion of the summarized data using a linear regression algorithm and storing it in a cache.

[0060] In specific implementation, after a preset time period, the present invention re-predicts a portion of the aggregated data using a linear regression algorithm and puts it into the cache. For example, as mentioned in the following embodiment, a 7-day period is set, and the data is dynamically adjusted and re-predicted to improve the accuracy of data prediction.

[0061] In one embodiment, the above method for summarizing and displaying data from different data sources may further include: when the first type of interface finds that all the summarized data exists in the cache, it returns all the summarized data and its corresponding cache flag indicating whether it comes from the cache to the client.

[0062] In practice, the first type of interface can retrieve all aggregated data from all data sources that meet business requirements from the cache and return it directly to the client for display, which can improve the timeliness of the interface.

[0063] In one embodiment, the cache can be a Redis cache.

[0064] In practical implementation, Redis (Remote Dictionary Server) is an open-source, ANSI C-based, network-enabled, in-memory or persistent log-structured key-value data source that provides APIs in multiple languages. In this embodiment of the invention, Redis is used as a backend interface cache for providing data services, which can improve the stability of system operation.

[0065] This invention also provides a method for aggregating and displaying data from different data sources on a client-side application, as described in the following embodiments. Since the principle behind this method is similar to that of the method for aggregating and displaying data from different data sources on a client-side application, the implementation of this method can refer to the implementation of the method for aggregating and displaying data from different data sources on a client-side application; repeated details will not be elaborated further.

[0066] Figure 3 This is a flowchart illustrating a method for aggregating and displaying data from different data sources applied to a client in an embodiment of the present invention, as shown below. Figure 3 As shown, the method includes the following steps:

[0067] Step 101: Send the business application to the server; the server includes a first type of interface and a second type of interface. The first type of interface is used to query the partial data to be summarized from the first data source that does not exist in the cache and cannot meet the business requirements when partial summary data exists in the cache according to the business application. The partial summary data, the partial data to be summarized, and a cache flag indicating whether each data comes from the cache are returned to the client. The partial summary data is summary data that meets the business requirements and has been merged from all data sources. The cache flag is used to indicate whether the current data is summary data that has been merged from all data sources.

[0068] Step 102: When it is determined from the cache flag that the current data is part of the data to be summarized queried from the first data source, the part of the data to be summarized within the visible range of the interface is sent to the second type of interface on the server; the second type of interface is used to query other data sources based on the part of the data to be summarized, to obtain other parts of the data to be summarized corresponding to other data sources, and to merge the part of the data to be summarized queried from the first data source with other parts of the data to be summarized corresponding to other data sources according to the data identifiers one by one to obtain the merged summary data, and return the merged summary data to the client;

[0069] Step 103: Display the predicted partial summary data and the merged summary data to the user.

[0070] In one embodiment, the method for summarizing and displaying data from different data sources may further include: when determining from a cache flag that the data within the visible range of the interface is part of the summary data existing in the cache, directly displaying the part of the summary data existing in the cache within the visible range of the interface.

[0071] In practice, when the client determines that the current data is aggregated data from all data sources that has been merged in the cache, it does not request the second type of interface and can directly display it within the visible range of the interface, thereby improving the flexibility of the interface response.

[0072] In one embodiment, the method for summarizing and displaying data from different data sources may further include: after receiving a notification that the user has stopped scrolling the page, and determining, based on the request flag of the second type of interface for the data within the visible range of the interface, that the data within the visible range of the interface needs to request the second type of interface (i.e., isABData is 0), sending a portion of the data to be summarized within the visible range of the interface to the second type of interface on the server; the request flag of the second type of interface is a flag indicating whether the second type of interface needs to be requested during the subsequent data processing of the scrolling page.

[0073] In practice, when a user stops scrolling the page and needs to request the second type of interface, the data within the visible range of the interface is used to request data from other data sources (such as data in table B). Similarly, there will be no interface redundancy problem, further improving the interface response time.

[0074] In one embodiment, the above method for summarizing and displaying data from different data sources may further include: after receiving a notification that the user has stopped scrolling the page, if it is determined that the data within the visible range of the interface does not need to request the second type of interface (i.e., isABData is 1) based on the request flag of the second type of interface for the data within the visible range of the interface, the portion of the summarized data existing in the cache is directly displayed within the visible range of the interface.

[0075] In practice, once the user stops scrolling the page, if it is determined from the flag that there is no need to request the second type of interface, the cached data can be displayed directly, which improves the flexibility of the interface response.

[0076] In one embodiment, the partial summary data present in the cache is partially predicted in advance using a linear regression algorithm.

[0077] In practice, some of the aggregated data in the cache is data predicted in advance using a linear regression algorithm. For example, using a linear regression algorithm to predict the 10 bank card data with the most applications and putting them into the Redis cache can improve the timeliness of the interface.

[0078] In one embodiment, the method for aggregating and displaying data from different data sources may further include: predicting a portion of the aggregated data in advance on the server side using a linear regression algorithm as follows:

[0079] Obtain the historical dataset corresponding to the business application;

[0080] The historical dataset is divided into a training set and a test set;

[0081] A linear regression algorithm is used to establish a prediction function from features to labels in a dataset; where there is a linear relationship between the features and labels in the dataset, and the labels in the dataset are continuous variables.

[0082] Using the prediction function in the training set, an initial linear regression prediction model is obtained;

[0083] The initial linear regression prediction model is tested using the test set to obtain the final linear regression prediction model;

[0084] The final linear regression prediction model is used to predict the aggregated data from all merged data sources that can meet business needs, and these data are then placed in the cache.

[0085] In practice, the inventors discovered a linear relationship between the features (such as likes and views) in the business application dataset and the tags. Therefore, they proposed to pre-predict some summary data using a linear regression algorithm, which is the data that has been merged from all data sources. This data is then placed in a cache. When the summary data for business applications needs to be displayed, it can be used directly without having to request the second type of interface from the server. This reduces the number of database queries and related merging operations, further improving the interface response time.

[0086] In one embodiment, the cache can be a Redis cache.

[0087] In practice, the cache can be a Redis cache, which can improve the stability of system operation.

[0088] In one embodiment, the method for summarizing and displaying data from different data sources may further include: updating the cache flag of the merged summary data to the cache flag corresponding to the summary data from all data sources that has been merged.

[0089] In practice, the cache flag of the merged summary data will be updated to the cache flag corresponding to the summary data that has been merged from all data sources. When the user scrolls to the data with the updated cache flag, there is no need to request the second type of interface; it can be displayed directly.

[0090] To facilitate understanding of how this invention is implemented, the following is combined with... Figure 4 and Figure 5 Let me give an example to illustrate.

[0091] Business Scenario: To query 50 (or more, the following solution description will use 50 data entries) records under a specific username, we need to query data table A (the primary data source). However, a certain field A-1 provided by data table A cannot meet the business requirements (for example, in the banking industry, when applying for a bank card, the business application is called applying for a bank card. For different clients, such as a certain bank's APP and a certain bank's e-life APP, field A-1 (representing the image of the applied bank card) in data table A can meet the display requirements of the bank's APP, but the card image field A-1 cannot meet the display requirements of the bank's e-life APP. Instead, we need to retrieve the card image field B-1 (fields C-1D-1E-1F-1...) from another data table B (or other data tables CDE F... other data sources) based on the primary key field A-0 in table A to display the card image). In other words, we need to query the B-1 field in data table B to match it with each of the 50 data entries in table A before it can be displayed on the client. Due to time constraints, the backend cannot complete the query of 50 data entries in table A and the one-to-one correspondence between these 50 data entries and table B in a single interface, as this would cause excessively long backend interface request times. Therefore, for this business scenario, the backend provides two types of interfaces. Interface type 1 (Type 1 interface) completes the query of Redis cached data and table A, while interface type 2 (Type 2 interface) completes the one-to-one correspondence between table A and table B (and tables C, D, E, F, etc.), and the client completes the compatible summary and display of data from tables A and B.

[0092] This embodiment of the invention also introduces a Redis cache. The Redis cache will predict the 10 types of cards with the most card applications based on the linear regression algorithm (the number is not limited to 10 and can be dynamically adjusted). The summary data of the 10 types of cards with the most predicted applications (the summary data is the summary result of data table A and data table B or more data tables) will be placed in the Redis cache from largest to smallest. Here, we can also set 7 days (dynamically adjusted) as the time to re-predict card application data and update the Redis cache.

[0093] Detailed technical specifications:

[0094] Backend network interface type 1 (first type interface): Query Redis cached data and the remaining data in table A that is not cached in Redis;

[0095] Backend network interface type 2 (second type interface): Implements a one-to-one correspondence between data in table A (first data source) and data in table B (other data sources); retrieves the corresponding data B-1 in table B based on the A-0 field in table A.

[0096] The cached data fields of data table A / data table B in Redis are shown in Table 1 below:

[0097] Data Table A Primary key: A-0 Card design: A-1 Card Title: A-2 Card description: A-3 Card likes: A-4 Card popularity index: A-5 Card rating: A-6 Card forwarding count: A-7 Is it Redis cached data?: isRedis A01 0 A02 0 A03 0 A04 Data Table B Primary key: B-0 Card design: B-1 The join key in table A: B-2 B01 A01 B02 A02 B03 A03 Redis caching Primary key: A-0 Card design: B-1 Card Title: A-2 Card description: A-3 Card likes: A-4 Card popularity index: A-5 Card rating: A-6 Card forwarding count: A-7 Is it Redis cached data?: isRedis A03 1 A01 1

[0098] Table 1

[0099] So if Figure 4 As shown, the detailed process for this business scenario is explained below:

[0100] Step 1: When the client enters the card application page, it prioritizes requesting the first type of backend network interface:

[0101] 1. Check if there is data in the Redis cache. If there is cached data, then API Type 1 directly returns the 10 cached data records and the remaining 40 data records in table A to the client. At this time, API Type 1 also needs to return the isRedis flag for each data record to the client (the flag is used to explain whether the current data has been merged from multiple tables).

[0102] 1.1 If isRedis is 1 (meaning that this data is aggregated data that has been merged from all data sources, i.e., the data to be aggregated is aggregated data that has been merged from all data sources and meets the business requirements), then we set the isABData flag (the request flag for the second type of interface) of this data to 1 (meaning that data within the visible range of the interface does not need to request the second type of interface). For data with isABData of 1, the client will not need to request the second type of backend network interface again during the subsequent data processing process of scrolling up and down the page.

[0103] 1.2 If isRedis is 0 (meaning this data is not the aggregated data that has been merged from all data sources, but is data to be aggregated, i.e., the part of the data that cannot meet the business requirements), then we set the isABData flag of this data to 0 (meaning that the data within the visible range of the interface needs to request the second type of interface). For data with isABData of 0, the client needs to use the data with isABData of 0 as the second type of input parameter of the backend network interface to integrate multiple data tables during the subsequent data processing process of scrolling up and down the page. After the integration of multiple data tables is successful, the isABData flag of the data is set to 1.

[0104] 2. If there is no Redis cached data, then the first type of interface can directly return all the data in table A; at this time, we set the isABData flag of the data to 0; and since this is the first time entering the card application page, we need to use the data with isABData of 0 within the visible range of the page as the input parameter of the second type of backend network interface to integrate multiple data tables. After successfully integrating multiple data tables, we set the isABData flag of the data to 1.

[0105] 3. Regarding which data will be cached in Redis, for example, in this embodiment of the invention, the 10 bank card records with the highest application volume, predicted using a linear regression algorithm (the method of using a linear regression algorithm can preferably be applied on the server side), will be placed in the Redis cache:

[0106] We split the dataset into four datasets:

[0107] Feature training set: (X_train)

[0108] Feature test set: (X_test)

[0109] Label training set (y_train)

[0110] Labeled test set (y_test)

[0111] Because of certain features in this dataset (x mentioned below, for example) Figure 5 The number of "likes" and tags (e.g., y mentioned below) Figure 5 There is an approximately linear relationship between the "number of bank card applications" (i.e., the predicted result) and the actual number of applications. Figure 5 As shown. Furthermore, the labels in this dataset are continuous variables. Based on the above analysis and experience, we choose regression analysis to find a predictive function from features to labels;

[0112] Here we choose the linear regression algorithm for modeling. Since the dataset in this project has 4 features, the linear regression algorithm we choose is as follows:

[0113] y = w1x1 + w2x2 + w3x3 + w4x4 + b;

[0114] Where y represents the label corresponding to the feature, i.e., the predicted result, for example... Figure 5The number of bank card applications in the dataset is represented by x1, x2, x3, and x4, which represent different feature datasets, such as the number of likes, shares, popularity index, and card rating information for each application. w1, w2, w3, and w4 are the weights corresponding to the features of likes, shares, popularity index, and card rating information, respectively. The weight represents the contribution or importance of x to y. The larger the weight, the greater the impact on the value of y. b is the bias, and the final result is a constant.

[0115] Therefore, we calculated the 10 card types with the largest y values ​​and put the data of the 10 bank cards into the Redis cache in descending order of y value.

[0116] Step 2: Scroll up and down on the card application page in the client.

[0117] 1. When a user swipes up on the app's UI and stops swiping, the app queries the data within the visible range of the current screen (e.g., data from the 20th to the 26th). If the isABData flag is 1, then API type 2 does not need to be requested. If the isABData flag is 0, then API type 2 needs to be requested.

[0118] For example, if the isABData of data entries 20-22 is 1 and the isABData of data entries 23-26 is 0, then data entries 23-26 will be used as input parameters to request the second type of interface in the backend to query the field B-1 (for data entries 23-26) in table B. After interface 2 succeeds, the client APP will update the UI display of data entries 23-26 to field B-1 and set the isABData flag of data entries 23-26 to 1.

[0119] 2. Similarly, when the user scrolls down the UI of the app, after the scroll stops, the app queries the data within the visible range of the current screen (e.g., the 10th to the 16th data). It checks whether the isABData of each data is 1. The data with isABData not equal to 1 is used as the input parameter of the backend interface 2 to query the field B-1 in table B. After the interface 2 succeeds, the client app updates the UI to the field B-1 and sets the isABData flag of the data to 1.

[0120] In this way, the backend can be compatible with data from different data tables without using a single interface, while the client can flexibly aggregate data from different data tables and display it on the client side.

[0121] In summary, this invention proposes a method to request data from table B using data visible to the client's naked eye (interface) instead of using a single backend interface to accommodate data from different databases. Furthermore, by using a linear regression algorithm to place the data with the highest predicted request volume into a Redis cache, the interface timeliness is improved. Moreover, the method of requesting data visible to the naked eye on the interface after scrolling stops also saves the number of times the data table is queried.

[0122] This invention also provides a server for aggregating and displaying data from different data sources, as described in the following embodiments. Since the principle behind this server's problem-solving approach is similar to the method for aggregating and displaying data from different data sources applied to a server, the implementation of this server can refer to the implementation of the method for aggregating and displaying data from different data sources applied to a server; repeated details will not be elaborated further.

[0123] Figure 6 This is a schematic diagram of the server structure for aggregating and displaying data from different data sources in an embodiment of the present invention, such as... Figure 6 As shown, the server includes:

[0124] The first type of interface 021 is used to query, when partial aggregated data is found in the cache according to a business request, retrieve partial aggregated data that does not exist in the cache and cannot meet the business requirements from the first data source, and return the partial aggregated data, the partial aggregated data, and a cache flag indicating whether each data comes from the cache to the client; the partial aggregated data is aggregated data that meets the business requirements and has been merged from all data sources, and the cache flag is used to indicate whether the current data is aggregated data that has been merged from all data sources; the business request is sent by the client.

[0125] The second type of interface 022 is used to query other data sources based on the partial data to be summarized, obtain other partial data to be summarized corresponding to other data sources, merge the partial data to be summarized from the first data source with other partial data to be summarized corresponding to other data sources according to the data identifier, obtain the merged summary data, and return the merged summary data to the client; the partial data to be summarized is the partial data to be summarized within the visible range of the interface sent by the client when it determines that the current data is partial data to be summarized from the first data source based on the cache flag; the client displays the predicted partial summary data and the merged summary data to the user.

[0126] In one embodiment, the first type of interface is further configured to query the partial data to be summarized from the first data source that cannot meet the business requirements when no partial summary data is found in the cache according to the business application, and return the partial data to be summarized and a cache flag indicating whether each data comes from the cache to the client.

[0127] In one embodiment, the partial summary data existing in the cache may be partial summary data predicted in advance using a linear regression algorithm.

[0128] In one embodiment, the server that aggregates and displays data from different data sources may further include a creation unit for pre-predicting a portion of the aggregated data using a linear regression algorithm, as follows:

[0129] Obtain the historical dataset corresponding to the business application;

[0130] The historical dataset is divided into a training set and a test set;

[0131] A linear regression algorithm is used to establish a prediction function from features to labels in a dataset; where there is a linear relationship between the features and labels in the dataset, and the labels in the dataset are continuous variables.

[0132] Using the prediction function in the training set, an initial linear regression prediction model is obtained;

[0133] The initial linear regression prediction model is tested using the test set to obtain the final linear regression prediction model;

[0134] The final linear regression prediction model is used to predict the aggregated data from all merged data sources that can meet business needs, and these data are then placed in the cache.

[0135] In one embodiment, the aforementioned establishing unit is further configured to: after a preset time period, re-predict a portion of the summarized data using a linear regression algorithm and place it into the cache.

[0136] In one embodiment, the first type of interface described above is also used to return all the summary data and its corresponding cache flag indicating whether it comes from the cache to the client when all the summary data is found in the cache.

[0137] In one embodiment, the cache can be a Redis cache.

[0138] This invention also provides a client for aggregating and displaying data from different data sources, as described in the following embodiments. Since the principle behind this client's problem-solving is similar to the method for aggregating and displaying data from different data sources applied to a client, the implementation of this client can refer to the implementation of the method for aggregating and displaying data from different data sources applied to a client; repeated details will not be elaborated further.

[0139] Figure 7 This is a schematic diagram of the client structure for aggregating and displaying data from different data sources in an embodiment of the present invention, such as... Figure 7 As shown, the client includes:

[0140] The first type of interface request unit 011 is used to send a business application to a first type of interface on the server. The server includes a first type of interface and a second type of interface. The first type of interface is used to query, when it finds that some aggregated data exists in the cache according to the business application, to query from the first data source some data that does not exist in the cache and cannot meet the business requirements, and return the partial aggregated data, the partial data to be aggregated, and a cache flag indicating whether each data comes from the cache to the client. The partial aggregated data is aggregated data that can meet the business requirements and has been merged from all data sources. The cache flag is used to indicate whether the current data is aggregated data that has been merged from all data sources.

[0141] The second type of interface request unit 012 is used to send a portion of the data to be summarized within the visible range of the interface to the second type of interface when it is determined from the cache flag that the current data is a portion of the data to be summarized retrieved from the first data source. The second type of interface is used to query other data sources based on the portion of the data to be summarized, obtain other portions of the data to be summarized corresponding to other data sources, merge the portion of the data to be summarized retrieved from the first data source with other portions of the data to be summarized corresponding to other data sources according to the data identifier, obtain the merged summary data, and return the merged summary data to the client.

[0142] Display unit 013 is used to display the predicted partial summary data and the merged summary data to the user.

[0143] In one embodiment, the second type of interface request unit is further configured to send the partial summary data existing in the cache to the display unit for direct display within the visible range of the interface when it is determined from the cache flag that the data within the visible range of the interface is partial summary data existing in the cache.

[0144] In one embodiment, the first type of interface request unit is further configured to: after receiving the user's continued page scrolling operation stops, determine, based on the request flag of the second type of interface for data within the visible range of the interface, that data within the visible range of the interface needs to request the second type of interface (i.e., isABData is 0), send part of the data to be summarized within the visible range of the interface to the second type of interface on the server; the request flag of the second type of interface is a flag indicating whether the second type of interface needs to be requested during the subsequent page scrolling data processing.

[0145] In one embodiment, the first type of interface request unit is further configured to: after receiving the user's continued page scrolling operation stops, if it is determined that the data within the visible range of the interface does not need to request the second type of interface (i.e., isABData is 1), send the portion of the aggregated data existing in the cache to the display unit for direct display within the visible range of the interface.

[0146] In one embodiment, the partial summary data present in the cache is partial summary data predicted in advance using a linear regression algorithm.

[0147] In one embodiment, the method for aggregating and displaying data from different data sources may further include: establishing a unit for pre-predicting a portion of the aggregated data on the server side using a linear regression algorithm as follows:

[0148] Obtain the historical dataset corresponding to the business application;

[0149] The historical dataset is divided into a training set and a test set;

[0150] A linear regression algorithm is used to establish a prediction function from features to labels in a dataset; where there is a linear relationship between the features and labels in the dataset, and the labels in the dataset are continuous variables.

[0151] Using the prediction function in the training set, an initial linear regression prediction model is obtained;

[0152] The initial linear regression prediction model is tested using the test set to obtain the final linear regression prediction model;

[0153] The final linear regression prediction model is used to predict the aggregated data from all merged data sources that can meet business needs, and these data are then placed in the cache.

[0154] In one embodiment, the cache can be a Redis cache.

[0155] In one embodiment, the second type of interface request unit described above can also be used to update the cache flag of the merged summary data to the cache flag corresponding to the summary data that has been merged from all data sources.

[0156] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described method for aggregating and displaying data from different data sources.

[0157] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above for aggregating and displaying data from different data sources.

[0158] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for aggregating and displaying data from different data sources.

[0159] Compared with existing technologies that use a single backend interface to support data from different databases, resulting in low interface request and response times, the beneficial technical effects of the solution provided in this invention, which aggregates and displays data from different data sources, are as follows:

[0160] (1) First, in the prior art, the operation of multiple request data sources of the interface is dependent on each other and is serial, which leads to excessive interface request time. When a lot of data is returned in step one, the response time of step two increases significantly. In order to solve this problem, the solution of summarizing and displaying data from different data sources provided in the embodiments of the present invention includes a first type of interface and a second type of interface on the server side. The first type of interface is used for the remaining data in the first data source that is not cached. The second type of interface is used to query the data in other corresponding data sources according to the first data source and realize the one-to-one correspondence between the data in the first data source and the data in other data sources. It can realize the compatibility of different data table data without a single interface and realize the flexible summarization of data from different data sources to the client for display, reducing the interface request and response time and improving the interface timeliness.

[0161] (2) Secondly, in this embodiment of the invention, the first type of interface is also used to query whether there is some summary data in the cache. If there is summary data in the cache that meets the business requirements and has completed the merging of all data sources, then the summary data can be directly displayed to the client, saving the process of querying the data source and merging the first data source with other data sources, and further improving the timeliness of interface requests and responses.

[0162] (3) Furthermore, in the prior art, due to the limitations of mobile phone screen length and user operation behavior, the user may only see a portion of the data returned by the interface. This results in redundancy in the data returned by the interface and affects the timeliness of the interface. In order to solve this problem, in the solution of summarizing and displaying data from different data sources provided in the embodiments of the present invention, the data requested by the second type of interface is the data within the visible range of the interface, and the returned data does not have redundancy, which further improves the timeliness of the interface.

[0163] In summary, the solution for aggregating and displaying data from different data sources provided in this embodiment of the invention can improve the timeliness of interface requests and responses when aggregating and displaying data from different data sources, thereby enhancing the user experience.

[0164] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0165] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0166] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0167] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0168] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for aggregating and displaying data from different data sources, characterized in that, This method is applied to a server, which includes a first type of interface and a second type of interface. The method includes: When the first type of interface finds partial aggregated data in the cache based on the user's input business request, it queries the first data source for partial aggregated data that does not exist in the cache and cannot meet the business requirements. It then returns the partial aggregated data, the partial aggregated data, and a cache flag indicating whether each piece of data comes from the cache to the client. The partial aggregated data is aggregated data that meets the business requirements and has already been merged from all data sources. The cache flag indicates whether the current data is aggregated data that has already been merged from all data sources. The business request is sent by the client. The second type of interface queries other data sources based on the partial data to be summarized, obtains other partial data to be summarized corresponding to the other data sources, merges the partial data to be summarized from the first data source with the other partial data to be summarized corresponding to the other data sources according to the data identifier, and obtains the merged summary data. The merged summary data is then returned to the client. The partial data to be summarized is the partial data to be summarized within the visible range of the interface sent by the client when it determines that the current data is partial data to be summarized from the first data source based on the cache flag. The client displays the partial summary data existing in the cache and the merged summary data to the user. The partial summary data existing in the cache is partial summary data predicted in advance by a linear regression algorithm. The aforementioned pre-predicted summary data using a linear regression algorithm includes: Obtain the historical dataset corresponding to the business application; The historical dataset is divided into a training set and a test set; A linear regression algorithm is used to establish a prediction function from features to labels in the dataset; where there is a linear relationship between the features and labels in the dataset, and the labels in the dataset are continuous variables. Using the prediction function in the training set, an initial linear regression prediction model is obtained; The initial linear regression prediction model is tested using the test set to obtain the final linear regression prediction model; The final linear regression prediction model is used to predict the aggregated data from all merged data sources that can meet business needs, and these data are then placed in the cache.

2. The method as described in claim 1, characterized in that, Also includes: When the first type of interface does not find some aggregated data in the cache according to the business application, it queries the part of the data to be aggregated that cannot meet the business requirements from the first data source, and returns the part of the data to be aggregated and the cache flag of whether each data comes from the cache to the client.

3. The method as described in claim 1, characterized in that, Also includes: After a preset time period, a portion of the aggregated data is re-predicted using a linear regression algorithm and placed into the cache.

4. The method as described in claim 1, characterized in that, Also includes: When the first type of interface finds all the summary data in the cache, it returns all the summary data and its corresponding cache flag indicating whether it comes from the cache to the client.

5. The method according to any one of claims 1 to 4, characterized in that, The cache is a Redis cache.

6. A method for aggregating and displaying data from different data sources, characterized in that, This method is applied to the client and includes: The user-inputted business request is sent to the server. The server includes a first type of interface and a second type of interface. The first type of interface is used to query, when partial aggregated data is found in the cache based on the business request, the partial aggregated data that does not exist in the cache and cannot meet the business requirements from the first data source, and return the partial aggregated data, the partial aggregated data, and a cache flag indicating whether each data comes from the cache to the client. The partial aggregated data is aggregated data that meets the business requirements and has been merged from all data sources. The cache flag is used to indicate whether the current data is aggregated data that has been merged from all data sources. When the cache flag indicates that the current data is part of the data to be summarized retrieved from the first data source, the part of the data to be summarized within the visible range of the interface is sent to the second type of interface on the server. The second type of interface is used to query other data sources based on the part of the data to be summarized, obtain other parts of the data to be summarized corresponding to other data sources, and merge the part of the data to be summarized retrieved from the first data source with other parts of the data to be summarized corresponding to other data sources according to the data identifiers to obtain the merged summary data. The merged summary data is then returned to the client. Display the cached summary data and the merged summary data to the user; The method further includes: After receiving a notification that the user has stopped scrolling the page, the system determines whether the data within the visible area needs to request the second type of interface based on the request flag of the second type of interface. If so, it sends a portion of the data to be aggregated within the visible area to the second type of interface on the server. The request flag of the second type of interface indicates whether a request for the second type of interface is needed during subsequent data processing of the scrolling page.

7. The method as described in claim 6, characterized in that, Also includes: When the cache flag indicates that the data within the visible range of the interface is part of the summary data that exists in the cache, the part of the summary data that exists in the cache will be directly displayed within the visible range of the interface.

8. The method as described in claim 6, characterized in that, Also includes: After receiving a notification that the user has stopped scrolling the page, and based on the request flag of the second type of interface for the data within the visible range of the interface, if it is determined that the data within the visible range of the interface does not need to request the second type of interface, then the portion of the aggregated data existing in the cache will be directly displayed within the visible range of the interface.

9. The method as described in claim 6, characterized in that, Also includes: Update the cache flag of the merged summary data to the cache flag corresponding to the summary data that has been merged from all data sources.

10. The method according to any one of claims 6 to 9, characterized in that, The cache is a Redis cache.

11. A server for aggregating and displaying data from different data sources, characterized in that, include: The first type of interface is used to query the partial data to be summarized that does not exist in the cache and cannot meet the business requirements from the first data source when the partial summary data is found to exist in the cache according to the business application input by the user. The partial summary data, the partial data to be summarized, and the cache flag indicating whether each data comes from the cache are returned to the client. The aforementioned aggregated data is aggregated data that has been merged from all data sources and meets business requirements. The cache flag is used to indicate whether the current data is aggregated data that has been merged from all data sources. The business request is sent by the client. The second type of interface is used to query other data sources based on the part of data to be summarized, obtain other parts of data to be summarized corresponding to other data sources, merge the part of data to be summarized queried from the first data source with other parts of data to be summarized corresponding to other data sources according to the data identifier, obtain the merged summary data, and return the merged summary data to the client. The data to be summarized refers to the portion of the data to be summarized that the client sends within the visible range of the interface when it determines, based on the cache flag, that the current data is part of the data to be summarized retrieved from the first data source. The client displays the cached partial summary data and the merged summary data to the user; the cached partial summary data is a partial summary data predicted in advance using a linear regression algorithm; The server also includes a setup unit for obtaining historical datasets corresponding to business applications; dividing the historical datasets into training and testing sets; establishing a prediction function from features to labels in the dataset using a linear regression algorithm; wherein there is a linear relationship between features and labels in the dataset, and the labels in the dataset are continuous variables; obtaining an initial linear regression prediction model using the prediction function in the training set; testing the initial linear regression prediction model using the testing set to obtain a final linear regression prediction model; and using the final linear regression prediction model to predict aggregated data that meets business requirements and has been merged from all data sources, and placing it in a cache.

12. A client application that aggregates and displays data from different data sources, characterized in that, include: The first type of interface request unit is used to send business requests to the first type of interface on the server. The server includes a first type of interface and a second type of interface. The first type of interface is used to query the partial summary data that does not exist in the cache and cannot meet the business requirements from the first data source when partial summary data exists in the cache according to the business application. The partial summary data, partial summary data, and cache flag indicating whether each data comes from the cache are returned to the client. The aforementioned aggregated data is aggregated data that has been merged from all data sources and meets business requirements. The cache flag is used to indicate whether the current data is aggregated data that has been merged from all data sources. The second type of interface request unit is used to send part of the data to be summarized within the visible range of the interface to the second type of interface when it is determined from the cache flag that the current data is part of the data to be summarized queried from the first data source. The second type of interface is used to query other data sources based on the partial data to be summarized, obtain other partial data to be summarized corresponding to other data sources, merge the partial data to be summarized queried from the first data source with other partial data to be summarized corresponding to other data sources according to the data identifier, obtain the merged summary data, and return the merged summary data to the client. The display unit is used to show users the partial summary data that exists in the cache and the merged summary data; The first type of interface request unit is further configured to: after receiving the user's continued page scrolling operation stops, determine whether the data within the visible range of the interface needs to request the second type of interface based on the request flag of the second type of interface for the data within the visible range of the interface, and send part of the data to be summarized within the visible range of the interface to the second type of interface on the server; the request flag of the second type of interface is a flag indicating whether the second type of interface needs to be requested during the subsequent page scrolling data processing.

13. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 10.

15. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 10.

Citation Information

Patent Citations

  • Data query method and device, equipment, storage medium and program product

    CN114691725A

  • Business data processing method, electronic equipment and storage medium

    CN115080272A