WO2021077341A1 - 数据请求方法、装置、系统、服务器及存储介质 - Google Patents

数据请求方法、装置、系统、服务器及存储介质 Download PDF

Info

Publication number
WO2021077341A1
WO2021077341A1 PCT/CN2019/112846 CN2019112846W WO2021077341A1 WO 2021077341 A1 WO2021077341 A1 WO 2021077341A1 CN 2019112846 W CN2019112846 W CN 2019112846W WO 2021077341 A1 WO2021077341 A1 WO 2021077341A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
request
query
target node
nodes
Prior art date
Application number
PCT/CN2019/112846
Other languages
English (en)
French (fr)
Inventor
赵辉
Original Assignee
北京欧珀通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京欧珀通信有限公司 filed Critical 北京欧珀通信有限公司
Priority to CN201980099530.7A priority Critical patent/CN114270343A/zh
Priority to PCT/CN2019/112846 priority patent/WO2021077341A1/zh
Publication of WO2021077341A1 publication Critical patent/WO2021077341A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions

Definitions

  • This application relates to the field of computer technology, and more specifically, to a data request method, device, system, server, and storage medium.
  • this application proposes a data request method, device, system, server and storage medium to improve the above-mentioned problems.
  • this application provides a data request method, the method comprising: sending the received data request to multiple data requesting nodes respectively, so as to use the multiple data requesting nodes in their respective data domains.
  • this application provides a data request method applied to a data request system.
  • the data request system includes a server and a plurality of data request nodes.
  • the method includes: the server sends the received data requests separately To multiple data requesting nodes; the multiple data requesting nodes respectively query the data requested by the data request in their respective data fields, wherein the data fields of different data requesting nodes are different; if the request takes time When the target usage is not exceeded, the server obtains the recall rate corresponding to the current data query detection, the recall rate characterizing the current overall data query success of the multiple data requesting nodes; judging whether to discard the target node based on the recall rate,
  • the target node is a data requesting node that has not successfully inquired about data; if the target node is not discarded, it is determined whether to trigger the target node to perform data query again; if it is determined to perform data query again, trigger the target node to perform data query again , And enter the next data query detection; if the request time exceeds the target time
  • the present application provides a data request device, the device includes: a request distribution unit, configured to send received data requests to multiple data requesting nodes, respectively, for use in the multiple data requesting nodes Query the data requested by the data request in their respective data domains, where the data domains of different data request nodes are different; the parameter obtaining unit is used to obtain if the request time does not exceed the target time When the data query detects the corresponding recall rate, the recall rate represents the current overall data query success of the multiple data requesting nodes; the node processing unit is configured to determine whether to discard the target node based on the recall rate, and the target The node is a data requesting node that has not successfully inquired about the data; the recheck management unit is used to determine whether to trigger the target node to perform data query again if the target node is not discarded; if it is determined to perform the data query again, trigger the target node Perform data query again, and enter the next data query detection; the request management unit is configured to return the data that has
  • the present application provides a data request system, including a server and multiple data request nodes; the server is configured to send received data requests to multiple data request nodes; the multiple data requests Nodes, configured to query the data requested by the data request in respective data domains, wherein the data domains of different data request nodes are different;
  • the server is further configured to obtain the recall rate corresponding to the current data query detection if the request time does not exceed the target time, and the recall rate represents the current overall data query success status of the multiple data request nodes; based on the recall If the target node is not discarded, it is determined whether to trigger the target node to perform data query again; if it is determined to perform the data query again, the data query node is triggered.
  • the target node performs data query again, and enters the next data query detection; if the request time exceeds the target time, the data that has been queried by the multiple data request nodes currently is returned.
  • the present 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 method.
  • the present application provides a computer-readable storage medium with program code stored in the computer-readable storage medium, wherein the above-mentioned method is executed when the program code is executed by a processor.
  • the data request method, device, system, server, and storage medium provided by the present application after receiving the data request, respectively send the received data request to multiple data request nodes for use in the multiple data requests
  • the nodes respectively query the data requested by the data request in their respective data domains. Monitor the request time during the query process, if the request time does not exceed the target time, obtain the recall rate that characterizes the current overall data query success of the multiple data request nodes, and determine whether to discard the target node based on the recall rate, and Whether to perform data query again on the target node without discarding the target node.
  • the request process can be detected based on the configured target time, and the target node can be dynamically discarded when the request time does not exceed the target time. And the way to trigger the target node to recheck the data, to ensure that the overall requested data can be completed within the target time, and it can also further improve the stability and integrity of the requested data.
  • FIG. 1 shows a schematic diagram of the architecture of a data request system proposed by an embodiment of the present application
  • FIG. 2 shows a flowchart of a data request method proposed by an embodiment of the present application
  • FIG. 3 shows a schematic diagram of multiple data fields in a data request method proposed by an embodiment of the present application
  • FIG. 4 shows a flowchart of a data request method proposed by another embodiment of the present application.
  • FIG. 5 shows a flowchart of a data request method proposed by still another embodiment of the present application.
  • Fig. 6 shows a flowchart of a data request method proposed by another embodiment of the present application.
  • FIG. 7 shows a flowchart of a data request method proposed by another embodiment of the present application.
  • FIG. 8 shows a structural block diagram of a data request device proposed in an embodiment of the present application.
  • FIG. 9 shows a structural block diagram of a data request device proposed by another embodiment of the present application.
  • FIG. 10 shows a structural block diagram of another server of the present application for executing the data request method according to an embodiment of the present application
  • Fig. 11 is a storage unit for storing or carrying program code for implementing the data request method according to the embodiment of the present application according to an embodiment of the present application.
  • the server can start multiple threads to query the received data request at the same time.
  • the inventor discovered during the process of researching the related data request process.
  • one or more threads may indicate that the data query cannot be successfully performed.
  • it may be necessary to wait for all threads to be uniform. After successful data query, all the queried data is fed back to the data requester, then this will cause the data request process to consume too much time waiting for some threads to perform data query, and in some cases Even if it keeps waiting, some nodes cannot successfully perform data query, which causes the data requester to perceive that the efficiency of the request is low.
  • the inventor proposed a data request method, device, system, server, and storage medium provided in the embodiments of the present application.
  • the request process can be detected based on the configured target time, and the request time does not exceed
  • the target time is used, combined with the method of dynamically discarding the target node and triggering the target node to perform data rechecking, it is guaranteed that the overall requested data can be completed within the target time, and the stability and integrity of the requested data can also be further improved .
  • the data request system 200 may include a server 210 and multiple data request nodes.
  • the figure exemplarily shows a data request node 220a and a data request node 220b. And the data request node 220c.
  • the server 210 can send the data request to the data requesting node 220a, the data requesting node 220b, and the data requesting node 220c, so that the data requesting node 220a, the data requesting node 220a, and the data requesting node 220c
  • the node 220b and the data requesting node 220c respectively start data query at the same time.
  • the data domain can be understood as a range of data query.
  • the first data to the 30th data can be divided into a range
  • the 31st data to the 60th data can be divided into a range
  • the first data can be divided into a range.
  • 61 data to 100 data can be divided into one range
  • the 100 conditional data is divided into three different ranges, and these three different ranges can be called three different data fields.
  • the data request node 220a when performing data query, can correspond to the data field from the first data to the 30th data, and then in the first From 1 data to 30th data, the data field needs to match the query.
  • the data requesting node 220b can correspond to the data field from the 31st data to the 60th data, and then to match the query requirements within the data field from the 31st data to the 60th data.
  • the data requesting node 220c can correspond to the data field from the 61st data to the 100th data, and then the matching query needs in the data field from the 61st data to the 100th data.
  • the confirmation of different data fields is not limited to the data table, as long as the storage methods that can be divided into regions are within the scope of protection of this application.
  • it can also correspond to different storage locations.
  • folder A can be mapped to a data field
  • folder B can be mapped to another data field.
  • a data request method provided by an embodiment of the present application is applied to a server, and the method includes:
  • Step S110 Send the received data request to multiple data requesting nodes respectively, so that the multiple data requesting nodes respectively query the data requested by the data request in their respective data domains, where different The data field of the data request node is different.
  • the server is used to receive the data request sent by the business party, and after the data request is received, further distribute the data request to multiple data request nodes.
  • each data request node may correspond to a different data domain.
  • the server can be determined according to the data domain parameter carried in the data request sent by the server.
  • the total data storage area corresponding to them may be the same. That is, it can be understood that all data is stored in the same storage area, so multiple data request nodes go to the same storage area for data query, then this may cause data query duplication.
  • the total storage area shown in Figure 3 is divided into area 1, area 2, area 3, and area 4, multiple data request nodes may not strictly correspond to one of the areas, which will cause Multiple data requesting nodes all go to area 1 for data query.
  • the server distributes the received request to each data requesting node, it can add the identifier of the corresponding area to the distributed data request as the data field corresponding to each data requesting node.
  • the data request sent to the data requesting node 220a carries the parameter a
  • the data requesting node 220a will recognize that the data field corresponding to the current data request is the area in Figure 3 after receiving the data request carrying the parameter a. 1.
  • the data request sent to the data requesting node 220b carries the parameter b
  • the data requesting node 220b will recognize that the data field corresponding to the current data request is as shown in Figure 3 after receiving the data request carrying the parameter b. In the area 2.
  • the data request sent to the data request node 220c carries the parameter c
  • the data request node 220c will recognize that the data field corresponding to the current data request is as shown in Figure 3 after receiving the data request carrying the parameter c.
  • the data field corresponding to each data request node is not the same every time.
  • the data request node b may also be allocated to perform data query corresponding to the area 1 shown in FIG. 3
  • the data request node a may also be allocated to perform data query corresponding to the area 4 shown in FIG.
  • the server can determine the data field corresponding to each data request node according to the type of the data request of the current business party.
  • the data fields corresponding to each data request node are separated from each other. In this way, the data field corresponding to each data request node is fixed.
  • Step S120 If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection, and the recall rate represents the current overall data query success of the multiple data request nodes.
  • the recall rate in the embodiment of the present application can be used to reflect the proportion of data request nodes that have successfully inquired about data so far. As a way, the recall rate is equal to the ratio of the number of nodes that have successfully inquired data to the number of data request nodes used at that time.
  • the server may correspond to multiple data request nodes, but not every data request needs to be forwarded to all data request nodes, but only some of the data request nodes may be used.
  • a successful data query can be understood as the data query node has fed back the data that needs to be queried to the server. It can also be understood that the data requesting node has already started data feedback, but some data has not been fed back.
  • Step S130 Determine whether to discard the target node based on the recall rate, the target node being a data requesting node that has not successfully inquired about data.
  • the same recall rate can be configured for data requests of different services. It is also possible to configure different recall rates corresponding to different business requests. For example, when the data requirements for some services are relatively complete, the corresponding recall rate can be configured to be relatively high to ensure that there can be relatively complete data feedback.
  • Step S140 If the target node is not discarded, determine whether to trigger the target node to perform data query again.
  • each data request node is configured with multiple data query devices, then after the data request node first accepts the big data request, one of the data query devices can be configured to perform data query, but it may happen to be selected If the device fails to perform data query, then you can switch to another data query device to perform data query again. Then, in this manner, the step of triggering the target node to perform data query again includes: after triggering the target node to switch the data query device, data query is performed through the switched data query device.
  • Step S150 If it is determined to perform data query again, trigger the target node to perform data query again, and enter the next data query detection.
  • Step S160 If the request time exceeds the target time, return the data currently inquired by the multiple data request nodes.
  • the conditions for triggering the no longer waiting for data query include the target time and the current recall rate. Then, the data query result obtained in this case where the data query waiting is no longer triggered because the target time is used may not meet the current data request. Then, in order to ensure that the feedback query result is consistent with the data request requirement, as a way, if the request time exceeds the target time, the step of returning the data that the multiple data requesting nodes have currently queried includes: If the request time exceeds the target time, check whether the recall rate of the data currently queried by multiple data requesting nodes is greater than the second specified recall rate; if so, return the data currently queried by the multiple data requesting nodes .
  • the received data request is sent to multiple data requesting nodes respectively, so that the multiple data requesting nodes can compare data in their respective data domains.
  • the data request is for querying the requested data. Monitor the request time during the query process, if the request time does not exceed the target time, obtain the recall rate that characterizes the current overall data query success of the multiple data request nodes, and determine whether to discard the target node based on the recall rate, and Whether to perform data query again on the target node without discarding the target node.
  • the request process can be detected based on the configured target time, and the target node can be dynamically discarded when the request time does not exceed the target time. And the way to trigger the target node to recheck the data, to ensure that the overall requested data can be completed within the target time, and it can also further improve the stability and integrity of the requested data.
  • a data request method provided by an embodiment of the present application is applied to a server, and the method includes:
  • Step S210 Send the received data request to multiple data requesting nodes respectively, so that the multiple data requesting nodes respectively query the data requested by the data request in their respective data domains, where different The data field of the data request node is different.
  • Step S211 Determine whether the request time is greater than the target time.
  • Step S220 If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection, and the recall rate represents the current overall data query success status of the multiple data request nodes.
  • Step S230 Determine whether the recall rate is greater than the first designated recall rate.
  • Step S240 If the recall rate is greater than the first designated recall rate, determine to discard the target node, and return the data that the multiple data requesting nodes have currently inquired about.
  • Step S250 If the recall rate is not greater than the first designated recall rate, it is determined not to discard the target node, and the target node is a data request node that has not successfully inquired about data.
  • the step of determining not to discard the target node includes: if the recall rate is not greater than the first designated recall rate, obtaining the target time, The target time is the larger one of the preset minimum waiting time and the dynamic waiting time, and the dynamic waiting time is the average time used to query the data by the data request node that has successfully inquired 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 not to discard the target node.
  • the step of updating the weighting factor based on the number includes: obtaining a mapping relationship between the number of multiple data request nodes that have successfully inquired data and their respective weighting factors; and updating all the weighting factors based on the mapping relationship.
  • the weight factor is
  • Step S260 If the target node is not discarded, determine whether to trigger the target node to perform data query again.
  • Step S261 If it is determined that the data query is not to be performed again, enter the next data query detection.
  • Step S270 If it is determined to perform data query again, trigger the target node to perform data query again, and enter the next data query detection.
  • Step S212 If the request time exceeds the target time, the data that the multiple data requesting nodes have currently queried are returned.
  • This application provides a data request method, so that after the received data request is sent to multiple data request nodes separately, the request process can be detected based on the configured target time, and the request time does not exceed the target
  • time is used, combining with the method of dynamically discarding the target node and triggering the target node to perform data rechecking, 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 also be further improved.
  • whether the target node is discarded can be dynamically selected in combination with the minimum waiting time and the dynamic waiting time, which improves the accuracy and rationality of the target node discarding judgment.
  • a data request method provided by an embodiment of the present application is applied to a server, and the method includes:
  • Step S310 Send the received data request to multiple data requesting nodes respectively, so that the multiple data requesting nodes respectively query the data requested by the data request in their respective data domains, where different The data field of the data request node is different.
  • Step S320 If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection, and the recall rate represents the current overall data query success status of the multiple data request nodes.
  • Step S330 Determine whether to discard the target node based on the recall rate, the target node being a data requesting node that has not successfully inquired about data.
  • Step S340 If the target node is not discarded, obtain the historical data query success rate of the target node.
  • Step S350 If the historical data query success rate of the target node is greater than a target threshold, it is determined to trigger the target node to perform data query again.
  • Step S360 If the historical data query success rate of the target node is not greater than a target threshold, it is determined not to trigger the target node to perform data query again.
  • Step S370 If it is determined to perform data query again, trigger the target node to perform data query again, and enter the next data query detection.
  • Step S380 If the request time exceeds the target time, return the data currently inquired by the multiple data request nodes.
  • This application provides a data request method, so that after the received data request is sent to multiple data request nodes separately, the request process can be detected based on the configured target time, and the request time does not exceed the target When time is used, combining with the method of dynamically discarding the target node and triggering the target node to perform data rechecking, 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 also be further improved. Moreover, in this embodiment, it is determined whether to trigger the target node to perform data query again based on the historical data query success rate of the target node, which improves the accuracy and rationality of determining whether to recheck.
  • a data request method provided by an embodiment of the present application is applied to a server, and the method includes:
  • Step S410 Receive the data request sent by the service party.
  • Step S420 Detect whether the current number of data request nodes is multiple.
  • 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.
  • Step S440 If there are multiple data requesting nodes, send the received data request to multiple data requesting nodes respectively for the multiple data requesting nodes to request the data request in their respective data domains.
  • Query data wherein the data fields of different data request nodes are different.
  • Step S450 If the request time does not exceed the target time, obtain the recall rate corresponding to the current data query detection, and the recall rate represents the current overall data query success status of the multiple data request nodes.
  • Step S460 Determine whether to discard the target node based on the recall rate, the target node being a data requesting node that has not successfully inquired about data.
  • Step S470 If the target node is not discarded, determine whether to trigger the target node to perform data query again;
  • Step S480 If it is determined to perform data query again, trigger the target node to perform data query again, and enter the next data query detection.
  • Step S490 If the request time exceeds the target time, the data that has been queried by the multiple data requesting nodes currently is returned.
  • This application provides a data request method, so that after the received data request is sent to multiple data request nodes separately, the request process can be detected based on the configured target time, and the request time does not exceed the target When time is used, combining with the method of dynamically discarding the target node and triggering the target node to perform data rechecking, 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 also be further improved. Moreover, in this embodiment, after receiving the data request sent by the business party, it will first determine the number of data request nodes currently available. If there are multiple data nodes, then perform the aforementioned receiving data request.
  • the received data request is sent to multiple data requesting nodes separately, and in the case of only a single data requesting node, the data requesting node can be triggered to return data directly according to the historical query situation of the single data requesting node, and then Improve the flexibility of data request.
  • the data request system includes a server and a plurality of data request nodes, and the method includes:
  • Step S510 The server sends the received data request to multiple data request nodes respectively.
  • Step S520 The multiple data requesting nodes respectively query the data requested by the data request in their respective data domains, where different data requesting nodes have different data domains.
  • 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, and the recall rate represents the current overall data query success status of the multiple data request nodes.
  • Step S540 Determine whether to discard the target node based on the recall rate, the target node being a data requesting node that has not successfully inquired about data;
  • Step S550 If the target node is not discarded, determine whether to trigger the target node to perform data query again; if it is determined to perform the data query again, trigger the target node to perform data query again, and enter the next data query detection;
  • Step S560 If the request time exceeds the target time, return the data currently inquired by the multiple data requesting nodes.
  • the server returns the data that the multiple data requesting nodes have currently queried.
  • the server triggers the next data query detection.
  • This application provides a data request method, so that after the received data request is sent to multiple data request nodes separately, the request process can be detected based on the configured target time, and the request time does not exceed the target When time is used, combining with the method of dynamically discarding the target node and triggering the target node to perform data rechecking, 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 also be further improved.
  • a data request device 600 provided by an embodiment of the present application, the device 600 includes:
  • the request distribution unit 610 is configured to send the received data request to multiple data requesting nodes respectively, so that the multiple data requesting nodes respectively query the data requested by the data request in their respective data domains. , Wherein the data fields of different data request nodes are different.
  • the parameter obtaining unit 620 is configured to obtain the recall rate corresponding to the current data query detection if the request time does not exceed the target time, and the recall rate represents the current overall data query success status of the multiple data request nodes.
  • the node processing unit 630 is configured to determine whether to discard a target node based on the recall rate, and the target node is a data requesting node that has not successfully inquired about data.
  • the node processing unit 630 is specifically configured to compare the recall rate with a first designated recall rate; if the recall rate is not greater than the first designated recall rate, it is determined not to discard the target node. In addition, the node processing unit 630 is further configured to determine to discard the target node if the recall rate is greater than the first designated recall rate.
  • the node processing unit 630 is specifically configured to obtain a target time if the recall rate is not greater than the first designated recall rate, where the target time is the shorter of the preset minimum waiting time and the dynamic waiting time.
  • the larger one, the dynamic waiting time is the product of the average data query time of the data requesting node that has successfully inquired 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 The target node is not discarded.
  • the node processing unit 630 is specifically configured to obtain the number of data requesting nodes that have successfully inquired data; and update the weight factor based on the number, where the larger the number corresponds to The greater the value of the weighting factor.
  • the node processing unit 630 is specifically configured to obtain a mapping relationship between the number of multiple data request nodes that have successfully queried data and their corresponding weight factors; and update the weight factors based on the mapping relationship.
  • the recheck management unit 640 is configured to determine whether to trigger the target node to perform data query again if the target node is not discarded; if it is determined to perform data query again, trigger the target node to perform data query again, and enter the next data query Detection.
  • the recheck management unit 640 is specifically configured 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 a target threshold, it is determined to trigger the target node to retry Perform data query; if the historical data query success rate of the target node is not greater than a target threshold, it is determined not to trigger the target node to perform data query again.
  • each data request node is configured with multiple data query devices.
  • the recheck management unit 640 is specifically configured to trigger the target node to switch the data query device, and then perform data query through the switched data query device.
  • the request management unit 650 is configured to, if the request time exceeds the target time, return the data that has been queried by the multiple data request nodes currently.
  • the request management unit 650 is specifically configured to detect whether the recall rate of the data currently queried by multiple data requesting nodes is greater than the second designated recall rate if the request time exceeds the target time; Multiple data request nodes to return the data that has been queried currently.
  • the device 600 shown in FIG. 9 further includes: a node detection unit 660, configured to determine the current number of data requesting nodes before the step of sending the received data request to multiple data requesting nodes respectively.
  • the request distribution unit 610 is configured to send the received data requests to the multiple data request nodes respectively.
  • the request distribution unit 610 is further configured to send the data request to the data requesting node if there is a single data requesting node.
  • the request management unit 650 is configured to trigger the data request node to return data based on the historical query situation of the data request node.
  • the request management unit 650 is further configured to return the data currently inquired by the multiple data requesting nodes if the target node is discarded.
  • an embodiment of the present application also provides another server 200 including a processor 104 that can execute the foregoing data request method.
  • the server 200 further includes a storage 104 and a network module 106.
  • the memory 104 stores a program that can execute the content in the foregoing embodiment, and the processor 102 can execute the program stored in the memory 104.
  • the internal structure of the processor 102 may be as shown in FIG. 1.
  • the processor 102 may include one or more cores for processing data and a message matrix unit.
  • the processor 102 uses various interfaces and lines to connect various parts of the entire server 200, and executes the server by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and calling data stored in the memory 104. 200's various functions and processing data.
  • the processor 102 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 102 may be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs;
  • the GPU is used for rendering and drawing of display content;
  • the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 102, but may be implemented by a communication chip alone.
  • the memory 104 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 104 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 104 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc.
  • the data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
  • the network module 106 is used to receive and send electromagnetic waves, and realize the mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other equipment, such as communicating with an audio playback device.
  • the network module 106 may include various existing circuit elements for performing these functions, for example, an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a subscriber identity module (SIM) card, a memory, etc. .
  • SIM subscriber identity module
  • the network module 106 can communicate with various networks, such as the Internet, an intranet, and a wireless network, or communicate with other devices through a wireless network.
  • the aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network.
  • the network module 106 can exchange information with the base station.
  • FIG. 11 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 1100 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • 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.
  • the computer-readable storage medium 1100 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 1100 has a storage space for executing the program code 810 of any method step in the above-mentioned method. These program codes can be read from or written into one or more computer program products.
  • the program code 1110 may be compressed in an appropriate form, for example.
  • the data request method, device, system, server, and storage medium provided by this application, after receiving the data request, send the received data request to multiple data requesting nodes respectively for use in all data request nodes.
  • the multiple data request nodes respectively query the data requested by the data request in their respective data domains. Monitor the request time during the query process, if the request time does not exceed the target time, obtain the recall rate that characterizes the current overall data query success of the multiple data request nodes, and determine whether to discard the target node based on the recall rate, and Whether to perform data query again on the target node without discarding the target node.
  • the request process can be detected based on the configured target time, and the target node can be dynamically discarded when the request time does not exceed the target time. And the way of triggering the target node to recheck the data, to ensure that the overall requested data can be completed within the target time, and it can also further improve the stability and integrity of the requested data.

