Data reading method and device, electronic equipment and computer readable storage medium

By determining the target reading scheme according to the data type and system type in multi-end device data access, data pre-reading is solved, and the cross-end file reading speed is improved.

CN119322757APending Publication Date: 2025-01-17GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310879882.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-17
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

In the prior art, data access efficiency of multi-end devices is low and cannot effectively improve the reading speed of cross-end files.

Method used

By obtaining data read requests, the target pre-reading scheme is determined based on the data type and device system type, data pre-reading is performed, and the data reading process is optimized to improve efficiency.

Benefits of technology

Adaptive read-out schemes for different data types and system types are implemented, which significantly accelerates the cross-end data reading rate and improves file access efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322757A_ABST
    Figure CN119322757A_ABST
Patent Text Reader

Abstract

The invention relates to a data reading method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: acquiring a data reading request, wherein the data reading request is used for acquiring data on second equipment; determining a corresponding target pre-reading scheme according to a data type corresponding to the data reading request and a system type corresponding to the first equipment; reading data on the second equipment according to the target pre-reading scheme to obtain pre-read data; and acquiring data corresponding to the data reading request from the pre-read data. By adopting the method, the correspondingly matched target pre-reading scheme can be determined according to different data types, and the data reading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a data reading method, device, electronic device and computer-readable storage medium. Background Art

[0002] With the rapid development of communication technology and electronic technology, modern people can use more and more devices, and devices can be interconnected in various ways, gradually breaking down the barriers between various devices and sharing data among multiple devices. Faced with the increasing number of data types, data types are not limited to text data, but also include pictures, audio and video, web pages and other data.

[0003] In traditional technology, by encapsulating the POSIX (Protable Operating System Interface) interface, users can call the SDK (Software Development Kit) interface to obtain file data through the network and access multi-terminal and multi-type data. However, the access efficiency of multi-terminal data is low. Summary of the invention

[0004] The embodiments of the present application provide a data reading method, device, electronic device, and computer-readable storage medium, which can improve the efficiency of file access on multiple devices.

[0005] In a first aspect, the present application provides a data reading method. The method comprises:

[0006] Obtain a data read request, where the data read request is used to obtain data on the second device;

[0007] Determining a corresponding target pre-reading solution according to a data type corresponding to the data read request and a system type corresponding to the first device;

[0008] Reading data on the second device according to the target pre-reading scheme to obtain pre-read data;

[0009] The data corresponding to the data read request is obtained from the pre-read data.

[0010] In a second aspect, the present application also provides a data reading device. The device comprises:

[0011] A request acquisition module, used to acquire a data read request, wherein the data read request is used to acquire data on the second device;

[0012] A pre-reading scheme module, used to determine a corresponding target pre-reading scheme according to a data type corresponding to the data read request and a system type corresponding to the first device;

[0013] A data pre-reading module, configured to read the data on the second device according to the target pre-reading scheme to obtain pre-read data;

[0014] A data acquisition module acquires data corresponding to the data read request from the pre-read data.

[0015] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0016] Obtain a data read request, where the data read request is used to obtain data on the second device;

[0017] Determining a corresponding target pre-reading solution according to a data type corresponding to the data read request and a system type corresponding to the first device;

[0018] Reading data on the second device according to the target pre-reading scheme to obtain pre-read data;

[0019] The data corresponding to the data read request is obtained from the pre-read data.

[0020] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0021] Obtain a data read request, where the data read request is used to obtain data on the second device;

[0022] Determining a corresponding target pre-reading solution according to a data type corresponding to the data read request and a system type corresponding to the first device;

[0023] Reading data on the second device according to the target pre-reading scheme to obtain pre-read data;

[0024] The data corresponding to the data read request is obtained from the pre-read data.

[0025] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0026] Obtain a data read request, where the data read request is used to obtain data on the second device;

[0027] Determining a corresponding target pre-reading solution according to a data type corresponding to the data read request and a system type corresponding to the first device;

[0028] Reading data on the second device according to the target pre-reading scheme to obtain pre-read data;

[0029] The data corresponding to the data read request is obtained from the pre-read data.

[0030] The above-mentioned data reading method, device, electronic device, and computer-readable storage medium determine the corresponding target pre-reading scheme according to the data type corresponding to the data reading request and the system type corresponding to the first device, read the data on the second device according to the target pre-reading scheme, obtain the pre-read data, and obtain the data corresponding to the data reading request from the pre-read data. It is possible to determine the corresponding adaptive target pre-reading scheme for the system type of the first device and different data types. By pre-reading the data on the cross-end device through the target pre-reading scheme, the data reading rate can be accelerated, thereby improving the reading efficiency of the cross-end files. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 An application environment diagram of a data reading method in an embodiment;

[0033] Figure 2 is a flow chart of a data reading method in one embodiment;

[0034] Figure 3 is a flow chart of step 204 in one embodiment;

[0035] Figure 4 A schematic diagram of a flow chart of a sequential pre-reading solution in one embodiment;

[0036] Figure 5 A schematic diagram of a flow chart of a sequential pre-reading solution in another embodiment;

[0037] Figure 6 A schematic diagram of a pre-reading window of a page reading solution in an embodiment;

[0038] Figure 7 A schematic diagram of a flow chart of a sequential pre-reading solution in another embodiment;

[0039] Figure 8 is a structural block diagram of a data reading device in one embodiment;

[0040] Fig. 9FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0042] The data reading method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the first device 102 communicates with the second device 104 through the network, wherein the first device 102 can communicate with multiple second devices 104 at the same time. The first device 102 sends a data read request to the second device 104, and the second device 104 provides the first device 102 with access rights to the corresponding data according to the data read request, so that the first device 102 can read it. The first device 102 obtains the data read request, determines the corresponding target pre-reading scheme according to the data type corresponding to the data read request and the system type corresponding to the first device, reads the data on the second device according to the target pre-reading scheme, obtains the pre-read data, and obtains the data corresponding to the data read request from the pre-read data, thereby accelerating the acquisition speed and improving the cross-end data reading efficiency.

