Data query method and device, file sending method and device and storage medium

By transferring the filter from the database to the first server end in the server cluster, the problem of excessive filter pressure in the prior art is solved, and the effect of reducing database pressure and improving query efficiency is achieved.

CN119441264APending Publication Date: 2025-02-14BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310945199.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, filters are integrated into the database, resulting in excessive pressure on the filter in the case of high concurrent query requests, affecting query efficiency and database performance.

Method used

Transfer the filter from the database to the first server in the server cluster, judge the result of the query request through the local filter file, and send a data acquisition request to the second server if necessary to update the filter file.

Benefits of technology

It reduces the pressure on the database, improves query efficiency, reduces network communication and delay, and ensures system stability in high concurrency situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441264A_ABST
    Figure CN119441264A_ABST
Patent Text Reader

Abstract

The invention provides a data query method, a file sending method, device and system and a storage medium. Bloom files can be deployed on a first server side of a server cluster. Correspondingly, when the target data needs to be queried, the client side can send a query request to the corresponding first server side. The query request can comprise information of target data. According to the query request, the first server side can judge whether the target data can be queried based on the locally stored first filtering file, so as to obtain a query result of the target data and send the query result. Therefore, the filter is transferred from the database to the first server, and the pressure generated by the query request cannot be reflected on the filter in the database. Therefore, the filter is deployed in the first server instead of the database, so that the pressure of the database is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data query method, a file sending method, a device, a system and a storage medium. Background Art

[0002] Filters can be used to determine whether an element belongs to a set, and can be used to filter requests, thereby improving query efficiency. Specifically, after obtaining a query request for the data to be queried, it can be determined based on the filter whether the data to be queried is stored in the database. If the data to be queried is not stored in the database, the result that no data to be queried is found can be directly returned. In this way, there is no need to query from the database, which improves query efficiency.

[0003] Currently, filters are generally integrated into databases to filter query requests. When the number of query requests is large, it will cause great pressure on the filter. Summary of the invention

[0004] In order to solve the problems of the prior art, the present application provides a data query method, a file sending method, a device, a system and a storage medium.

[0005] In a first aspect, the present application provides a data query method, which is applied to a first server in a server cluster, and the method includes:

[0006] Obtaining a query request, wherein the query request includes information of target data;

[0007] Determining a query result corresponding to the query request according to a first local filtering file of the first server;

[0008] The query result is sent.

[0009] In some possible implementations, the query result is used to indicate whether the target data is stored in the second server.

[0010] In some possible implementations, the method further includes:

[0011] Acquire a first change information set, where the first change information set includes at least one change information, and the change information is used to indicate that a change occurs to data stored in the second server;

[0012] The determining, according to the first local filtering file of the first server, the query result corresponding to the query request comprises:

[0013] Determine whether the second server stores the target data according to the first filter file and the first change information set.

[0014] In some possible implementations, obtaining the first change information set includes:

[0015] Sending a data acquisition request to the second server based on a target period;

[0016] The first change information set sent by the second server is obtained, where the change information in the first change information set indicates changes that occur in data stored by the second server in this cycle.

[0017] In some possible implementations, the amount of change information in the first change information set is equal to a first threshold, and the method further includes:

[0018] A second filter file is obtained, where the second filter file is determined according to the first filter file and the first change information set.

[0019] In some possible implementations, before obtaining the second filter file, the method further includes:

[0020] receiving a second change information set sent by the second server, where the second change information set includes at least one change information, and the number of change information in the second change information set is less than the first threshold;

[0021] The determining, according to the first filter file and the first change information set, whether the second server stores the target data comprises:

[0022] Determine whether the second server stores the target data according to the first filter file, the first change information set, and the second change information set.

[0023] In a second aspect, the present application provides a file sending method, which is applied to a second server, and the method includes:

[0024] Acquire first change information, where the first change information indicates that data stored in the second server has changed;

[0025] generating a first filtering file according to the first change information;

[0026] The first filter file is sent to the first server so that the first server provides a query service based on the first filter file, wherein the query service is used to determine whether the second server stores data to be queried.

[0027] In some possible implementations, generating a first filter file according to the first change information of the database includes:

[0028] Adding the first change information to a first change information set;

[0029] The second filter file is modified according to the first change information set to obtain the first filter file, and the second filter file is determined according to the situation of data stored in the second server before the change.

[0030] In some possible implementations, the method further includes:

[0031] Obtain a first set acquisition request sent by the first server;

[0032] Send the first change information set to the first server.

[0033] In some possible implementations, the method further includes:

[0034] A second change information set is sent to the first server, the second change information set includes at least one change information, the change information in the second change information set indicates changes in data stored by the second server within a target time period, and the target time period is the time period from obtaining the first set acquisition request to obtaining the second data acquisition request.

[0035] In some possible implementations, the first change information indicates a change in a piece of data stored in the second server, and before obtaining the first filter file, the method further includes:

[0036] It is determined that the amount of change information in the first change information set reaches a preset threshold.

