Data access method and device and storage medium
By setting up a prefetch window and caching device in the large language model, the data access process is optimized, which solves the problem of reduced inference speed caused by storage device performance and data retrieval, and achieves faster data retrieval and improved inference speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JINAN INSPUR DATA TECH CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-12
AI Technical Summary
Large language models suffer from a decrease in inference speed due to storage device performance and data retrieval issues, especially the limited high-bandwidth memory capacity of GPUs and the slow data access speed of non-volatile storage media.
By setting a prefetch window in the job queue, managing the storage address of data, using caching devices such as high-bandwidth memory to cache the data required by the jobs to be processed, and timely scheduling and recycling of data through asynchronous I/O and data query results, the data access process is optimized.
It improves the inference speed of large models, reduces the waiting time of computing units, manages data storage addresses in a timely manner, and improves the speed of models for frequently accessing data.
Smart Images

Figure CN122019094A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of storage technology, and in particular to a data access method, device and storage medium. Background Technology
[0002] In dialogue processing using Large Language Models (LLMs), rapid access to the processed data is required. However, the High Bandwidth Memory (HBM) capacity of Graphics Processing Units (GPUs) is limited, making it impossible to store key-value data generated by large-scale dialogues for extended periods. Large-scale computations lead to frequent recalculations of historical data, slowing down model inference. While non-volatile storage media offer large capacity, their slow data access speed also reduces model inference speed, failing to meet the demands of high-speed model inference. Summary of the Invention
[0003] This application provides a data access method, device, and storage medium, which at least solves the problem of reduced inference speed caused by storage device performance and data retrieval during the inference process using large language models.
[0004] Firstly, this application provides a data access method, including: Obtain task requests, generate computation jobs based on task requests, and submit the computation jobs to the job queue; In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device. The prefetch window is used to indicate the jobs to be loaded in the job queue. Identify the pending jobs in the job queue and establish the correspondence between the pending jobs and the computing units; The data to be processed is queried in its storage status to obtain the data query results; Based on the data query results, the data to be called by the job to be processed is cached in the cache device corresponding to the computing unit of the job to be processed, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0005] Secondly, this application also provides a data access device, comprising: The job processing module is used to obtain task requests, generate computing jobs based on task requests, and submit computing jobs to the job queue. The first data loading module is used to retrieve the computation jobs covered by the prefetch window in the job queue as jobs to be loaded, and to transfer the data to be called by the jobs to be loaded to the first storage device. The prefetch window is used to indicate the jobs to be loaded in the job queue. The association establishment module is used to identify the jobs to be processed in the job queue and establish the correspondence between the jobs to be processed and the computing units. The data query module is used to query the storage status of the data to be accessed by the job and obtain the data query results; The second data loading module is used to cache the data to be called by the job to be processed to the cache device corresponding to the computing unit corresponding to the job to be processed, based on the data query results, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0006] Thirdly, this application also provides a computer device, including a memory, a processor, and a data access program stored in the memory and executable on the processor. When the processor executes the data access program, it implements the data access method described in the first aspect, including: Obtain task requests, generate computation jobs based on task requests, and submit the computation jobs to the job queue; In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device. The prefetch window is used to indicate the jobs to be loaded in the job queue. Identify the pending jobs in the job queue and establish the correspondence between the pending jobs and the computing units; The data to be processed is queried in its storage status to obtain the data query results; Based on the data query results, the data to be called by the job to be processed is cached in the cache device corresponding to the computing unit of the job to be processed, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0007] Fourthly, this application also provides a computer-readable storage medium storing a data access program thereon, which, when executed by a processor, implements the data access method described in the first aspect, including: Obtain task requests, generate computation jobs based on task requests, and submit the computation jobs to the job queue; In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device. The prefetch window is used to indicate the jobs to be loaded in the job queue. Identify the pending jobs in the job queue and establish the correspondence between the pending jobs and the computing units; The data to be processed is queried in its storage status to obtain the data query results; Based on the data query results, the data to be called by the job to be processed is cached in the cache device corresponding to the computing unit of the job to be processed, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0008] Fifthly, this application also provides a computer program product, including a computer program, which, when executed by a processor, implements the data access method described in the first aspect, including: Obtain task requests, generate computation jobs based on task requests, and submit the computation jobs to the job queue; In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device. The prefetch window is used to indicate the jobs to be loaded in the job queue. Identify the pending jobs in the job queue and establish the correspondence between the pending jobs and the computing units; The data to be processed is queried in its storage status to obtain the data query results; Based on the data query results, the data to be called by the job to be processed is cached in the cache device corresponding to the computing unit of the job to be processed, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0009] The beneficial effects of the technical solution provided in this application are: by implementing the data access method, device and storage medium provided in this application, the storage address of data can be managed in a timely manner, enabling large models to quickly call the generated data and improve the inference speed of the model. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of a data access method provided in an embodiment of this application; Figure 2 This is a schematic diagram of data flow provided in an embodiment of this application; Figure 3 This is a schematic diagram of the server and storage device provided in an embodiment of this application; Figure 4This is a schematic diagram of a data access device provided in an embodiment of this application; Figure 5 This is a schematic diagram of a computer system provided in an embodiment of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0013] Unless otherwise defined, the technical or scientific terms used in this disclosure shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an,” “a,” or “the,” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The numbers in the accompanying drawings are only used to distinguish individual functional parts or modules and do not indicate logical relationships between parts or modules. The terms “comprising,” “including,” or “including,” and similar terms mean that the element or object preceding the term encompasses the element or object listed following the term and its equivalents, without excluding other elements or objects. The terms “connected,” “linked,” and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. “Above,” “below,” “left,” “right,” etc., are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0014] The various embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that in the drawings, the same reference numerals are assigned to components having substantially the same or similar structure and function, and repeated descriptions of them will be omitted.
[0015] To address the problem of reduced model inference speed caused by limitations in storage device performance and data retrieval mechanisms in existing technologies, this application provides the following implementation method: In some embodiments, such as Figure 1 As shown, a data access method includes: S100: Obtain task requests, generate computing jobs based on task requests, and submit computing jobs to the job queue; S200: In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device, wherein the prefetch window is used to indicate the jobs to be loaded in the job queue; S300: Determine the pending jobs in the job queue and establish the correspondence between the pending jobs and the computing units; S400: Performs a storage status query on the data to be retrieved by the job to obtain the data query results; S500: Based on the data query results, cache the data to be called by the job to be processed to the cache device corresponding to the computing unit corresponding to the job to be processed, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0016] A computational job is a computational task unit that needs to be executed by the system. It typically includes: input data, such as a piece of text, an image, or a batch of training samples; execution logic, such as running a Python script, calling a model inference function, or executing a MapReduce task; resource requirements, such as the amount of CPU, GPU, memory, and runtime needed; and output goals, such as writing the results to a database, returning them to the user, or saving them to the file system.
[0017] A job queue is a data structure used to temporarily store computational jobs waiting to be executed, following First-In, First-Out (FIFO) or priority scheduling rules.
[0018] This application provides an example of a process for generating computational jobs based on task requests: parsing the request to determine the user's desired task; determining the task type, such as classification, generation, training, or transcoding; estimating computational resources, such as model size and input scale; and generating the job, encapsulating it into an executable task, such as a JSON / YAML description, ID, resources, and input. By implementing this computational job generation process, specific computational jobs are obtained and queued in the job queue.
[0019] A computing unit is a hardware module that performs computational tasks on a computational job. In large language model inference tasks, graphics processing units (GPUs) are commonly used computing units. The correspondence between jobs and computing units is typically determined based on load balancing principles.
[0020] Storage status includes at least the storage location of the data to be accessed by the job to be processed, and the physical device on which the data is stored.
[0021] The caching device is preferably high-bandwidth memory corresponding to the computing unit.
[0022] By implementing the data access method provided in this application embodiment, the storage address of data can be managed in a timely manner, enabling large models to quickly call the generated data and improve the inference speed of the model.
[0023] Specifically, S200: In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device, including: S210: Set a prefetch window in the job queue and treat the computation jobs covered by the prefetch window as jobs to be loaded; S220: Retrieve the cache key-value pair corresponding to the job to be loaded; S230: Based on the cache key value, determine the storage address of the data to be called by the job to be loaded corresponding to the cache key value through the key-value mapping table, and determine the storage device to store the data to be called by the job to be loaded based on the storage address. The key-value mapping table includes at least the cache key value and the storage address of the data to be called by the job to be loaded. S240: In response to the fact that the data to be called by the job to be loaded is stored in the second storage device, the data to be called by the job to be loaded is transferred to the first storage device.
[0024] The first storage device refers to Dynamic Random Access Memory (DRAM); the second storage device refers to non-volatile storage media, which can be a solid-state drive (SSD), a hard disk drive (HDD), etc.
[0025] Preferably, setting the prefetch window includes: According to L pw = C a / S kv Determine the length of the prefetch window, where L pw C represents the length of the prefetch window and the number of computational jobs covered by the prefetch window. a S represents the available space size of the first storage device. kv The cache size required for the calculation job.
[0026] Preferably, the data to be called by the job to be loaded is transferred to the first storage device via asynchronous I / O. This allows the data to be called by the next computing task to be scheduled simultaneously while the computing unit is performing polarity calculations on the data, reducing the waiting time for the computing unit.
[0027] Specifically, S400: performs a storage status query on the data to be accessed by the job to obtain the data query results, including: S410: Look up the data that the job to be processed needs to access in the key-value mapping table; S420a: In response to a match in the key-value mapping table for the data to be retrieved by the job to be processed, the storage address of the data to be retrieved by the job to be loaded in the key-value mapping table is used as the data query result. S420b: In response to the fact that the data to be called by the pending job is not found in the key-value mapping table, the data to be called by the pending job is searched in the cache device corresponding to any computing unit; S430ba: In response to a hit in the cache device corresponding to any computing unit, the storage address of the data to be retrieved by the job in the cache device is used as the data query result; S430bb: In response to the fact that the data to be called by the pending job is not found in the storage device corresponding to any computing unit, the data to be called by the pending job is searched in the first storage device; S440bba: In response to a data query result in which the data to be retrieved by the pending job is found in the first storage device, the storage address of the data to be retrieved by the pending job in the first storage device is used as the data query result. S440bbb: In response to the fact that the data to be retrieved by the pending job is not found in the first storage device, the data to be retrieved by the pending job is searched in the second storage device; S450bbba: In response to a hit in the second storage device of the data to be retrieved by the pending job, the storage address of the data to be retrieved in the second storage device is used as the data query result; S450bbbb: In response to the failure to find the data to be retrieved by the pending job in the second storage device, the data to be retrieved by the pending job is marked as new data as the data query result.
[0028] Specifically, S500: Based on the data query results, caches the data to be accessed by the job to be processed in the cache device corresponding to the computing unit corresponding to the job, including: S510a: In response to the data query result being a storage address, the data corresponding to the storage address is transmitted through the first storage device to the cache device corresponding to the computing unit corresponding to the job to be processed; S510b: In response to a new data query result, the data to be called by the task to be processed is calculated by the computing unit corresponding to the task to be processed, and the data to be called by the task to be processed is transmitted to the cache device corresponding to the computing unit.
[0029] Schematic illustration: if the data query result is a storage address, and that storage address is the address of a cache device, then the data is stored in that cache; if the storage address is the address of a first storage device, then the data is stored in the first storage device; if the storage address is the address of a second storage device, then the data is stored in the second storage device. This points to a high-bandwidth area. In this case, the data needs to be loaded from the first storage device into the cache device corresponding to the computing unit that performs the computation task on that data.
[0030] If the query result is new data, the corresponding calculation unit is directly invoked to calculate the data to be called by the task to be processed based on the corresponding calculation job.
[0031] Preferably, after caching the data to be accessed by the job to be processed in the cache device corresponding to the computing unit corresponding to the job, the method further includes: S610: In response to the cache device obtaining the data to be called by the job to be processed, the calculation unit calculates the data to be called by the job to be processed and obtains the calculation result; S620: Returns the calculation results to the pending job.
[0032] Preferably, after returning the calculation results to the job to be processed, the method further includes: S710: Get the number of times the cached key-value pairs stored in the key-value mapping table are referenced per unit time; S720: Mark cached key-value pairs whose reference count per unit time is less than a preset threshold as pending reclamation; S730: Set up the recycling window; S740: Release cached key-value pairs marked as pending recycling from the key-value map table covered by the recycling window to update the key-value map table.
[0033] Preferably, a recycle window is provided, including: According to: L ev =(C dram +C ssd ) / S kv Determine the length of the recycling window, where L ev C represents the length of the reclamation window, indicating the number of cached key-value pairs covered by the reclamation window. dram For the available space of the first storage device, C ssd For the available space of the second storage device, S kv The cache size required for the calculation job.
[0034] like Figure 2 As shown, C dram for Figure 2 The total available space of the first storage device, C ssd for Figure 2 The total available space of the second storage device.
[0035] Preferably, the eviction of cached key-value pairs is handled asynchronously. This allows for parallel processing with the computational tasks of the computing unit, updating the key-value mapping table while data is being computed, and promptly eviction of infrequently accessed data to update with the latest frequently accessed data. This improves the speed at which the model accesses frequently accessed data, thereby increasing the model's inference speed.
[0036] Preferably, the data recovery process is also applicable to updating. Figure 3 The diagram shows the cache device, the first storage device, and the second storage device storing data. Illustratively, infrequently accessed data in the cache device is transferred to the first storage device; infrequently accessed data in the first storage device is transferred to the second storage device; and infrequently accessed data in the second storage device is directly deleted. It should be noted that the transfer or deletion of infrequently accessed data is done on a session-by-session basis to ensure data integrity within the same session. Figure 3 The KVcache in the database stores the key-value mapping table.
[0037] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0038] By implementing the data access method provided in this application embodiment, the storage address of data can be managed in a timely manner, enabling large models to quickly call the generated data and improve the inference speed of the model; the data to be called by the next computing task can be scheduled in a timely manner, reducing the waiting gap of computing units; and by timely recycling of infrequently accessed data to update the latest frequently accessed data, the speed at which the model accesses frequently accessed data can be improved, thereby improving the inference speed of the model.
[0039] In other embodiments, such as Figure 4 As shown, a data access device includes: The job processing module is used to obtain task requests, generate computing jobs based on task requests, and submit computing jobs to the job queue. The first data loading module is used to retrieve the computation jobs covered by the prefetch window in the job queue as jobs to be loaded, and to transfer the data to be called by the jobs to be loaded to the first storage device. The prefetch window is used to indicate the jobs to be loaded in the job queue. The association establishment module is used to identify the jobs to be processed in the job queue and establish the correspondence between the jobs to be processed and the computing units. The data query module is used to query the storage status of the data to be accessed by the job and obtain the data query results; The second data loading module is used to cache the data to be called by the job to be processed to the cache device corresponding to the computing unit corresponding to the job to be processed, based on the data query results, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0040] By implementing the data access device provided in the embodiments of this application, the storage address of data can be managed in a timely manner, enabling large models to quickly call the generated data and improve the inference speed of the model.
[0041] For specific limitations regarding the data access device described above, please refer to the limitations regarding the data access method above, which will not be repeated here. Each module in the aforementioned data access device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.
[0042] In other embodiments, such as Figure 5 As shown, a computer device includes a memory, a processor, and a data access program stored in the memory and executable on the processor. When the processor executes the data access program, it implements the data access method described above, specifically including: S100: Obtain task requests, generate computing jobs based on task requests, and submit computing jobs to the job queue; S200: In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device, wherein the prefetch window is used to indicate the jobs to be loaded in the job queue; S300: Determine the pending jobs in the job queue and establish the correspondence between the pending jobs and the computing units; S400: Performs a storage status query on the data to be retrieved by the job to obtain the data query results; S500: Based on the data query results, cache the data to be called by the job to be processed to the cache device corresponding to the computing unit corresponding to the job to be processed, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0043] By implementing the computer device provided in the embodiments of this application, the storage address of data can be managed in a timely manner, enabling large models to quickly call up the generated data and improve the inference speed of the model.
[0044] In other embodiments, a computer-readable storage medium stores a data access program thereon, which, when executed by a processor, implements the data access method described above, specifically including: S100: Obtain task requests, generate computing jobs based on task requests, and submit computing jobs to the job queue; S200: In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device, wherein the prefetch window is used to indicate the jobs to be loaded in the job queue; S300: Determine the pending jobs in the job queue and establish the correspondence between the pending jobs and the computing units; S400: Performs a storage status query on the data to be retrieved by the job to obtain the data query results; S500: Based on the data query results, cache the data to be called by the job to be processed to the cache device corresponding to the computing unit corresponding to the job to be processed, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0045] By implementing the computer-readable storage medium provided in the embodiments of this application, the storage address of data can be managed in a timely manner, enabling large models to quickly call up the generated data and improve the inference speed of the model.
[0046] In other embodiments, a computer program product includes a computer program that, when executed by a processor, implements the data access method described above, specifically including: S100: Obtain task requests, generate computing jobs based on task requests, and submit computing jobs to the job queue; S200: In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device, wherein the prefetch window is used to indicate the jobs to be loaded in the job queue; S300: Determine the pending jobs in the job queue and establish the correspondence between the pending jobs and the computing units; S400: Performs a storage status query on the data to be retrieved by the job to obtain the data query results; S500: Based on the data query results, cache the data to be called by the job to be processed to the cache device corresponding to the computing unit corresponding to the job to be processed, so that the computing unit can perform calculations on the data to be called by the job to be processed.
[0047] Implementing the computer program product provided in the embodiments of this application enables timely management of data storage addresses, allowing large models to quickly access generated data and improving the inference speed of the model.
[0048] By implementing the data access method, apparatus, device, computer-readable storage medium, and computer program product provided in the embodiments of this application, the storage address of data can be managed in a timely manner, enabling large models to quickly call the generated data and improve the inference speed of the model; the data to be called by the next computing task can be scheduled in a timely manner, reducing the waiting gap of computing units; and by timely recycling of infrequently accessed data to update the latest frequently accessed data, the speed at which the model accesses frequently accessed data is improved, thereby improving the inference speed of the model.
[0049] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0050] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as steps controlled by a computer software program. For example, embodiments of this application include a computer program product comprising a computer program loaded on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from memory, or installed from ROM. When the computer program is executed by an external processor, it performs the functions defined in the methods of embodiments of this application.
[0051] It should be noted that the computer-readable medium in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the embodiments of this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof.
[0052] The aforementioned computer-readable medium may be included in the aforementioned server; or it may exist independently and not assembled into the server. The aforementioned computer-readable medium carries one or more programs that, when executed by the server, cause the server to: in response to detecting that the peripheral mode of the terminal is not activated, acquire the frame rate of the application on the terminal; when the frame rate meets the screen-off condition, determine whether the user is acquiring the terminal's screen information; and in response to the determination that the user is not acquiring the terminal's screen information, control the screen to enter an immediate dimming mode.
[0053] Computer program code for performing the operations of the embodiments of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0054] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0055] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
[0056] The data access method, device, and storage medium provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. These embodiments are merely preferred embodiments of this application, used to help understand the method and its core ideas, and are not intended to limit this application. It should be noted that for those skilled in the art, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application without departing from its principles are also within the protection scope of this application.
Claims
1. A data access method, characterized in that, include: Obtain a task request, generate a computing job based on the task request, and submit the computing job to the job queue; In the job queue, the computation jobs covered by the prefetch window are obtained as jobs to be loaded, and the data to be called by the jobs to be loaded is transferred to the first storage device, wherein the prefetch window is used to indicate the jobs to be loaded in the job queue; Identify the pending jobs in the job queue and establish the correspondence between the pending jobs and computing units; The storage status of the data to be accessed by the pending job is queried to obtain the data query results; Based on the data query results, the data to be called by the pending job is cached in the cache device corresponding to the computing unit corresponding to the pending job, so that the computing unit can perform calculations on the data to be called by the pending job.
2. The data access method according to claim 1, characterized in that, The step of retrieving computation jobs covered by the prefetch window from the job queue as jobs to be loaded, and transferring the data to be called by the jobs to be loaded to the first storage device, includes: A prefetch window is set in the job queue, and the computation jobs covered by the prefetch window are designated as jobs to be loaded. Obtain the cache key-value pair corresponding to the job to be loaded; Based on the cache key value, the storage address for storing the data to be called by the job to be loaded corresponding to the cache key value is determined through a key-value mapping table, and the storage device for storing the data to be called by the job to be loaded is determined based on the storage address. The key-value mapping table includes at least the cache key value and the storage address where the data to be called by the job to be loaded is stored. In response to the fact that the data to be called by the job to be loaded is stored in the second storage device, the data to be called by the job to be loaded is transferred to the first storage device.
3. The data access method according to claim 2, characterized in that, The prefetch window settings include: According to L pw =C a / S kv Determine the length of the prefetch window, where L pw C represents the length of the prefetch window, indicating the number of computational jobs covered by the prefetch window. a S represents the available space size of the first storage device. kv The cache size required for the calculation job.
4. The data access method according to claim 1, characterized in that, The step of performing a storage status query on the data to be accessed by the job to be processed, and obtaining the data query results, includes: Look up the data that the job to be processed needs to access in the key-value mapping table; In response to a match in the key-value mapping table for the data to be called by the job to be processed, the storage address of the data to be called by the job to be loaded in the key-value mapping table is used as the data query result. In response to the fact that the data to be called by the pending job is not found in the key-value mapping table, the data to be called by the pending job is searched in the cache device corresponding to any computing unit; In response to a hit in the cache device corresponding to any computing unit on the data to be called by the job to be processed, the storage address of the data to be called by the job to be processed in the cache device is used as the data query result; In response to the fact that the data to be called by the pending job is not found in the storage device corresponding to any computing unit, the data to be called by the pending job is searched in the first storage device; In response to a match in the first storage device for the data to be retrieved by the job to be processed, the storage address of the data to be retrieved by the job to be processed in the first storage device is used as the data query result. In response to the fact that the data to be called by the pending job is not found in the first storage device, the data to be called by the pending job is searched in the second storage device; In response to a match in the second storage device for the data to be retrieved by the pending job, the storage address of the data to be retrieved by the pending job in the second storage device is used as the data query result; In response to the failure to find the data to be retrieved by the pending job in the second storage device, the data to be retrieved by the pending job is marked as new data and used as the data query result.
5. The data access method according to claim 4, characterized in that, The step of caching the data to be accessed by the job to be processed in the cache device corresponding to the computing unit corresponding to the job, based on the data query result, includes: In response to the data query result being a storage address, the data corresponding to the storage address is transmitted through the first storage device to the cache device corresponding to the computing unit corresponding to the job to be processed; In response to the data query result being new data, the data to be called by the task to be processed is calculated by the computing unit corresponding to the task to be processed, and the data to be called by the task to be processed is transmitted to the cache device corresponding to the computing unit.
6. The data access method according to any one of claims 1-5, characterized in that, After caching the data to be accessed by the job to be processed in the cache device corresponding to the computing unit corresponding to the job to be processed, the method further includes: In response to the caching device obtaining the data to be called by the job to be processed, the computing unit performs calculations on the data to be called by the job to be processed to obtain the calculation result; Return the calculation results to the job to be processed.
7. The data access method according to claim 6, characterized in that, After returning the calculation result to the job to be processed, the process further includes: Get the number of times the cached key values stored in the key-value mapping table are referenced per unit time; Cache key-value pairs whose reference count per unit time is less than a preset threshold are marked as pending recycling; Set up a recycling window; The cached key-value pairs marked as pending recycling and covered by the recycling window are released from the key-value mapping table to update the key-value mapping table.
8. The data access method according to claim 7, characterized in that, The settings for the recycling window include: According to: L ev =(C dram +C ssd ) / S kv Determine the length of the recycling window, where L ev C represents the length of the recycling window, indicating the number of cached key-value pairs covered by the recycling window. dram C represents the available space for the first storage device. ssd For the available space of the second storage device, S kv The cache size required for the calculation job.
9. A computer device, characterized in that, The device includes a memory, a processor, and a data access program stored in the memory and executable on the processor. When the processor executes the data access program, it implements the data access method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, It stores a data access program, which, when executed by a processor, implements the data access method according to any one of claims 1 to 8.