Abstract

本申请实施例公开了一种数据请求方法、装置、系统、服务器及存储介质。所述方法包括:将接收到的数据请求分别发送到多个数据请求节点,以用于多个数据请求节点分别在各自的数据域中对数据请求所请求的数据进行查询。若请求用时未超过目标用时,获取当次数据查询检测对应的召回率;基于所述召回率判断是否丢弃目标节点;若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测。从而通过前述方式使得整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。

Description

数据请求方法、装置、系统、服务器及存储介质 技术领域
本申请涉及计算机技术领域,更具体地,涉及一种数据请求方法、装置、系统、服务器及存储介质。
背景技术
随着互联网业务的发展,数据也在呈现爆炸式的增长,在各行各业对数据的操作需求越来越多,例如相关的推荐和检索系统就是要在大批量数据中筛选出满足业务需求的少部分数据。但是,在相关的数据请求过程中还存在一定的不足。
发明内容
鉴于上述问题,本申请提出了一种数据请求方法、装置、系统、服务器及存储介质,以改善上述问题。
第一方面,本申请提供了一种数据请求方法,所述方法包括:将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同;若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况;基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点;若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
第二方面,本申请提供了一种数据请求方法,应用于数据请求系统,所述数据请求系统包括服务器以及多个数据请求节点,所述方法包括:所述服务器将接收到的数据请求分别发送到多个数据请求节点;所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求数据的进行查询,其中,不同的所述数据请求节点的数据域不同;若请求用时未超过目标用时,所述服务器获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况;基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点;若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
第三方面,本申请提供了一种数据请求装置,所述装置包括:请求分发单元,用于将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同;参数获取单元,用于若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况;节点处理单元,用于基于所述召回率判断是否丢弃目标节点,所述目标节点为 还未成功查询到数据的数据请求节点;重查管理单元,用于若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;请求管理单元,用于若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
第四方面,本申请提供了一种数据请求系统,包括服务器以及多个数据请求节点;所述服务器,用于将接收到的数据请求分别发送到多个数据请求节点;所述多个数据请求节点,用于分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同;
所述服务器,还用于若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况;基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点;若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
第五方面,本申请提供了一种电子设备,包括处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述处理器执行以实现上述的方法。
第六方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行上述的方法。
本申请提供的一种数据请求方法、装置、系统、服务器及存储介质,在接收到数据请求后,将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询。在查询过程中对请求用时进行监测,若请求用时未超过目标用时,获取表征所述多个数据请求节点当前整体的数据查询成功情况的召回率,基于所述召回率判断是否丢弃目标节点,以及在不丢弃目标节点的情况下对于目标节点是否进行重新进行数据查询。从而通过前述方式使得对于将接收到数据请求分别发送到多个数据请求节点后,可以基于配置的目标用时对请求过程进行检测,并且在请求用时未超过目标用时的情况下结合动态丢弃目标节点,以及触发目标节点进行数据重查的方式,保证整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请实施例提出的一种数据请求系统的架构示意图;
图2示出了本申请一实施例提出的一种数据请求方法的流程图;
图3示出了本申请一实施例提出的一种数据请求方法中多个数据域的示意图;
图4示出了本申请另一实施例提出的一种数据请求方法的流程图;
图5示出了本申请再一实施例提出的一种数据请求方法的流程图;
图6示出了本申请又一实施例提出的一种数据请求方法的流程图;
图7示出了本申请又一实施例提出的一种数据请求方法的流程图;
图8示出了本申请实施例提出的一种数据请求装置的结构框图;
图9示出了本申请另一实施例提出的一种数据请求装置的结构框图;
图10示出了本申请的用于执行根据本申请实施例的数据请求方法的另一种服务器的结构框图;
图11是本申请实施例的用于保存或者携带实现根据本申请实施例的数据请求方法的程序代码的存储单元。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
随着互联网业务的发展,数据也在呈现爆炸式的增长,而更多的互联网业务对数据的请求操作的需求也越来越多,例如,在相关的数据推荐和数据检索业务中就是要在大批量数据中筛选出满足业务需求的数据。例如,在搜索业务中,用户可以在客户端中输入自己期望搜索的关键词,然后客户端发送一个携带关键词的搜索请求到服务器中,服务器在接收该搜索请求后就会开始在一些数据域中查找与该关键词匹配的内容,然后返回给客户端以便展示给用户。
在一种相关数据请求过程中,服务器可以启动多个线程同时对所接收到的数据请求进行查询。但是,发明人在对该相关的数据请求过程进行研究的过程中发现。在该数据请求过程中,对于启动的多个线程中,可能会有一个甚至更多的线程启示无法成功的进行数据查询,但是,基于最开始配置的查询机制,可能是要等待所有的线程均成功进行数据查询后,再将所有查询到的数据反馈到数据请求方,那么这就会造成,数据请求过程中需要消耗过多的时间在等待某些线程进行数据查询上,并且在有的情况下,即使一直进行等待,某些节点也无法成功进行数据查询,进而造成数据请求方感知到请求的效率较低。
因此,发明人在经过研究后提出了本申请实施例所提供的一种数据请求方法、装置、系统、服务器及存储介质。通过本申请实施例所提供的一种数据请求方法,可以使得对于将接收到数据请求分别发送到多个数据请求节点后,可以基于配置的目标用时对请求过程进行检测,并且在请求用时未超过目标用时的情况下结合动态丢弃目标节点,以及触发目标节点进行数据重查的方式,保证整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。
下面先结合图1对本申请实施例所涉及的应用环境进行介绍。
请参阅图1,示例性的展示了一数据请求系统200,该数据请求系统200可以包括服务器210以及多个数据请求节点,其中,图中示例性的展示了数据请求节点220a、数据请求节点220b以及数据请求节点220c。在这种情况下,当服务器210接收到业务方发送的数据请求后,可以将该数据请求分别发送到数据请求节点220a、数据请求节点220b以及数据请求节点220c,以便数据请求节点220a、数据请求节点220b以及数据请求节点220c分别同时开始进行数据查询。
需要说明的是,在该数据请求系统中不同的数据请求节点所对应的数据域是不同的,也就是说,数据请求节点220a、数据请求节点220b以及数据请求节点220c各自对应的数据域是不同的。而其中的数据域可以理解为进行数据查询的一个范围。
例如,一张完整的数据表存储有100条数据,那么其中第1条数据到第30条数据可以划分为一个范围,而其中第31条数据到第60条数据可以划分为一个范围,其中第61条数据到100条数据可以划分为一个范围,那么这100条件数据就被划分为了三个不同的范围,而这三个不同的范围就可以被称为三个不同的数据域。那么对应到前述的数据请求节点220a、数据请求节点220b以及数据请求节点220c,在进行数据查询时,数据请求节点220a就可以对应于第1条数据到第30条数据这个数据域,进而在第1条数据到第30条数据这个数据域这个范围内对匹配查询需求。对应的,数据请求节点220b就可以对应于第31条数据到第60条数据这个数据域,进而在第31条数据到第60条数据这个数据域这个范围内对匹配查询需求。 对应的,数据请求节点220c就可以对应于第61条数据到第100条数据这个数据域,进而在第61条数据到第100条数据这个数据域这个范围内对匹配查询需求。
当然,对于不同的数据域的确认也不仅限于数据表的方式,只要可以进行区域划分的储存方式都在本申请要求保护的范围内。例如,也可以对应于不同的存储位置。例如,可以将文件夹A对应为一个数据域,而将文件夹B又对应于另一个数据域。
下面再结合附图对本申请实施例进行介绍。
请参阅图2,本申请实施例提供的一种数据请求方法,应用于服务器,所述方法包括:
步骤S110:将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同。
需要说明的是,在本申请实施例中,服务器用于接收业务方发送的数据请求,并在接收到的数据请求后进一步的将数据请求分发到多个数据请求节点。而其中,为了实现多个数据请求节点同时进行的数据查询的效果,每个数据请求节点可以对应于不同的数据域。
而在本申请实施例中,多个数据请求节点如何确定自己进行查询的数据域的方式有多种。
作为一种方式,可以根据服务器发送的数据请求中携带的数据域参数来确定。需要说明的是,虽然可能配置有多个数据请求节点,但是其所对应的总的数据存储区域可能是相同的。也就是可以理解为,所有的数据都是存储在同一个存储区域中的,那么多个数据请求节点都是到该同一个存储区域中进行数据查询,那么这就可能会造成数据查询重复。例如,如图3所示总的存储区域虽然划分为了区域1、区域2、区域3以及区域4,但是,多个数据请求节点可能并未严格的与其中某个区域进行对应,那么就会造成多个数据请求节点都去到区域1中进行数据查询。那么在本方式中,服务器在将接收到的请求分发给各个数据请求节点时,可以在分发的数据请求中添加对应的区域的标识作为每个数据请求节点对应的数据域。
例如,以前述的数据请求节点220a、数据请求节点220b以及数据请求节点220c为例。在发送给数据请求节点220a的数据请求中携带有参数a,那么数据请求节点220a在接收到携带有参数a的数据请求后,就会识别到当前数据请求对应的数据域为图3中的区域1。对应的,在发送给数据请求节点220b的数据请求中携带有参数b,那么数据请求节点220b在接收到携带有参数b的数据请求后,就会识别到当前数据请求对应的数据域为图3中的区域2。对应的,在发送给数据请求节点220c的数据请求中携带有参数c,那么数据请求节点220c在接收到携带有参数c的数据请求后,就会识别到当前数据请求对应的数据域为图3中的区域3。当然,在这种方式下,每个数据请求节点所对应的数据域并不是每次都是相同的。例如,也可以分配数据请求节点b对应图3所示的区域1进行数据查询,也可以分配数据请求节点a对应图3所示的区域4进行数据查询。在这种方式下,服务器可以根据当前的业务方的数据请求的类型来确定每个数据请求节点所对应的数据域。
作为另外一种方式,每个数据请求节点所对应的数据域是相互分离的。在这种方式下,每个数据请求节点各自所对应的数据域是固定的。
步骤S120:若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况。
需要说明的是,对于每个数据请求节点可能会因为本身的处理资源占用或者网络卡顿的问题而影响数据查询效率,那么就可能造成有的数据请求节点已经成功查询数据了,而有的数据请求节点可能还未开始进行数据查询。那么本申请实施例中的召回率可以用于体现目前已经成功查询数据的数据请求节点的占比。作为一种方式,召回率等于当前已经成功查询数据的节点的数量与当次所使用的数据请求节点的数量的比值。
需要说明的是,服务器可以对应有多个数据请求节点,但是并不是每次数据请求都需要转发给所有的数据请求节点,而是可以只使用其中的部分数据请求节点。
需要说明的是,在本申请实施例中,成功查询数据可以理解为数据查询节点已经将所需要查询的数据反馈给服务器。也可以理解为,数据请求节点已经开始进行数据反馈,但是有 数据未反馈。
步骤S130:基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点。
其中,作为一种方式,可以对于不同的业务的数据请求配置相同的召回率。也可以对应于不同的业务请求而配置不同的召回率。例如,对于一些业务对应的数据要求比较完整的情况下,所对应的召回率可以配置相对较高,以保证可以有较为完整的数据反馈。
步骤S140:若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询。
作为一种方式,每个数据请求节点配置有多个数据查询设备,那么在数据请求节点最开始接受大数据请求后可以配置由其中的一个数据查询设备进行数据查询,但是有可能正好该被选中的设备有故障而无法进行数据查询,那么就可以切换为另外一个数据查询设备再次进行数据查询。那么在这种方式下,所述触发所述目标节点重新进行数据查询的步骤包括:触发所述目标节点切换数据查询设备后,通过切换后的数据查询设备进行数据查询。
步骤S150:若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测。
步骤S160:若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
需要说明的是,在本申请实施例中,触发不再进行数据查询等待的条件包括有目标用时以及当前的召回率。那么在因为目标用时而触发不再进行数据查询等待的这种情况下的到的数据查询结果可能是不满足当次的数据请求的。那么为了保证反馈的查询结果和数据请求的需求一致,作为一种方式,所述若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回的步骤包括:若请求用时超过所述目标用时,检测多个数据请求节点当前已经查询到的数据的召回率是否大于第二指定召回率;若是,将所述多个数据请求节点当前已经查询到的数据进行返回。
本申请提供的一种数据请求方法,在接收到数据请求后,将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询。在查询过程中对请求用时进行监测,若请求用时未超过目标用时,获取表征所述多个数据请求节点当前整体的数据查询成功情况的召回率,基于所述召回率判断是否丢弃目标节点,以及在不丢弃目标节点的情况下对于目标节点是否进行重新进行数据查询。从而通过前述方式使得对于将接收到数据请求分别发送到多个数据请求节点后,可以基于配置的目标用时对请求过程进行检测,并且在请求用时未超过目标用时的情况下结合动态丢弃目标节点,以及触发目标节点进行数据重查的方式,保证整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。
请参阅图4,本申请实施例提供的一种数据请求方法,应用于服务器,所述方法包括:
步骤S210:将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同。
步骤S211:判断请求用时是否大于目标用时。
步骤S220:若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况。
步骤S230:判断所述召回率是否大于第一指定召回率。
步骤S240:若所述召回率大于所述第一指定召回率,判定丢弃目标节点,将所述多个数据请求节点当前已经查询到的数据进行返回。
步骤S250:若所述召回率不大于所述第一指定召回率,判定不丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点。
作为一种方式,所述若所述召回率不大于所述第一指定召回率,判定不丢弃目标节点的步骤包括:若所述召回率不大于所述第一指定召回率,获取目标时间,所述目标时间为预设 的最小等待时间和动态等待时间中的较大的一个,所述动态等待时间为当前已成功查询到数据的数据请求节点查询数据的平均用时与预设的权值因子的乘积;若目标节点对应的等待时间不大于所述目标时间,判定不丢弃目标节点。
其中,可选的,获取当前已经成功查询数据的数据请求节点的数量;基于所述数量更新所述权值因子,其中,所述数量越大所对应的权值因子的值越大。
进一步的,所述基于所述数量更新所述权值因子的步骤包括:获取多个已经成功查询数据的数据请求节点的数量与各自对应的权值因子的映射关系;基于所述映射关系更新所述权值因子。
步骤S260:若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询。
步骤S261:若判定不重新进行数据查询,进入下一次的数据查询检测。
步骤S270:若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测。
步骤S212:若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
本申请提供的一种数据请求方法,从而通过前述方式使得对于将接收到数据请求分别发送到多个数据请求节点后,可以基于配置的目标用时对请求过程进行检测,并且在请求用时未超过目标用时的情况下结合动态丢弃目标节点,以及触发目标节点进行数据重查的方式,保证整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。并且,在本实施例中,对于目标节点是否丢弃,可以结合最小等待时间和动态等待时间来动态选择,提升了目标节点丢弃判断的准确性以及合理性。
请参阅图5,本申请实施例提供的一种数据请求方法,应用于服务器,所述方法包括:
步骤S310:将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同。
步骤S320:若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况。
步骤S330:基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点。
步骤S340:若不丢弃目标节点,获取所述目标节点的历史数据查询成功率。
步骤S350:若所述目标节点的所述历史数据查询成功率大于目标阈值,判定触发所述目标节点重新进行数据查询。
步骤S360:若所述目标节点的所述历史数据查询成功率不大于目标阈值,判定不触发所述目标节点重新进行数据查询。
步骤S370:若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测。
步骤S380:若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
本申请提供的一种数据请求方法,从而通过前述方式使得对于将接收到数据请求分别发送到多个数据请求节点后,可以基于配置的目标用时对请求过程进行检测,并且在请求用时未超过目标用时的情况下结合动态丢弃目标节点,以及触发目标节点进行数据重查的方式,保证整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。并且,在本实施例中,会基于目标节点的历史数据查询成功率来确定是否触发所述目标节点重新进行数据查询,提升了是否重查的确定的准确性以及合理性。
请参阅图6,本申请实施例提供的一种数据请求方法,应用于服务器,所述方法包括:
步骤S410:接收业务方发送的数据请求。
步骤S420:检测当前的数据请求节点的数量是否为多个。
步骤S430:若有单个数据请求节点,将所述数据请求发送到所述数据请求节点,并基于所述数据请求节点的历史查询情况,触发该数据请求节点进行数据返回。
步骤S440:若有多个数据请求节点,将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同。
步骤S450:若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况。
步骤S460:基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点。
步骤S470:若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;
步骤S480:若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测。
步骤S490:若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
本申请提供的一种数据请求方法,从而通过前述方式使得对于将接收到数据请求分别发送到多个数据请求节点后,可以基于配置的目标用时对请求过程进行检测,并且在请求用时未超过目标用时的情况下结合动态丢弃目标节点,以及触发目标节点进行数据重查的方式,保证整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。并且,在本实施例中,会在接收到业务方发送的数据请求后,先判断当前可以用的数据请求节点的数量,若在节点数据量有多个的情况下再去执行前述的将接收到的数据请求分别发送到多个数据请求节点的步骤,而在仅有单个数据请求节点的情况下,可以直接根据该单个数据请求节点的历史查询情况,触发该数据请求节点进行数据返回,进而提升了数据请求的灵活性。
请参阅图7,本申请实施例提供的一种数据请求方法,应用于数据请求系统,所述数据请求系统包括服务器以及多个数据请求节点,所述方法包括:
步骤S510:所述服务器将接收到的数据请求分别发送到多个数据请求节点。
步骤S520:所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求数据的进行查询,其中,不同的所述数据请求节点的数据域不同。
步骤S530:若请求用时未超过目标用时,所述服务器获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况。
步骤S540:基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点;
步骤S550:若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;
步骤S560:若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
其中,可选的,若丢弃目标节点,所述服务器将所述多个数据请求节点当前已经查询到的数据进行返回。
可选的,若判定不重新进行数据查询,所述服务器触发进入下一次的数据查询检测。
本申请提供的一种数据请求方法,从而通过前述方式使得对于将接收到数据请求分别发送到多个数据请求节点后,可以基于配置的目标用时对请求过程进行检测,并且在请求用时未超过目标用时的情况下结合动态丢弃目标节点,以及触发目标节点进行数据重查的方式,保证整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。
请参阅图8,本申请实施例提供的一种数据请求装置600,所述装置600包括:
请求分发单元610,用于将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同。
参数获取单元620,用于若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况。
节点处理单元630,用于基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点。
作为一种方式,节点处理单元630,具体用于将所述召回率与第一指定召回率进行比对;若所述召回率不大于所述第一指定召回率,判定不丢弃目标节点。此外,节点处理单元630,还用于若所述召回率大于所述第一指定召回率,判定丢弃目标节点。
作为一种方式,节点处理单元630,具体用于若所述召回率不大于所述第一指定召回率,获取目标时间,所述目标时间为预设的最小等待时间和动态等待时间中的较大的一个,所述动态等待时间为当前已成功查询到数据的数据请求节点查询数据的平均用时与预设的权值因子的乘积;若目标节点对应的等待时间不大于所述目标时间,判定不丢弃目标节点。
在这种方式,可选的,节点处理单元630,具体用于获取当前已经成功查询数据的数据请求节点的数量;基于所述数量更新所述权值因子,其中,所述数量越大所对应的权值因子的值越大。可选的,节点处理单元630,具体用于获取多个已经成功查询数据的数据请求节点的数量与各自对应的权值因子的映射关系;基于所述映射关系更新所述权值因子。
重查管理单元640,用于若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测。
作为一种方式,重查管理单元640,具体用于获取所述目标节点的历史数据查询成功率;若所述目标节点的所述历史数据查询成功率大于目标阈值,判定触发所述目标节点重新进行数据查询;若所述目标节点的所述历史数据查询成功率不大于目标阈值,判定不触发所述目标节点重新进行数据查询。
可选的,每个数据请求节点配置有多个数据查询设备。在这种情况下,重查管理单元640,具体用于触发所述目标节点切换数据查询设备后,通过切换后的数据查询设备进行数据查询。
请求管理单元650,用于若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
作为一种方式,请求管理单元650,具体用于若请求用时超过所述目标用时,检测多个数据请求节点当前已经查询到的数据的召回率是否大于第二指定召回率;若是,将所述多个数据请求节点当前已经查询到的数据进行返回。
作为一种方式,如图9所示装置600,还包括:节点检测单元660,用于将接收到的数据请求分别发送到多个数据请求节点的步骤之前判断当前的数据请求节点的数量。在这种方式下,若有多个数据请求节点,请求分发单元610,用于将接收到的数据请求分别发送到多个数据请求节点。请求分发单元610,还用于若有单个数据请求节点,将所述数据请求发送到所述数据请求节点。对应的,请求管理单元650,用于基于所述数据请求节点的历史查询情况,触发该数据请求节点进行数据返回。
请求管理单元650,还用于若丢弃目标节点,将所述多个数据请求节点当前已经查询到的数据进行返回。
需要说明的是,本申请中装置实施例与前述方法实施例是相互对应的,装置实施例中具体的原理可以参见前述方法实施例中的内容,此处不再赘述。
下面将结合图10对本申请提供的一种电子设备进行说明。
请参阅图10,基于上述的数据请求方法,本申请实施例还提供的另一种包括可以执行前 述数据请求方法的处理器104的服务器200。服务器200还包括存储器104、以及网络模块106。其中,该存储器104中存储有可以执行前述实施例中内容的程序,而处理器102可以执行该存储器104中存储的程序。其中的处理器102的内部结构可以如图1所示。
其中,处理器102可以包括一个或者多个用于处理数据的核以及消息矩阵单元。处理器102利用各种接口和线路连接整个服务器200内的各个部分,通过运行或执行存储在存储器104内的指令、程序、代码集或指令集,以及调用存储在存储器104内的数据,执行服务器200的各种功能和处理数据。可选地,处理器102可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器102可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器102中,单独通过一块通信芯片进行实现。
存储器104可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器104可用于存储指令、程序、代码、代码集或指令集。存储器104可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
所述网络模块106用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯,例如和音频播放设备进行通讯。所述网络模块106可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。所述网络模块106可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。例如,网络模块106可以与基站进行信息交互。
请参考图11,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质1100中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质1100可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质1100包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质1100具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码1110可以例如以适当形式进行压缩。
综上所述,本申请提供的一种数据请求方法、装置、系统、服务器及存储介质,在接收到数据请求后,将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询。在查询过程中对请求用时进行监测,若请求用时未超过目标用时,获取表征所述多个数据请求节点当前整体的数据查询成功情况的召回率,基于所述召回率判断是否丢弃目标节点,以及在不丢弃目标节点的情况下对于目标节点是否进行重新进行数据查询。从而通过前述方式使得对于将接收到数据请求分别发送到多个数据请求节点后,可以基于配置的目标用时对请求过程进行检测,并且在请求用时未超过目标用时的情况下结合动态丢弃目标节点,以及触发目标节点进行数据重查的方式,保证整体所请求的数据可以在目标用时内完成,并且也可以进一步的提升所请求数据的稳定性以及完整性。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照 前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种数据请求方法,其特征在于,所述方法包括:
    将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同;
    若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况;
    基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点;
    若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;
    若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;
    若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述召回率判断是否丢弃目标节点的步骤包括:
    将所述召回率与第一指定召回率进行比对;
    若所述召回率不大于所述第一指定召回率,判定不丢弃目标节点。
  3. 根据权利要求2所述的方法,其特征在于,
    若所述召回率大于所述第一指定召回率,判定丢弃目标节点。
  4. 根据权利要求2或3所述的方法,其特征在于,所述若所述召回率不大于所述第一指定召回率,判定不丢弃目标节点的步骤包括:
    若所述召回率不大于所述第一指定召回率,获取目标时间,所述目标时间为预设的最小等待时间和动态等待时间中的较大的一个,所述动态等待时间为当前已成功查询到数据的数据请求节点查询数据的平均用时与预设的权值因子的乘积;
    若目标节点对应的等待时间不大于所述目标时间,判定不丢弃目标节点。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    获取当前已经成功查询数据的数据请求节点的数量;
    基于所述数量更新所述权值因子,其中,所述数量越大所对应的权值因子的值越大。
  6. 根据权利要求5所述的方法,其特征在于,所述基于所述数量更新所述权值因子的步骤包括:
    获取多个已经成功查询数据的数据请求节点的数量与各自对应的权值因子的映射关系;
    基于所述映射关系更新所述权值因子。
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述判断是否触发所述目标节点重新进行数据查询的步骤包括:
    获取所述目标节点的历史数据查询成功率;
    若所述目标节点的所述历史数据查询成功率大于目标阈值,判定触发所述目标节点重新进行数据查询;
    若所述目标节点的所述历史数据查询成功率不大于目标阈值,判定不触发所述目标节点重新进行数据查询。
  8. 根据权利要求1-7任一所述的方法,其特征在于,每个数据请求节点配置有多个数据查询设备,所述触发所述目标节点重新进行数据查询的步骤包括:
    触发所述目标节点切换数据查询设备后,通过切换后的数据查询设备进行数据查询。
  9. 根据权利要求1-8任一所述的方法,其特征在于,所述若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回的步骤包括:
    若请求用时超过所述目标用时,检测多个数据请求节点当前已经查询到的数据的召回率是否大于第二指定召回率;
    若是,将所述多个数据请求节点当前已经查询到的数据进行返回。
  10. 根据权利要求1-9任一所述的方法,其特征在于,所述将接收到的数据请求分别发送到多个数据请求节点的步骤之前还包括:
    若接收到数据请求,检测当前的数据请求节点的数量;
    若有多个数据请求节点,执行所述将接收到的数据请求分别发送到多个数据请求节点。
  11. 根据权利要求10所述的方法,其特征在于,所述方法,还包括:
    若有单个数据请求节点,将所述数据请求发送到所述数据请求节点,并基于所述数据请求节点的历史查询情况,触发该数据请求节点进行数据返回。
  12. 根据权利要求1-11任一所述的方法,其特征在于,所述方法还包括:
    若丢弃目标节点,将所述多个数据请求节点当前已经查询到的数据进行返回。
  13. 根据权利要求1-12任一所述的方法,其特征在于,所述方法还包括:
    若判定不重新进行数据查询,进入下一次的数据查询检测。
  14. 一种数据请求方法,其特征在于,应用于数据请求系统,所述数据请求系统包括服务器以及多个数据请求节点,所述方法包括:
    所述服务器将接收到的数据请求分别发送到多个数据请求节点;
    所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求数据的进行查询,其中,不同的所述数据请求节点的数据域不同;
    若请求用时未超过目标用时,所述服务器获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况;基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点;若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
  15. 根据权利要求14所述的方法,其特征在于,所述方法还包括:
    若丢弃目标节点,所述服务器将所述多个数据请求节点当前已经查询到的数据进行返回。
  16. 根据权利要求14所述的方法,其特征在于,所述方法还包括:
    若判定不重新进行数据查询,所述服务器触发进入下一次的数据查询检测。
  17. 一种数据请求装置,其特征在于,所述装置包括:
    请求分发单元,用于将接收到的数据请求分别发送到多个数据请求节点,以用于所述多个数据请求节点分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同;
    参数获取单元,用于若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况;
    节点处理单元,用于基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点;
    重查管理单元,用于若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;
    请求管理单元,用于若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
  18. 一种数据请求系统,其特征在于,包括服务器以及多个数据请求节点;
    所述服务器,用于将接收到的数据请求分别发送到多个数据请求节点;
    所述多个数据请求节点,用于分别在各自的数据域中对所述数据请求所请求的数据进行查询,其中,不同的所述数据请求节点的所述数据域不同;
    所述服务器,还用于若请求用时未超过目标用时,获取当次数据查询检测对应的召回率,所述召回率表征所述多个数据请求节点当前整体的数据查询成功情况;基于所述召回率判断是否丢弃目标节点,所述目标节点为还未成功查询到数据的数据请求节点;若不丢弃目标节点,判断是否触发所述目标节点重新进行数据查询;若判定重新进行数据查询,触发所述目标节点重新进行数据查询,并进入下一次的数据查询检测;若请求用时超过所述目标用时,将所述多个数据请求节点当前已经查询到的数据进行返回。
  19. 一种服务器,其特征在于,包括处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述处理器执行以实现权利要求1-13所述的方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行权利要求1-13任一所述的方法。