[0037] In a third aspect, the present application provides a data query device, which is applied to a first server in a server cluster, and includes: an acquisition unit, which is used to acquire a query request, wherein the query request includes information about target data; a determination unit, which is used to determine a query result corresponding to the query request based on a first local filter file of the first server; and a sending unit, which is used to send the query result.

[0038] In some possible implementations, the query result is used to indicate whether the target data is stored in the second server.

[0039] In some possible implementations, the acquisition unit is further configured to acquire a first change information set, the first change information set including at least one change information, the change information being used to indicate that a change has occurred to the data stored in the second server. The determination unit is specifically configured to determine whether the second server stores the target data based on the first filter file and the first change information set.

[0040] In some possible implementations, the sending unit is specifically configured to send a data acquisition request to the second server based on a target period. The acquiring unit is specifically configured to acquire the first change information set sent by the second server, wherein the change information in the first change information set indicates changes in data stored by the second server in this period.

[0041] In some possible implementations, the amount of change information in the first change information set is equal to a first threshold. The acquisition unit is further configured to acquire a second filter file, where the second filter file is determined based on the first filter file and the first change information set.

[0042] In some possible implementations, the acquisition unit is further configured to receive a second change information set sent by the second server, the second change information set including at least one change information, and the number of change information in the second change information set is less than the first threshold. The determination unit is further configured to determine whether the second server stores the target data based on the first filter file, the first change information set, and the second change information set.

[0043] In a fourth aspect, the present application provides a file sending device, which is applied to a second server, and the device includes: an acquisition unit, which is used to acquire first change information, wherein the first change information indicates that data stored in the second server has changed. A generation unit, which is used to generate a first filter file according to the first change information. A sending unit, which is used to send the first filter file to the first server, so that the first server provides a query service based on the first filter file, and the query service is used to determine whether the second server stores data to be queried.

[0044] In some possible implementations, the generating unit is specifically configured to add the first change information to a first change information set. The second filter file is modified according to the first change information set to obtain the first filter file, and the second filter file is determined according to the data stored in the second server before the change.

[0045] In some possible implementations, the acquiring unit is further configured to acquire a first set acquisition request sent by the first server. The sending unit is further configured to send the first change information set to the first server.

[0046] In some possible implementations, the sending unit is also used to send a second change information set to the first server, the second change information set including at least one change information, the change information in the second change information set indicating changes in data stored by the second server within a target time period, and the target time period is the time period from obtaining the first set acquisition request to obtaining the second data acquisition request.

[0047] In some possible implementations, the first change information indicates a change in a piece of data stored in the second server. The generating unit is further configured to determine whether the amount of change information in the first change information set reaches a preset threshold.

[0048] In a fifth aspect, the present application provides an electronic device, including:

[0049] one or more processors;

[0050] a storage device having one or more programs stored thereon,

[0051] When the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect, or the one or more processors implement any method described in the second aspect.

[0052] In a sixth aspect, the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the program implements any of the methods described in the first aspect, or, when the program is executed by a processor, the program implements any of the methods described in the second aspect.

[0053] In a seventh aspect, the present application provides a computer program product. When the computer program product is executed on a device, the device executes the method described in the first aspect, or the device executes the method described in the second aspect.

[0054] It can be seen that this application has the following beneficial effects:

[0055] The present application provides a data query method, a file sending method, a device, a system and a storage medium, which can deploy a Bloom file on the first server of a server cluster. Accordingly, when it is necessary to query the target data, the client can send a query request to the corresponding first server. The query request may include information about the target data. According to the query request, the first server can determine whether the target data can be queried based on the first filter file stored locally, thereby obtaining the query result of the target data and sending the query result. In this way, the filter is transferred from the database to the first server, and the pressure generated by the query request will not be reflected on the filter in the database. Even if there are multiple clients that issue query requests in a short period of time, the query request issued by the client will be sent to the corresponding first server. Due to the corresponding relationship between the client and the first server, the number of servers served by each first server is limited. Then the number of query requests received by the first server in a unit time is limited. Limited query requests will not cause excessive pressure on the first server. In this way, the filter is deployed on the first server instead of the database, which reduces the pressure on the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0057] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0058] Figure 2 A flowchart of a data query method provided in an embodiment of the present application;

[0059] Figure 3 A flowchart of a file sending method provided in an embodiment of the present application;

[0060] Figure 4 A schematic diagram of a data query device provided in an embodiment of the present application;

[0061] Figure 5 A schematic diagram of a file sending device provided in an embodiment of the present application;

[0062] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.

[0064] It should be understood that the various steps described in the method implementation of the present application can be performed in different orders and / or performed in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0065] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0066] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different objects, devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0067] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0068] Filters have the ability to quickly determine whether an element exists in a collection and have been applied in many fields. For example, in the field of data query, filters can be used to filter query requests, so as to determine whether the data queried by the query request has been stored in the database without traversing the database. In this way, query requests that cannot query data can be filtered out to improve query efficiency.

