Data request methods, devices, systems, servers, and storage media

By distributing data requests to multiple data request nodes and monitoring recall rate, and dynamically managing target nodes, the problem of excessive time and low efficiency caused by unsuccessful thread queries during the data request process is solved, achieving stability and completeness in completing data requests within the target time.

CN114270343BActive Publication Date: 2025-10-31BEIJING OPPO TELECOMM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201980099530.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-23
Publication Date
2025-10-31
Estimated Expiration
2039-10-23

AI Technical Summary

Technical Problem

During the data request process, there are issues with excessively long request times and low efficiency caused by threads failing to query successfully. This is especially true when some nodes in multiple threads fail to query data successfully, resulting in excessive overall request time.

Method used

Data requests are distributed to multiple data request nodes, the request time is monitored and the recall rate is obtained, and the target node is discarded or restarted based on the recall rate to ensure that the data query is completed within the target time.

Benefits of technology

By dynamically managing data request nodes, the system ensures that data requests are completed within the target time, thereby improving the stability and integrity of data requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114270343B_ABST
    Figure CN114270343B_ABST
Patent Text Reader

Abstract

This application discloses a data request method, apparatus, system, server, and storage medium. The method includes: sending a received data request to multiple data request nodes, so that each data request node can query the requested data in its respective data domain. If the request time does not exceed a target time, the recall rate corresponding to the current data query detection is obtained; based on the recall rate, it is determined whether to discard the target node; if the target node is not discarded, it is determined whether to trigger the target node to re-query the data; if it is determined to re-query the data, the target node is triggered to re-query the data and enter the next data query detection. Thus, the above-mentioned method enables the overall requested data to be completed within the target time, and can further improve the stability and integrity of the requested data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a data request method, apparatus, system, server, and storage medium. Background Technology

[0002] With the development of internet businesses, data is also experiencing explosive growth. Various industries have increasingly higher demands for data manipulation; for example, recommendation and retrieval systems need to sift through massive amounts of data to extract a small subset that meets business requirements. However, certain shortcomings still exist in the data request process. Summary of the Invention

[0003] In view of the above problems, this application proposes a data request method, apparatus, system, server and storage medium to improve the above problems.

[0004] In a first aspect, this application provides a data request method, the method comprising: sending a received data request to multiple data request nodes, wherein the multiple data request nodes respectively query the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different; if the request time does not exceed a target time, obtaining the recall rate corresponding to the current data query detection, wherein the recall rate represents the overall data query success rate of the multiple data request nodes; determining whether to discard a target node based on the recall rate, wherein the target node is a data request node that has not yet successfully queried data; if the target node is not discarded, determining whether to trigger the target node to re-query the data; if it is determined to re-query the data, triggering the target node to re-query the data and entering the next data query detection; if the request time exceeds the target time, returning the data that the multiple data request nodes have currently queried.

[0005] Secondly, this application provides a data request method applied to a data request system, the data request system including a server and multiple data request nodes. The method includes: the server sending received data requests to the multiple data request nodes respectively; the multiple data request nodes querying the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different; if the request time does not exceed a target time, the server obtains the recall rate corresponding to the current data query detection, the recall rate representing the overall data query success rate of the multiple data request nodes; based on the recall rate, it is determined whether to discard a target node, the target node being a data request node that has not yet successfully queried data; if the target node is not discarded, it is determined whether to trigger the target node to re-query the data; if it is determined to re-query the data, the target node is triggered to re-query the data and enter the next data query detection; if the request time exceeds the target time, the data currently queried by the multiple data request nodes is returned.

[0006] Thirdly, this application provides a data request apparatus, comprising: a request distribution unit, configured to send received data requests to multiple data request nodes, wherein the multiple data request nodes query the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different; a parameter acquisition unit, configured to acquire the recall rate corresponding to the current data query detection if the request time does not exceed the target time, wherein the recall rate represents the overall data query success rate of the multiple data request nodes; a node processing unit, configured to determine whether to discard a target node based on the recall rate, wherein the target node is a data request node that has not yet successfully queried data; a re-query management unit, configured to determine whether to trigger the target node to re-query data if the target node is not discarded; if it is determined to re-query data, the target node is triggered to re-query data and enter the next data query detection; and a request management unit, configured to return the data currently queried by the multiple data request nodes if the request time exceeds the target time.

[0007] Fourthly, this application provides a data request system, including a server and multiple data request nodes; the server is used to send received data requests to the multiple data request nodes respectively; the multiple data request nodes are used to query the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different.