[0043] The first device 102 or the second device 104 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc.

[0044] It should be noted that the above application scenario is only one of the application scenarios in the embodiments of the present application. The embodiments of the present application can also be applied to application scenarios in which a first device, a second device and a server interact. The first device and the second device are respectively connected to the server for communication. The server receives a data read request sent by the first device and sends the data read request to the second device. The second device receives the data read request and provides the corresponding data access rights to the server. The server reads the corresponding data from the second device and returns the corresponding data to the first device. The server receives the data read request sent by the first device, determines the corresponding target pre-reading scheme according to the data type corresponding to the data read request and the system type corresponding to the first device, reads the data on the second device according to the target pre-reading scheme, obtains the pre-read data, and obtains the data corresponding to the data read request from the pre-read data. The server can be implemented as an independent server or a server cluster consisting of multiple servers.

[0045] In one embodiment, Figure 2 As shown, a data reading method is provided, which is applied to Figure 1 Taking the first device in the example as an example, the method includes the following steps 202 to 208.

[0046] Step 202: Obtain a data read request, where the data read request is used to obtain data on the second device.

[0047] The first device can obtain a data read request from its display interface, communication interface, or application program instruction, and the data read request is used to obtain data on the second device. It can be understood that when the first device and the second device are in communication connection, the first device sends the data read request to the second device, and after receiving the data read request, the second device provides the corresponding data access permission to the first device, so that the first device can read the data corresponding to the data read request on the second device. Optionally, the first device can establish communication connections with multiple second devices at the same time and send corresponding data read requests to the multiple second devices respectively.

[0048] In the process of data reading, the data or files corresponding to the data reading request often need to be read in batches. Since the size of the data read each time is limited, the complete data or files corresponding to the data reading request can only be obtained after multiple data readings. After the data is read for the first time, the data can be pre-read according to the situation of the initial reading, and the pre-read data can be saved in the cache. When the data is read next time, the corresponding data can be obtained from the cache, thereby speeding up the data reading. In the subsequent data reading process, the data can be pre-read in sequence, that is, the data can be pre-read after each data reading, and the data corresponding to the next data reading can be pre-cached. The speed of obtaining the corresponding data from the cache is much faster than reading the data directly from the second device.

[0049] Optionally, the data read request may include a data type corresponding to the data read request, wherein the data type includes a file type, and the file type includes PPT (PowerPoint, presentation), PDF (Portable Document Format, portable document), WORD (Microsoft office Word, Microsoft office text), EXCEL (Microsoft Excel), TXT (text document), JPG (Joint Photo graphic Experts Group, JPEG), web page files, database files, video files, audio files or thumbnails, etc. For example, the corresponding file type can be identified according to the file suffix identifier.

[0050] Step 204: Determine a corresponding target pre-reading solution according to the data type corresponding to the data read request and the system type corresponding to the first device.

[0051] The first device can determine the corresponding target pre-reading scheme according to the data type corresponding to the data read request and the system type corresponding to the first device. Among them, the data type can be the file type corresponding to the data read request, and the system type corresponding to the first device can refer to the type of operating system installed on the first device. The first device can directly obtain the type of operating system installed on itself. The operating system can be an operating system on a PC (personal computer) machine, or an operating system on a Mac (Macintosh). The operating types include Android, BSD (Berkeley Software Distribution), IOS (mobile operating system developed by Apple), Linux, Mac OS X, Windows (Windows operating system), Windows Phone and z / OS. The target pre-reading scheme is a scheme for pre-reading data. Pre-reading data according to the target pre-reading scheme can adapt the read data type and the system type corresponding to the first device, thereby maximizing its pre-reading speed and improving pre-reading efficiency. The target pre-reading scheme includes a specific way of pre-reading, such as the pre-reading data type, the pre-reading data position, the pre-reading data size, etc.

[0052] Optionally, the first device may match the combination formed by the data type corresponding to the data read request and the system type corresponding to the first device with the standard combination in the preset solution library. If the standard combination in the preset solution library includes the combination formed by the data type corresponding to the data read request and the system type corresponding to the first device, the standard pre-reading solution corresponding to the corresponding combination in the preset solution library is used as the target pre-reading solution. The same target pre-reading solution may correspond to the standard combination formed by the standard data type corresponding to multiple data read requests and the standard system type corresponding to the first device.

[0053] Optionally, the first device can also read the data type corresponding to the data read request through the system type corresponding to the first device to obtain a data read result, and by analyzing and fitting the data read result, a corresponding file read model can be obtained, and the file read model is used as a target pre-reading solution. The fitting technology can be GNU Scientific Library (GNU Scientific Computing Function Library), Eigen and Armadillo, etc., wherein Armadillo is a major scientific computing library in C++ that is on par with Eigen, or the model can be trained by machine learning methods to obtain a file read model, and the fitting method of the file read model is not specifically limited here.

[0054] Step 206: read the data on the second device according to the target pre-reading scheme to obtain pre-read data.

[0055] The first device reads the data on the second device according to the target pre-reading scheme, obtains the pre-read data, and stores the pre-read data in a cache corresponding to the first device. Different target pre-reading schemes correspond to different pre-reading methods.

[0056] Optionally, the target pre-reading scheme includes a sequential pre-reading scheme, which represents reading the data on the second device in sequence according to the order in which the data is arranged, for example, file types such as PPT, WORD, EXCEL, TXT, etc.

[0057] Optionally, the target pre-reading scheme includes an overall pre-reading scheme, where the overall pre-reading scheme represents reading the entire thumbnail on the second device.

[0058] Optionally, the target pre-reading scheme includes a page reading scheme, which represents reading the data on the second device page by page, such as file types such as PPT and PDF.

[0059] Step 208: Acquire data corresponding to the data read request from the pre-read data.