[0069] Specifically, assuming that the query request is used to query the target data, the query request may include information of the target data. The query request may be used to obtain the target data from the database. The target data may be associated with the relevant information of the target data and stored in the database. After obtaining the query request, the query request may be filtered by a filter. Specifically, the filter may determine whether the target data in the query request has been stored in the database.

[0070] If the target data is stored in the database, the filter can determine that the target data has been stored in the database, indicating that the target data can be queried from the database based on the query request. Therefore, if the filter determines that the target data is stored in the database, the target data can be searched from the database according to the information of the target data, and the target data can be returned to complete the query of the target data.

[0071] If the target data is not stored in the database, then the target data cannot be obtained from the database according to the query request. Accordingly, the filter can determine that the target data is not stored in the database. Since the filter can directly determine that the target data is not stored in the database, there is no need to query the target data from the database according to the information of the target data, and the query result that the target data is not found is directly returned.

[0072] It can be seen that the filter can filter the query requests that cannot find data, thereby reducing the number of query requests that the database needs to process and reducing the pressure on the database.

[0073] Since filters can reduce the pressure on the database, filters can be integrated into the database to filter the query requests received by the database. That is, after obtaining the query request, the query request can be filtered by the filter first, and then the corresponding data can be found from the database according to the filtered query request, so as to reduce the number of query requests that the database needs to process.

[0074] However, in some application scenarios, the database may receive a large number of query requests per unit time. Filters can filter out query requests that cannot find data, reducing the number of query requests that the database needs to process. Although the number of query requests that the database itself needs to process has been reduced, the number of query requests that the filter needs to process has not changed. This will increase the pressure on the filter. In addition, when a large number of query requests need to be processed, the processing speed of the filter will also decrease, thereby reducing the processing speed of the query requests.

[0075] Furthermore, if the query service is triggered by the user through the client, then the query request is sent by the server (or service instance) corresponding to the client to the database through the network connection. If the corresponding data cannot be found, the filter in the database needs to send the query result that the data cannot be found to the server (or service instance) through the network connection. In this process, the server (or service instance) and the database communicate over the network, which not only increases the network pressure, but also causes delays due to network communication.

[0076] In order to solve the problems of the prior art, an embodiment of the present application provides a data query method, which is described in detail below in conjunction with the drawings in the specification.

[0077] In order to facilitate understanding of the technical solution provided in the embodiments of the present application, Figure 1 The example scenario shown is used for illustration.

[0078] See also Figure 1 , which is a schematic diagram of an application scenario given in an embodiment of the present application. Figure 1 The application scenario shown includes a client 110 , a client 120 , a client 130 , a service instance 210 , a service instance 220 and a database 300 .

[0079] exist Figure 1 In the implementation shown, client 110 and client 120 may correspond to service instance 210, and client 130 may correspond to service instance 220. Here, “client corresponds to service instance” may mean that the service instance provides background services for the client. Figure 1 In the implementation shown, the background data processing services of the clients 110 and 120 are implemented by the service instance 210, and the background data processing services of the client 130 are implemented by the service instance 220. The service instance 210 and the service instance 220 may correspond to independent physical servers or virtual servers running on physical servers.

[0080] In the scenario where the filter is deployed in the database 300, if the user using the client 110 wants to query data A from the database 300, the data query operation can be triggered through the client 110. Accordingly, the service instance 210 for providing background data processing services for the client 110 can generate a query request according to the data query operation and send the query request to the database 300. After receiving the query request, the database 300 can first determine whether the data queried by the query request (i.e., data A) is stored in the database 300 through the filter. If data A is not stored in the database 300, the filter can send a query result indicating that data A is not found to the service instance 210.

[0081] Assume that at the same time, the user using client 120 and the user using client 130 both want to query data from database 300, and database 300 will receive three query requests at the same time (or in a short time interval). Accordingly, the filter in database 300 needs to process the three query requests. Obviously, as the number of clients increases, the number of query request data received by database 300 per unit time may be more. In this way, the pressure on database 300 is increased.

[0082] Moreover, the filter located in the database 300 will consume more time to process the three query requests.

[0083] Furthermore, the query request from the service instance 210 needs to be sent to the database 300 through the network connection, and the database 300 also needs to send the query result to the service instance 210 through the network connection. In this way, for the query request whose data is not stored in the database 300, even if the query result can be quickly returned through the filter, since both the query request and the query result need to be transmitted through the network, the network transmission delay will also increase the time interval between the service instance 210 sending the query request and obtaining the query result.

[0084] To this end, in the data query method provided in the embodiment of the present application, the files required by the filter can be transferred from the database 300 to the service instance 210 and / or the service instance 220. In this way, on the one hand, the pressure on the database is reduced, and on the other hand, for query requests that cannot find data, there is no need to interact with the database, thereby reducing latency. For a detailed introduction to this part, please refer to the following, which will not be repeated here.

[0085] In the embodiment of the present application, client 110, client 120 and client 130 are clients of the target software, service instance 210 and service instance 220 are service instances corresponding to the target software, and database 300 is a background database corresponding to the target software.