[0008] The server is further configured to: if the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection, wherein the recall rate represents the overall data query success rate of the multiple data request nodes; determine whether to discard the target node based on the recall rate, wherein the target node is the data request node that has not yet successfully retrieved data; if the target node is not discarded, determine whether to trigger the target node to re-query the data; if it is determined to re-query the data, trigger the target node to re-query the data and enter the next data query detection; if the request time exceeds the target time, return the data that the multiple data request nodes have currently retrieved.

[0009] Fifthly, this application provides an electronic device including a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the above-described method.

[0010] Sixthly, this application provides a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run by a processor.

[0011] This application provides a data request method, apparatus, system, server, and storage medium. Upon receiving a data request, the method sends the received data request to multiple data request nodes, allowing each node to query the requested data within its respective data domain. During the query process, the request time is monitored. If the request time does not exceed a target time, a recall rate representing the overall data query success rate of the multiple data request nodes is obtained. Based on the recall rate, it is determined whether to discard the target node, and if not, whether to re-query the target node. This approach ensures that after receiving a data request and sending it to multiple data request nodes, the request process can be monitored based on a configured target time. Furthermore, by dynamically discarding target nodes and triggering re-querying of target nodes when the request time does not exceed the target time, the method guarantees that the overall requested data can be completed within the target time, further improving the stability and integrity of the requested data. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1This paper illustrates a schematic diagram of the architecture of a data request system proposed in an embodiment of this application.

[0014] Figure 2 A flowchart of a data request method according to an embodiment of this application is shown;

[0015] Figure 3 A schematic diagram of multiple data fields in a data request method according to an embodiment of this application is shown;

[0016] Figure 4 A flowchart of a data request method according to another embodiment of this application is shown;

[0017] Figure 5 A flowchart of a data request method according to another embodiment of this application is shown;

[0018] Figure 6 A flowchart of a data request method according to another embodiment of this application is shown;

[0019] Figure 7 A flowchart of a data request method according to another embodiment of this application is shown;

[0020] Figure 8 This paper shows a structural block diagram of a data request device according to an embodiment of this application;

[0021] Figure 9 A structural block diagram of a data request apparatus according to another embodiment of this application is shown;

[0022] Figure 10 This paper illustrates a structural block diagram of another server for performing a data request method according to an embodiment of this application;

[0023] Figure 11 This is a storage unit in this application embodiment for storing or carrying program code that implements the data request method according to this application embodiment. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0025] With the development of internet businesses, data is also experiencing explosive growth, and the demand for data requests and operations is increasing. For example, in data recommendation and data retrieval services, it is necessary to filter data from large amounts of data to select those that meet business needs. For instance, in search services, users can enter keywords they wish to search for in the client, and then the client sends a search request carrying those keywords to the server. After receiving the search request, the server begins searching for content matching the keywords in various data domains and then returns it to the client for display to the user.

[0026] In a data request process, a server can launch multiple threads to simultaneously query received data requests. However, during their research on this data request process, the inventors discovered that among the launched threads, one or more may fail to successfully query the data. Based on the initially configured query mechanism, it might wait for all threads to successfully query before sending the retrieved data back to the requester. This results in excessive time being spent waiting for certain threads to query the data, and in some cases, even after continuous waiting, some nodes may still fail to query successfully, leading to a perceived low efficiency on the requester's end.

[0027] Therefore, after research, the inventors proposed a data request method, apparatus, system, server, and storage medium as provided in the embodiments of this application. The data request method provided in the embodiments of this application enables the sending of received data requests to multiple data request nodes. Based on a configured target time, the request process can be monitored. Furthermore, if the request time does not exceed the target time, the method combines dynamically discarding target nodes and triggering data re-checking on the target nodes to ensure that the overall requested data is completed within the target time. This also further improves the stability and integrity of the requested data.

[0028] Let's combine the following... Figure 1 The application environment involved in the embodiments of this application will be described.

[0029] Please see Figure 1An exemplary data request system 200 is illustrated. This system 200 may include a server 210 and multiple data request nodes, with data request nodes 220a, 220b, and 220c shown as examples. In this configuration, when the server 210 receives a data request from a business party, it can send the request to data request nodes 220a, 220b, and 220c, respectively, so that these nodes can simultaneously begin data querying.

[0030] It should be noted that the data fields corresponding to different data request nodes in this data request system are different. That is, the data fields corresponding to data request nodes 220a, 220b, and 220c are different. A data field can be understood as a range for data querying.