[0060] When it is determined that the data corresponding to the data read request exists in the pre-read data, the first device obtains the data corresponding to the data read request from the pre-read data. Optionally, the first device obtains the data corresponding to the current data read request from the pre-read data obtained in the previous pre-read, and performs the next pre-read to obtain the corresponding pre-read data according to the reading situation corresponding to the current data read request. During initialization, the first device performs the first data read according to the data read request, and performs the first pre-read to obtain the corresponding pre-read data according to the first data read situation. Optionally, when the data corresponding to the data read request does not exist in the pre-read data, the first device directly reads the corresponding data from the location where the corresponding data is stored in the second device.

[0061] Optionally, the first device reads the data on the second device according to the target pre-reading scheme based on the reading situation of the first data reading, which may include the type of data, data location, and data size, etc., to obtain the first pre-read data, and save the first pre-read data in the cache; when the first device performs the second data reading, it first obtains the first pre-read data from the cache, and when the corresponding data is not found in the cache, it reads from the second device; the first device reads the data on the second device according to the target pre-reading scheme based on the reading situation of the second data reading, obtains the second pre-read data, and saves the second pre-read data in the cache, and so on, until all the data corresponding to the data read request is read. Optionally, after each data reading is completed, the pre-read data saved in the cache in the previous pre-reading can be cleared.

[0062] In the above data reading method, the first device determines the corresponding target pre-reading scheme according to the data type corresponding to the data reading request and the system type corresponding to the first device, reads the data on the second device according to the target pre-reading scheme, obtains the pre-read data, and obtains the data corresponding to the data reading request from the pre-read data. It can be realized to determine the corresponding adaptive target pre-reading scheme according to the system type of the first device and the different data types of the read data. By pre-reading the data on the cross-end device through the target pre-reading scheme, the data reading rate can be accelerated, thereby improving the reading efficiency of the cross-end files.

[0063] In one embodiment, Figure 3 As shown, step 204 of determining a corresponding target pre-reading solution according to a data type corresponding to the data read request and a system type corresponding to the first device includes the following steps 302 to 306 .

[0064] Step 302, matching the alternative combinations formed based on the data type corresponding to the data read request and the system type corresponding to the first device with a preset solution library; wherein the preset solution library includes standard combinations formed by standard data types and standard system types, and standard pre-reading solutions corresponding to the standard combinations.

[0065] The first device matches the candidate combination formed by the data type corresponding to the data read request and the system type corresponding to the first device with the standard combination formed by the standard data type and the standard system type in the solution library. Optionally, the data type corresponding to the first data read request can be matched with the standard data type in the solution library, and when a matching standard data type is obtained, the system type corresponding to the first device is matched with the standard system type corresponding to the matching standard data type.

[0066] Optionally, the alternative combination formed based on the data type corresponding to the data read request and the system type corresponding to the first device is matched with the preset solution library, which can be understood as searching the preset solution library for whether there is an alternative combination formed based on the data type corresponding to the data read request and the system type corresponding to the first device.

[0067] Step 304: when there is an alternative combination of data type and system type in the preset solution library, the standard pre-reading solution corresponding to the alternative combination is used as the corresponding target pre-reading solution.

[0068] In this embodiment, when there is an alternative combination formed by a data type and a system type in the preset solution library, the corresponding alternative combination is also a standard combination in the preset solution library. Therefore, the standard pre-reading solution corresponding to the alternative combination is used as the corresponding target pre-reading solution.

[0069] Step 306: When there is no candidate combination of the data type and the system type in the preset solution library, the default pre-reading solution is used as the corresponding target pre-reading solution.

[0070] In this embodiment, when there is no alternative combination formed by the data type and the system type in the preset solution library, the default pre-reading solution is used as the target pre-reading solution corresponding to the alternative combination. The default pre-reading solution belongs to the preset pre-reading solution. If there is no alternative combination in the preset solution library, the data on the second device is pre-read through the default pre-reading solution. Optionally, the default pre-reading solution can be one of the standard pre-reading solutions in the preset solution library. For example, the default pre-reading solution is a sequential pre-reading solution. The sequential pre-reading solution indicates that the data on the second device is read sequentially according to the arrangement order of the data itself.

[0071] In the above embodiment, the alternative combination formed based on the data type corresponding to the data read request and the system type corresponding to the first device is matched with the preset solution library. If the alternative combination exists in the preset solution library, the standard pre-reading solution corresponding to the alternative combination in the preset solution library is used as the target pre-reading solution; if the alternative combination does not exist in the preset solution library, the preset default pre-reading solution is used as the target pre-reading solution, so that data corresponding to different data types and system types can be pre-read using the corresponding most matching target pre-reading solution, thereby ensuring the fastest pre-reading speed for data corresponding to any data type and system type, and improving data reading efficiency.

[0072] In some embodiments, when there is an alternative combination of data type and system type in the preset solution library, the standard pre-reading solution corresponding to the alternative combination is used as the corresponding target pre-reading solution, including:

[0073] When the alternative combination formed by the data type and the system type is a sequential reading combination, the corresponding sequential pre-reading scheme in the preset scheme library is used as the corresponding target pre-reading scheme; wherein the sequential pre-reading scheme represents reading the data on the second device in sequence according to the order in which the data itself is arranged.

[0074] In this embodiment, the preset solution library includes a sequential reading combination formed by a data type and a system type, and a sequential pre-reading solution corresponding to the sequential reading combination. The candidate combination formed by the data type and the system type is a sequential reading combination, which can be understood as a data type pre-read under the corresponding system type, and can be pre-read in a sequential reading manner, that is, the corresponding sequential pre-reading solution in the preset solution library is used as the corresponding target pre-reading solution.

[0075] In one example, the sequential reading combination can be that the system type is Android system, and the corresponding file type is any one of PPT, WORD, EXCEL, TXT, or JPG; or, the system type is Android system, and the file type is MP4 or MKV; or, the system type is Windows system, and the file type is WORD, EXCEL, TXT or JPG. In the sequential reading combination, when opening a file, the corresponding pre-reading request will be sent in sequence according to the order of its own data arrangement, and the data to be pre-read will be requested from the second device. It can be understood that a pre-reading request is sent before each pre-reading starts. For the sequential reading combination, the sequential pre-reading scheme is used as the corresponding target pre-reading scheme.