[0086] Optionally, the client 110, the client 120 and the client 130 may be run on a terminal device, such as a mobile phone, a tablet computer or a computer. For example, the service instance 210 and the service instance 220 may be run on a server or other device, and the service instance 210 and the service instance 220 may be run on the same server or on different servers. Optionally, the service instance 210 and the service instance 220 may also correspond to different servers. The database 300 may be a distributed database, such as a Redis database.

[0087] See also Figure 2 , Figure 2 An information interaction diagram of a data query method provided in an embodiment of the present application, the embodiment of the present application can be applicable to application scenarios of querying data from a database. Optionally, the method can be executed by a first server, specifically by a data query device running on the first server. The first server is used to provide services to users, for example, it can be the server or service instance described above. The first server can correspond to one or more clients, and is used to provide data query services to the corresponding clients. The above-mentioned data query device can be implemented in the form of software and integrated into the first server. For example, in Figure 1 In the application scenario shown, execute Figure 2The data query device of the data query method shown can be run on the service instance 210 and / or the service instance 220. That is, the first service end can be Figure 2 The service instance 210 or service instance 220 summarized in the illustrated embodiment. Similarly, the second service end described below may be, for example, Figure 2 Database 300 in the illustrated embodiment.

[0088] like Figure 2 As shown, the method specifically comprises the following steps:

[0089] S201: Obtain a query request.

[0090] When a user uses the query service provided by the client, the user can trigger a data query operation on the client. The client can send a query request to the corresponding first server in response to the data query operation triggered by the user. The query request includes information about the target data. The target data is the data queried by the query request, and the information about the target data can include, for example, an identifier of the target data, and can also include related information such as description information of the target data.

[0091] Optionally, the query request can be used to query the target data from the second server. The second server is a database corresponding to the client and the first server, and can also be called a target database. For example, if the client is a client of the target software, and the first server is a background server that provides services for the target software, then the second server can be a database for storing relevant data of the target software.

[0092] In some possible implementations, the first server and the second server may be the same server.

[0093] S202: Determine a query result corresponding to the query request according to the first local filter file of the first server.

[0094] After obtaining the query request, the query result can be determined from the first local filter file of the first server. The first filter file refers to a related file for implementing the filter. In other words, the first server locally stores related files for implementing the filter. After obtaining the query request, the function of the filter can be implemented based on the file stored locally on the first server, and the query request can be filtered to determine the query result. In an embodiment of the present application, the filter corresponding to the first filter file can be referred to as the first filter.

[0095] In an embodiment of the present application, the first filter file can be determined based on the data stored in the second server. Optionally, the first filter file can be sent by the second server to the first server. Specifically, the second server can send the first filter file to the first server after generating the first filter file. Alternatively, the first server can also send a filter file acquisition request to the second server, and the second server can send the first filter file to the first server based on the filter file acquisition request.

[0096] If the query request is used to query the target data from the second server, the first filter file can be used to determine whether the target data is stored in the second server. Specifically, the first filter file can be determined based on the data stored in the second server. Optionally, if the data stored in the second server changes, the filter file stored locally in the first server can be updated. For an introduction to this part, please refer to Figure 3 The introduction of the corresponding embodiments will not be repeated here.

[0097] If the target data is stored in the second server, the first server can determine that the file queried by the query request can be queried from the second server according to the first filter. Accordingly, the first server can send a data query instruction to the second server. The second server can query the target data according to the data query instruction sent by the first server, and return the queried target data to the first server. Then, the first server can generate a query result according to the target data, so as to return the query result to the client.

[0098] If the target data is not stored in the second server, the first server can filter out the query request through the first filter. Accordingly, the first server does not need to send a data query instruction to the second server, and can directly generate a query result that does not find the target data. In this way, the query efficiency can be improved.

[0099] In actual scenarios, the first server is used to provide background data processing related services for the client. The computing resources that can be called by the first server are limited, so the number of clients served by the first server is also limited. In other words, each first server only corresponds to a relatively small number of clients. Since it corresponds to a relatively small number of clients, the number of query requests obtained by the first server per unit time is also relatively small. In this way, deploying the filter on the first server will not put pressure on the database, and the number of query requests that the filter on the first server needs to process per unit time is relatively small, and it will not put too much pressure on the first server.

[0100] In addition, by deploying the filter on the first server, query requests that cannot find data can be filtered out on the first server. In other words, query requests that cannot find data will not be sent to the second server, and query results can be obtained directly on the first server. In this way, for query requests that cannot find data, the time of sending query requests to the database and obtaining query results from the database is saved, thereby improving the query speed.

[0101] In the embodiment of the present application, the first local filter file of the first server may be a Bloom file. Accordingly, the filter implemented based on the first filter file may be a Bloom filter.

[0102] In actual scenarios, the data stored in the second server may change, resulting in the actual situation of the second server storing data being different from the storage situation indicated by the first filter file. Thus, if the target data is only determined based on the storage situation indicated by the first filter file, the result may be biased.