[0031] For example, a complete data table stores 100 data entries. The first 100 entries can be divided into three ranges: entries 30, 31, and 60; and entries 61 and 100. These 100 data entries are thus divided into three distinct ranges, which can be called three different data domains. Corresponding to the aforementioned data request nodes 220a, 220b, and 220c, during a data query, data request node 220a can correspond to the data domain 1 to 30, and thus match the query within this range. Similarly, data request node 220b can correspond to the data domain 31 to 60, and thus match the query within this range. Correspondingly, data request node 220c can correspond to the data field from the 61st data to the 100th data, and then match the query requirements within the range of the data field from the 61st data to the 100th data.

[0032] Of course, the identification of different data domains is not limited to data tables; any storage method that allows for regional division is within the scope of protection claimed in this application. For example, they can also correspond to different storage locations. For instance, folder A can correspond to one data domain, while folder B can correspond to another data domain.

[0033] The embodiments of this application will now be described in conjunction with the accompanying drawings.

[0034] Please see Figure 2 This application provides a data request method applied to a server, the method comprising:

[0035] Step S110: The received data request is sent to multiple data request nodes, so that the multiple data request nodes can query the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different.

[0036] It should be noted that, in this embodiment, the server is used to receive data requests sent by the business party and further distribute the data requests to multiple data request nodes after receiving them. Furthermore, to achieve the effect of simultaneous data queries by multiple data request nodes, each data request node can correspond to a different data domain.

[0037] In this application embodiment, there are multiple ways for multiple data request nodes to determine the data domain they are querying.

[0038] One approach is to determine the data domain based on the data field parameters carried in the data request sent by the server. It's important to note that although multiple data request nodes may be configured, their corresponding overall data storage area may be the same. In other words, all data can be understood as being stored in the same storage area. If multiple data request nodes are querying the same storage area, this could lead to duplicate data queries. For example, ... Figure 3 Although the overall storage area is divided into Region 1, Region 2, Region 3, and Region 4, multiple data request nodes may not be strictly associated with any one of these regions. This would result in multiple data request nodes querying data in Region 1. Therefore, in this approach, when the server distributes the received requests to each data request node, it can add the corresponding region identifier to the distributed data request as the data field for each data request node.

[0039] For example, consider the aforementioned data request nodes 220a, 220b, and 220c. If a data request sent to data request node 220a carries parameter 'a', then upon receiving the data request with parameter 'a', data request node 220a will recognize that the data field corresponding to the current data request is... Figure 3 Region 1 in the data field. Correspondingly, if the data request sent to data request node 220b carries parameter b, then after receiving the data request carrying parameter b, data request node 220b will recognize that the data field corresponding to the current data request is... Figure 3Region 2 in the data request. Correspondingly, if the data request sent to data request node 220c carries parameter c, then after receiving the data request carrying parameter c, data request node 220c will recognize that the data field corresponding to the current data request is... Figure 3 Region 3 in the diagram. Of course, in this approach, the data field corresponding to each data request node is not always the same. For example, data request node b could also be assigned a different data field. Figure 3 Data queries can be performed in area 1 as shown, or data request node a can be assigned accordingly. Figure 3 Data queries are performed in area 4, as shown. In this method, the server can determine the data domain corresponding to each data request node based on the type of data request from the current business party.

[0040] Alternatively, the data fields corresponding to each data request node are separate. In this approach, the data fields corresponding to each data request node are fixed.

[0041] Step S120: If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection. The recall rate represents the overall data query success rate of the multiple data request nodes.

[0042] It should be noted that the data query efficiency of each data request node may be affected by its own processing resource consumption or network congestion. This could result in some data request nodes successfully querying data while others have not yet started querying. Therefore, the recall rate in this embodiment can be used to reflect the proportion of data request nodes that have successfully queried data. In one approach, the recall rate is equal to the ratio of the number of nodes that have successfully queried data to the total number of data request nodes used in the current query.

[0043] It should be noted that a server can have multiple data request nodes, but not every data request needs to be forwarded to all data request nodes. Instead, only some of the data request nodes can be used.

[0044] It should be noted that, in this embodiment of the application, a successful data query can be understood as the data query node having already sent the requested data back to the server. Alternatively, it can be understood as the data request node having started sending data back, but some data has not yet been sent back.

[0045] Step S130: Based on the recall rate, determine whether to discard the target node, where the target node is a data request node that has not yet successfully retrieved data.