[0076] The flow chart of the sequential pre-reading solution is as follows: Figure 4 As shown, the block diagram shown in the figure is the corresponding pre-reading window. In the initial case, no data is read, and there is no corresponding pre-reading window; when the first data is read, the pre-reading window of the first pre-reading is determined according to the first data reading situation, and the pre-reading window represents the pre-reading position and the pre-reading data size; when the second data is read, the corresponding data is obtained from the pre-reading data obtained by the first pre-reading, and the pre-reading window of the second pre-reading is determined according to the actual situation of the second data reading, and so on, until all the data corresponding to the data reading request is obtained.

[0077] In another example, Figure 5As shown, the pre-reading window for pre-reading includes a first pre-reading window and a second pre-reading window. Optionally, the first pre-reading window can be pre-read from the starting position of the file, and the second pre-reading window can be pre-read from other positions in the file except the starting position. In this example, when a data read request is made, the distance between the data read position corresponding to the data read request and the first pre-reading window or the second pre-reading window can be used to determine whether it is a first sequential read corresponding to the first pre-reading window or a second sequential read corresponding to the second pre-reading window. When the data read request is less than a preset distance from the first pre-reading window, it is determined to be a first sequential read, and the first pre-reading window is updated according to the data read situation corresponding to the data read request to obtain an updated first pre-reading window; when the data read request is less than a preset distance from the second pre-reading window, it is determined to be a second sequential read, and the second pre-reading window is updated according to the data read situation corresponding to the data read request to obtain an updated second pre-reading window; when the data read request is less than a preset distance from the first pre-reading window and less than a preset distance from the second pre-reading window, it is determined to be any one of the first sequential read and the second sequential read.

[0078] In this example, during initialization, a first pre-reading window 502 and a second pre-reading window 504 are preset. When the first data reading is performed, the first pre-reading window and the second pre-reading window are updated according to the first data reading situation, and the first pre-reading window 506 and the second pre-reading window 508 after the first update are obtained respectively. When the second data reading is performed, the first pre-reading window and the second pre-reading window are updated according to the second data reading situation, and the first pre-reading window 510 and the second pre-reading window 512 after the second update are obtained respectively.

[0079] When the candidate combination formed by the data type and the system type is a thumbnail reading combination, the corresponding overall pre-reading scheme in the preset scheme library is used as the corresponding target pre-reading scheme; wherein the overall pre-reading scheme represents reading the entire thumbnail on the second device.

[0080] In this embodiment, after obtaining a data read request, the data type corresponding to the data read request and the system type corresponding to the first device are determined. When the data type corresponding to the data request is identified as a thumbnail, the entire thumbnail is read as pre-read data and saved in the cache. When reading data, the first device can quickly obtain the corresponding thumbnail data from the cache, thereby improving the display speed of the thumbnail. In an example, the data type in the thumbnail read combination is thumbnail, and the system type can correspond to an Android operating system or a Windows operating system.

[0081] When the candidate combination formed by the data type and the system type is a paged reading combination, the corresponding page reading scheme in the scheme library is used as the corresponding pre-reading scheme, wherein the page reading scheme represents reading the data on the second device by page.

[0082] In this embodiment, after obtaining a data read request, the data type corresponding to the data read request and the system type corresponding to the first device are determined. When it is identified that the data read method is to perform jump reading according to a specific ratio, pre-reading can be performed according to a page reading scheme that reads the required small data per page and then sequentially reads the content of each page. In an example, the system type corresponding to the paging reading combination can be a Windows operating system, the corresponding data type can be PPT or PDF, and the pre-reading window corresponding to each pre-reading is as follows: Figure 6 As shown, the preset interval length determines the starting position of the pre-reading window corresponding to each pre-reading, and data is pre-read according to the preset window size. For example, the first pre-reading corresponds to the first pre-reading window, the second pre-reading corresponds to the second pre-reading window, the third pre-reading corresponds to the third pre-reading window, and so on. The sizes of each pre-reading window can be the same.

[0083] In the above embodiment, by determining corresponding target pre-reading schemes for different alternative combinations in a preset scheme library, the most matching pre-reading scheme can be determined for different data types and system types when performing cross-end data access, which can improve the pre-reading speed and thus improve the cross-end data reading efficiency.

[0084] In some embodiments, when there is no alternative combination of data type and system type in the preset solution library, the default pre-reading solution is used as the corresponding target pre-reading solution, including: when there is no alternative combination of data type and system type in the preset solution library, the number of data read sub-requests corresponding to the data read request is counted; wherein the data read request includes multiple data read sub-requests; when the number of data read sub-requests is not greater than the preset number, the default pre-reading solution is used as the corresponding target pre-reading solution.

[0085] In this embodiment, the data read request is used to obtain data on the second device. In the process of the first device reading the data of the second device, the data on the second device will be obtained by multiple readings. Each time the data is read, a corresponding data read sub-request will be sent to the second device. According to each data reading situation, the corresponding pre-read data position and data size can be determined, so that a pre-read request is sent to the second device to pre-read the data to obtain the pre-read data. It can be understood that the obtained pre-read data can be understood as the pre-read data corresponding to the data read sub-request. When the number of data read sub-requests is not greater than the preset number, the default pre-read scheme is used as the corresponding target pre-read scheme.

[0086] In the above embodiment, when there is no alternative combination formed by the data type and the system type in the preset solution library, the number of data read sub-requests corresponding to the statistical data read request is counted. When the number of data read sub-requests is not greater than the preset number, the default pre-reading solution is used as the corresponding target pre-reading solution, and the number of data read sub-requests corresponding to the statistical data read request is counted. When the number is not greater than the preset number, the data corresponding to the actual read results corresponding to the data read sub-requests are relatively small, and the file reading model cannot be obtained by analyzing and simulating the data corresponding to the actual read results. In order to ensure the accuracy of the file reading model, the default pre-reading solution is still used for pre-reading, so as to continue to count the data corresponding to the actual read results. By using more data corresponding to the actual read results, a more accurate file reading model can be obtained.