[0103] For example, suppose that the first filter file indicates the storage status of data in the second server at the first moment, and the target data is not stored in the second server at the first moment. At the second moment after the first moment, the target data is stored in the second server. At the third moment after the second moment, the first server obtains a query request for the target data. In this way, if the judgment is made only based on the first filter file, the first server will determine that the target data is not stored in the second server, and thus filter out the query request and do not obtain the target data from the second server. In this way, an erroneous judgment may be made.

[0104] In order to solve the above problem, in some possible implementations, the update speed of the first filter file can be increased. Specifically, if the data storage situation of the second server changes, the filter file can be adjusted to obtain a new filter file and send it to the first server. In this way, it can be ensured that the storage situation indicated by the filter file in the first server matches the actual situation of the data storage on the second server.

[0105] Alternatively, in some other possible implementations, in order to reduce the frequency of updating the filter file, the first server may also determine the query result based on the filter file and the change information. The change information is used to indicate the change of the data stored by the second server. Specifically, the change information used to determine the query result may be used to indicate the data change that occurred on the second server after the time corresponding to the latest filter file.

[0106] In addition, the first server can also update the filter file regularly or irregularly. That is, the first server can also obtain the second filter file. After obtaining the second filter file, the first server can query based on the second filter file. Optionally, the first server can also delete the first filter file.

[0107] Using the above example for illustration, assuming that the first filter file corresponds to the first moment, and the first server obtains the query request at the third moment, the first server can determine the query result based on the first filter file and the change information. In addition, the change information used to determine the query result is used to indicate the data changes that occurred on the second server from the first moment to the third moment. In this way, based on the first filter file and the change information, the data storage situation of the second server at the third moment can be determined, thereby obtaining an accurate query result. In this way, the accuracy of the query result can be maintained, and the number of times the filter file is updated can be reduced.

[0108] In some possible implementations, the change information may correspond to a change in a piece of data in the second server. If the data stored in the second server changes multiple times, multiple change information may be obtained. In an embodiment of the present application, multiple change information may constitute a change information set. Accordingly, the first server may determine the query result based on the change information set and the filter file. Among them, the change information included in the change information set corresponds to the data change that occurred in the second server after the time corresponding to the filter file. Optionally, the change information set may be implemented based on a queue.

[0109] Optionally, the first server may obtain multiple change information sets, and determine whether the target data is stored in the second server by combining the first filter file and the multiple change information sets. For an introduction to the multiple change information sets, see below. Figure 3 The introduction of the corresponding embodiment part will not be repeated here.

[0110] Optionally, the above change information (or change information set) can be determined by the second server and sent to the first server. Optionally, the first server can also obtain the change information (or change information set) in other ways. For an introduction to the first server obtaining the change information (or change information set), please refer to the following Figure 3 The introduction of the corresponding embodiment part will not be repeated here.

[0111] S203: Send the query result.

[0112] After determining the query result of the target data, the first server may send the query result to the client. Optionally, if the target data is stored in the second server, the query result sent by the first server to the client may include the target data; if the target data is not stored in the second server, the query result sent by the first server to the client may include indication information, and the indication information is used to indicate that the target data is not stored in the second server.

[0113] In the technical solution provided by the present application, a Bloom file can be deployed in the first server of the server cluster. Accordingly, when the target data needs to be queried, the client can send a query request to the corresponding first server. The query request may include information about the target data. According to the query request, the first server can determine whether the target data can be queried based on the first filter file stored locally, thereby obtaining the query result of the target data and sending the query result. Deploying the filter file used by the filter on the first server is equivalent to deploying the filter in the first server. In this way, the filter is transferred from the second server to the first server, and the number of query requests will not cause greater pressure on the second server. Even if there are multiple clients issuing query requests in a short period of time, the query request issued by the client will be sent to the corresponding first server. Due to the corresponding relationship between the client and the first server, the number of query requests received by the first server in a unit time is limited, and it will not cause excessive pressure on the first server. In this way, the filter is deployed on the first server instead of the database, which reduces the pressure on the database.

[0114] In the embodiment of the present application, the filter file for implementing the filter is deployed in the first server, and the filter file is determined according to the data stored in the second server. In the actual scenario, the data stored in the second server may change. Accordingly, the filter file can be adaptively adjusted. Specifically, the embodiment of the present application also provides a file sending method

[0115] See also Figure 3 , Figure 3 This is an information interaction diagram of a file sending method provided in an embodiment of the present application. The embodiment of the present application can be applied to an application scenario where a filter file is sent from a second server to a first server. Optionally, the method can be executed by the second server, specifically by a file sending device running on the second server. The file sending device can be implemented in software and integrated into the first server. For example, in Figure 1 In the application scenario shown, execute Figure 3 The file sending device of the data query method shown can be run on the database 300 .

[0116] like Figure 3As shown, the method specifically comprises the following steps:

[0117] S301: Acquire first change information of the second server.

[0118] When the data stored in the second server is changed, the second server can obtain the first change information, wherein the data change includes but is not limited to the addition of new data, the deletion of original data and the replacement of original data.