[0046] One approach is to configure the same recall rate for data requests from different business processes. Alternatively, different recall rates can be configured for different business requests. For example, for business processes requiring more complete data, a relatively higher recall rate can be configured to ensure more comprehensive data feedback.

[0047] Step S140: If the target node is not discarded, determine whether to trigger the target node to re-query the data.

[0048] As one approach, each data request node is configured with multiple data query devices. After initially receiving a large data request, the node can be configured to perform the data query using one of these devices. However, if the selected device malfunctions and cannot perform the query, it can be switched to another data query device. In this approach, the step of triggering the target node to re-perform the data query includes: triggering the target node to switch data query devices, and then performing the data query using the switched-in data query device.

[0049] Step S150: If it is determined that a data query should be performed again, the target node is triggered to perform a data query again and enter the next data query detection.

[0050] Step S160: If the request time exceeds the target time, return the data that the multiple data request nodes have currently queried.

[0051] It should be noted that, in this embodiment, the conditions for triggering the cessation of data query waiting include the target time and the current recall rate. Therefore, the data query results obtained under the condition that the cessation of data query waiting is triggered due to the target time may not satisfy the current data request. To ensure that the returned query results are consistent with the data request requirements, as one approach, the step of returning the data currently queried by the multiple data request nodes if the request time exceeds the target time includes: if the request time exceeds the target time, detecting whether the recall rate of the data currently queried by the multiple data request nodes is greater than a second specified recall rate; if so, returning the data currently queried by the multiple data request nodes.

[0052] This application provides a data request method. Upon receiving a data request, the method sends the received data request to multiple data request nodes, allowing each node to query the requested data within its respective data domain. During the query process, the request time is monitored. If the request time does not exceed a target time, a recall rate representing the overall data query success rate of the multiple data request nodes is obtained. Based on the recall rate, it is determined whether to discard a target node, and if not, whether to re-query the target node. This approach ensures that after receiving a data request and sending it to multiple data request nodes, the request process can be monitored based on a configured target time. Furthermore, by dynamically discarding target nodes and triggering re-querying of target nodes when the request time does not exceed the target time, the method guarantees that the overall requested data can be completed within the target time, further improving the stability and integrity of the requested data.

[0053] Please see Figure 4 This application provides a data request method applied to a server, the method comprising:

[0054] Step S210: The received data request is sent to multiple data request nodes, so that the multiple data request nodes can query the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different.

[0055] Step S211: Determine whether the request time is greater than the target time.

[0056] Step S220: If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection. The recall rate represents the overall data query success rate of the multiple data request nodes.

[0057] Step S230: Determine whether the recall rate is greater than the first specified recall rate.

[0058] Step S240: If the recall rate is greater than the first specified recall rate, determine to discard the target node and return the data that the multiple data request nodes have currently queried.

[0059] Step S250: If the recall rate is not greater than the first specified recall rate, determine that the target node is not discarded. The target node is the data request node that has not yet successfully queried data.

[0060] As one approach, the step of determining not to discard a target node if the recall rate is not greater than the first specified recall rate includes: if the recall rate is not greater than the first specified recall rate, obtaining a target time, wherein the target time is the larger of a preset minimum waiting time and a dynamic waiting time, and the dynamic waiting time is the product of the average time taken for a data request node that has successfully queried data to query data and a preset weight factor; if the waiting time corresponding to the target node is not greater than the target time, determining not to discard the target node.

[0061] Optionally, the number of data request nodes that have successfully queried data is obtained; the weight factor is updated based on the number, wherein the larger the number, the larger the value of the corresponding weight factor.

[0062] Furthermore, the step of updating the weight factor based on the quantity includes: obtaining the mapping relationship between the number of multiple data request nodes that have successfully queried data and their respective corresponding weight factors; and updating the weight factor based on the mapping relationship.

[0063] Step S260: If the target node is not discarded, determine whether to trigger the target node to re-query the data.

[0064] Step S261: If it is determined that the data query will not be performed again, proceed to the next data query test.

[0065] Step S270: If it is determined that a data query should be performed again, the target node is triggered to perform a data query again and enter the next data query detection.

[0066] Step S212: If the request time exceeds the target time, return the data that the multiple data request nodes have currently queried.