[0087] In some embodiments, the target pre-reading scheme includes a sequential pre-reading scheme; reading data on the second device according to the target pre-reading scheme to obtain pre-read data, including: determining a second read position and a second data length for pre-reading by the sequential pre-reading scheme according to a first read position and a first data length corresponding to a data read sub-request; reading data on the second device according to the second read position and the second data length to obtain pre-read data corresponding to the data read sub-request.

[0088] In this embodiment, according to the first read position and the first data length when the data corresponding to the data read sub-request is actually read, the second read position and the second data length for pre-reading by the sequential pre-reading scheme can be determined, and according to the second read position and the second data length, the data on the second device is read to obtain the pre-read data corresponding to the data read sub-request. The data length can also be understood as the data size, the first data length is the first data size, and the second data length is the second data size.

[0089] Optionally, the second reading position may be determined according to the first reading position and the first data length; and the second data length may be determined according to the first data length.

[0090] In one example, the second reading position is a position where the first reading position is offset by the first data length in the direction of sequentially reading data. Under the condition that the second data length is not higher than the preset data length, the second data length is an integer multiple of the first data length, such as twice.

[0091] In the above embodiment, according to the first read position and the first data length corresponding to the data read sub-request, that is, according to the actual reading situation, the second read position and the second data length for pre-reading by the sequential pre-reading scheme can be accurately determined; according to the second read position and the second data length, the data on the second device is read to obtain the pre-read data corresponding to the data read sub-request, and the data corresponding to the data read request is obtained from the pre-read data, which can improve the hit rate of the pre-read data and thereby improve the data reading efficiency.

[0092] In some embodiments, the method also includes: when the number of data read sub-requests is greater than a preset number, obtaining the actual read result corresponding to each data read sub-request; fitting the actual read result corresponding to each data read sub-request according to a function fitting method to obtain a file read model; taking an alternative combination of the data type corresponding to the data read request and the system type corresponding to the first device as a standard combination, and saving the file read model as a standard pre-reading scheme in a preset scheme library.

[0093] In this embodiment, when the number of data read sub-requests is greater than the preset number, that is, when the number of data pre-read times is greater than the preset number, the actual read result corresponding to each data read sub-request of the first device can be obtained. For example, the actual read result corresponding to the data read sub-request can be obtained through the operating system kernel of the first device, and the actual read result includes the data type, data location and data size of the read data.

[0094] According to the function fitting method, the actual reading results corresponding to each data request are fitted to obtain a file reading model. It can be understood that the actual reading results corresponding to each data request can be fitted by a corresponding function fitting method in the art to obtain a file reading model. For example, the actual reading results corresponding to each data request can be fitted by fitting techniques such as GNU Scientific Library, Eigen and Armadillo to obtain a corresponding file reading model. It is noted that the function fitting method corresponding to the file reading model in this embodiment is not specifically limited here. Among them, the file reading model in this embodiment can be understood as a data pre-reading scheme, and the data can be pre-read. Therefore, the alternative combination of the data type corresponding to the data read request and the system type corresponding to the first device can be used as a standard combination, and the file reading model can be used as a standard pre-reading scheme corresponding to the standard combination, and saved in the preset scheme library.

[0095] In the above embodiment, when the number of data read sub-requests is greater than the preset number, the actual read result corresponding to each data read sub-request is obtained; the actual read result corresponding to each data read sub-request is fitted according to the function fitting method to obtain a file read model; the alternative combination of the data type corresponding to the data read request and the system type corresponding to the first device is used as a standard combination, and the file read model is saved as a standard pre-reading scheme in a preset scheme library, which can ensure that the file read model is fitted with data corresponding to a sufficient number of actual read results, thereby increasing the accuracy of the file read model, and thus pre-reading according to the file read model can improve the data reading hit rate and data reading speed, thereby improving the efficiency of data reading.

[0096] In some embodiments, an alternative combination of a data type corresponding to a data read request and a system type corresponding to the first device is taken as a standard combination, and a file read model is saved as a standard pre-reading scheme in a preset scheme library, including: when it is verified that the accuracy of the file read model is higher than a preset accuracy, an alternative combination of a data type corresponding to the data read request and a system type corresponding to the first device is taken as a standard combination, and the file read model is saved as a standard pre-reading scheme in a preset scheme library.

[0097] In this embodiment, when the accuracy of the verified file reading model is higher than the preset accuracy, the corresponding alternative combination and file reading model are saved as the standard combination and standard pre-reading solution in the preset solution library, which can further ensure the accuracy of the file reading model.

[0098] Optionally, the accuracy of the file reading model can be determined by the hit rate of the pre-read data corresponding to the file reading model. The actual read data result corresponding to the data reading request can be obtained, and the data result pre-read by the file reading model can be matched. If the hit rate corresponding to the data result pre-read by the file reading model hits the actual read data result is higher than the preset hit rate, it is determined that the accuracy of the file reading model is higher than the preset accuracy. The hit rate of the file reading model corresponding to the pre-read data can be used as the accuracy of the file reading model, wherein the preset accuracy can be, for example, 80%.

[0099] In some embodiments, the method also includes: when verifying that the accuracy of the file reading model is not higher than the preset accuracy, increasing the value of the preset number, and returning to execute the step of obtaining the actual reading result corresponding to each data reading sub-request when the number of data reading sub-requests is greater than the preset number.