[0119] Optionally, the first change information may indicate that one piece of data stored in the second server has changed, or may indicate that multiple pieces of data stored in the second server have changed. For ease of introduction, the following takes the example that the first change information indicates that multiple pieces of data stored in the second server have changed.

[0120] S302: Generate a first filtering file according to the first change information.

[0121] After obtaining the first change information, a first filter file may be generated according to the first change information. Figure 3 The first filter file and Figure 2 The first filter files in the corresponding embodiments may be the same or different.

[0122] In some possible implementations, a new filter file may be generated each time a change occurs on the second server.

[0123] However, in actual scenarios, the frequency of data update on the second server may be relatively high, and if a new filter file needs to be generated every time data is updated, it may cause great pressure.

[0124] To this end, in some other possible implementations, a new filter file may be generated after the changes on the second server have accumulated to a certain extent. Specifically, if a change information corresponds to a change of a piece of data stored on the second server, then after obtaining the first change information, the first change information may be added to the first change information set. After the update condition is met, the first filter file may be determined based on the first change information set.

[0125] Among them, the update condition can be set according to actual conditions. For example, in some possible implementations, the update condition can be related to time. Specifically, it can be set to update the filter file regularly. In other words, the second server can update the filter file according to the update cycle. The changes that occur in the second server during the update cycle can be recorded in the change information set in the form of change information, and when the update cycle is reached, the filter file can be updated according to the change information set.

[0126] For another example, in some other possible implementations, the update condition may be related to the number of change information. Specifically, the number of change information queue sets may be set. That is, the second server may record the data changes in the change information set in the form of change information, and when the number of change information recorded in the change information set reaches a preset threshold, the filter file may be updated according to the change information set.

[0127] Optionally, after the number of change information included in the change information set reaches a preset threshold, if the data stored in the second server changes again, a new change information set can be established and the new change information can be added to the new change information set. Optionally, after the number of change information included in the change information set reaches a first threshold, the change information set can be set to an unavailable state.

[0128] The above describes the update conditions. The following describes how to adjust the filter file based on the set of change information.

[0129] In the embodiment of the present application, if there is a filter file, when a new filter file is obtained, the filter file can be adjusted based on the filter file and according to the set of change information to obtain a new filter file. That is, assuming that before obtaining the first change information, the second service end corresponds to the second filter file, then when determining the first filter file, the corresponding data in the second filter file can be modified according to the data change indicated by the first change information, so that the modified second filter file matches the first change information.

[0130] S303: Sending a first filtering file to the first server.

[0131] After determining the first filter file, the second server may send the first filter file to the first server so that the first server filters the query request based on the first filter file.

[0132] In an actual scenario, there may be multiple first servers. In some possible implementations, the second server may send the first filter file to each first server respectively.

[0133] However, the method in which the second server sends the first filter file to each first server respectively requires a large amount of network bandwidth resources between the second server and the first server. In actual scenarios, the bandwidth resources between the first server and the second server may be relatively limited. To this end, the filter file can be sent to the first server through a peer-to-peer (P2P) transmission method. Specifically, the second server can first send the first filter file to one or more first servers. After receiving the first filter file, the first server can send the first filter file to other first servers connected to itself. In this way, the first filter file can be spread in a p2p manner to reduce bandwidth occupancy.

[0134] However, when the first filter file is spread through a method such as p2p, it may happen that clients corresponding to different first servers query the same data and obtain different query results.

[0135] For example, Figure 1 Assume that the first filter file is obtained based on the second filter file, and the first filter file is diffused to the service instance 220 through the service instance 210, then after the first filter file is generated, the database 300 can send the first filter file to the service instance 210. After the service instance 210 receives the first filter file, it can send the first filter file to the service instance 220.

[0136] Before the service instance 220 receives the complete first filter file, the filter file used by the filter on the service instance 210 is the first filter file, and the filter file used by the filter on the service instance 220 is the second filter file. In this way, the versions of the filter files on different first servers are different. If the query result is determined only based on the filter file, different clients corresponding to different first servers may obtain different query results.

[0137] In addition, even if p2p or other methods of transmitting the first filter file are not used, in actual scenarios, due to different network resources and network fluctuations of different first servers, clients corresponding to different first servers may query the same data and obtain different query results.

[0138] In order to solve the above problem, in an embodiment of the present application, the first server can obtain a change information set, and then determine the query request by combining the change information set and the filter file. Two possible implementation methods are introduced below.

[0139] In a first possible implementation manner, the first server may send a set acquisition request to the second server after acquiring the query request, and the second server may send a change information set to the first server according to the set acquisition request.

[0140] In this way, after obtaining the query request, any first server can determine the actual situation of the second server storing data according to the change information set, thus avoiding the problem that different first servers obtain different query results.

[0141] In a second possible implementation, a set of change information may be periodically sent to the first server. Specifically, the first server may periodically send a set acquisition request to the second server. Alternatively, the second server may periodically send a set of change information to the first server. Optionally, the second server may transmit the set of change information in a p2p manner.