[0067] This application provides a data request method that, through the aforementioned approach, allows for the monitoring of the request process based on a configured target time after receiving a data request and sending it to multiple data request nodes. Furthermore, if the request time does not exceed the target time, it combines dynamically discarding target nodes and triggering data re-querying on the target nodes to ensure that the overall requested data is completed within the target time, further improving the stability and integrity of the requested data. In this embodiment, whether to discard a target node can be dynamically selected by combining minimum waiting time and dynamic waiting time, improving the accuracy and rationality of target node discard judgment.

[0068] Please see Figure 5 This application provides a data request method applied to a server, the method comprising:

[0069] Step S310: The received data request is sent to multiple data request nodes respectively, so that the multiple data request nodes can query the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different.

[0070] Step S320: If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection. The recall rate represents the overall data query success rate of the multiple data request nodes.

[0071] Step S330: Based on the recall rate, determine whether to discard the target node, where the target node is a data request node that has not yet successfully retrieved data.

[0072] Step S340: If the target node is not discarded, obtain the historical data query success rate of the target node.

[0073] Step S350: If the historical data query success rate of the target node is greater than the target threshold, it is determined that the target node is triggered to re-query the data.

[0074] Step S360: If the historical data query success rate of the target node is not greater than the target threshold, it is determined that the target node will not be triggered to re-query the data.

[0075] Step S370: If it is determined that a data query should be performed again, the target node is triggered to perform a data query again and enter the next data query detection.

[0076] Step S380: If the request time exceeds the target time, return the data that the multiple data request nodes have currently queried.

[0077] This application provides a data request method that, through the aforementioned approach, allows for monitoring of the request process based on a configured target time after receiving a data request and sending it to multiple data request nodes. Furthermore, if the request time does not exceed the target time, it combines dynamically discarding target nodes and triggering target nodes to re-query data, ensuring that the overall requested data is completed within the target time and further improving the stability and integrity of the requested data. In this embodiment, the method determines whether to trigger the target node to re-query data based on its historical data query success rate, improving the accuracy and rationality of the determination of whether to re-query.

[0078] Please see Figure 6 This application provides a data request method applied to a server, the method comprising:

[0079] Step S410: Receive data requests sent by the service provider.

[0080] Step S420: Detect whether there are multiple data request nodes.

[0081] Step S430: If there is a single data request node, send the data request to the data request node, and trigger the data request node to return data based on the historical query situation of the data request node.

[0082] Step S440: If there are multiple data request nodes, the received data request is sent to the multiple data request nodes respectively, so that the multiple data request nodes can query the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different.

[0083] Step S450: If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection. The recall rate represents the overall data query success rate of the multiple data request nodes.

[0084] Step S460: Based on the recall rate, determine whether to discard the target node, where the target node is a data request node that has not yet successfully retrieved data.

[0085] Step S470: If the target node is not discarded, determine whether to trigger the target node to re-query the data;

[0086] Step S480: If it is determined that a data query should be performed again, the target node is triggered to perform a data query again and enter the next data query detection.

[0087] Step S490: If the request time exceeds the target time, return the data that the multiple data request nodes have currently queried.

[0088] This application provides a data request method that, through the aforementioned approach, allows for monitoring of the request process based on a configured target time after receiving a data request and sending it to multiple data request nodes. Furthermore, if the request time does not exceed the target time, it combines dynamically discarding target nodes and triggering data re-queries on those nodes to ensure that the overall requested data is completed within the target time, further improving the stability and integrity of the requested data. In this embodiment, upon receiving a data request from the business party, the number of available data request nodes is first determined. If there are multiple nodes with sufficient data, the aforementioned step of sending the received data request to multiple data request nodes is executed. If only a single data request node is available, the data request node can be directly triggered to return data based on its historical query data, thereby improving the flexibility of data requests.

[0089] Please see Figure 7 This application provides a data request method applied to a data request system, which includes a server and multiple data request nodes. The method includes:

[0090] Step S510: The server sends the received data requests to multiple data request nodes respectively.

[0091] Step S520: The multiple data request nodes query the data requested by the data request in their respective data domains, wherein the data domains of the different data request nodes are different.

[0092] Step S530: If the request time does not exceed the target time, the server obtains the recall rate corresponding to the current data query detection. The recall rate represents the overall data query success rate of the multiple data request nodes.

[0093] Step S540: Based on the recall rate, determine whether to discard the target node, where the target node is a data request node that has not yet successfully retrieved data;

[0094] Step S550: If the target node is not discarded, determine whether to trigger the target node to re-query the data; if it is determined to re-query the data, trigger the target node to re-query the data and proceed to the next data query detection.