[0100] In this embodiment, when it is verified that the accuracy of the file reading model is not higher than the preset accuracy, the value of the preset number is increased, for example, the preset number is increased to twice the original value, and then the determination is returned as to whether the number of data reading sub-requests is greater than the preset number, until the number of data reading sub-requests is greater than the preset number, the actual reading result corresponding to each data reading sub-request is obtained, the actual reading result corresponding to each data reading sub-request is fitted according to the function fitting method, to obtain the file reading model, and the accuracy of the file reading model is verified, until it is verified that the accuracy of the file reading model is higher than the preset accuracy, the alternative combination of the data type corresponding to the data reading request and the system type corresponding to the first device is used as the standard combination, and the file reading model is saved as a standard pre-reading scheme in the preset scheme library.

[0101] When the accuracy of the verified file reading model is not higher than the preset accuracy, the value of the preset number is increased, thereby increasing the data corresponding to the actual reading result corresponding to the data reading sub-request, thereby increasing the accuracy of the file reading model fitted according to the data corresponding to the actual reading result.

[0102] In some embodiments, the default pre-reading scheme is set as a sequential pre-reading scheme. Configuring the default pre-reading scheme as a sequential pre-reading scheme can better adapt to the actual data reading method corresponding to various alternative combinations, thereby adding more corresponding alternative combinations to the preset scheme library, enriching the scheme library, providing more preset pre-reading schemes, reducing the alternative combinations of unknown pre-reading schemes, speeding up the data pre-reading speed, and thus improving the data reading efficiency.

[0103] In one embodiment, the standard pre-reading scheme includes a sequential pre-reading scheme; the method also includes: obtaining a first reading result corresponding to a data read request; when the second reading result matches the first reading result, taking an alternative combination formed by a data type corresponding to the data read request and a system type corresponding to the first device as a standard combination, and saving it in a standard combination category corresponding to the sequential pre-reading scheme, and the second reading result is obtained by pre-reading through the sequential pre-reading scheme.

[0104] In this embodiment, the default pre-reading scheme is the sequential pre-reading scheme, the first reading result corresponding to the data read request is the actual reading result, and the second reading result is obtained by pre-reading through the sequential pre-reading scheme. When the first reading result matches the second reading result, the alternative combination formed by the data type corresponding to the data read request and the system type corresponding to the first device is used as the standard combination and saved in the standard combination category corresponding to the sequential pre-reading scheme.

[0105] Optionally, the accuracy of the second reading result can be identified according to the first reading result. For example, the accuracy of the second reading result can be determined by the hit rate of the second reading result hitting the corresponding first reading result, and the hit rate of the second reading result can be directly used as the accuracy of the second reading result. If the accuracy of the second reading result is higher than a preset accuracy, the first reading result is considered to match the second reading result. Otherwise, if the accuracy of the second reading result is not higher than the preset accuracy, the first reading result is considered to not match the second reading result.

[0106] In the above embodiment, when the second reading result matches the first reading result, the alternative combination formed by the data type corresponding to the data reading request and the system type corresponding to the first device is taken as the standard combination and saved in the standard combination category corresponding to the sequential pre-reading scheme. More corresponding alternative combinations can be added to the standard combinations of the preset scheme library to enrich the scheme library, provide more preset pre-reading schemes, reduce the alternative combinations of unknown pre-reading schemes, speed up data pre-reading, and improve data reading efficiency.

[0107] In some embodiments, the method further includes: performing a pre-reading accuracy test on the standard pre-reading scheme corresponding to the standard combination at preset time intervals to obtain an accuracy test result; when the accuracy test result is failed, removing the corresponding standard combination from the preset scheme library.

[0108] In this embodiment, the pre-reading accuracy of the standard pre-reading scheme corresponding to the standard combination is tested at every preset time interval to obtain an accuracy test result. When the accuracy test result is not passed, the corresponding standard combination is removed from the preset scheme library.

[0109] Optionally, at intervals of a preset time length, the data reading result of the pre-reading by the standard pre-reading scheme corresponding to the standard combination is compared with the actual reading result corresponding to the data reading request to obtain the hit rate of the pre-reading by the standard pre-reading scheme. When the hit rate is greater than the preset hit rate, the accuracy test result of the standard pre-reading scheme is passed, and the corresponding standard combination is retained in the preset scheme library; when the hit rate is not greater than the preset hit rate, the accuracy test result of the standard pre-reading scheme is failed, and the corresponding standard combination is removed from the preset scheme library.

[0110] In the above embodiment, the pre-reading accuracy of the standard pre-reading scheme corresponding to the standard combination is tested at preset time intervals to obtain an accuracy test result; when the accuracy test result is failed, the corresponding standard combination is removed from the preset scheme library, which can ensure the accuracy of pre-reading of the standard pre-reading scheme corresponding to the standard combination in the preset scheme library, and avoid the influence of the pre-reading accuracy of the standard combination and the corresponding standard pre-reading scheme in the preset scheme library due to system upgrades or data access software upgrades.

[0111] In one embodiment, Figure 7 As shown, the data reading method includes the following steps 702 to 724.

[0112] Step 702: The first device obtains a data read request, where the data read request is used to obtain file data on the second device.

[0113] Step 704: Obtain the file type corresponding to the data read request and the system type corresponding to the first device, and match the candidate combination formed by the file type and the system type with the preset solution library.

[0114] Step 706: When there is an alternative combination of data type and system type in the preset solution library, the standard pre-reading solution in the preset solution library corresponding to the alternative combination is used as the corresponding target pre-reading solution.

[0115] Step 708 , at intervals of a preset time length, the pre-reading accuracy of the standard pre-reading solution corresponding to the standard combination is tested to obtain an accuracy test result.

[0116] Step 710: If the accuracy test result fails, remove the corresponding standard combination from the preset solution library.

[0117] Step 712: When there is no candidate combination of data type and system type in the preset solution library, count the number of current read sub-requests.

[0118] Step 714, when the number of data read sub-requests is greater than the preset number, obtain the actual read result corresponding to each data read sub-request, and fit the actual read result corresponding to each data read sub-request according to the function fitting method to obtain the file read model.

[0119] Step 716, when the accuracy of the file reading model is greater than the preset accuracy, the alternative combination of the data type corresponding to the data reading request and the system type corresponding to the first device is used as a standard combination, and the file reading model is saved as a standard pre-reading solution to the preset solution library.