PCT/CN2019/112846 2019-10-23 2019-10-23 数据请求方法、装置、系统、服务器及存储介质 WO2021077341A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980099530.7A CN114270343A (zh) 2019-10-23 2019-10-23 数据请求方法、装置、系统、服务器及存储介质
PCT/CN2019/112846 WO2021077341A1 (zh) 2019-10-23 2019-10-23 数据请求方法、装置、系统、服务器及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/112846 WO2021077341A1 (zh) 2019-10-23 2019-10-23 数据请求方法、装置、系统、服务器及存储介质

Publications (1)

Publication Number Publication Date
WO2021077341A1 true WO2021077341A1 (zh) 2021-04-29

Family

ID=75619275

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/112846 WO2021077341A1 (zh) 2019-10-23 2019-10-23 数据请求方法、装置、系统、服务器及存储介质

Country Status (2)

Country Link
CN (1) CN114270343A (zh)
WO (1) WO2021077341A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140324842A1 (en) * 2013-03-15 2014-10-30 Tencent Technology (Shenzhen) Company Limited Information retrieval system evaluation method, device and storage medium
US20150019530A1 (en) * 2013-07-11 2015-01-15 Cognitive Electronics, Inc. Query language for unstructed data
CN107077490A (zh) * 2015-03-02 2017-08-18 微软技术许可有限责任公司 数据查询作业提交管理
CN109284316A (zh) * 2018-09-11 2019-01-29 中国人民解放军战略支援部队信息工程大学 基于数据源多维特性的真值发现方法
CN109582751A (zh) * 2018-11-29 2019-04-05 百度在线网络技术(北京)有限公司 一种检索效果的度量方法及服务器

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140324842A1 (en) * 2013-03-15 2014-10-30 Tencent Technology (Shenzhen) Company Limited Information retrieval system evaluation method, device and storage medium
US20150019530A1 (en) * 2013-07-11 2015-01-15 Cognitive Electronics, Inc. Query language for unstructed data
CN107077490A (zh) * 2015-03-02 2017-08-18 微软技术许可有限责任公司 数据查询作业提交管理
CN109284316A (zh) * 2018-09-11 2019-01-29 中国人民解放军战略支援部队信息工程大学 基于数据源多维特性的真值发现方法
CN109582751A (zh) * 2018-11-29 2019-04-05 百度在线网络技术(北京)有限公司 一种检索效果的度量方法及服务器