[0095] Step S560: If the request time exceeds the target time, return the data that the multiple data request nodes have currently queried.

[0096] Optionally, if the target node is discarded, the server will return the data that has already been queried by the multiple data request nodes.

[0097] Optionally, if it is determined that the data query should not be performed again, the server triggers the next data query detection.

[0098] This application provides a data request method that, through the aforementioned means, after receiving a data request and sending it to multiple data request nodes, can detect the request process based on a configured target time. Furthermore, if the request time does not exceed the target time, it combines dynamically discarding target nodes and triggering target nodes to re-examine data, thereby ensuring that the overall requested data can be completed within the target time and further improving the stability and integrity of the requested data.

[0099] Please see Figure 8 This application provides a data request device 600, which includes:

[0100] The request distribution unit 610 is used to send the received data request to multiple data request nodes, so that the multiple data request nodes can query the data requested by the data request in their respective data domains, wherein the data domains of the different data request nodes are different.

[0101] The parameter acquisition unit 620 is used to acquire the recall rate corresponding to the current data query detection if the request time does not exceed the target time. The recall rate represents the overall data query success rate of the multiple data request nodes.

[0102] The node processing unit 630 is used to determine whether to discard a target node based on the recall rate, wherein the target node is a data request node that has not yet successfully retrieved data.

[0103] In one approach, the node processing unit 630 is specifically configured to compare the recall rate with a first specified recall rate; if the recall rate is not greater than the first specified recall rate, it is determined not to discard the target node. Furthermore, the node processing unit 630 is also configured to determine to discard the target node if the recall rate is greater than the first specified recall rate.

[0104] In one approach, the node processing unit 630 is specifically configured to, if the recall rate is not greater than the first specified recall rate, obtain a target time, wherein the target time is the larger of a preset minimum waiting time and a dynamic waiting time, and the dynamic waiting time is the product of the average time taken by the data request node that has successfully queried data and a preset weight factor; if the waiting time corresponding to the target node is not greater than the target time, determine that the target node should not be discarded.

[0105] In this approach, optionally, the node processing unit 630 is specifically configured to obtain the number of data request nodes that have successfully queried data; and update the weight factor based on the number, wherein a larger number corresponds to a larger value of the weight factor. Optionally, the node processing unit 630 is specifically configured to obtain the mapping relationship between the number of multiple data request nodes that have successfully queried data and their respective corresponding weight factors; and update the weight factor based on the mapping relationship.

[0106] The re-query management unit 640 is used to determine whether to trigger the target node to re-query the data if the target node is not discarded; if it is determined to re-query the data, the target node is triggered to re-query the data and enter the next data query detection.

[0107] As one method, the re-query management unit 640 is specifically used to obtain the historical data query success rate of the target node; if the historical data query success rate of the target node is greater than the target threshold, it is determined that the target node is triggered to re-query the data; if the historical data query success rate of the target node is not greater than the target threshold, it is determined that the target node is not triggered to re-query the data.

[0108] Optionally, each data request node is configured with multiple data query devices. In this case, the re-query management unit 640 is specifically used to trigger the target node to switch data query devices, and then perform data queries through the switched data query devices.

[0109] The request management unit 650 is used to return the data that has been queried by the multiple data request nodes if the request time exceeds the target time.

[0110] In one approach, the request management unit 650 is specifically used to detect whether the recall rate of the data currently queried by the multiple data request nodes is greater than a second specified recall rate if the request time exceeds the target time; if so, the data currently queried by the multiple data request nodes is returned.

[0111] As a way, such as Figure 9The illustrated apparatus 600 further includes a node detection unit 660, configured to determine the current number of data request nodes before the step of sending received data requests to multiple data request nodes. In this mode, if there are multiple data request nodes, a request distribution unit 610 is configured to send the received data request to each of the multiple data request nodes. The request distribution unit 610 is also configured to send the data request to a single data request node if there is one. Correspondingly, a request management unit 650 is configured to trigger the data request node to return data based on its historical query history.

[0112] The request management unit 650 is also configured to return the data that the plurality of data request nodes have already queried if the target node is discarded.

[0113] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.

[0114] The following will combine Figure 10 This application describes an electronic device.

[0115] Please see Figure 10 Based on the aforementioned data request method, this application embodiment also provides another server 200 including a processor 104 capable of executing the aforementioned data request method. The server 200 further includes a memory 104 and a network module 106. The memory 104 stores a program capable of executing the content described in the aforementioned embodiment, and the processor 102 can execute the program stored in the memory 104. The internal structure of the processor 102 can be as follows... Figure 1 As shown.