[0120] Step 718: When the accuracy of the file reading model is not greater than the preset accuracy, the preset number is increased to twice the original preset number.

[0121] Step 720 : When the number of data read sub-requests is not greater than a preset number, a default pre-reading scheme is used as a corresponding target pre-reading scheme.

[0122] Step 722: read the data on the second device according to the target pre-reading scheme to obtain pre-read data.

[0123] Step 724: Acquire data corresponding to the data read request from the pre-read data.

[0124] In the above data reading method, it is possible to implement pre-reading of the data type corresponding to the data access request and the alternative combination formed by the system type corresponding to the first device and its most suitable target pre-reading scheme during the cross-end device data access process. Different file types are pre-read using the corresponding target pre-reading scheme, which can speed up the corresponding pre-reading speed and improve the efficiency of data reading. In addition, the preset scheme library can be updated and enriched, so that when data is pre-read, the situation where there is no matching standard pre-reading scheme in the preset scheme library is minimized, thereby further improving the accuracy and speed of data pre-reading, thereby improving data reading efficiency.

[0125] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0126] Based on the same inventive concept, the embodiment of the present application also provides a data reading device for implementing the data reading method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data reading device embodiments provided below can refer to the limitations on the data reading method above, and will not be repeated here.

[0127] In one embodiment, Figure 8 As shown, a data reading device is provided, including: a request acquisition module 802, a pre-reading solution module 804, a data pre-reading module 806 and a data acquisition module 808, wherein:

[0128] A request acquisition module 802, used to acquire a data read request, where the data read request is used to acquire data on the second device;

[0129] A pre-reading scheme module 804 is used to determine a corresponding target pre-reading scheme according to a data type corresponding to the data read request and a system type corresponding to the first device;

[0130] A data pre-reading module 806, configured to read the data on the second device according to the target pre-reading scheme to obtain pre-read data;

[0131] The data acquisition module 808 acquires data corresponding to the data read request from the pre-read data.

[0132] In one embodiment, the pre-reading solution module 804 includes:

[0133] a pre-reading scheme matching unit, configured to match an alternative combination formed by a data type corresponding to the data read request and a system type corresponding to the first device with a preset scheme library; the preset scheme library includes a standard combination formed by a standard data type and a standard system type, and a standard pre-reading scheme corresponding to the standard combination;

[0134] A first solution determination unit is configured to, if there is an alternative combination formed by the data type and the system type in the preset solution library, use the standard pre-reading solution corresponding to the alternative combination as the corresponding target pre-reading solution;

[0135] The second solution determination unit is configured to use a default pre-reading solution as a corresponding target pre-reading solution when there is no candidate combination of the data type and the system type in the preset solution library.

[0136] In one embodiment, the first scheme determination unit is further used for: when the alternative combination formed by the data type and the system type is a sequential reading combination, the corresponding sequential pre-reading scheme in the preset scheme library is used as the corresponding target pre-reading scheme; the sequential pre-reading scheme represents that the data on the second device is read sequentially according to the arrangement order of the data itself; when the alternative combination formed by the data type and the system type is a thumbnail reading combination, the corresponding overall pre-reading scheme in the preset scheme library is used as the corresponding target pre-reading scheme; the overall pre-reading scheme represents that the entire thumbnail on the second device is read; when the alternative combination formed by the data type and the system type is a paged reading combination, the corresponding page reading scheme in the scheme library is used as the corresponding pre-reading scheme; the page reading scheme represents that the data on the second device is read page by page.

[0137] In one embodiment, the second scheme determination unit is further used to: count the number of data read sub-requests corresponding to the data read request when there is no alternative combination formed by the data type and the system type in the preset scheme library; the data read request includes multiple data read sub-requests; and when the number of the data read sub-requests is not greater than a preset number, use the default pre-reading scheme as the corresponding target pre-reading scheme.

[0138] In one embodiment, the target pre-reading scheme includes a sequential pre-reading scheme; the data pre-reading module 806 is also used to: determine the second reading position and the second data length for pre-reading by the sequential pre-reading scheme according to the first reading position and the first data length corresponding to the data reading sub-request; read the data on the second device according to the second reading position and the second data length to obtain the pre-read data corresponding to the data reading sub-request.

[0139] In one embodiment, the data reading device also includes a file reading model fitting module, which is used to obtain the actual reading result corresponding to each data reading sub-request when the number of the data reading sub-requests is greater than a preset number; fit the actual reading result corresponding to each data reading sub-request according to a function fitting method to obtain a file reading model; take the alternative combination of the data type corresponding to the data reading request and the system type corresponding to the first device as a standard combination, and save the file reading model as a standard pre-reading scheme in the preset scheme library.

[0140] In one embodiment, the file reading model fitting module is also used to: when it is verified that the accuracy of the file reading model is higher than a preset accuracy, use an alternative combination of the data type corresponding to the data reading request and the system type corresponding to the first device as a standard combination, and save the file reading model as a standard pre-reading scheme in the preset scheme library.

[0141] In one embodiment, the file reading model fitting module is also used to: when it is verified that the accuracy of the file reading model is not higher than the preset accuracy, increase the value of the preset number, and return to execute the step of obtaining the actual reading result corresponding to each data reading sub-request when the number of the data reading sub-requests is greater than the preset number.

[0142] In one embodiment, the standard pre-reading scheme includes a sequential pre-reading scheme; the data reading device also includes a scheme library management module, which is used to obtain a first reading result corresponding to the data reading request; when the second reading result matches the first reading result, the alternative combination formed by the data type corresponding to the data reading request and the system type corresponding to the first device is used as a standard combination and saved in the standard combination category corresponding to the sequential pre-reading scheme, and the second reading result is obtained by pre-reading through the sequential pre-reading scheme.