[0142] In this way, all first servers can periodically obtain the change information set. Then in the same cycle, the second server storage data recorded by different first servers are the same. In this way, the problem of different first servers obtaining different query results is avoided.

[0143] Optionally, the collection acquisition request may include an identifier of a filter file, which is used to identify the filter file stored by the first server. Accordingly, the second server can determine, based on the identifier of the filter file, what changes have occurred in the data stored by the second server from obtaining the filter file to receiving the collection acquisition request, thereby determining a change information set and sending it to the first server. In this way, the first server can determine the original storage situation of the second server based on the filter file, and then determine what changes have occurred in the data stored by the second server based on the change information set, thereby determining the actual situation of the data stored by the second server.

[0144] In some possible implementations, the second server may send multiple change information sets to the first server.

[0145] Specifically, in scenarios such as transmitting filter files via p2p, if a filter file on a first server has not been updated to the latest version, then when obtaining a change information set, the first server may need to obtain both a change information set for updating the filter file and a change information set corresponding to the actual situation of data stored on the second server.

[0146] That is to say, the first server can obtain a first change information set and a second change information set, wherein the first change information set is used to update the filter file stored by the first server to the latest version of the filter file, and the second change information set is used to distinguish the storage situation indicated by the latest version of the filter file from the actual situation of the data stored by the second server.

[0147] The above example is used for illustration. Assume that the database 300 updates the second filter file to the first filter file based on the change information set A, and the service instance 210 obtains the first filter file, while the service instance 220 does not obtain the first file. If the data stored in the database 300 changes again, the database 300 can generate change information and add the change information to the change information set B.

[0148] Thus, for service instance 210, since service instance 210 stores the first filter file, service instance 210 can determine the actual situation of data stored in second server 300 based on change information set B and the first filter file. Therefore, service instance 210 can obtain change information set B without obtaining change information set A.

[0149] As for the service instance 220, since the service instance 220 only stores the relatively more original second filter file and does not store the first filter file, the service instance 220 cannot determine the actual situation of the data stored in the database 300 by relying only on the change information set B and the second filter file. Therefore, the service instance 220 can obtain the change information set A and the change information set B, and thus determine the actual situation of the data stored in the database 300 according to the change information set A, the change information set B and the second filter file.

[0150] Based on a data query method provided by the above method embodiment, the embodiment of the present application also provides a data query device, which will be described below in conjunction with the accompanying drawings.

[0151] See also Figure 4 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a data query device provided in an embodiment of the present application. The data query device can be applied to the first server in a server cluster. Figure 4 As shown, the data query device includes:

[0152] The acquisition unit 410 is used to acquire a query request, wherein the query request includes information of target data. The determination unit 420 is used to determine a query result corresponding to the query request according to the first local filtering file of the first server. The sending unit 430 is used to send the query result.

[0153] In some possible implementations, the query result is used to indicate whether the target data is stored in the second server.

[0154] In some possible implementations, the acquisition unit 410 is further configured to acquire a first change information set, the first change information set including at least one change information, the change information being used to indicate that a change has occurred to the data stored in the second server. The determination unit 420 is specifically configured to determine whether the second server stores the target data based on the first filter file and the first change information set.

[0155] In some possible implementations, the sending unit 430 is specifically configured to send a data acquisition request to the second server based on a target period. The acquiring unit 410 is specifically configured to acquire the first change information set sent by the second server, wherein the change information in the first change information set indicates changes in the data stored by the second server in this period.

[0156] In some possible implementations, the amount of change information in the first change information set is equal to a first threshold. The acquisition unit 410 is further configured to acquire a second filter file, which is determined according to the first filter file and the first change information set.

[0157] In some possible implementations, the acquisition unit 410 is further configured to receive a second change information set sent by the second server, the second change information set including at least one change information, and the number of change information in the second change information set is less than the first threshold. The determination unit 420 is further configured to determine whether the second server stores the target data based on the first filter file, the first change information set, and the second change information set.

[0158] Based on a file sending method provided by the above method embodiment, an embodiment of the present application further provides a file sending device, which will be described below in conjunction with the accompanying drawings.

[0159] See also Figure 5 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a file sending device provided in an embodiment of the present application. The file sending device can be integrated with the second server. Figure 5 As shown, the file sending device includes:

[0160] The acquisition unit 510 is used to acquire first change information, where the first change information indicates that data stored in the second server has changed.

[0161] The generating unit 520 is configured to generate a first filtering file according to the first change information.

[0162] The sending unit 530 is used to send the first filtering file to the first server, so that the first server provides a query service based on the first filtering file, and the query service is used to determine whether the second server stores data to be queried.

[0163] In some possible implementations, the generating unit 520 is specifically configured to add the first change information to a first change information set, modify the second filter file according to the first change information set, and obtain the first filter file, wherein the second filter file is determined according to the data stored in the second server before the change.

[0164] In some possible implementations, the acquisition unit 510 is further configured to acquire a first set acquisition request sent by the first server. The sending unit 530 is further configured to send the first change information set to the first server.