[0116] The processor 102 may include one or more cores for data processing and message matrix units. The processor 102 connects to various parts of the server 200 via various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and by calling data stored in the memory 104. Optionally, the processor 102 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 102 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 102 and may be implemented separately using a communication chip.

[0117] The memory 104 may include random access memory (RAM) or read-only memory (ROM). The memory 104 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 104 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the terminal 100 during use (such as phonebook data, audio and video data, chat log data, etc.).

[0118] The network module 106 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby communicating with communication networks or other devices, such as audio playback devices. The network module 106 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM cards), memory, etc. The network module 106 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices through wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks (WLANs), or metropolitan area networks (MANs). For example, the network module 106 can interact with base stations.

[0119] Please refer to Figure 11 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 1100 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0120] The computer-readable storage medium 1100 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1100 has storage space for program code 810 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 1110 may, for example, be compressed in a suitable form.

[0121] In summary, the data request method, apparatus, system, server, and storage medium provided in this application, upon receiving a data request, send the received data request to multiple data request nodes, so that each of the multiple data request nodes can query the data requested by the data request in its respective data domain. During the query process, the request time is monitored. If the request time does not exceed a target time, a recall rate representing the overall data query success rate of the multiple data request nodes is obtained. Based on the recall rate, it is determined whether to discard the target node, and if not discarding the target node, whether to re-query the data for the target node. Thus, by the aforementioned method, after sending the received data request to multiple data request nodes, the request process can be monitored based on a configured target time. Furthermore, by combining dynamically discarding target nodes and triggering data re-query on target nodes when the request time does not exceed the target time, it is ensured that the overall requested data can be completed within the target time, and the stability and integrity of the requested data can be further improved.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A data request method, characterized in that, The method includes: The received data request is sent to multiple data request nodes, so that the multiple data request nodes can query the data requested by the data request in their respective data domains, wherein the data domains of the different data request nodes are different; If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection. The recall rate represents the overall data query success rate of the multiple data request nodes. The recall rate is compared with the first specified recall rate; If the recall rate is not greater than the first specified recall rate, the target time is obtained. The target time is the larger of the preset minimum waiting time and the dynamic waiting time. The dynamic waiting time is the product of the average time taken by the data request node that has successfully queried the data and the preset weight factor. If the waiting time corresponding to the target node is not greater than the target time, it is determined that the target node will not be discarded. The target node is the data request node that has not yet successfully retrieved data. If the target node is not discarded, determine whether to trigger the target node to re-query the data; If it is determined that a new data query should be performed, the target node is triggered to perform a new data query and enter the next data query detection. If the request time exceeds the target time, the data that the multiple data request nodes have currently queried will be returned.

2. The method according to claim 1, characterized in that, If the recall rate is greater than the first specified recall rate, the target node is discarded.

3. The method according to claim 1, characterized in that, The method further includes: Get the number of data request nodes that have successfully queried data; The weight factor is updated based on the quantity, wherein the larger the quantity, the larger the value of the corresponding weight factor.

4. The method according to claim 3, characterized in that, The step of updating the weight factor based on the quantity includes: Obtain the mapping relationship between the number of data request nodes that have successfully queried data and their respective weight factors; The weighting factor is updated based on the mapping relationship.

5. The method according to any one of claims 1-4, characterized in that, The step of determining whether to trigger the target node to re-query the data includes: Obtain the historical data query success rate of the target node; If the historical data query success rate of the target node is greater than the target threshold, it is determined that the target node is triggered to perform a data query again. If the historical data query success rate of the target node is not greater than the target threshold, it is determined that the target node will not be triggered to re-query the data.

6. The method according to any one of claims 1-4, characterized in that, Each data request node is configured with multiple data query devices, and the step of triggering the target node to re-query the data includes: After the target node is triggered to switch data query devices, data queries are performed through the switched data query devices.

7. The method according to any one of claims 1-4, characterized in that, The step of returning the data that the multiple data request nodes have already queried if the request time exceeds the target time includes: If the request time exceeds the target time, check whether the recall rate of the data currently queried by multiple data request nodes is greater than the second specified recall rate; If so, return the data that the multiple data request nodes have already queried.

8. The method according to any one of claims 1-4, characterized in that, Before the step of sending the received data requests to multiple data request nodes, the following is also included: If a data request is received, check the number of nodes currently requesting data. If there are multiple data request nodes, the received data request will be sent to the multiple data request nodes respectively.

