Data acquisition method
By configuring a cache area on the front-end device and prioritizing the search for target data within the cache area, the problem of insufficient browser cache space is solved, and efficient data retrieval is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING JINGWEI HIRAIN TECH CO INC
- Filing Date
- 2023-07-19
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, the limited browser cache space of front-end devices makes it difficult to store data samples, and users need to frequently retrieve data samples from back-end devices, which is inefficient.
Configure a cache area on the front-end device, prioritize searching for target data in the cache area, and if not found, copy data in batches from the back-end device to the cache area and return it, thereby reducing interaction with the back-end device.
It improved the efficiency of data acquisition, reduced the number of interactions between front-end and back-end devices, and increased the speed of data acquisition.
Smart Images

Figure CN116932594B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to a data acquisition method. Background Technology
[0002] Typically, deep learning models, computer vision models, and similar models require training with data samples before and during application to improve model performance. For supervised learning, after collecting data samples, users often need to label them before the model can be trained.
[0003] Users typically annotate data samples using the browser configured on their front-end devices. However, browser cache space is limited, usually only 3 to 5 megabytes (MB), making it difficult to store large amounts of data samples. Therefore, data samples are often stored in the storage components of back-end devices. Consequently, users often need to retrieve the data samples before annotating them.
[0004] In existing technologies, when acquiring data samples, the front-end device typically sends a request carrying a data identifier to the back-end device to obtain the data sample from the back-end device.
[0005] Clearly, each time a user retrieves a data sample, they need to send a request to the backend device and wait for the backend device to return the data sample. Furthermore, since it often takes time for the data sample to be sent from the backend device to the frontend device, the efficiency of data sample retrieval is low in the current technology. Summary of the Invention
[0006] This application provides a data acquisition method that can improve the efficiency of acquiring target data.
[0007] On one hand, embodiments of this application provide a data acquisition method, the method including:
[0008] Retrieve a query request carrying a data identifier;
[0009] Search the cache for the target data corresponding to the data identifier;
[0010] If the target data is found, the target data is returned in response to the query request;
[0011] If the target data is not found, the data batch containing the target data stored in the backend device is copied to the cache area, and the target data stored in the cache area is returned in response to the query request.
[0012] Optionally, the data batch carries a batch identifier;
[0013] The step of copying the data batch containing the target data stored on the backend device to the cache area, and returning the target data from the cache area in response to the query request, includes:
[0014] Based on the data identifier, determine the batch identifier corresponding to the data identifier;
[0015] Based on the batch identifier, a data batch corresponding to the batch identifier is obtained from a backend device associated with the frontend device, and the data batch contains the target data;
[0016] The data batch is stored in the cache area;
[0017] In response to the query request, the target data stored in the cache is returned.
[0018] Optionally, the data identifiers are incremented sequentially starting from a first value, and the batch identifiers are incremented sequentially starting from a second value. Data batches with smaller batch identifiers are preferentially configured with target data that have smaller data identifiers.
[0019] The step of determining the batch identifier corresponding to the data identifier based on the data identifier includes:
[0020] Based on the data identifier, the first value, the second value, and B, the batch identifier of the data batch containing the target data corresponding to the data identifier is determined using the following formula:
[0021]
[0022] Where Y is the batch identifier, X is the data identifier, C is the first value, D is the second value, and N is the maximum value of the data identifier.
[0023] Optionally, based on the batch identifier, the data batch corresponding to the batch identifier is obtained from the backend device associated with the frontend device, including:
[0024] Send a target request to the backend device to obtain the data batch corresponding to the batch identifier;
[0025] Receive and store the data batch returned by the backend device;
[0026] If it is determined that the number of data batches stored in the cache is greater than B, H data batches are deleted from the data batches stored in the cache in a first-in-first-out order, where H is a positive integer and H is less than B.
[0027] Optionally, the data batch carries a status identifier, which includes at least cached, requested, and not cached;
[0028] Sending a target request to the backend device to obtain the data batch corresponding to the batch identifier includes:
[0029] Obtain the status identifier of the data batch corresponding to the batch identifier from the backend device;
[0030] If the status indicator is determined to be requesting, wait for the backend device to send the data batch;
[0031] If the status identifier is determined to be uncached, a target request for obtaining the data batch corresponding to the batch identifier is sent to the backend device.
[0032] Optionally, the data batch carries a status identifier, which includes at least cached, requested, and not cached;
[0033] The method further includes:
[0034] If it is determined that a data batch exists and its status is "requesting", then stop receiving the data batch sent by the backend device;
[0035] If it is determined that a data batch containing the target data corresponding to the data identifier has been stored, the reception of the data batch that has been stopped is resumed.
[0036] Optionally, the data batch carries a status identifier, which includes at least cached, requesting, and not cached. In the initial state, the status identifier of the data batch is not cached.
[0037] The method further includes:
[0038] If it is determined that a target request carrying a batch identifier is to be sent to the backend device, a status modification request carrying the batch identifier is sent to the backend device to modify the status identifier carried by the data batch corresponding to the batch identifier to "requesting".
[0039] If it is determined that the data batch will be stored in the cache area, a status modification request carrying the batch identifier is sent to the backend device to modify the status identifier of the data batch to be cached;
[0040] If it is determined that a batch of data in the cache will be deleted, a status modification request carrying the batch identifier is sent to the backend device to modify the status identifier of the data batch to "not cached".
[0041] Optionally, the data batch carries a batch identifier, and the method further includes:
[0042] Based on the first-in-first-out principle, the sequential identifiers of the several data batches in the cache area are determined respectively;
[0043] Based on the data identifier of the target data within the data batch corresponding to the data identifier, the first boundary point and the second boundary point are determined using the following formula:
[0044]
[0045]
[0046] Wherein, K1 is the first dividing point, K2 is the first dividing point, M is the smallest data identifier in the data batch, and L is the largest data identifier in the data batch;
[0047] If the data identifier is determined to be within the interval [M, K1], a target batch identifier is determined based on the batch identifier of the data batch, wherein the target batch identifier is the difference between the batch identifier and the third value;
[0048] When it is determined that the data identifier is within the interval [K2, L], the target batch identifier is determined according to the batch identifier of the data batch, wherein the target batch identifier is the sum of the batch identifier and the third value;
[0049] Obtain the data batch whose batch identifier is the same as the target batch identifier.
[0050] On the other hand, embodiments of this application provide another data acquisition method, the method including:
[0051] Based on the size of the cache area configured within the front-end device's service area, determine the target amount of target data that the cache area can store;
[0052] Determine the total amount of target data;
[0053] Based on a preset second threshold and the total quantity, the total number of data batches is determined using the following formula, where the second threshold is the maximum number of target data that a data batch can contain:
[0054]
[0055] Where P is the total number of data batches, Q is the total number of target data, and B is the second threshold;
[0056] Based on the target quantity and the second threshold, a first threshold is determined, wherein the first threshold is the maximum number of data batches that the cache can store, denoted by the letter A;
[0057] A data batches are sent to the front-end device, which then stores the A data batches in the cache area so that the target data can be retrieved from the cache area.
[0058] Optionally, the data batch carries a batch identifier, and the method further includes:
[0059] Receive a target request carrying a batch identifier sent by the front-end device;
[0060] In response to the target request, the data batch corresponding to the batch identifier is sent to the front-end device.
[0061] On the other hand, embodiments of this application provide another data acquisition device, the device comprising:
[0062] The acquisition unit is used to acquire query requests carrying data identifiers;
[0063] A lookup unit is used to search for target data corresponding to a data identifier from the cache area;
[0064] The first determining unit is configured to return the target data in response to the query request if it is determined that the target data has been found.
[0065] The second determining unit is configured to, when determining that the target data is not found, copy the data batch containing the target data stored in the backend device to the cache area, and in response to the query request, return the target data stored in the cache area.
[0066] On the other hand, embodiments of this application provide a data acquisition device, the device comprising:
[0067] The first determining unit is used to determine the target amount of target data that the cache can store, based on the size of the cache configured in the service area of the front-end device.
[0068] The second determining unit is used to determine the total amount of target data;
[0069] The calculation unit is used to determine the total number of data batches based on a preset second threshold and the total number, using the following formula, where the second threshold is the maximum number of target data that a data batch can contain:
[0070]
[0071] Where P is the total number of data batches, Q is the total number of target data, and B is the second threshold;
[0072] The third determining unit is used to determine a first threshold based on the target quantity and the second threshold, wherein the first threshold is the maximum number of data batches that the cache can store, denoted by the letter A;
[0073] A storage unit is used to send A data batches to the front-end device, so that the front-end device stores the A data batches in the cache area in order to retrieve the target data from the cache area.
[0074] Furthermore, embodiments of this application provide a data acquisition device, the device comprising:
[0075] Processor and memory storing computer program instructions;
[0076] When the processor executes the computer program instructions, it implements the data acquisition method as described in one aspect above. It should be noted that, in one or more embodiments of this application, the data acquisition device is a front-end device or a back-end device.
[0077] In another aspect, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the data acquisition method as described in any of the preceding aspects.
[0078] In another aspect, embodiments of this application provide a computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to implement the data acquisition method as described in any of the preceding aspects.
[0079] The data acquisition method, apparatus, device, and computer storage medium of this application acquire target data through a front-end device. Before acquiring the target data, a portion of the target data is stored in the cache of the front-end device. When acquiring target data with a specific data identifier, the target data can be searched first in the cache, and the decision on whether to acquire the target data from the back-end device is based on the search result, eliminating the need for frequent interaction with the back-end device and improving efficiency. Attached Figure Description
[0080] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0081] Figure 1 This is a flowchart illustrating a data acquisition method provided in one embodiment of this application;
[0082] Figure 2This is a schematic diagram of a status indicator change provided in one embodiment of this application;
[0083] Figure 3 This is a schematic diagram illustrating the equal division of data batches according to an embodiment of this application;
[0084] Figure 4 This is a flowchart illustrating a data acquisition method provided in another embodiment of this application;
[0085] Figure 5 This is a schematic diagram of data batch division provided in one embodiment of this application;
[0086] Figure 6 This is a schematic diagram of the structure of a data acquisition device provided in one embodiment of this application;
[0087] Figure 7 This is a schematic diagram of the structure of a data acquisition device provided in another embodiment of this application;
[0088] Figure 8 This is a schematic diagram of the structure of a data acquisition device provided in one embodiment of this application. Detailed Implementation
[0089] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0090] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0091] As described in the background section, users typically annotate data samples using a browser. However, browsers often have limited memory, making it difficult to store large amounts of data. Consequently, data samples are often stored in the storage components of backend devices. Therefore, during the annotation process, users usually retrieve the data samples to be annotated from the backend device. However, browsers are typically configured within the frontend device, and data interaction between the frontend and backend devices often takes time. Clearly, in existing technologies, the frequent retrieval of data samples from the backend device by users reduces the efficiency of data acquisition, further reducing the efficiency of data sample annotation.
[0092] To address the problems of the prior art, this application provides a data acquisition method. The data acquisition method provided in this application is described below.
[0093] Figure 1 A flowchart illustrating a data acquisition method according to an embodiment of this application is shown. Figure 1 As shown, the data acquisition method provided in this application embodiment includes the following steps: S101 to S104.
[0094] S101: Obtain a query request carrying a data identifier.
[0095] In one or more embodiments of this application, the data acquisition method can be executed by a front-end device. Of course, the electronic device can be a computer, mobile phone, tablet computer, or other similar device; this application does not limit the specific type of device and it can be configured as needed. It should be noted that a communication connection exists between the front-end device and the back-end device, allowing the front-end device to interact with the back-end device via this communication connection.
[0096] To reduce the number of data interactions between the front-end and back-end devices and improve data retrieval efficiency, the front-end device is configured with a cache area, which has a certain amount of storage space. This cache area differs from the browser's cache space; its data capacity is larger than the browser's cache space, but it is still limited. That is, the cache area can store a certain amount of target data, but not all of it. For example, if the target data size is 3MB, the browser's cache space is 5MB, the cache area size is 200MB, and the total number of target data items is 1000, then the browser's cache space can only store one target data item, requiring data interaction with the back-end device each time the target data is retrieved. However, the cache area can store 66 target data items; after one interaction between the front-end and back-end devices, all 66 target data items can be retrieved, eliminating the need for frequent data interactions with the back-end device.
[0097] The cache area can be a portion of the memory of the front-end device, and the data within the cache area is stored in a list. The cache area can also be a portion of a storage component connected to the front-end. This application does not limit which specific areas the cache area comprises and can be set as needed. Furthermore, the cache area can be determined by the user through writing business code. That is, in one or more embodiments of this application, the cache area is the cache area corresponding to the memory described in the front-end device's business code.
[0098] In one or more embodiments of this application, a certain amount of target data may be preferentially stored in the cache area of the front-end device. Furthermore, since data interaction between the front-end device and the back-end device requires a certain amount of time, the front-end device may interact with the back-end device asynchronously when a certain amount of unacquired (unlabeled) target data still exists in the cache area. That is, without affecting the acquisition of target data, a portion of the target data can be stored in the cache area.
[0099] Continuing with the previous example, the front-end device can store 66 target data items. It can then treat these 66 items as two batches: one containing 33 items and the other containing 33 items. Once the front-end device has determined that all 33 items in the first batch have been retrieved, it can delete the first batch (i.e., delete the retrieved 33 items) and asynchronously interact with the back-end device to retrieve a third batch of 33 items. This further reduces the impact of data interaction between the front-end and back-end devices on data retrieval, improving efficiency.
[0100] Specifically, in one or more embodiments of this application, before acquiring target data, the front-end device may preferentially interact with the back-end device to receive A data batches sent by the back-end device, wherein each data batch contains at most B target data items. A and B are both positive integers, and A is less than a preset first threshold, while B is less than a preset second threshold. Both the first and second thresholds are determined based on the storage capacity of the cache and the size of the target data, and the memory space occupied by the A data batches is less than the storage capacity of the cache. It should be noted that each target data item carries a data identifier, which is used to distinguish it from other target data; that is, the data identifier carried by each target data item is different from the data identifiers carried by other target data items.
[0101] In one or more embodiments of this application, the target data is an image frame that makes up a video image, and the data identifier of the target data is the frame number of the target data in the video image.
[0102] The front-end device can respond to user operations, determine the data identifier of the target data to be obtained, and determine the query request carrying the data identifier. Specifically, the front-end device can display the data identifiers of several target data items to be obtained through a configured browser or other software, and respond to the user's selection operation, determine the data identifier selected by the user as the data identifier of the target data to be obtained.
[0103] Using the above method, the front-end device can determine the data identifier of the target data to be acquired, so as to acquire the target data based on the data identifier.
[0104] S102: Search for the target data corresponding to the data identifier in the cache area.
[0105] In one or more embodiments of this application, after the front-end device determines a lookup request carrying a data identifier, it can search for the target data corresponding to the data identifier in the cache.
[0106] Specifically, the front-end device can search for the target data corresponding to the data identifier carried in the query request from the cache. Since the method of searching for data based on data identifiers is already quite mature in the existing technology, the specific search method will not be described in detail here for the sake of brevity.
[0107] Using the above method, the electronic device can prioritize searching for the required data in the cache area without directly interacting with the backend device, thus improving the efficiency of data acquisition.
[0108] S103: If the target data is found, the target data is returned in response to the query request.
[0109] In one or more embodiments of this application, when the front-end device finds the target data corresponding to the data identifier in the cache area, it can obtain the target data.
[0110] Specifically, if the front-end device determines that it has found target data that matches the data identifier in the cache area, the front-end device can return the target data and display it to the user so that the user can obtain the target data.
[0111] Using the above method, the front-end device can return the target data to the user without interacting with the back-end device, allowing the user to obtain the target data.
[0112] S104: If it is determined that the target data is not found, the data batch containing the target data stored in the backend device is copied to the cache area, and in response to the query request, the target data stored in the cache area is returned.
[0113] In one or more embodiments of this application, if the front-end device does not find target data matching the data identifier in the cache area, the front-end device can interact with the back-end device based on the data identifier to store the data batch containing the target data in the cache area of the front-end device, and then return the target data.
[0114] Specifically, if the front-end device determines that the target data is not found in the cache, it can determine the batch identifier corresponding to the data identifier based on the data identifier. Then, based on the batch identifier, it retrieves the data batch corresponding to the batch identifier from the back-end device associated with the front-end device and stores the data batch in the cache. Finally, in response to the query request, it returns the target data stored in the cache.
[0115] Each data batch carries a batch identifier. When determining the batch identifier corresponding to a data identifier, the front-end device can determine the batch identifier based on the correspondence between data identifiers and batch identifiers. Alternatively, when determining the data identifier, it can be determined that each data identifier contains the batch identifier of the data batch to which the target data belongs, so the front-end device can directly determine the batch identifier based on the data identifier.
[0116] Furthermore, in one or more embodiments of this application, both the data identifier of the target data and the batch identifier of the data batch can be user-defined. Therefore, in one or more embodiments of this application, the front-end device needs to manually define the rule between the data identifier and the batch identifier before determining the batch identifier based on the rule of the correspondence between the data identifier and the batch identifier.
[0117] Therefore, in one or more embodiments of this application, the front-end device can determine that the data identifier increments sequentially starting from a first value, and the batch identifier increments sequentially starting from a second value. Furthermore, data batches with smaller batch identifiers are preferentially configured with target data whose data identifiers are smaller, until the number of target data contained in the data batch reaches B.
[0118] Where B represents the maximum number of target data items contained in a data batch. Both the first and second values are positive integers. For example, if both the first and second values are 1, B is 100, and the total number of target data items is 432. Therefore, the target data items are identified as 1, 2, 3, ..., 432. The batch identifiers are 1, 2, 3, 4, and 5. A target batch with batch identifier 1 contains target data items with identifiers 1, 2, 3, ..., 100; a target batch with batch identifier 2 contains target data items with identifiers 101, 102, 103, ..., 200; a target batch with batch identifier 3 contains target data items with identifiers 201, 202, 203, ..., 300; a target batch with batch identifier 4 contains target data items with identifiers 301, 302, 303, ..., 400; and a target batch with batch identifier 5 contains target data items with identifiers 401, 402, 403, ..., 432.
[0119] Therefore, the front-end device can determine the batch identifier of the data batch containing the target data corresponding to the data identifier based on the data identifier, the first value, the second value, and B, using the following formula:
[0120]
[0121] Where Y is the batch identifier, X is the data identifier, C is the first value, D is the second value, and N is the maximum target identifier. In one or more embodiments of this application, when C is 1, N is also the total number of target data. Based on the above method of determining the pattern between the data identifier and the batch identifier, the front-end device can determine the batch identifier corresponding to any target data based on this pattern after determining the data identifier of that data. This further improves the efficiency of acquiring target data.
[0122] In addition, in one or more embodiments of this application, when the front-end device obtains the data batch corresponding to the batch identifier from the back-end device, it may do so in the following manner.
[0123] The front-end device can send a target request carrying a batch identifier to the back-end device. This target request is used to retrieve the data batch corresponding to the batch identifier. The front-end device then receives the data batch returned by the back-end device in response to the target request and stores the data batch in the cache.
[0124] Furthermore, since the number of data batches that the cache can store is limited, if the number of data batches stored in the cache exceeds A, the front-end device can delete some of the data batches in the cache. Specifically, when the front-end device determines that the number of data batches stored in the cache exceeds A, the front-end device can delete H data batches from the data batches stored in the cache in a first-in, first-out (FIFO) order, that is, according to the order in which the data batches were stored in the cache. H is a positive integer, and H is less than A.
[0125] Furthermore, in one or more embodiments of this application, since data interaction between the front-end device and the back-end device takes a certain amount of time, and the user has autonomy, they may not wait. That is, if a user determines to obtain target data corresponding to a certain data identifier, and that target data has not yet been returned to the user, the user may obtain target data corresponding to other data identifiers. Moreover, the target data obtained by the user twice may correspond to the same data batch, which can easily lead to the front-end device requesting the same data batch twice from the back-end device.
[0126] For example, a user determines to retrieve target data corresponding to data identifier 134. The batch identifier of this target data is 2, so the front-end device sends a target request carrying batch identifier 2 to the back-end device. If the user does not retrieve the target data corresponding to data identifier 134, and then determines to retrieve target data corresponding to data identifier 158, the batch identifier of which is also 2, then the front-end device sends a target request carrying batch identifier 2 to the back-end device.
[0127] This is clearly unreasonable. Therefore, to avoid this situation, the electronic device can determine that each data batch carries a status identifier, which represents the status of the data batch. Status identifiers include cached, requesting, and not cached. When a data batch is stored in the cache, its status identifier is cached. When the front-end device sends a target request carrying a batch identifier to the back-end device, and the data batch corresponding to that batch identifier is not yet stored in the cache, the status identifier of that data batch is requesting. When a batch of data is not stored in the cache, and the front-end device has not sent a target request carrying the batch identifier of that batch of data to the back-end device, the status identifier of that batch of data is not cached. The change of this status identifier can be implemented through a function in a computer program running within the back-end device. Since the relevant technology is relatively mature in the prior art, the specific process of updating the status identifier and how the status identifier exists will not be described in detail here for the sake of brevity.
[0128] In one or more embodiments of this application, when the front-end device determines that the status identifier of a certain data batch needs to be updated, it can update the status identifier by sending a status modification request to the back-end device. Specifically, by default, the status identifiers of several data batches stored in the front-end device before step S101 are cached, while the status identifiers of other data batches are not cached.
[0129] Therefore, if the front-end device determines that it will send a target request carrying a batch identifier to the back-end device, it can send a status modification request carrying the batch identifier to the back-end device, modifying the status identifier of the data batch corresponding to the batch identifier to "Requesting". If it determines that it will store the data batch in the cache, it sends a status modification request carrying the batch identifier to the back-end device, modifying the status identifier of the data batch to "Cached". If it determines that it will delete the data batch from the cache, it sends a status modification request carrying the batch identifier to the back-end device, modifying the status identifier of the data batch to "Not Cached".
[0130] Figure 2 This is a schematic diagram of a status indicator change provided in one embodiment of this application, such as... Figure 2 As shown in the diagram, when a front-end device initiates a target request for a specific data batch to a back-end device, the status identifier of that data batch changes from "Not Cached" (201) to "Requesting" (202). When the target request fails, the status identifier of the data batch changes from "Requesting" (202) back to "Not Cached" (201). When the target request succeeds, the status identifier of the data batch changes from "Requesting" (202) to "Cached" (203). When a cached data batch is removed from the cache, the status identifier of that data batch changes from "Cached" (203) back to "Not Cached" (201).
[0131] Therefore, when the front-end device sends a target request carrying a batch identifier to the back-end device, it can first determine the status identifier of the data batch corresponding to the batch identifier, and thus decide whether to send the target request. Specifically, before sending a target request to the back-end device to obtain the data batch corresponding to the batch identifier, the front-end device can obtain the status identifier of the data batch corresponding to the batch identifier from the back-end device.
[0132] If the front-end device determines that the status identifier is "requesting," it can wait for the back-end device to send the data batch without sending the target request. If the front-end device determines that the status identifier is "not cached," it can send a target request to the back-end device to retrieve the data batch corresponding to the batch identifier. If the front-end device determines that the status identifier is "cached," it can avoid sending the target request. By using the above methods, the front-end device can reduce the occurrence of requesting the same data batch twice from the back-end device, further improving the efficiency of retrieving target data.
[0133] Furthermore, as described in step S101, after the front-end device has determined that all target data in certain data batches has been acquired, it can delete these data batches and request some data batches from the back-end device via asynchronous communication. Moreover, when determining the data identifier carried in the query request, the front-end device can also request the data batch corresponding to the target data from the back-end device if no target data corresponding to the data identifier is found in the cache. Therefore, the data batch requested from the back-end device via asynchronous communication may be the same as or different from the data batch requested from the back-end device based on the query request. To further improve the efficiency of acquiring target data, the front-end device can adopt different processing methods for different situations.
[0134] Specifically, if the front-end device determines that the data identifier carried in the query request is not found in the cache corresponding to the data identifier, it can determine the batch identifier corresponding to the data identifier and obtain the status identifier of the batch identifier from the back-end device.
[0135] If the front-end device determines that the status is either requesting or cached, there is no need to send a target request to the back-end device.
[0136] If the front-end device determines that the status identifier is not cached, it can send a target request carrying the batch identifier to the back-end device. Furthermore, in one or more embodiments of this application, since the front-end device may be interacting with the back-end device, to further improve the efficiency of acquiring target data, the front-end device can determine whether it is interacting with the back-end device. If the front-end device determines that there is no data batch with a status identifier indicating it is requesting, it may not perform any further operations. If the front-end device determines that there is a data batch with a status identifier indicating it is requesting, it can stop receiving the data batch sent by the back-end device and receive the data batch related to the query request. If it determines that the data batch related to the query request has been stored, the front-end device can resume receiving the data batch that it had stopped receiving.
[0137] For example, a query request carries a target identifier of 154, corresponding to a batch identifier of 2. After the front-end device sends a target request carrying batch identifier 2 to the back-end device, it determines that the status identifier of the data batch corresponding to batch identifier 4 is "requesting". That is, it determines that the front-end device is receiving the data batch with batch identifier 4, so the front-end device can stop receiving the data batch with batch identifier 4, and after storing the data batch with batch identifier 2 in the buffer, it can then reply to receive the data batch with batch identifier 4.
[0138] Furthermore, in one or more embodiments of this application, the target data contained in a data batch may exhibit a certain pattern under certain circumstances. Therefore, after obtaining the last few target data points of a data batch, there is a certain probability that the target data contained in the next data batch adjacent to that data batch will be obtained.
[0139] Therefore, the front-end device can determine whether to store certain data batches in the cache in the following ways.
[0140] Specifically, the front-end device can determine the target identifier carried in the query request, as well as the data identifier corresponding to that target identifier. Then, based on the data identifiers of each target data within the data batch corresponding to that data identifier, the first and second boundary points are determined using the following formula:
[0141]
[0142]
[0143] Where K1 is the first dividing point, K2 is the first dividing point, M is the smallest data identifier in the data batch, and L is the largest data identifier in the data batch;
[0144] If the data identifier is determined to be within the interval [M, K1], the target batch identifier is determined based on the batch identifier of the data batch. The target batch identifier is the difference between the batch identifier and the third value.
[0145] When the data identifier is determined to be within the interval [K2, L], a target batch identifier is determined based on the batch identifier of the data batch. The target batch identifier is the sum of the batch identifier and a third value. The third value is a positive integer, preferably 1.
[0146] Figure 3 This is a schematic diagram of data batch division provided in one embodiment of this application, such as... Figure 3As shown. M301 is the smallest target identifier within this data batch, and L304 is the largest target identifier within this data batch. One-third of the data identifiers within this data batch exist within the interval [M, K1], and one-third of the data identifiers within this data batch also exist within the interval [K2, L]. The target identifier of K1302 is... K2303 target identifier is If the target identifier X belongs to the interval [M, K1], then the target batch identifier can be determined as the difference between the batch identifier and the third value.
[0147] Finally, if the front-end device determines that a target batch identifier exists, it can send a target request carrying the target batch identifier to the back-end device, storing the data batch with the same batch identifier as the target batch identifier in the cache. Using this method, the front-end device can further improve the efficiency of acquiring target data.
[0148] Using the above method, the front-end device can store data batches containing the target data in the cache even if the target data cannot be found in the cache, and then return the target data from the cache.
[0149] The above describes the specific implementation of the data acquisition method provided in this application. As can be seen, in the above embodiments, target data can be acquired through a front-end device. Before acquiring the target data, a portion of the target data is stored in the cache of the front-end device. When acquiring target data with a specific data identifier, the target data can be searched first from the cache, and the search result determines whether to acquire the target data from the back-end device, eliminating the need for frequent interaction with the back-end device and improving efficiency.
[0150] The following section first introduces another data acquisition method provided in the embodiments of this application.
[0151] Figure 4 A flowchart illustrating a data acquisition method according to an embodiment of this application is shown. Figure 4 As shown, the data acquisition method provided in this application embodiment includes the following steps: S101 to S104.
[0152] S401: Determine the target amount of target data that the cache can store based on the size of the cache configured in the service area of the front-end device.
[0153] In one or more embodiments of this application, the backend device can determine the target quantity of target data that can be stored in the cache area based on the size of the cache area configured in the service area of the frontend device and the size of the target data. Since different target data may have different sizes, the backend device can also estimate the target quantity of target data that can be stored in the cache area based on the size of the cache area and the average size of the target data.
[0154] S402: Determine the total number of target data.
[0155] In one or more embodiments of this application, the backend device can count the total amount of target data stored within the storage component.
[0156] S403: Based on the preset second threshold and the total quantity, determine the total quantity of the data batch using the following formula, where the second threshold is the maximum number of target data that a data batch can contain:
[0157]
[0158] Where P is the total number of data batches, Q is the total number of target data, and B is the second threshold.
[0159] In one or more embodiments of this application, the backend device can determine the total number of data batches based on a preset second threshold and the total number, using Formula 4. Wherein, P is the total number of data batches, Q is the total number of target data, and B is the second threshold.
[0160] Figure 5 This is a schematic diagram of data batch division provided in one embodiment of this application, as shown below. Figure 5 As shown in the figure, there are a total of Q target data arranged sequentially. The first target data 501 to the second target data 502 are assigned to the first data batch 505. The third target data 503 to the fourth target data 504 are assigned to the fifth data batch 506.
[0161] S404: Based on the target quantity and the second threshold, determine a first threshold, where the first threshold is the maximum number of data batches that the cache can store, denoted by the letter A.
[0162] In one or more embodiments of this application, the backend device may determine a first threshold based on the target quantity and the second threshold, wherein the first threshold is the maximum number of data batches that the cache can store, denoted by the letter A.
[0163] S405: Send A data batches to the front-end device, so that the front-end device stores the A data batches in the cache area in order to retrieve the target data from the cache area.
[0164] In one or more embodiments of this application, the electronic device may randomly send A data batches to the front-end device, so that the front-end device may store the A data batches in the cache in advance, so as to obtain the target data from the cache.
[0165] In one or more embodiments of this application, the backend device may also receive a target request carrying a batch identifier sent by the frontend device, and in response to the target request, send the data batch corresponding to the batch identifier to the frontend device.
[0166] The above describes the specific implementation of the data acquisition method provided in this application. As can be seen, in the above embodiments, target data can be acquired through a front-end device. Before acquiring the target data, a portion of the target data is stored in the cache of the front-end device. When acquiring target data with a specific data identifier, the target data can be searched first from the cache, and the search result determines whether to acquire the target data from the back-end device, eliminating the need for frequent interaction with the back-end device and improving efficiency.
[0167] Furthermore, the acquisition, storage, use, and processing of data in this application's technical solution all comply with relevant national laws and regulations.
[0168] Based on the data acquisition method provided in the above embodiments, this application also provides specific implementations of the data acquisition device. Please refer to the following embodiments.
[0169] First see Figure 6 The data acquisition device provided in this application embodiment includes the following units:
[0170] The acquisition unit 601 is used to acquire a query request carrying a data identifier;
[0171] The lookup unit 602 is used to look up the target data corresponding to the data identifier from the cache area;
[0172] The first determining unit 603 is configured to return the target data in response to the query request when it is determined that the target data has been found.
[0173] The second determining unit 604 is used to copy a batch of data containing the target data stored in the backend device to the cache area when it is determined that the target data is not found, and to return the target data stored in the cache area in response to the query request.
[0174] As can be seen from the above embodiments, the data acquisition device provided in this application can acquire target data through a front-end device. Before acquiring the target data, a portion of the target data is stored in the cache of the front-end device. When acquiring target data with a specific data identifier, the target data can be searched first from the cache, and the decision on whether to acquire the target data from the back-end device is based on the search result, eliminating the need for frequent interaction with the back-end device and improving efficiency.
[0175] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include: a second determining subunit.
[0176] The second determining subunit is configured to determine the batch identifier corresponding to the data identifier based on the data identifier, obtain the data batch corresponding to the batch identifier from the backend device associated with the frontend device based on the batch identifier, the data batch containing the target data, store the data batch in the cache area, and return the target data stored in the cache area in response to the query request.
[0177] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include: a second determining subunit.
[0178] The second determining subunit is configured to determine the batch identifier of the data batch containing the target data corresponding to the data identifier, based on the data identifier, the first value, the second value, and B, using the following formula:
[0179]
[0180] Where Y is the batch identifier, X is the data identifier, C is the first value, and D is the second value.
[0181] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include: a second determining subunit.
[0182] The second determining subunit is used to send a target request to the backend device to obtain the data batch corresponding to the batch identifier, receive and store the data batch returned by the backend device, and, if it is determined that the number of data batches stored in the cache is greater than B, delete H data batches from the data batches stored in the cache in a first-in-first-out order, where H is a positive integer and H is less than B.
[0183] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include: a second determining subunit.
[0184] The second determining subunit is used to obtain the status identifier of the data batch corresponding to the batch identifier from the backend device. If the status identifier is determined to be requesting, the subunit waits for the backend device to send the data batch. If the status identifier is determined to be uncached, the subunit sends a target request to the backend device to obtain the data batch corresponding to the batch identifier.
[0185] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include: a second determining subunit.
[0186] The second determining subunit is configured to stop receiving the data batch sent by the backend device when it is determined that the status identifier of the data batch is "requesting", and to resume receiving the data batch that has been stopped when it is determined that a data batch containing the target data corresponding to the data identifier has been stored.
[0187] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include: a second determining subunit.
[0188] The second determining subunit is configured to, when determining to send a target request carrying a batch identifier to the backend device, send a status modification request carrying the batch identifier to the backend device to modify the status identifier of the data batch corresponding to the batch identifier to "Requesting"; when determining to store the data batch in the cache area, send a status modification request carrying the batch identifier to the backend device to modify the status identifier of the data batch to "Cached"; and when determining to delete the data batch in the cache area, send a status modification request carrying the batch identifier to the backend device to modify the status identifier of the data batch to "Not Cached".
[0189] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include: a second determining subunit.
[0190] The second determining subunit is used to determine the sequence identifiers of the several data batches in the buffer based on the first-in-first-out principle, and to determine the first and second dividing points according to the data identifiers of the target data within the data batch corresponding to the data identifiers, using the following formula:
[0191]
[0192]
[0193] Wherein, K1 is the first dividing point, K2 is the first dividing point, M is the smallest data identifier in the data batch, and N is the largest data identifier in the data batch. When it is determined that the data identifier is within the interval [M, K1], the target batch identifier is determined according to the batch identifier of the data batch. The target batch identifier is the difference between the batch identifier and the third value. When it is determined that the data identifier is within the interval [K2, N], the target batch identifier is determined according to the batch identifier of the data batch. The target batch identifier is the sum of the batch identifier and the third value. Data batches with the same batch identifier as the target batch identifier are obtained.
[0194] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include: an acquisition subunit.
[0195] The acquisition subunit is configured such that the target data is an image frame that makes up a video image, and the data identifier is the frame number of the target data in the video image.
[0196] Based on the data acquisition method provided in the above embodiments, this application also provides specific implementations of the data acquisition device. Please refer to the following embodiments.
[0197] First see Figure 7 The data acquisition device provided in this application embodiment includes the following units:
[0198] The first determining unit 701 is used to determine the target number of target data that the cache can store based on the size of the cache configured in the service area of the front-end device.
[0199] The second determining unit 702 is used to determine the total quantity of target data;
[0200] Calculation unit 703 is configured to determine the total number of data batches based on a preset second threshold and the total number, using the following formula, where the second threshold is the maximum number of target data that a data batch can contain:
[0201]
[0202] Where P is the total number of data batches, Q is the total number of target data, and B is the second threshold;
[0203] The third determining unit 704 is used to determine a first threshold based on the target quantity and the second threshold, wherein the first threshold is the maximum number of data batches that the buffer can store, represented by the letter A;
[0204] Storage unit 705 is used to send A data batches to the front-end device, so that the front-end device stores the A data batches in the cache area in order to retrieve the target data from the cache area.
[0205] As can be seen from the above embodiments, the data acquisition device provided in this application can acquire target data through a front-end device. Before acquiring the target data, a portion of the target data is stored in the cache of the front-end device. When acquiring target data with a specific data identifier, the target data can be searched first from the cache, and the decision on whether to acquire the target data from the back-end device is based on the search result, eliminating the need for frequent interaction with the back-end device and improving efficiency.
[0206] As another implementation of this application, in order to further improve efficiency, the above-mentioned device may further include a transmitting subunit.
[0207] The sending subunit is configured to receive a target request carrying a batch identifier sent by the front-end device, and in response to the target request, send the data batch corresponding to the batch identifier to the front-end device.
[0208] Figure 8 A schematic diagram of the hardware structure of the data acquisition device provided in an embodiment of this application is shown.
[0209] The data acquisition device may include a processor 801 and a memory 802 storing computer program instructions.
[0210] Specifically, the processor 801 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0211] Memory 802 may include mass storage for data or instructions. For example, and not limitingly, memory 802 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 802 may include removable or non-removable (or fixed) media. Where appropriate, memory 802 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 802 is non-volatile solid-state memory.
[0212] In a particular embodiment, memory 802 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) 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 one aspect of this disclosure.
[0213] The processor 801 implements any of the data acquisition methods described in the above embodiments by reading and executing computer program instructions stored in the memory 802.
[0214] In one example, the data acquisition device may further include a communication interface 803 and a bus 810. For example, Figure 8 As shown, the processor 801, memory 802, and communication interface 803 are connected through bus 810 and complete communication with each other.
[0215] The communication interface 803 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0216] Bus 810 includes hardware, software, or both, that couples components of a data acquisition device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 810 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0217] The data acquisition device can execute the data acquisition method in the embodiments of this application, thereby achieving the combination Figure 1 , Figure 5 , Figure 6 as well as Figure 7 The data acquisition method and apparatus described.
[0218] Furthermore, in conjunction with the data acquisition methods described in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the data acquisition methods described in the above embodiments.
[0219] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0220] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0221] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. 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 embodiments, or in a different order, or several steps can be performed simultaneously.
[0222] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. 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 is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0223] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A data acquisition method, characterized in that, This is applied to a front-end device, where a cache stores A data batches, each containing B target data items. Each target data item carries a data identifier. The cache corresponds to the memory containing the front-end device's business code. Both A and B are positive integers, with A being a preset first threshold and B being a preset second threshold, including: Retrieve a query request carrying a data identifier; Search the cache for the target data corresponding to the data identifier; If the target data is found, the target data is returned in response to the query request; If the target data is not found, the data batch containing the target data stored in the backend device is copied to the cache area, and the target data stored in the cache area is returned in response to the query request. The data batch carries a status identifier, which includes at least cached, requesting, and not cached. The initial status identifier of the data batch is not cached. The method further includes: If it is determined that a target request carrying a batch identifier is to be sent to the backend device, a status modification request carrying the batch identifier is sent to the backend device to modify the status identifier carried by the data batch corresponding to the batch identifier to "requesting". If it is determined that the data batch will be stored in the cache area, a status modification request carrying the batch identifier is sent to the backend device to modify the status identifier of the data batch to be cached; If it is determined that a batch of data in the cache will be deleted, a status modification request carrying the batch identifier is sent to the backend device to modify the status identifier of the data batch to "not cached".
2. The method according to claim 1, characterized in that, The data batch carries a batch identifier; The step of copying the data batch containing the target data stored on the backend device to the cache area, and returning the target data from the cache area in response to the query request, includes: Based on the data identifier, determine the batch identifier corresponding to the data identifier; Based on the batch identifier, a data batch corresponding to the batch identifier is obtained from a backend device associated with the frontend device, and the data batch contains the target data; The data batch is stored in the cache area; In response to the query request, the target data stored in the cache is returned.
3. The method according to claim 2, characterized in that, The data identifiers are incremented sequentially starting from a first value, and the batch identifiers are incremented sequentially starting from a second value. Data batches with smaller batch identifiers are prioritized for configuring target data with smaller data identifiers. The step of determining the batch identifier corresponding to the data identifier based on the data identifier includes: Based on the data identifier, the first value, the second value, and B, the batch identifier of the data batch containing the target data corresponding to the data identifier is determined using the following formula: Where Y is the batch identifier, X is the data identifier, C is the first value, D is the second value, and N is the largest data identifier.
4. The method according to claim 2, characterized in that, Based on the batch identifier, the data batch corresponding to the batch identifier is obtained from the backend device associated with the frontend device, including: Send a target request to the backend device to obtain the data batch corresponding to the batch identifier; Receive and store the data batch returned by the backend device; If it is determined that the number of data batches stored in the cache is greater than B, H data batches are deleted from the data batches stored in the cache in a first-in-first-out order, where H is a positive integer and H is less than B.
5. The method according to claim 4, characterized in that, The data batch carries a status identifier, which includes at least three status identifiers: cached, requesting, and not cached. Sending a target request to the backend device to obtain the data batch corresponding to the batch identifier includes: Obtain the status identifier of the data batch corresponding to the batch identifier from the backend device; If the status indicator is determined to be requesting, wait for the backend device to send the data batch; If the status identifier is determined to be uncached, a target request for obtaining the data batch corresponding to the batch identifier is sent to the backend device.
6. The method according to claim 2, characterized in that, The data batch carries a status identifier, which includes at least three status identifiers: cached, requesting, and not cached. The method further includes: If it is determined that a data batch exists and its status is "requesting", then stop receiving the data batch sent by the backend device; If it is determined that a data batch containing the target data corresponding to the data identifier has been stored, the reception of the data batch that has been stopped is resumed.
7. The method according to claim 1, characterized in that, The data batch carries a batch identifier, and the method further includes: Based on the first-in-first-out principle, the sequential identifiers of several data batches in the cache area are determined respectively; Based on the data identifier of the target data within the data batch corresponding to the data identifier, the first boundary point and the second boundary point are determined using the following formula: in, This is the first dividing point. Let M be the first dividing point, M be the smallest data identifier in the data batch, and L be the largest data identifier in the data batch; After determining that the data identifier is in the interval [M, In the case of [data batch], the target batch identifier is determined based on the batch identifier of the data batch, wherein the target batch identifier is the difference between the batch identifier and the third value; After determining that the data identifier is within the range [ Within the specified time, based on the batch identifier of the data batch, a target batch identifier is determined, wherein the target batch identifier is the sum of the batch identifier and a third value; Obtain the data batch whose batch identifier is the same as the target batch identifier.
8. The method according to claim 1, characterized in that, The method further includes: Based on the size of the cache area configured within the front-end device's service area, determine the target amount of target data that the cache area can store; Determine the total amount of target data; Based on a preset second threshold and the total quantity, the total number of data batches is determined using the following formula, where the second threshold is the maximum number of target data that a data batch can contain: Where P is the total number of data batches, Q is the total number of target data, and B is the second threshold; Based on the target quantity and the second threshold, a first threshold is determined, wherein the first threshold is the maximum number of data batches that the cache can store, denoted by the letter A; A data batches are sent to the front-end device, which then stores the A data batches in the cache area so that the target data can be retrieved from the cache area.
9. The method according to claim 8, characterized in that, The data batch carries a batch identifier, and the method further includes: Receive a target request carrying a batch identifier sent by the front-end device; In response to the target request, the data batch corresponding to the batch identifier is sent to the front-end device.
Citation Information
Patent Citations
Cache updating method and device
CN106506704A
Data retrieval method and device, electronic equipment and storage medium
CN113971238A