[0165] In some possible implementations, the sending unit 530 is also used to send a second change information set to the first server, the second change information set including at least one change information, the change information in the second change information set indicating changes in the data stored by the second server within a target time period, and the target time period is the time period from obtaining the first set acquisition request to obtaining the second data acquisition request.

[0166] In some possible implementations, the first change information indicates a change in a piece of data stored in the second server. The generating unit 520 is further configured to determine whether the amount of change information in the first change information set reaches a preset threshold.

[0167] Based on the data query method and file sending method provided by the above method embodiments, the present application also provides an electronic device, including: one or more processors; a storage device, on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors implement the data query method and / or file sending method as described in any of the above embodiments.

[0168] Reference below Figure 6, which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing an embodiment of the present application. The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. The electronic device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0169] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0170] Typically, the following devices may be connected to the I / O interface 605: an input device 608 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0171] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0172] The electronic device provided in the embodiment of the present application and the data query method and file sending method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0173] Based on the method provided in the above method embodiments, an embodiment of the present application provides a computer storage medium on which a computer program is stored, wherein when the program is executed by a processor, the data query method and / or file sending method as described in any of the above embodiments is implemented.

[0174] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0175] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0176] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0177] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the data query method and / or file sending method.

[0178] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0179] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0180] The units involved in the embodiments described in this application may be implemented by software or hardware. The name of a unit / module does not limit the unit itself in some cases. For example, a voice data acquisition module may also be described as a "data acquisition module".

[0181] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0182] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0183] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0184] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0185] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0186] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data query method, characterized in that: The method is applied to a first server in a server cluster, and the method includes: Obtaining a query request, wherein the query request includes information of target data; Determining a query result corresponding to the query request according to a first local filtering file of the first server; The query result is sent.

2. The method according to claim 1, characterized in that The query result is used to indicate whether the target data is stored in the second server.

3. The method according to claim 2, characterized in that The method further comprises: Acquire a first change information set, where the first change information set includes at least one change information, and the change information is used to indicate that a change occurs to data stored in the second server; The determining, according to the first local filtering file of the first server, the query result corresponding to the query request comprises: Determine whether the second server stores the target data according to the first filter file and the first change information set.

4. The method according to claim 3, characterized in that The obtaining of the first change information set includes: Sending a data acquisition request to the second server based on a target period; The first change information set sent by the second server is obtained, where the change information in the first change information set indicates changes that occur in data stored by the second server in this cycle.

5. The method according to claim 4, characterized in that The amount of change information in the first change information set is equal to a first threshold, and the method further includes: A second filter file is obtained, where the second filter file is determined according to the first filter file and the first change information set.

6. The method according to claim 5, characterized in that Before obtaining the second filter file, the method further includes: receiving a second change information set sent by the second server, where the second change information set includes at least one change information, and the number of change information in the second change information set is less than the first threshold; The determining, according to the first filter file and the first change information set, whether the second server stores the target data comprises: Determine whether the second server stores the target data according to the first filter file, the first change information set, and the second change information set.

7. A file sending method, characterized in that: The method is applied to the second server, and the method includes: Acquire first change information, where the first change information indicates that data stored in the second server has changed; generating a first filtering file according to the first change information; The first filter file is sent to the first server so that the first server provides a query service based on the first filter file, wherein the query service is used to determine whether the second server stores data to be queried.

8. The method according to claim 7, characterized in that The generating of the first filter file according to the first change information of the database comprises: Adding the first change information to a first change information set; The second filter file is modified according to the first change information set to obtain the first filter file, and the second filter file is determined according to the situation of data stored in the second server before the change.

9. The method according to claim 8, characterized in that The method further comprises: Obtain a first set acquisition request sent by the first server; Send the first change information set to the first server.

10. The method according to claim 9, characterized in that The method further comprises: A second change information set is sent to the first server, the second change information set includes at least one change information, the change information in the second change information set indicates changes in data stored by the second server within a target time period, and the target time period is the time period from obtaining the first set acquisition request to obtaining the second data acquisition request.

11. The method according to any one of claims 8 to 10, characterized in that: The first change information indicates a change in a piece of data stored in the second server. Before obtaining the first filter file, the method further includes: It is determined that the amount of change information in the first change information set reaches a preset threshold.

12. A data query device, characterized in that: The device is applied to a first server in a server cluster, and the device includes: An acquisition unit, configured to acquire a query request, wherein the query request includes information of target data; A determination unit, configured to determine a query result corresponding to the query request according to a first local filtering file of the first server; A sending unit is used to send the query result.

13. A file sending device method, characterized in that: The method is applied to the second server, and the device includes: An acquiring unit, configured to acquire first change information, where the first change information indicates that data stored in the second server has changed; A generating unit, configured to generate a first filtering file according to the first change information; The determination unit is used to send the first filtering file to the first server so that the first server provides a query service based on the first filtering file, and the query service is used to determine whether the second server stores data to be queried.

14. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.

15. A computer readable medium, characterized in that A computer program is stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.