Data transmission method and device, equipment, storage medium and program product
By generating multiple data partial requests in the data transmission device and sending them in batches, the problem of low efficiency of responsive services when transmitting data through blocking services is solved, and faster data transmission is achieved.
Patent Information
- Application Number
- CN202411218092.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-09-02
AI Technical Summary
In a network environment, when a responsive service calls a blocking service, the data transmission device needs to be fully stored and sent due to the data being returned at one time, resulting in low data calling efficiency.
Based on the data request obtained by the responsive service, the data transmission device generates a number of requests to obtain data parts and sends them to the blocking service, thereby sending the data part to the responsive service first, improving the data call efficiency.
By batch processing and sending data, the time for data callers to obtain data is significantly shortened and data transmission efficiency is improved.
Smart Images

Figure CN118945226A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of big data processing technology, and in particular, relates to a data transmission method, device, equipment, storage medium and program product. Background Art
[0002] There are two types of services in the current network environment, one is blocking service and the other is responsive service. After the blocking service is called by the callee, the data is returned in one go. Responsive service is to establish a network channel between the caller and the callee, and the data obtained by the responsive service will be returned to the caller in multiple times.
[0003] The responsive service calls the blocking service through the data transmission device. However, since the blocking service returns data at one time, the data transmission device needs to store the complete data and then send the data to the responsive service. The data is sent after it is received. The responsive service processes the received data and then sends the processed data to the caller, which results in a long time for the data caller to obtain the data, that is, there is a problem of low data call efficiency. Summary of the invention
[0004] The embodiments of the present application provide a data transmission method, apparatus, device, storage medium and program product for solving the problem of low data call efficiency.
[0005] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a data transmission device. The data transmission method includes:
[0006] Receiving a first data acquisition request sent by a first client, wherein the first client is used to indicate a client corresponding to the responsive service;
[0007] determining a first data parameter according to the first data acquisition request, where the first data parameter is used to indicate a data length or a data amount of first data, and the first data is used to indicate data to be acquired by the first data acquisition request;
[0008] Generate multiple second data acquisition requests according to the first data parameter, and send each of the second data acquisition requests to a second client, where the second client is used to indicate a client corresponding to the blocking service;
[0009] Each time the second data sent by the second client based on the second data acquisition request is received, the received second data is sent to the first client.
[0010] In some possible implementations, the step of generating a plurality of second data acquisition requests according to the first data parameter includes:
[0011] According to the first data parameter, configure a plurality of second data parameters, wherein the second data parameters are smaller than the first data parameters;
[0012] A second data acquisition request corresponding to each second data parameter is generated, where the second data parameter is used to indicate a data length or a data amount of the second data required to be acquired by the corresponding second data acquisition request.
[0013] In some possible implementations, the first data parameter includes a first data amount of the first data, and the step of configuring a plurality of second data parameters according to the first data parameter includes:
[0014] Acquire the remaining storage capacity of the storage area in the data transmission device;
[0015] Determine a second data amount of second data to be acquired by the data transmission device according to the remaining storage amount, and determine a ratio of the first data amount to the second data amount, the second data amount being smaller than the remaining storage amount;
[0016] According to the ratio, a second data parameter of a target quantity is configured, the target data is greater than or equal to the ratio, and the second data parameter is the second data quantity.
[0017] In some possible implementations, the step of generating a plurality of second data acquisition requests according to the first data parameter includes:
[0018] Obtaining the remaining storage capacity of the storage area in the data transmission device
[0019] In response to the first data parameter being greater than or equal to the remaining storage amount, a plurality of second data acquisition requests are generated according to the first data parameter.
[0020] In some possible implementations, the step of sending each of the second data acquisition requests to the second client includes:
[0021] Determine the interval between the data transmission device sending the second data acquisition request and receiving the second data;
[0022] Configure a target duration according to the interval duration, wherein the target duration is greater than or equal to the interval duration;
[0023] A second data acquisition request is sent to the second client at intervals of the target duration.
[0024] In some possible implementations, the step of generating a plurality of second data acquisition requests according to the first data parameter includes:
[0025] Generate a plurality of sorted second data acquisition requests according to the first data parameter, wherein the second data required to be acquired by each of the second data acquisition requests are concatenated according to the sorting sequence numbers of each of the second data acquisition requests to obtain the first data;
[0026] The step of sending a second data acquisition request to the second client at each target time interval includes:
[0027] According to the sorting order of each of the second data acquisition requests, one second data acquisition request is sent to the second client at intervals of the target time length.
[0028] In some possible implementations, the step of determining the first data parameter according to the first data acquisition request includes:
[0029] Parsing the first data acquisition request to obtain a data identifier of the first data;
[0030] generating a parameter acquisition request according to the data identifier, and sending the parameter acquisition request to the second client;
[0031] Receive the first data parameter fed back by the second client based on the parameter acquisition request.
[0032] In a second aspect, an embodiment of the present application provides a data transmission device, including:
[0033] A receiving module, configured to receive a first data acquisition request sent by a first client, wherein the first client is used to indicate a client corresponding to the responsive service;
[0034] a determining module, configured to determine a first data parameter according to the first data acquisition request, wherein the first data parameter is used to indicate a data length or a data amount of first data, and the first data is used to indicate data required to be acquired by the first data acquisition request;
[0035] A generating module, used for generating a plurality of second data acquisition requests according to the first data parameter, and sending each of the second data acquisition requests to a second client, where the second client is used for indicating a client corresponding to the blocking service;
[0036] The sending module is used to send the received second data to the first client each time the second data sent by the second client based on the second data acquisition request is received.
[0037] In a third aspect, an embodiment of the present application provides a data transmission device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the data transmission method as described above is implemented.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by a processor, the data transmission method as described above is implemented.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the data transmission method as described above.
[0040] The data transmission method, apparatus, device, storage medium and program product of the embodiments of the present application receive a first data acquisition request sent by a first client corresponding to a responsive service, determine data parameters such as the data length and data volume of the first data required by the responsive service based on the first data acquisition request, generate multiple second data acquisition requests corresponding to the second data of the first data portion according to the first data parameters, and then send each second data acquisition request to the second client corresponding to the blocking service in turn, and send the second data to the first client each time the second data fed back by the second client is received. In the present application, the data transmission device generates multiple second data requests for obtaining the first data portion based on the first data request for the first data obtained by the responsive service, thereby sending part of the first data to the responsive service first, so that the responsive service transmits the data to the caller, thereby improving the data call efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0042] Figure 1 It is a schematic diagram of the scenario involved in the data transmission method of this application;
[0043] Figure 2 It is a flowchart of the first embodiment of the data transmission method of the present application;
[0044] Figure 3 It is a flowchart of the second embodiment of the data transmission method of the present application;
[0045] Figure 4 It is a flowchart of the third embodiment of the data transmission method of the present application;
[0046] Figure 5 It is a functional module diagram of the data transmission device of the present application;
[0047] Figure 6 It is a structural schematic diagram of the data transmission device of the present application. DETAILED DESCRIPTION
[0048] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0049] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0050] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0051] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0052] There are two types of services in the current network environment, one is blocking service and the other is responsive service. After the blocking service is called by the callee, the data is returned in one go. Responsive service is to establish a network channel between the caller and the callee, and the data obtained by the responsive service will be returned to the caller in multiple times.
[0053] The inventor of the present application found that the responsive service calls the blocking service through the data transmission device. However, since the blocking service returns data once, the data transmission device needs to store the complete data and then send the data to the responsive service. The data is sent after it is received. The responsive service processes the received data and then sends the processed data to the caller, which results in a long time for the data caller to obtain the data, that is, there is a problem of low data call efficiency.
[0054] The inventor of the present application therefore conceived that the data transmission device generates multiple second data requests for obtaining part of the first data based on the first data request for the first data obtained by the responsive service, thereby sending part of the first data to the responsive service first, so that the responsive service transmits the data to the caller, thereby improving the data calling efficiency.
[0055] Reference Figure 1 , Figure 1 This is a schematic diagram of the scenario of the data transmission method of this application. Figure 1 , the data transmission device 100 is connected to the first client 200 and the second client 300 in communication. The data transmission device 100 can be a physical device or a virtual device corresponding to the network proxy, the first client 200 is a client of a responsive service, and the second client 300 is a client of a blocking service. The first client 200 sends a first data acquisition request to the data transmission device 100, and the data transmission device 100 obtains the data parameters of the first data required by the first client 200 based on the first data acquisition request, generates multiple second data acquisition requests through the data parameters, and the data transmission device 100 then sends each first data acquisition request to the second client 300. For example, the data transmission device 100 sends two second data acquisition requests to the second client, and the data transmission device 100 receives two second data fed back by the second client 300, and the data transmission device 100 then sends the two second data to the first client 100.
[0056] The following combination Figure 1 , the data transmission method of the present application is described in detail.
[0057] Reference Figure 2 , Figure 2 FIG. 1 is a flow chart of a first embodiment of a data transmission method of the present application. The data transmission method includes:
[0058] Step S201: receiving a first data acquisition request sent by a first client, wherein the first client is used to indicate a client corresponding to a responsive service.
[0059] In this embodiment, the execution subject is a data transmission device. For the convenience of description, the device is used below to refer to the data transmission device. The device can be a physical device or a virtual device of a network proxy.
[0060] The device is connected to a first client and a second client in communication. The first client is a client corresponding to the responsive service, and the second client is a client corresponding to the blocking service.
[0061] When the first client needs to obtain data for use by the caller, the first client generates a data acquisition request, which is defined as a first data acquisition request. The first data acquisition request includes a data identifier of the data to be obtained. The data to be obtained is defined as the first data. The first client sends the first data acquisition request to the device.
[0062] Step S202: determining a first data parameter according to a first data acquisition request, where the first data parameter is used to indicate a data length or data amount of first data, and the first data is used to indicate data to be acquired by the first data acquisition request.
[0063] After obtaining the first data acquisition request, the device parses the first data acquisition request to obtain the data identifier of the first data. The device obtains the first data parameter of the first data based on the data identifier. The first data parameter includes the data length or data amount of the first data.
[0064] In one example, a data table is stored in the device, the data table contains data parameters of each data in the second client, and the data parameters are associated with the data identifier. The device obtains the data parameter associated with the data identifier from the data table as the first data parameter.
[0065] In another example, the device parses the first data acquisition request to obtain the data identifier of the first data, generates a parameter acquisition request based on the data identifier, and then sends the parameter acquisition request to the second client. The second client parses the parameter acquisition request to obtain the data identifier, and then sends the first data parameter of the first data associated with the data identifier to the device. That is, the device receives the first data parameter fed back by the second client based on the data acquisition request.
[0066] Step S203: Generate multiple second data acquisition requests according to the first data parameter, and send each second data acquisition request to a second client, where the second client is used to indicate a client corresponding to the blocking service.
[0067] After obtaining the first data parameter, the device generates multiple second data acquisition requests based on the first data parameter, and the data requested to be acquired by each second data acquisition request is defined as the second data, and each second data constitutes the first data. It can be understood that the device splits the first data acquisition request into multiple second data acquisition requests, so that the device changes from acquiring the complete first data to acquiring multiple parts of the first data.
[0068] After obtaining each second data acquisition request, the device sends each second data acquisition request to the second client. After receiving the second data acquisition request, the second client will cut out the part of the first data required to obtain the second data request from the first data, and the part of the first data is the second data. The second client then returns the second data to the device.
[0069] Step S204: Each time the second data sent by the second client based on the second data acquisition request is received, the received second data is sent to the first client.
[0070] Each time the device receives second data sent by the second client based on a second data acquisition request, the device sends the received second data to the first client, that is, after the device receives the second data, it immediately sends the second data to the first client, so that the first client can process the second data as part of the first data without waiting for the first client to receive the complete first data before processing, thereby enabling the caller to obtain the required data from the first client as soon as possible.
[0071] The data length of the first data is 10000. Assume that the time required for the first client to obtain data of each data length is 0.01 seconds. If the first client needs to obtain the complete data before processing the data, it needs to wait for 10 seconds before processing the data. In this solution, the device sends 1000 second data acquisition requests to the second client, and each second data acquisition request obtains data of 10 data lengths, so the first device only needs to wait 0.1 seconds to process the data.
[0072] In this embodiment, a first data acquisition request sent by a first client corresponding to a responsive service is received, and data parameters such as the data length and data volume of the first data required to be acquired by the responsive service are determined based on the first data acquisition request. Multiple second data acquisition requests corresponding to the second data for acquiring a portion of the first data are generated based on the first data parameters, and then each second data acquisition request is sent in turn to the second client corresponding to the blocking service, and the second data is sent to the first client each time the second data fed back by the second client is received. In this embodiment, the data transmission device generates multiple second data requests for acquiring a portion of the first data based on the first data request for the first data acquired by the responsive service, thereby first sending part of the first data to the responsive service, so that the responsive service transmits the data to the caller, thereby improving the data call efficiency.
[0073] Reference Figure 3 , Figure 3 This is a flow chart of the second embodiment of the data transmission method of the present application. Based on the first embodiment, step S203 includes:
[0074] Step S301: configure a plurality of second data parameters according to the first data parameters, wherein the second data parameters are smaller than the first data parameters.
[0075] In this embodiment, after obtaining the first data parameter, the device can configure multiple second data parameters based on the first data parameter, and each data parameter is smaller than the first data parameter. For example, when the first data parameter is the first data amount, the second data parameter is the second data amount smaller than the first data amount; when the first data parameter is the first data length, the second data parameter is the second data length smaller than the first data length.
[0076] In one example, the first client has a requirement for quantity, for example, the first client requires the quantity of the first data to be obtained to be the target quantity, and the device divides the first data parameter according to the target data to obtain multiple second data parameters. For example, if the target quantity is 10, the first data parameter is divided 9 times to obtain 10 second data parameters. For example, if the first data length is 100, it is divided nine times to obtain 10 second data lengths, and the second data lengths are all 10. Of course, each second data length may also be different.
[0077] In another example, the first client has a requirement for the amount of received data, for example, requiring that the amount of received data is not less than a target data amount, and the ratio of the first data amount to the target data amount can determine multiple second data parameters. For example, the first data amount is 100M, the target data amount is 8M, and the ratio of 100 to 8 is 12.5, then there are 13 second data parameters, and 12 of the second data parameters are 8M, and the last second data parameter is 4M.
[0078] In another example, the first data parameter is the first data volume, the remaining storage volume of the storage area in the device is obtained, and the second data volume of the second data to be obtained by the device is determined based on the remaining storage volume. The device determines the ratio of the first data volume to the second data volume, and the data volume of the second data needs to be less than the remaining storage volume to avoid the device from being unable to receive the second data completely. The device configures the second data parameter of the target quantity based on the ratio, and the second data parameter is the second data volume. For example, the remaining storage volume is 7M, the first data volume is 100M, the ratio of 100 to 7 is 14.3, and 14.3 is rounded to 15, then the target quantity is greater than or equal to 15. In this way, it is avoided that the device cannot receive the second data. In addition, in this way, the device does not need to configure a larger storage space for data transmission, which reduces the data transmission cost of the device. The first data volume is 100M, and the device in the exemplary technology needs to configure 100M of storage space. In this embodiment, since the maximum data volume of the second data is 7M, the device only needs to configure 7M of storage space to complete the reception of the second data, and then transmit the received second data to the first client.
[0079] Step S302: Generate a second data acquisition request corresponding to each second data parameter, where the second data parameter is used to indicate the data length or data amount of the second data required to be acquired by the corresponding second data acquisition request.
[0080] After obtaining multiple second data parameters, the device generates a data acquisition request corresponding to each second data parameter, where the second data parameter is the data length or data amount of the second data required to be acquired by the second data acquisition request.
[0081] It should be noted that, when the second client receives a second data acquisition request, it divides the second data corresponding to the second data parameter from the first data; when the second client receives a second data acquisition request again, it continues to divide the first data from which the second data has been divided, until the first data is divided and sent. For example, if the second data acquisition request is 10M, the second client divides 10M from the 100M first data and transmits it to the device, and the 10M first data becomes 90M; if the second client receives another second data acquisition request for 10M division, it divides 10M from the 90M first data and sends it, until the second client sends the last divided second data to the device. In this way, there is no need for the device to set the second data acquisition request differently, saving the computing resources of the device.
[0082] In this embodiment, the device configures multiple second data parameters based on the first data parameters, and then generates a second data acquisition request corresponding to each second data parameter, so that the second client sends multiple parts of the first data to the first client through the device.
[0083] In one embodiment, after obtaining the first data parameter, the device obtains the remaining storage capacity of the storage area in the device, and if the first data parameter is greater than or equal to the remaining storage capacity, it is necessary to generate multiple second data acquisition requests according to the first data parameter. The first data parameter is the first data capacity.
[0084] If the first data parameter is less than the remaining storage capacity, it is necessary to determine whether the first data parameter is less than the preset data amount. If the first data parameter is greater than or equal to the preset data amount, it can be determined that the first data is large-capacity data, and the device needs to generate multiple second data acquisition requests based on the first data parameter.
[0085] In this embodiment, when the first data parameter is greater than or equal to the remaining storage capacity of the storage space of the device, the device needs to generate multiple second data acquisition requests based on the first data parameter to obtain multiple small-capacity data divided by the second client, so as to avoid the device having insufficient storage space and being unable to receive the data required by the first client.
[0086] Reference Figure 4 , Figure 4 This is a flowchart of a third embodiment of the data transmission method of the present application. Based on the first or second embodiment, step S203 includes:
[0087] Step S401: determining the interval between the data transmission device sending a second data acquisition request and receiving the second data.
[0088] In this embodiment, the interval between the sending of the second data acquisition request and the receiving of the second data by the acquisition device can be obtained by testing. For example, the device sends a heartbeat packet to the second client and starts timing. When the device receives a response message from the second client based on the heartbeat packet feedback, the timing is stopped. The timing duration obtained by the device is the interval duration.
[0089] Step S402: configuring a target duration according to the interval duration, wherein the target duration is greater than or equal to the interval duration.
[0090] Step S403: Send a second data acquisition request to the second client at every target time interval.
[0091] After obtaining the interval duration, the device configures a target duration based on the interval duration, and the target duration is greater than or equal to the interval duration. The device sends a second data acquisition request to the second client at each interval of the target duration.
[0092] In this embodiment, when the device generates multiple second data acquisition requests according to the first data parameter, it generates multiple sorted second data acquisition requests based on the first data parameter, and the second data required to be acquired by each second data acquisition request is spliced according to the sorting sequence number of the second data acquisition request to obtain the first data. The device sends a second data acquisition request to the second client at each target time interval according to the sorting order of each second data acquisition request. Exemplarily, assuming that there are three second data acquisition requests sorted as 1, 2 and 3, the device first sends a second data acquisition request sorted as 1 to the second client, and obtains the second data 1 fed back by the second client; after the device sends the second data acquisition request sorted as 1, it starts timing. If the timing duration reaches the target duration, the timing is stopped, and the device sends a second data acquisition request sorted as 2 to the second client again, and obtains the second data 2 fed back by the second client; after the device sends the second data acquisition request sorted as 2, it starts timing. If the timing duration reaches the target duration, the timing is stopped, and the device sends a second data acquisition request sorted as 3 to the second client again, and obtains the second data 3 fed back by the second client. The second data 1+the second data 2+the third data 3 can obtain the first data.
[0093] It should be noted that the device sends the second data to the first client in sequence, and the first client forms streaming data based on the second data sent in sequence.
[0094] In this embodiment, the device sends a second data acquisition request to the second client at target time intervals, so that the device can store a second data within a time period, which has low configuration requirements for the storage space of the device, that is, the data transmission cost of the device is low.
[0095] In one embodiment, the device parses the first data acquisition request to obtain a delay parameter, where the delay parameter refers to the time required for the first client to obtain the complete first data. For example, if the delay parameter is 2 seconds, the device needs to transmit the first data to the first client within 2 seconds.
[0096] The device has multiple ways of transmitting the second data, including parallel transmission and serial transmission. Parallel transmission means that the device sends various second data acquisition requests to the second client at the same time, so that the second client can feedback the second data to the device in the same time period, so that the second device can send various second data to the first client in parallel; serial transmission means that the device sends a second data request to the second client every target interval.
[0097] After the device generates each second data acquisition request, the device obtains a delay parameter based on the first data acquisition request and determines whether the delay parameter is greater than a preset threshold. If the delay parameter is greater than the preset threshold, it can be determined that the first client is not in a hurry to obtain the complete first data, and the device executes steps S401 to S403 to send a second data acquisition request to the second client at each target interval. When the delay parameter is less than or equal to the preset threshold, the device sends each second data acquisition request to the second client in the current time period.
[0098] In the embodiment, the device determines the manner of sending the second data acquisition request through the delay parameter, thereby reasonably transmitting the second data to the second client, and the device has a high degree of intelligence.
[0099] See also Figure 5 , the data transmission device 500 provided in the embodiment of the present application, the data transmission device 500 includes:
[0100] The receiving module 510 is used to receive a first data acquisition request sent by a first client, wherein the first client is used to indicate a client corresponding to the responsive service;
[0101] A determination module 520, configured to determine a first data parameter according to the first data acquisition request, where the first data parameter is used to indicate a data length or data amount of the first data, and the first data is used to indicate data required to be acquired by the first data acquisition request;
[0102] A generating module 530, configured to generate a plurality of second data acquisition requests according to the first data parameter, and send each second data acquisition request to a second client, where the second client is used to indicate a client corresponding to the blocking service;
[0103] The sending module 540 is configured to send the received second data to the first client each time the second data sent by the second client based on the second data acquisition request is received.
[0104] In one embodiment, the data transmission device 500 is specifically used for:
[0105] According to the first data parameter, a plurality of second data parameters are configured, wherein the second data parameters are smaller than the first data parameters;
[0106] A second data acquisition request corresponding to each second data parameter is generated, where the second data parameter is used to indicate the data length or data amount of the second data required to be acquired by the corresponding second data acquisition request.
[0107] In one embodiment, the data transmission device 500 is specifically used for:
[0108] Acquire the remaining storage capacity of the storage area in the data transmission device;
[0109] Determine a second data amount of the second data to be acquired by the data transmission device according to the remaining storage amount, and determine a ratio of the first data amount to the second data amount, the second data amount being less than the remaining storage amount;
[0110] According to the ratio, a second data parameter of the target quantity is configured, the target data is greater than or equal to the ratio, and the second data parameter is the second data amount.
[0111] In one embodiment, the data transmission device 500 is specifically used for:
[0112] Get the remaining storage capacity of the storage area in the data transmission device
[0113] In response to the first data parameter being greater than or equal to the remaining storage amount, a plurality of second data acquisition requests are generated according to the first data parameter.
[0114] In one embodiment, the data transmission device 500 is specifically used for:
[0115] Determine the interval between the data transmission device sending the second data acquisition request and receiving the second data;
[0116] Configure the target duration according to the interval duration. The target duration should be greater than or equal to the interval duration.
[0117] A second data acquisition request is sent to the second client at every target time interval.
[0118] In one embodiment, the data transmission device 500 is specifically used for:
[0119] Generate multiple sorted second data acquisition requests according to the first data parameter, wherein the second data required to be acquired by each second data acquisition request is spliced according to the sorting sequence number of each second data acquisition request to obtain the first data;
[0120] The step of sending a second data acquisition request to the second client at each target time interval includes:
[0121] According to the sorting order of the second data acquisition requests, a second data acquisition request is sent to the second client at every target time interval.
[0122] In one embodiment, the data transmission device 500 is specifically used for:
[0123] Parsing the first data acquisition request to obtain a data identifier of the first data;
[0124] Generate a parameter acquisition request according to the data identifier, and send the parameter acquisition request to the second client;
[0125] Receive the first data parameter fed back by the second client based on the parameter acquisition request.
[0126] Each module of the data transmission device provided in the embodiment of the present application can realize Figures 2 to 4 Any embodiment provides the functions of each step of the data transmission method and can achieve its corresponding technical effects. For the sake of concise description, they will not be repeated here.
[0127] Figure 6 A schematic diagram of the hardware structure of a data transmission device provided in an embodiment of the present application is shown.
[0128] The data transmission device may include a processor 601 and a memory 602 storing computer program instructions.
[0129] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0130] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.
[0131] In certain embodiments, the memory 602 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0132] The processor 601 implements any one of the authentication methods in the above embodiments by reading and executing computer program instructions stored in the memory 602 .
[0133] In one example, the data transmission device may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.
[0134] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0135] Bus 610 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 610 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0136] The data transmission method in the above embodiment can be implemented by providing a computer storage medium in the present application embodiment. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the data transmission methods in the above embodiment is implemented.
[0137] An embodiment of the present application further provides a computer program product, including a computer program, which implements any one of the data transmission methods in the above embodiments when the computer program is processed and executed.
[0138] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0139] Aspects of the present disclosure are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data transmission device to produce a machine so that these instructions executed by the processor of the computer or other programmable data transmission device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0140] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A data transmission method, It is characterized in that Applied to a data transmission device, the data transmission method comprises: Receiving a first data acquisition request sent by a first client, wherein the first client is used to indicate a client corresponding to the responsive service; determining a first data parameter according to the first data acquisition request, where the first data parameter is used to indicate a data length or a data amount of first data, and the first data is used to indicate data to be acquired by the first data acquisition request; Generate multiple second data acquisition requests according to the first data parameter, and send each of the second data acquisition requests to a second client, where the second client is used to indicate a client corresponding to the blocking service; Each time the second data sent by the second client based on the second data acquisition request is received, the received second data is sent to the first client.
2. The data transmission method according to claim 1, It is characterized in that The step of generating a plurality of second data acquisition requests according to the first data parameter comprises: According to the first data parameter, configure a plurality of second data parameters, wherein the second data parameters are smaller than the first data parameters; A second data acquisition request corresponding to each second data parameter is generated, where the second data parameter is used to indicate a data length or a data amount of the second data required to be acquired by the corresponding second data acquisition request.
3. The data transmission method according to claim 2, It is characterized in that The first data parameter includes a first data amount of the first data, and the step of configuring a plurality of second data parameters according to the first data parameter includes: Acquire the remaining storage capacity of the storage area in the data transmission device; Determine a second data amount of second data to be acquired by the data transmission device according to the remaining storage amount, and determine a ratio of the first data amount to the second data amount, the second data amount being smaller than the remaining storage amount; According to the ratio, a second data parameter of a target quantity is configured, the target data is greater than or equal to the ratio, and the second data parameter is the second data quantity.
4. The data transmission method according to claim 1, It is characterized in that The step of generating a plurality of second data acquisition requests according to the first data parameter comprises: Obtaining the remaining storage capacity of the storage area in the data transmission device In response to the first data parameter being greater than or equal to the remaining storage amount, a plurality of second data acquisition requests are generated according to the first data parameter.
5. The data transmission method according to claim 1, It is characterized in that The step of sending each of the second data acquisition requests to the second client comprises: Determine the interval between the data transmission device sending the second data acquisition request and receiving the second data; Configure a target duration according to the interval duration, wherein the target duration is greater than or equal to the interval duration; A second data acquisition request is sent to the second client at intervals of the target duration.
6. The data transmission method according to claim 5, It is characterized in that The step of generating a plurality of second data acquisition requests according to the first data parameter comprises: Generate a plurality of sorted second data acquisition requests according to the first data parameter, wherein the second data required to be acquired by each of the second data acquisition requests are concatenated according to the sorting sequence numbers of each of the second data acquisition requests to obtain the first data; The step of sending a second data acquisition request to the second client at each target time interval includes: According to the sorting order of each of the second data acquisition requests, one second data acquisition request is sent to the second client at every target time interval.
7. The data transmission method according to any one of claims 1 to 6, It is characterized in that The step of determining the first data parameter according to the first data acquisition request comprises: Parsing the first data acquisition request to obtain a data identifier of the first data; generating a parameter acquisition request according to the data identifier, and sending the parameter acquisition request to the second client; Receive the first data parameter fed back by the second client based on the parameter acquisition request.
8. A data transmission device, It is characterized in that include: A receiving module, configured to receive a first data acquisition request sent by a first client, wherein the first client is used to indicate a client corresponding to the responsive service; a determining module, configured to determine a first data parameter according to the first data acquisition request, wherein the first data parameter is used to indicate a data length or a data amount of first data, and the first data is used to indicate data required to be acquired by the first data acquisition request; A generating module, used for generating a plurality of second data acquisition requests according to the first data parameter, and sending each of the second data acquisition requests to a second client, where the second client is used for indicating a client corresponding to the blocking service; The sending module is used to send the received second data to the first client each time the second data sent by the second client based on the second data acquisition request is received.
9. A data transmission device, It is characterized in that The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the data transmission method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data transmission method according to any one of claims 1 to 7 is implemented.
11. A computer program product, It is characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the data transmission method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method, relative device and system for data transmission
CN103618714A
Data query method and device
CN105808661A
Load balancing method and device, proxy equipment, cache equipment and service node
CN111464661A
Data transmission method and device, equipment and medium
CN116599895A
Processing a plurality of requests simultaneously in a web application
US20100268758A1