Also Published As

Publication number Publication date
CN114270343A (zh) 2022-04-01

Similar Documents

Publication Publication Date Title
CN110290217B (zh) 数据请求的处理方法及装置、存储介质及电子装置
WO2014108030A1 (zh) Web轮询方法、装置及系统
CN111338806B (zh) 一种业务控制方法及装置
WO2017071087A1 (zh) 信息的传输方法、装置和设备
TWI640214B (zh) 一種網路接入方法、相關設備和系統
WO2023103419A1 (zh) 基于消息队列的5g消息批量发送方法、装置及电子设备
CN112600693A (zh) 业务请求的处理方法、系统、电子设备及计算机存储介质
CN113285884B (zh) 流量控制方法及系统
CN113691610A (zh) 数据获取方法、装置、电子设备及存储介质
CN113691609A (zh) 数据获取方法、装置、电子设备及存储介质
US9866641B2 (en) Information query method and device
CN110597643B (zh) 核间通信方法、处理器以及电子设备
WO2021077341A1 (zh) 数据请求方法、装置、系统、服务器及存储介质
CN102025730B (zh) 基于http协议的数据传输装置及其实现方法
CN111338710A (zh) 应用程序控制方法、装置、电子设备及存储介质
CN106330504A (zh) 一种实现应用的方法及业务控制器
CN109347994A (zh) 互联网协议ip地址获取方法、装置、存储介质及电子设备
CN111813529B (zh) 数据处理方法、装置、电子设备及存储介质
WO2021226820A1 (zh) 权限配置方法、装置、节点设备以及数据处理系统
CN116761206B (zh) 数据传输方法、装置、通信设备、介质和程序产品
CN113905099B (zh) 上报请求的控制方法、装置、服务器、终端及存储介质
CN111881151B (zh) 一种交通违法数据管理方法、装置及服务器
CN114760362B (zh) 网络接入请求的调度方法、系统、电子装置和存储介质
CN112333752A (zh) 确定主机设备的方法、装置、智能设备及存储介质
CN112764951A (zh) 消息广播方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19949810

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19949810

Country of ref document: EP

Kind code of ref document: A1