[0143] In one embodiment, the data reading device also includes an accuracy detection module, which is used to perform a pre-reading accuracy detection on the standard pre-reading scheme corresponding to the standard combination at preset time intervals to obtain an accuracy detection result; when the accuracy detection result is not passed, the corresponding standard combination is removed from the preset scheme library.

[0144] Each module in the above data reading device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0145] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data read by the first device from the second device. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data reading method is implemented.

[0146] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0147] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the data reading method.

[0148] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the data reading method.

[0149] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0151] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0152] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data reading method, characterized in that: Applied to a first device, comprising: Obtain a data read request, where the data read request is used to obtain data on the second device; Determining a corresponding target pre-reading solution according to a data type corresponding to the data read request and a system type corresponding to the first device; Reading data on the second device according to the target pre-reading scheme to obtain pre-read data; The data corresponding to the data read request is obtained from the pre-read data.

2. The method according to claim 1, characterized in that The determining a corresponding target pre-reading scheme according to the data type corresponding to the data read request and the system type corresponding to the first device includes: Based on the candidate combination formed by the data type corresponding to the data read request and the system type corresponding to the first device, matching is performed with a preset solution library; the preset solution library includes a standard combination formed by a standard data type and a standard system type, and a standard pre-reading solution corresponding to the standard combination; In the case that there is an alternative combination formed by the data type and the system type in the preset solution library, the standard pre-reading solution corresponding to the alternative combination is used as the corresponding target pre-reading solution; When there is no candidate combination of the data type and the system type in the preset solution library, the default pre-reading solution is used as the corresponding target pre-reading solution.

3. The method according to claim 2, characterized in that In the case that there is an alternative combination formed by the data type and the system type in the preset solution library, the standard pre-reading solution corresponding to the alternative combination is used as the corresponding target pre-reading solution, including: In the case where the candidate combination formed by the data type and the system type is a sequential reading combination, the corresponding sequential pre-reading scheme in the preset scheme library is used as the corresponding target pre-reading scheme; the sequential pre-reading scheme represents that the data on the second device is read sequentially according to the order in which the data is arranged; In the case where the candidate combination formed by the data type and the system type is a thumbnail reading combination, the corresponding overall pre-reading scheme in the preset scheme library is used as the corresponding target pre-reading scheme; the overall pre-reading scheme represents reading the entire thumbnail on the second device; When the candidate combination formed by the data type and the system type is a paged reading combination, the corresponding page reading scheme in the scheme library is used as the corresponding pre-reading scheme; the page reading scheme represents reading the data on the second device by page.

4. The method according to claim 2, characterized in that: In the case that the candidate combination formed by the data type and the system type does not exist in the preset solution library, the default pre-reading solution is used as the corresponding target pre-reading solution, including: In the case that the alternative combination formed by the data type and the system type does not exist in the preset solution library, counting the number of data read sub-requests corresponding to the data read request; the data read request includes multiple data read sub-requests; When the number of the data read sub-requests is not greater than a preset number, the default pre-reading scheme is used as the corresponding target pre-reading scheme.

5. The method according to claim 4, characterized in that The target pre-reading scheme includes a sequential pre-reading scheme; and reading the data on the second device according to the target pre-reading scheme to obtain the pre-read data includes: Determine, according to the first read position and the first data length corresponding to the data read sub-request, a second read position and a second data length for pre-reading by the sequential pre-reading scheme; The data on the second device is read according to the second read position and the second data length to obtain the pre-read data corresponding to the data read sub-request.

6. The method according to claim 4, characterized in that The method further comprises: When the number of the data reading sub-requests is greater than a preset number, obtaining an actual reading result corresponding to each of the data reading sub-requests; Fitting the actual reading results corresponding to each of the data reading sub-requests according to a function fitting method to obtain a file reading model; An alternative combination of the data type corresponding to the data read request and the system type corresponding to the first device is used as a standard combination, and the file read model is saved as a standard pre-reading solution in the preset solution library.

7. The method according to claim 6, characterized in that The taking the alternative combination of the data type corresponding to the data read request and the system type corresponding to the first device as a standard combination, and saving the file read model as a standard pre-reading solution to the preset solution library, includes: When it is verified that the accuracy of the file reading model is higher than the preset accuracy, the alternative combination of the data type corresponding to the data reading request and the system type corresponding to the first device is used as a standard combination, and the file reading model is saved as a standard pre-reading scheme in the preset scheme library.

8. The method according to claim 6, characterized in that The method further comprises: When it is verified that the accuracy of the file reading model is not higher than the preset accuracy, the value of the preset number is increased, and the process returns to the step of obtaining the actual reading result corresponding to each data reading sub-request when the number of data reading sub-requests is greater than the preset number.

9. The method according to any one of claims 2 to 8, characterized in that: The default pre-reading scheme is a sequential pre-reading scheme.

10. The method according to claim 9, characterized in that The standard pre-reading scheme includes a sequential pre-reading scheme; the method further includes: Obtaining a first reading result corresponding to the data reading request; When the second read result matches the first read result, an alternative combination formed by the data type corresponding to the data read request and the system type corresponding to the first device is taken as a standard combination and saved in the standard combination category corresponding to the sequential pre-reading scheme, and the second read result is obtained by pre-reading through the sequential pre-reading scheme.

11. The method according to claim 2, characterized in that The method further comprises: At preset time intervals, a pre-reading accuracy test is performed on the standard pre-reading scheme corresponding to the standard combination to obtain an accuracy test result; When the accuracy test result is failed, the corresponding standard combination is removed from the preset solution library.

12. A data reading device, characterized in that: include: A request acquisition module, used to acquire a data read request, wherein the data read request is used to acquire data on the second device; A pre-reading scheme module, used to determine a corresponding target pre-reading scheme according to a data type corresponding to the data read request and a system type corresponding to the first device; A data pre-reading module, configured to read the data on the second device according to the target pre-reading scheme to obtain pre-read data; A data acquisition module acquires data corresponding to the data read request from the pre-read data.

13. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Cited By

  • Storage controller adjusting read voltage level, storage device including the same, and method of operating the same

    US12608305B2