9. The method according to claim 8, characterized in that, The method further includes: If there is a single data request node, the data request is sent to the data request node, and based on the historical query situation of the data request node, the data request node is triggered to return data.

10. The method according to any one of claims 1-4, characterized in that, The method further includes: If the target node is discarded, the data that has already been queried by the multiple data request nodes will be returned.

11. The method according to any one of claims 1-4, characterized in that, The method further includes: If it is determined that the data query will not be performed again, proceed to the next data query check.

12. A data request method, characterized in that, Applied to a data request system, the data request system including a server and multiple data request nodes, the method includes: The server sends the received data requests to multiple data request nodes respectively; The multiple data request nodes each query the data requested by the data request in their respective data domains, wherein the data domains of the different data request nodes are different. If the request time does not exceed the target time, the server obtains the recall rate corresponding to the current data query detection. The recall rate represents the overall data query success rate of the multiple data request nodes. The recall rate is compared with a first specified recall rate. If the recall rate is not greater than the first specified recall rate, the target time is obtained. The target time is the larger of a preset minimum waiting time and a dynamic waiting time. The dynamic waiting time is the product of the average time taken by the data request nodes that have successfully queried data and a preset weighting factor. If the waiting time corresponding to the target node is not greater than the target time, it is determined not to discard the target node, which is a data request node that has not yet successfully retrieved data; if the target node is not discarded, it is determined whether to trigger the target node to re-query the data; if it is determined to re-query the data, the target node is triggered to re-query the data and enters the next data query detection; if the request time exceeds the target time, the data that the multiple data request nodes have currently retrieved is returned.

13. The method according to claim 12, characterized in that, The method further includes: If the target node is discarded, the server will return the data that the multiple data request nodes have already queried.

14. The method according to claim 12, characterized in that, The method further includes: If it is determined that the data query should not be performed again, the server will trigger the next data query detection.

15. A data request device, characterized in that, The device includes: The request distribution unit is used to send the received data request to multiple data request nodes respectively, so that the multiple data request nodes can query the data requested by the data request in their respective data domains, wherein the data domains of the different data request nodes are different. The parameter acquisition unit is used to acquire the recall rate corresponding to the current data query detection if the request time does not exceed the target time. The recall rate represents the overall data query success rate of the multiple data request nodes. A node processing unit is used to compare the recall rate with a first specified recall rate; if the recall rate is not greater than the first specified recall rate, a target time is obtained, wherein the target time is the larger of a preset minimum waiting time and a dynamic waiting time, and the dynamic waiting time is the product of the average time taken by data request nodes that have successfully queried data and a preset weight factor; if the waiting time corresponding to the target node is not greater than the target time, it is determined that the target node is not discarded, wherein the target node is a data request node that has not yet successfully queried data. The re-query management unit is used to determine whether to trigger the target node to re-query the data if the target node is not discarded; if it is determined to re-query the data, the target node is triggered to re-query the data and enter the next data query detection. The request management unit is used to return the data that the multiple data request nodes have currently queried if the request time exceeds the target time.

16. A data request system, characterized in that, This includes the server and multiple data request nodes; The server is used to send the received data requests to multiple data request nodes respectively; The plurality of data request nodes are used to query the data requested by the data request in their respective data domains, wherein the data domains of different data request nodes are different; The server is further configured to: if the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection, wherein the recall rate represents the overall data query success rate of the multiple data request nodes; compare the recall rate with a first specified recall rate; if the recall rate is not greater than the first specified recall rate, obtain a target time, wherein the target time is the larger of a preset minimum waiting time and a dynamic waiting time, wherein the dynamic waiting time is the product of the average time taken by the data request nodes that have successfully queried data and a preset weight factor; if the waiting time corresponding to the target node is not greater than the target time, determine not to discard the target node, wherein the target node is a data request node that has not yet successfully queried data; if the target node is not discarded, determine whether to trigger the target node to re-query data; if it is determined to re-query data, trigger the target node to re-query data and enter the next data query detection; if the request time exceeds the target time, return the data that the multiple data request nodes have currently queried.

17. A server, characterized in that, It includes a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-12.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code, wherein the program code, when executed by a processor, performs the method according to any one of claims 1-12.

Citation Information

Patent Citations

  • Distributed storage system upgrade method and apparatus

    CN106936622A

  • Data query system, method and apparatus

    CN108205561A