Data reading method, device and electronic equipment
By predicting and storing the data that the target application will read next on the terminal, the problem of excessively long data reading time is solved, enabling fast reading and efficient use, and reducing terminal resource consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 杨正
- Filing Date
- 2022-06-10
- Publication Date
- 2026-04-24
AI Technical Summary
When users are using the application, the data reading time is too long, which causes lag issues, especially when downloading and using applications with large data packages, the waiting time is too long.
By acquiring screenshots of the target application's pages and user behavior data, the system predicts the data to be read next and downloads it from the server in advance, storing it locally so that the data can be read directly from the local machine next time.
It shortens data reading time, improves data reading efficiency, avoids application lag during use, enhances smoothness, and reduces the occupation of terminal storage resources.
Smart Images

Figure CN115202748B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication processing technology, and in particular to a data reading method, apparatus, and electronic device. Background Technology
[0002] With the widespread use of various applications, users typically download various applications to their devices for use; for example, they may install many apps on their mobile phones.
[0003] However, when using various applications, users sometimes experience long loading times when reading data, causing them to wait a considerable amount of time on a page before seeing the content they want. For example, after downloading a game app, users often have to wait a long time to enter a game scene or use game items and skills, frequently encountering game lag issues. Summary of the Invention
[0004] In view of the above problems, embodiments of this application are proposed in order to overcome the above problems or at least partially solve the above problems.
[0005] To address the aforementioned problems, a first aspect of this application provides a data reading method, the method comprising:
[0006] Obtain multiple page screenshots and user behavior data of the target application up to the current moment; wherein, the page screenshots are obtained by taking screenshots of the display page of the target application;
[0007] Based on multiple screenshots of the page and the user behavior data, determine the pre-read data that the target application needs to read next;
[0008] The pre-read data is downloaded from the first server and stored locally so that when the next read request of the target application hits the pre-read data, the pre-read data is read from the local storage.
[0009] Optionally, the user behavior data includes multiple read data sequences, and the method further includes:
[0010] Based on the time of each of the multiple page screenshots and the time of each of the multiple read data sequences, the multiple page screenshots and the multiple read data sequences are aligned;
[0011] The user behavior data includes multiple read data sequences. Based on multiple page screenshots and the user behavior data, the pre-read data to be read by the target application next is determined, including:
[0012] Based on each aligned page screenshot and the corresponding read data sequence, determine the attention score between each page screenshot and the multiple read data sequences;
[0013] Based on the attention score, the target application is determined in the next read of pre-read data.
[0014] Optionally, based on multiple screenshots of the page and the user behavior data, the pre-read data to be read by the target application next time is determined, including:
[0015] Multiple screenshots of the page and user behavior data are input into the prediction model to obtain the pre-read data that the target application will read next time.
[0016] The prediction model is obtained by training the target neural network with multiple joint training samples as input and the actual read data samples corresponding to each joint training sample as the true value.
[0017] Each of the joint training samples includes multiple page screenshot samples and user behavior data samples, and the actual read data samples are the data actually read by the target application.
[0018] Optionally, the method further includes:
[0019] When the target application reads data for the i-th time, the actual read data sequence for the i-th time and the corresponding pre-read data sequence for the i-th time are obtained; where i is an integer greater than or equal to 1;
[0020] If the difference between the actual read data sequence and the pre-read data sequence exceeds the target difference, obtain the target user behavior data and target page screenshot on which the i-th corresponding pre-read data sequence was determined;
[0021] The prediction model is updated based on the target user behavior data, the target page screenshot, and the actual read data sequence.
[0022] Optionally, the method further includes:
[0023] The target user behavior data and target page screenshot corresponding to the i-th time are used as incremental samples and added to the incremental sample pool;
[0024] Based on the target user behavior data, the target page screenshot, and the actual read data sequence, the prediction model is updated, including:
[0025] Periodically retrieve newly added incremental samples from the incremental sample pool within the current period;
[0026] The prediction model is updated using the incremental samples added in the current period as input and the corresponding actual read data sequence as the truth value.
[0027] Optionally, the user behavior data sample includes multiple read data sequence samples, and the prediction model is trained in the following manner:
[0028] Obtain the first feature vector corresponding to each of the multiple page screenshot samples and the second feature vector corresponding to each of the multiple read data sequence samples;
[0029] By concatenating the first feature vector and the second feature vector, a joint vector is obtained;
[0030] Based on the joint vector, the pre-read data sequence output by the target neural network is obtained;
[0031] Based on the pre-read data sequence and the actual read data samples, the parameters of the target neural network are updated multiple times to obtain the prediction model.
[0032] Optionally, the method further includes:
[0033] Obtain the current performance configuration parameters of the terminal running the target application;
[0034] Based on multiple screenshots of the page and the user behavior data, the pre-read data to be read by the target application in the next iteration is determined, including:
[0035] If the current performance configuration parameters meet the target conditions, the multiple page screenshots and the user behavior data are sent to the prediction model configured in the terminal to obtain the pre-read data to be read next.
[0036] If the current performance configuration parameters do not meet the target conditions, the multiple page screenshots and the user behavior data are sent to the second server to obtain the pre-read data to be read next.
[0037] Optionally, the method includes:
[0038] Before the target application is installed, obtain the startup package and startup image package of the target application; wherein, the startup image package includes the startup data of the target application;
[0039] After the target application is launched via the startup package, in response to a read request from the target application, the data corresponding to the read request is read from the startup image package and / or the first server; wherein, the first server includes all the original data of the target application.
[0040] Optionally, embodiments of this application also disclose a data reading device, the device comprising:
[0041] The data acquisition module is used to acquire multiple page screenshots and user behavior data of the target application up to the current moment; wherein, the page screenshots are obtained by taking screenshots of the display page of the target application;
[0042] The data prediction module is used to determine the pre-read data that the target application needs to read next, based on multiple screenshots of the page and the user behavior data.
[0043] The download module is used to download the pre-read data from the first server and store the pre-read data locally so that when the next read request of the target application hits the pre-read data, the pre-read data is read from the local storage.
[0044] This application also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executed, implements the data reading method as described in the first aspect.
[0045] This application also discloses a computer-readable storage medium storing a computer program that causes a processor to execute the data reading method as described in the first aspect of this application.
[0046] This application also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the data reading method described in the first aspect.
[0047] The data reading method of this application embodiment can acquire multiple page screenshots and user behavior data of the target application before the current time; and based on the multiple page screenshots and user behavior data, determine the pre-read data to be read by the target application next time; download the pre-read data from the first server and store the pre-read data in the local cache, so that when the next read request of the target application hits the pre-read data, the pre-read data is read from the local cache.
[0048] The data reading method using the embodiments of this application has the following advantages:
[0049] On the one hand, since the pre-read data to be read by the user is obtained based on the page screenshot and user behavior data, and the pre-read data is downloaded from the first server and stored locally on the terminal, the target application can directly read the data from the local machine when it reads data next time. Compared with downloading the required data from the first server, reading data from the local machine will greatly shorten the reading path, thereby greatly improving the data reading efficiency of the target application, shortening the data reading time, and avoiding the problem of the target application lagging during use.
[0050] On the other hand, since page screenshots are taken from the displayed page of the target application, user behavior data can reflect the reading behavior of users when using the target application. The displayed page is generally the interface that the user is currently viewing, and it is correlated with the user's reading behavior. For example, in a game app, when a user swipes up, down, left, or right on a game scene page, the user's viewing behavior in the game scene can be recorded through a screenshot of the displayed page. User behavior data generally includes actions such as scene switching and item purchases, which are closely related to the viewing behavior in the game scene. Therefore, when predicting the pre-read data that a user will read next based on page screenshots and user behavior data, a correlation can be established between the user's page viewing behavior and data reading behavior. Based on this correlation, the data that the user will read next can be accurately predicted, thereby increasing the probability that the next read request will hit the pre-read data, and thus ensuring fast data reading each time. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the 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.
[0052] Figure 1 This is a diagram of the hardware and software environment in which a data reading method is implemented according to an embodiment of this application.
[0053] Figure 2 This is a flowchart of the steps of a data reading method in an embodiment of this application;
[0054] Figure 3 This is a flowchart illustrating the steps for determining pre-read data in an embodiment of this application;
[0055] Figure 4 This is a schematic diagram of the overall model training process in the embodiments of this application;
[0056] Figure 5 This is a schematic diagram of the process for self-iterative updating of the prediction model in the embodiments of this application;
[0057] Figure 6a This is a diagram of the hardware and software environment in server mode in the embodiments of this application;
[0058] Figure 6b This is a diagram of the hardware and software environment in the client mode of this application embodiment;
[0059] Figure 7This is a schematic diagram of the structural framework of a data reading device according to an embodiment of this application. Detailed Implementation
[0060] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, 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 some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0061] The embodiments of the present invention can be applied to various operating systems of terminals, including PCs and mobile terminals. The operating systems include PC operating systems such as Windows, Linux, Unix, and virtual machine emulation systems, as well as mobile terminal operating systems such as Android and iOS.
[0062] In this embodiment of the invention, the target application can refer to an application with a large software installation package and data package, such as a 3D game or a PS application; the target application can be a PC application or a mobile terminal application (APP); the method and system of this embodiment of the invention will be described below using a mobile terminal as an example.
[0063] In related technologies, users sometimes encounter long data reading times when using various applications. In view of this, this application proposes a data pre-reading scheme to solve the aforementioned technical problem. Specifically, multiple screenshots of the target application's displayed page before the current moment are obtained. Then, based on these multiple screenshots and user behavior data before the current moment, the pre-read data to be read by the target application next is determined. This pre-read data is downloaded from a first server in advance and stored locally on the terminal, thereby shortening the time for the target application to read data next time and improving data reading efficiency.
[0064] Building upon this, in some implementation scenarios, for target applications with large data packets, further improvement schemes have been proposed to enhance the smoothness of the target application's operation. Specifically, these improvement schemes can accelerate the download, installation, and startup speeds of the target application while ensuring its smooth operation, as described below:
[0065] For target applications with large data packets, the download and installation times are both long. When using the target application, the required bandwidth resources are large and the performance requirements of the terminal are high. Thus, for target applications with large data packets, the waiting time for users to use them for the first time is very long, and the requirements for terminal performance and network bandwidth resources are also high during use.
[0066] In view of this, an improved scheme is proposed to enable the target application to be used while it is being downloaded. Specifically, the startup package and startup image package of the target application can be obtained in advance when the target application is not installed. After the target application is started by the startup package, in response to the read request of the target application, the data corresponding to the read request is read from the startup image package and / or the first server. The first server includes all the original data of the target application.
[0067] The startup package is used to launch the target application. It contains the most basic files for launching the target application. When the terminal uses the startup package to run the target application, the startup package completes the basic component installation of the target application during the installation process, as well as the configuration of the interaction between the target application and the terminal. Therefore, the amount of data contained in the startup package is very small, which greatly improves the efficiency of the terminal downloading the startup package.
[0068] The startup image package includes the startup data of the target application. When the terminal obtains the startup runtime package, it also obtains the startup image package. When the target application starts, it can directly obtain the data required for the target application to start locally, which greatly reduces the startup time of the target application.
[0069] When the target application needs to read data during operation, it can obtain the data corresponding to the read request from the startup image package and / or the first server. If the startup image package contains the data corresponding to the read request, the data can be read directly from the startup image package. If the startup image package does not contain the data corresponding to the read request, the corresponding data can be read from the first server. If the startup image package contains part of the data corresponding to the read request, all the required data can be read from both the first server and the startup image package.
[0070] In this implementation, the target application vendor can create a startup package and a startup image package from the target application's raw data according to its function within the target application. The data other than the startup package is packaged into a raw image package. These packages can then be uploaded to a first server. When a user downloads and installs the target application, they can first download the startup package and startup image package. Because these packages are small and download quickly, the user can quickly launch the target application on their terminal. After the target application launches, the user can retrieve the data required for read requests from the startup image package and / or the first server (the raw image package), thus ensuring the normal operation of the target application.
[0071] This can improve the running speed of the target application, allowing users to use it as quickly as possible. For example, in a game scenario, when faced with a game app with a very large data package, the game app can be launched quickly when the user clicks to download it. When the user starts playing the game app, during the game, data acquisition during the game can be supported by the local startup image package and the original image package on the first server. This can greatly reduce the user's waiting time without affecting the user's gaming experience.
[0072] When the aforementioned data pre-reading scheme is combined with this improved scheme, on the one hand, it can help users quickly start and use the target application. On the other hand, during use, the data pre-reading mechanism improves the data reading speed and makes the display page display smooth.
[0073] On the other hand, since the terminal stores the target application's startup package and startup image package, as well as the corresponding pre-read data downloaded from the first server during the target application's use, compared to storing all the target application's data on the terminal, it can reduce the occupation of the terminal's storage resources and ensure the terminal's performance.
[0074] On the other hand, since the pre-read data is read from the first server and stored locally on the terminal, the data stored locally on the terminal will become richer as the target application is used. This increases the probability of reading data directly from the local storage, resulting in faster response speeds and a smoother user experience as the target application is used more extensively.
[0075] The following section provides a full explanation of the hardware and software environment used in the data reading method of this application, and how data pre-reading is performed.
[0076] Reference Figure 1 As shown, a schematic diagram of a hardware and software environment according to this application is illustrated. Figure 1As shown, the system includes a terminal, a first server, and a second server. The first server stores all the raw data (raw image package) required for the target application to run, while the second server determines the pre-read data to be read next for the target application. The terminal is configured with a pre-read module, a file management module, and an application screenshot module corresponding to the target application.
[0077] The file management module has a data path with the target application and can obtain user behavior data of the target application; the application screenshot module is used to obtain page screenshots of the displayed page; the pre-read module has its own data path with the file management module and the application screenshot module respectively, and can receive user behavior data sent by the file management module and multiple page screenshots sent by the application screenshot module.
[0078] In one implementation, the file management module sends user behavior data to the pre-read module, and the application screenshot module also sends multiple page screenshots to the pre-read module. The pre-read module can package the user behavior data and multiple page screenshots and send them to the second server. The second server determines the pre-read data that the target application needs to read next based on the user behavior data and page screenshots, and then feeds back the identifier of the pre-read data to the pre-read module. Then, the pre-read module downloads the pre-read data from the first server.
[0079] The pre-read module can communicate with the first server through multiple interfaces to obtain the determined pre-read data from the first server in sequence through multiple interfaces; the multiple interfaces may include a content delivery network (CDN) interface, a peer-to-peer (P2P) interface, and an origin server interface.
[0080] The file management module can be initialized when the target application is launched via the startup package, and the process of the application screenshot module acquiring page screenshots can be described as follows:
[0081] One approach is to directly take screenshots of the target application's display page at a preset frequency, thereby obtaining multiple page screenshots.
[0082] Another approach is to use the screenshot capture component configured in the terminal's operating system to capture a screenshot of the displayed page. Then, through the call interface between the terminal's video memory and the video memory, the captured image frame is obtained from the display buffer of the video memory, and the obtained image frame is used as the page screenshot.
[0083] Taking 3D games as an example, the application screenshot module can call the Nvidia Game Stream interface to extract relevant image frames from the GPU memory and the display buffer corresponding to the current 3D game. If the frame rate of the game is generally 60-120fps, image frames can be extracted at a certain sampling interval to obtain multiple page screenshots.
[0084] It should be noted that this application can preprocess the screenshot of the displayed page to obtain the desired page screenshot. Preprocessing may include adjusting the orientation and size of the screenshot, and adding a timestamp to the screenshot. When adjusting the orientation of the screenshot, it can be adjusted to a positive orientation; when adjusting the size of the screenshot, it can be compressed to the target size.
[0085] Of course, in some other embodiments, preprocessing the screenshot of the displayed page may also include cropping the edges of the displayed page in the screenshot that do not belong to the target application. This is suitable for cases where the screenshot mechanism is a full-screen screenshot, such as the screenshot software configured in some operating systems that takes a full-screen screenshot of the display screen. In this case, the screenshot will inevitably include other screens besides the displayed page of the target application.
[0086] For example, in a game app, if the user does not display the game page in full screen, some screenshot mechanisms will take a full-screen screenshot of the terminal. The screenshot will include the operating system's taskbar and the part of the desktop that is not covered by the game page.
[0087] Accordingly, in order to avoid including images other than the display page of the target application in the screenshot, the image area belonging to the display page of the target application can be captured in the screenshot to remove the edge images of the display page that do not belong to the display page of the target application in the screenshot, and then the captured image area can be used as the page screenshot described in this application.
[0088] The data reading method of this application will be described in detail below.
[0089] Reference Figure 2 As shown, a flowchart of the steps of a data reading method in one embodiment is illustrated. Figure 2 As shown, the specific steps may include:
[0090] Step S201: Obtain multiple page screenshots and user behavior data of the target application up to the current moment.
[0091] Among them, the page screenshot is obtained by taking a screenshot of the display page of the target application.
[0092] In this embodiment of the application, screenshots can be taken of the display page of the target application. Specifically, screenshots can be taken at preset intervals, such as 100-200ms. Figure 1 This process, from which a screenshot of the page is obtained, is described above. The steps for obtaining a screenshot from a displayed page are not repeated here.
[0093] The multiple page screenshots can be obtained by taking multiple screenshots of the target application's display page within a preset time period prior to the current moment. Similarly, the user behavior data can also be behavioral data within a preset time period prior to the current moment. The preset time period can be set to 10 seconds.
[0094] User behavior data can record user actions in the target application, including but not limited to data read logs. Data read logs are used to record the data read each time within a preset time period, as well as the read time of each data read. Specifically, data read logs can include multiple data read records. Each data read record can include the identifier of the data read each time, as well as the read time of each read. The read time can be a timestamp corresponding to the read moment.
[0095] Accordingly, each page screenshot can also include a timestamp corresponding to the page screenshot. This timestamp can represent the time when the page was displayed in the screenshot. For example, if a screenshot of the displayed page was taken at 12:12:34:100, the timestamp corresponding to the time of the screenshot can be recorded in the page screenshot obtained from that screenshot.
[0096] Of course, user behavior data includes not only data reading records, but also user page navigation data, data writing data, etc. Navigation data can reflect when a user navigates to a page and the pages displayed before and after the navigation. Since a displayed page generally corresponds to a backend resource (the resource data is processed into displayable page data, thus forming the displayed page), combined with the timestamps corresponding to the page screenshots, we can know the duration of the user's stay on each displayed page. This allows us to obtain the resource data that the user is interested in within a preset time period, thereby helping to predict the data that the user will read next.
[0097] Step S202: Based on multiple screenshots of the page and the user behavior data, determine the pre-read data that the target application will read next.
[0098] In this embodiment, by comparing the timestamps corresponding to the reading time and the screenshot time, each data reading record in the data reading log can be compared with the page screenshot, thereby obtaining the association between each page screenshot and the data reading record. Through this association, the relationship between the display page viewed by the user in the target application and the data reading behavior performed by the user when viewing a certain display page can be established.
[0099] For example, taking a game app as an example, multiple page screenshots can represent which game scenes the user watched in the game, data reading records can represent what data the user read, and correlation relationships can represent what data the user read while watching game scenes.
[0100] Of course, in some cases, a page screenshot may not have a corresponding data read record. In this case, you can set a data read record with a fixed identifier for the page screenshot, such as a data record with the identifier "00-00-00", so that each page screenshot has a corresponding data read record, thereby completing the association relationship.
[0101] In this way, based on the correlation between page screenshots and data reading records, it can be determined whether the user read data on the displayed page, and what data they read. Simultaneously, based on the chronological order of the page screenshots and data reading records, the transition trajectory between displayed pages and between data reading records can be determined. From this, a probability transition matrix for the displayed pages and a probability transition matrix for user behavior data can be obtained. These two probability transition matrices reflect the patterns of the user's reading behavior within the target application. Therefore, based on these two probability transition matrices, the pre-read data that the user will read next can be predicted. Specifically, based on page screenshots and behavioral data, the resource data that the user is interested in within a preset time period can be obtained. Thus, by combining the resource data that the user is interested in, the pre-read data that the user will read next can be predicted.
[0102] Step S203: Download the pre-read data from the first server and store the pre-read data locally so that when the next read request of the target application hits the pre-read data, the pre-read data is read from the local storage.
[0103] In this embodiment, the determined pre-read data can be represented as an identifier, such as the ID of the pre-read data. Based on this identifier, the pre-read data can be downloaded from the first server and stored locally, for example, in the terminal's external storage or memory. Thus, when the target application's next read request hits the pre-read data, it can directly read the pre-read data from the local storage, significantly shortening the data reading path and achieving fast data retrieval.
[0104] Of course, if the pre-read data only includes the portion of data needed for the next read request, the remaining data that was not matched in the pre-read data for the next read request can be downloaded from the first server. Then, the remaining data downloaded from the first server and the matched data from the pre-read data are encapsulated into a data packet and sent back to the target application. In this case, since only a portion of the data is downloaded from the first server in real time, the amount of data to be downloaded in real time is relatively reduced, and the real-time efficiency of reading data can be improved.
[0105] Of course, in some implementations, the time for downloading pre-read data from the first server can be limited to a target time. If the pre-read data is not downloaded within the target time, the download will stop. Generally, the target time can be determined based on the interval between two consecutive data reads by the user, such as the average interval between two consecutive data reads. This avoids conflicts between pre-reading and actual reading when the target application initiates the next read request if the pre-read data has not been successfully read. Therefore, the next read request from the target application can be responded to independently, ensuring the data reading efficiency of the target application.
[0106] The technical solution adopted in this application has two advantages. First, by pre-acquiring and storing the pre-read data from the first server locally on the terminal, the target application can directly read data from the local terminal the next time it needs to read data. Compared to downloading the required data from the first server, reading data locally significantly shortens the reading path, thereby greatly reducing the data reading time, improving the data reading efficiency of the target application, avoiding lag issues during use, and enhancing the smoothness of the target application. Second, by obtaining the pre-read data that the user will read next based on page screenshots and user behavior data, a correlation can be established between the user's page viewing behavior and data reading behavior. Based on this correlation, the data that the user will read next can be accurately predicted, thereby increasing the probability that the next read request will hit the pre-read data, and ensuring that each read request can be responded to quickly.
[0107] In one implementation, reference Figure 3 The diagram shows a flowchart of the steps to determine the data to be read. As mentioned above, user behavior data may include data read logs, which may include multiple data read records. Since data read records may include the identifier of the data read, such as the data ID, and each read data is generally not just one piece of data, but may be multiple pieces of data, each data read record is represented as an ID sequence. Therefore, one data read record can be called one read data sequence, and multiple data read records are multiple read data sequences.
[0108] For example, in a data read, if data with IDs "01", "02" and "03" needs to be read, then the data read record will be represented as the ID sequence "01-02-03".
[0109] As mentioned above, it is necessary to determine the correlation between page screenshots and multiple read data sequences. In practice, in order to accurately map the user's viewing behavior and data reading behavior, multiple page screenshots and multiple read data sequences can be aligned first. That is, one page screenshot can be mapped to one read data sequence, so as to accurately map the user's viewing behavior and data reading behavior.
[0110] Specifically, multiple page screenshots and multiple read data sequences can be aligned based on their respective times and the respective times of multiple read data sequences.
[0111] In practice, for each page screenshot, the read data sequence that matches the timestamp corresponding to the page screenshot can be used as the read data sequence aligned with the page screenshot.
[0112] For example, page screenshot Figure 1 The corresponding time is 34 seconds and 200 milliseconds, so the read data sequence with a time around 34 seconds and 200 milliseconds can be compared with the page screenshot. Figure 1 In alignment, the reading time being around 34 seconds and 200 milliseconds can be understood as: the time difference between the reading time and 34 seconds and 200 milliseconds is within the target time difference range. That is, during alignment, the read data sequence matching the timestamp corresponding to the page screenshot refers to the read data sequence where the time difference between the timestamp corresponding to the reading time and the timestamp corresponding to the page screenshot is within the target time difference range.
[0113] In one implementation, before aligning the page screenshots and read data sequences, the read data sequences can be preprocessed, such as deduplicating retransmitted read data sequences due to network / system anomalies. Specifically, during alignment, if a page screenshot lacks a matching read data sequence, the missing read data sequence can be supplemented based on the time of that page screenshot.
[0114] like Figure 3 As shown, the process of determining the pre-read data may specifically include the following steps:
[0115] Step S301: Based on each aligned page screenshot and the corresponding read data sequence, determine the attention score between each page screenshot and the multiple read data sequences.
[0116] In this embodiment, since each page screenshot has a corresponding sequence of read data, to accurately reflect the impact of page transitions on the read data, an attention score can be determined between each page screenshot and each read data sequence. This attention score characterizes the degree of correlation between the currently viewed page and the data read before and after it. Thus, based on the chronological viewing and data reading behaviors, the correlation between the viewed page and the read data can be better expressed, i.e., the impact of the viewed page on the user's read data can be obtained.
[0117] In one alternative implementation, the attention score between each page screenshot and multiple read data sequences can be determined using the BERT (Bidirectional Encoder Representations from Transformer) model.
[0118] Step S302: Based on the attention score, determine the target application for the next read of pre-read data.
[0119] In this embodiment, since the attention score is used to characterize the degree of correlation between the currently viewed display page and the data read before and after, the probability transition matrix of the display page and the probability transition matrix of the read data sequence can be constructed based on the multiple attention scores corresponding to each page screenshot (each read data sequence corresponds to one attention score). Based on the probability transition matrix, the pre-read data to be read by the user next can be determined.
[0120] In this application, the probability transition matrix can be used to reflect the probability distribution of the dynamic process of data reading behavior transitioning from one state to another, that is, to learn the pattern of user data reading behavior. This pattern is represented by a probability transition matrix, which can then predict the next data to be read.
[0121] A further explanation is as follows: Since multiple page screenshots record the user's viewing behavior, they contain rich information such as the correlation between scene areas, display pages, and resource data distribution. In the design of the target application, the distribution of scene areas, functional pages, and related component resource data is basically in a one-to-one correspondence. Therefore, after determining the scene area where the user is currently located through page screenshots, it is possible to infer which part of the target application's resource data is being accessed. Combined with user behavior data, it is possible to guess the probability ranking of combinations of jumping from the current scene area (display page) to other related scene areas (other display pages), and thus obtain the probability ranking of the resource data that the user will access next. Based on this probability ranking, the pre-read data that the user will read next can be determined.
[0122] It should be noted that, Figure 3 The process of determining the pre-read data shown indicates that this application determines the substantive content of the pre-read data based on page screenshots and read data sequences, and all specific technical implementations that adopt this substantive content can be considered to fall within the protection scope of this application.
[0123] Among them, based on Figure 3 The paper describes a possible technical approach to determining the essential meaning of the pre-read data. In this approach, a prediction model for determining the pre-read data can be constructed based on the idea of machine learning. This prediction model can be obtained by training the target neural network based on the corresponding training samples. In this way, the page screenshot and the read data sequence can be directly input into the prediction model to determine the pre-read data to be read next.
[0124] The training samples used to train the prediction model can include multiple joint training samples. Each joint training sample includes multiple page screenshot samples and user behavior data samples. The actual read data samples are the data actually read by the target application. Of course, the actual read data samples play the role of the ground truth during the training process. The ground truth is used as the target of supervised learning to construct the loss function. In this way, the loss value can continuously decrease during the training process, thereby continuously updating the parameters of the target neural network, so that the target neural network can continuously converge and obtain the prediction model.
[0125] When a prediction model is built by training a target neural network, a prediction model with strong prediction performance can be trained with a large number of training samples, thereby improving the accuracy of the prediction model in determining the read data.
[0126] Reference Figure 4 As shown, a schematic diagram of the overall process of model training in this application is illustrated. Figure 4 As shown, the target neural network includes a first feature extraction module, a second feature extraction module, a concatenation module, and a prediction module. Among them, Figure 4 The illustration uses the Transformer model as an example to illustrate the prediction module, combined with... Figure 4 The training process of the prediction model is as follows:
[0127] First, the user behavior data sample includes multiple read data sequence samples. Multiple page screenshot samples are input into the first feature extraction module to obtain the first feature vector corresponding to each of the multiple page screenshot samples. Then, multiple read data sequence samples are input into the second feature extraction module to obtain the second feature vector corresponding to each of the multiple read data sequence samples.
[0128] Next, the joint vector obtained by concatenating the first feature vector and the second feature vector is input into the prediction module to obtain the pre-read data sequence output by the prediction module; wherein, the concatenation module is used to concatenate the first feature vector and the second feature vector.
[0129] Subsequently, based on the pre-read data sequence and the actual read data samples, the parameters of the target neural network are updated multiple times to obtain the prediction model.
[0130] In this embodiment, the first feature extraction module is used to extract features from the page screenshot sample to form a feature map. The first feature extraction module may include multiple convolutional layers connected in sequence. Through multiple convolutional layers, features at different scales can be extracted from the page screenshot to obtain a feature map. The feature map is then converted into a feature vector to obtain a first feature vector.
[0131] The second feature extraction module can be used to perform vectorization processing on each read data sequence sample in a specified format to obtain the second feature vector.
[0132] Next, the first feature vector and the corresponding second feature vector are concatenated to obtain a joint vector. Then, multiple temporally consecutive joint vectors are input into the prediction module, which can be a Transformer model. The Transformer model makes extensive use of multi-head self-attention mechanisms. The algorithm used by the Transformer model is a temporal algorithm based on attention mechanisms. Thus, the prediction model can learn the degree of correlation between the display page of the target application and the data read based on the temporally consecutive joint vectors.
[0133] When the pre-read data sequence output by the prediction module is obtained, a loss function can be constructed based on the pre-read data sequence and the actual read data sequence included in the actual read data sample to obtain the loss value of the target neural network, and then the parameters of the target neural network can be updated based on the loss value.
[0134] Therefore, after multiple rounds of training, if the loss value is less than the target loss value and the LOSS curve changes as expected, the target neural network can be considered to have converged, and the resulting prediction model can be deployed to online applications.
[0135] When this implementation method is adopted, the prediction accuracy of the prediction model for the pre-read data can be improved by continuously training the prediction model with a large number of training samples. After the prediction model is trained, the read data sequence from multiple page screenshots and user behavior data can be input into the prediction model to obtain the pre-read data to be read next time.
[0136] In practice, the read data sequence is first timestamped with the page screenshots. The aligned page screenshots and read data sequences are then input into the first feature extraction module and the second feature extraction module, respectively, to obtain the first feature vector and the second feature vector. The concatenation module then concatenates the first and second feature vectors that are time-continuous to obtain a joint vector that is time-continuous. Finally, the joint vector is input into the prediction model to obtain the pre-read data to be read next.
[0137] Of course, when determining pre-read data based on a prediction model, the predictive performance of the model is related to the richness of the training samples. The richer the training samples, the better the generalization ability and robustness of the prediction model. In this way, training samples can be continuously collected during the use of the target application to dynamically update the prediction model, thereby improving the prediction accuracy of the prediction model.
[0138] Accordingly, in one implementation, a self-driven predictive model iteration mechanism can be constructed. Through this mechanism, the predictive model can be prompted to enter an automatic iteration loop. As the number of users using the target application increases and the number of training samples collected increases, the predictive ability of the predictive model will become more and more accurate, and only a small amount of human intervention is needed to enable the predictive model to complete self-updating and iteration.
[0139] Reference Figure 5 The diagram illustrates the process of iteratively updating the prediction model. Combined with... Figure 5 As shown, in specific implementation, when the target application reads data for the i-th time, the actual read data sequence for the i-th time and the corresponding pre-read data sequence for the i-th time can be obtained. If the difference between the actual read data sequence for the i-th time and the pre-read data sequence output for the (i-1)-th time (the pre-read data sequence output for the (i-1)-th time is actually the predicted data sequence to be read for the i-th time) exceeds the target difference, the target user behavior data and target page screenshot used to determine the corresponding pre-read data sequence for the (i-1)-th time can be obtained. Then, the prediction model is updated based on the target user behavior data, the target page screenshot, and the actual read data sequence. Here, i is an integer greater than or equal to 1.
[0140] In this embodiment, the i-th read data can refer to any read request from the target application. That is, each time the target application issues a read request to read data, the actual data to be read can be determined through the read request. This actual data to be read is the actual read data sequence, which, as mentioned above, can be specifically represented as an ID sequence. The identifier of the data to be read can be carried in the read request, and by parsing the read request, the actual read data sequence to be read for the i-th time can be obtained.
[0141] Since the pre-read data corresponding to each read request is predicted in advance, i.e., the pre-read data sequence, the difference between the actual read data sequence to be read in the i-th read request and the corresponding pre-read data sequence can be determined.
[0142] For example, when the target application issues a read request for the 5th time, the actual read data sequence to be read is "01-02-03-06-08". Previously, the predicted read data sequence to be read by the 4th read request (compared with the actual read data sequence of the 5th time) was "01-03-04-07-08". Therefore, the difference between "01-02-03-06-08" and "01-03-04-07-08" can be determined.
[0143] The difference between the actual read data sequence and the corresponding pre-read data sequence can include inconsistencies in the read data sequence and inconsistencies in the reading order of the read data sequence.
[0144] The difference between the actual read data sequence and the corresponding pre-read data sequence can be characterized by the error rate, and correspondingly, the target difference can be represented by the target error rate. Specifically, it can be expressed as the percentage of inconsistent data between the actual read data sequence and the pre-read data sequence. For example, between "01-02-03-06-08" and "01-03-04-07-08", there are three inconsistent data points, accounting for 60%, so the error rate is 60%.
[0145] If the difference is greater than the target difference, it indicates that the prediction accuracy of the i-th pre-read is not high. In this case, the page screenshot and user behavior data used to predict the data to be read in the i-th time can be re-input into the prediction model, and the actual read data sequence of the i-th time can be used as the truth value to train the prediction model, so as to update the parameters of the prediction model and enable the prediction model to relearn the inaccurate samples.
[0146] When this implementation method is adopted, the prediction model can be dynamically updated using real-time user behavior data and page screenshots obtained online during the online use process. This allows the prediction model to continuously learn the behavior of the current user group, so as to always ensure the prediction accuracy of the pre-read data as the target application is continuously used by the user group.
[0147] In one implementation, the target user behavior data and target page screenshot corresponding to the i-th time can be added to the incremental sample pool as incremental samples; then, the incremental samples newly added in the current period are periodically obtained from the incremental sample pool; and the prediction model is updated with the incremental samples newly added in the current period as training samples and the corresponding actual read data sequence as the ground truth.
[0148] Based on the above, the prediction model can be dynamically updated using real-time user behavior data and page screenshots acquired online during its deployment. In specific implementation, the prediction model can be updated periodically. Thus, whenever the difference between the pre-read data sequence and the corresponding actual read data sequence is greater than the target difference, the corresponding target user behavior data and target page screenshots can be added as incremental samples to the incremental sample pool.
[0149] Specifically, an index table can be constructed for the incremental sample pool. The index table can record the index of the incremental samples added in the current period. In this way, whenever the prediction model needs to be updated, the incremental samples added in the current period can be determined through the index table, and the prediction model can be updated using the incremental samples added in the current period as training samples.
[0150] For example, if the prediction model is updated weekly, then at the beginning of a new week, such as every Sunday, the incremental samples added from Monday to the present time can be retrieved and input into the prediction model. Through the training process described above, the prediction model is continuously trained to obtain the updated prediction model.
[0151] For example, if the prediction model is updated weekly, at the start of a new week, such as every Sunday, the incremental samples added from Monday to the present can be retrieved and merged into a full training sample set. This full training sample set includes all incremental samples from the current point in time to a point six months or a year ago, or it can be an existing base training sample set plus a set of incremental samples over a certain period. Then, the training samples in the full training sample set are input into the prediction model, and the prediction model is continuously trained through the above training process to obtain the updated prediction model. Compared to the previous training method, this training method can minimize the model's decay rate in specific scenarios and improve its generalization ability.
[0152] In this way, the updated prediction model can be used to predict the read data for the target application.
[0153] Of course, in some implementations, the prediction model can also be evaluated. Specifically, the evaluation process can be as described in related technologies, such as constructing an evaluation dataset, inputting the evaluation dataset into the prediction model for inference, and judging whether the prediction result (pre-read data sequence) output by the prediction model meets the target indicator. If it does, the prediction model can be determined to be ready for online operation.
[0154] Accordingly, each time the prediction model is updated using incremental samples, the updated prediction model is evaluated to determine whether it is better in terms of the target metric. If so, the updated prediction model can be launched as the latest version of the model. If not, the latest version of the prediction model is not released, and the prediction model before the update continues to run online.
[0155] The target metrics may include the average accuracy of the prediction, the recall rate, and the coverage of the prediction range.
[0156] Combination Figure 1 The hardware and software environment diagram shown illustrates that, when using a predictive model to determine the pre-read data, the predictive model can be deployed on a second server or on the terminal running the target application. The mode where the predictive model on the second server determines the pre-read data can be called server mode, and the mode where the predictive model on the terminal determines the pre-read data can be called client mode.
[0157] It's worth noting that in client mode, since the terminal itself determines the pre-read data, there's no need to send page screenshots and user behavior data to a second server. This avoids consuming network resources and relying on network bandwidth, thus eliminating the need for remote pre-read data determination and improving efficiency. In server mode, because the server's computing power is greater than the terminal's, it avoids consuming the terminal's computing resources, reducing performance consumption and ensuring longer battery life.
[0158] Reference Figure 6a and Figure 6b As shown, Figure 6a The diagram shows the hardware and software environment in server mode. Figure 6b The diagram illustrates the hardware and software environment in client mode. From... Figure 6a and Figure 6b It can be seen that, in addition to the prediction model, it also includes a first component 601 related to determining the pre-read data and a second component 602 related to the iterative update of the prediction model;
[0159] Among them, reference Figure 6a and Figure 6b As shown, the first component 601 may include a packet separation component, a log filtering component, an alignment component, and a preprocessing component. The second component 602 may include an incremental sample mining component, a database component, an update component, and an evaluation component.
[0160] like Figure 6a As shown, in server mode, the first component 601, the second component 602, and the prediction model are all deployed on the second server, as follows: Figure 6bAs shown, in client mode, the first component 601 and the prediction model are deployed on the terminal, while the second component 602 is deployed on the second server.
[0161] The terminal can choose to enter server mode or client mode based on its own performance configuration parameters. Of course, the terminal can also switch between server mode and client mode based on its own performance configuration parameters during use.
[0162] In practice, the current performance configuration parameters of the terminal running the target application can be obtained. If the current performance configuration parameters meet the target conditions, multiple page screenshots and user behavior data are sent to the prediction model configured in the terminal to obtain the pre-read data to be read next. If the current performance configuration parameters do not meet the target conditions, multiple page screenshots and user behavior data are sent to a second server to obtain the pre-read data to be read next.
[0163] In this embodiment, the performance configuration parameters can reflect the hardware configuration, software configuration, and operating system configuration of the terminal, thereby reflecting the overall performance of the terminal. Of course, the performance of the terminal will change dynamically as other applications are continuously run and more data is stored. Therefore, the current performance configuration parameters can reflect the situation in which the hardware and software carrying capacity of the terminal is consumed by the current applications and stored data.
[0164] The target conditions can be any combination of one or more conditions, such as the operating system being the target version, the terminal's CPU utilization being lower than the target utilization, and the terminal's remaining memory capacity being no less than the target capacity. The more target conditions included, the higher the performance configuration parameters of the terminal need to meet in order to utilize the prediction model configured on the terminal for predicting the pre-read data.
[0165] Of course, in some embodiments, the decision to deploy the prediction model on the terminal can be made based on the terminal's current performance configuration parameters when the target application is installed. For example, if the current performance configuration parameters meet the target conditions, the prediction model can be deployed on the terminal; otherwise, it will not be deployed.
[0166] Correspondingly, during the use of the target application, since the terminal can be dynamically switched between client mode and server mode according to the current performance configuration parameters, the prediction of the pre-read data is adapted to the terminal's own computing power.
[0167] Among them, for Figure 6a and Figure 6b The first and second components shown will be described separately:
[0168] In the first component, the output of the packet separation component is connected to the log filtering component and the alignment component. The output of the log filtering component is connected to the input of the alignment component. The output of the alignment component is connected to the input of the preprocessing component. The output of the preprocessing component is used to input preprocessed page screenshots and user behavior data into the prediction model.
[0169] The second component includes an incremental sample mining component, a database component, an update component, and an evaluation component. The input of the incremental sample mining component can be connected to the output of the alignment component and the output of the prediction model. It is used to receive the read data sequence and page screenshot output by the alignment component, as well as the pre-read data determined by the prediction model, such as the pre-read data determined in the previous time, so as to compare the difference with the read data sequence output by the alignment component this time.
[0170] The output of the incremental sample mining component is connected to the database component to store the read data sequence and page screenshots output by the alignment component, as well as the pre-read data determined by the prediction model, into the database; the update component is connected to the database to read the new incremental samples when there are new incremental samples in the database, and to update the prediction model using the new incremental samples; the evaluation component is used to evaluate the prediction model.
[0171] The second component 602 is deployed in the second server. The prediction model in the second server is updated through the second component 602. When the target indicator is determined to be improved through evaluation, the prediction model can be sent to the terminal so that the terminal can deploy the latest version of the prediction model.
[0172] It should be noted that in server mode, the path from the target application to the preprocessing component is to transmit page screenshots in the form of short videos. That is, multiple page screenshots are encoded into videos and then transmitted to the preprocessing component. After that, the preprocessing component decodes them to obtain multiple page screenshots.
[0173] Below, in conjunction with Figure 6a As shown, taking the use of a game app on a mobile terminal as an example, the overall process of the data reading method of this application is introduced:
[0174] S1: During game runtime, the display page of the current scene is sampled at a preset frequency. The NvidiaGameStream interface is called to obtain the currently cached image frames from the display buffer of the GPU video memory. Each extracted image frame is then adjusted in terms of orientation and size and marked with a timestamp. The processed image frames are then encoded into video. The video is then truncated into a short video A of 10-30 seconds and sent to the pre-reading module. In this way, the image frames in short video A are the page screenshots required for pre-reading.
[0175] S2: The file management module obtains the read data log of the target application. The read data log includes multiple read data sequences, each with its own corresponding timestamp, and sends them to the pre-read module.
[0176] S3: The pre-reading module finds the read data sequence that matches the time period (start timestamp → end timestamp) from the read data log based on the time range of short video A, and then packages it into a log packet A and sends it to the data packet separation component in the second server.
[0177] S4: The packet separation component separates log packet A into a short video A and several read data sequences; and sends short video A to the alignment module and several read data sequences to the log filtering component;
[0178] S5: The log filtering component checks for duplicate read data sequences among several received read data sequences and removes duplicates; after completing the missing read data sequences for a certain time period, it sends the processed read data sequences to the alignment component.
[0179] S6: The alignment component aligns the time of each image frame in short video A with the time of the read data sequence again, packages the aligned short video A and the read data sequence into data group B, sends a copy of data group B to the incremental sample mining component, and sends data group B to the preprocessing component.
[0180] S7: The preprocessing component separates the received data group B into short video A and read data sequence, decodes short video A to obtain several page screenshots, and finds matching page screenshots based on the timestamps of the read data sequence to achieve re-alignment of the read data sequence and page screenshots.
[0181] Then, multiple page screenshots and their corresponding read data sequences are sent to the prediction model for inference, and the target application of the prediction model is identified in the pre-read data to be read next.
[0182] S8: The second server sends the identifier of the next read data to the read module.
[0183] S9: The pre-read module encapsulates a data download request based on the identifier of the pre-read data to be read next, and sends the data download request to the first server.
[0184] S10: The pre-read module receives the pre-read data returned by the first server and stores the pre-read data in the terminal's external storage.
[0185] S11: When the next read request from the target application arrives, determine the data required for the read request. If the data required for the read request has already been stored in external storage, read it from external storage. If the data required for the read request only exists in external storage, construct a new data download request for the remaining data that does not exist in external storage, and obtain the remaining data from the first server.
[0186] For details on updating the prediction model, please refer to the description of the above embodiments; further illustrative examples will not be provided here.
[0187] Based on the same inventive concept, this application also provides a data reading device, referring to... Figure 7 As shown, a schematic diagram of the data reading device is presented, such as... Figure 7 As shown, it includes the following modules:
[0188] The data acquisition module 701 is used to acquire multiple page screenshots of the target application up to the current moment and user behavior data; wherein, the page screenshots are obtained by taking screenshots of the display page of the target application;
[0189] The data prediction module 702 is used to determine the pre-read data that the target application will read next based on multiple screenshots of the page and the user behavior data.
[0190] Download module 703 is used to download the pre-read data from the first server and store the pre-read data locally so that when the next read request of the target application hits the pre-read data, the pre-read data is read from the local storage.
[0191] Optionally, the user behavior data includes multiple read data sequences, and the device further includes:
[0192] An alignment module is used to align multiple page screenshots and multiple read data sequences based on the time of each of the multiple page screenshots and the time of each of the multiple read data sequences.
[0193] The user behavior data includes multiple read data sequences. The data prediction module 702 includes:
[0194] An attention score determination unit is used to determine the attention score between each page screenshot and multiple read data sequences based on each aligned page screenshot and the corresponding read data sequence.
[0195] A prediction unit is used to determine, based on the attention score, the target application to be read in the next pre-read data.
[0196] Optionally, the data prediction module 702 includes:
[0197] The input unit is used to input multiple page screenshots and user behavior data into the prediction model to obtain the pre-read data that the target application will read next time.
[0198] The prediction model is obtained by training the target neural network with multiple joint training samples as input and the actual read data samples corresponding to each joint training sample as the true value.
[0199] Each of the joint training samples includes multiple page screenshot samples and user behavior data samples, and the actual read data samples are the data actually read by the target application.
[0200] Optionally, the device further includes:
[0201] The first data sequence acquisition module is used to acquire the actual read data sequence of the i-th actual read and the corresponding pre-read data sequence of the i-th read when the target application reads data for the i-th time; where i is an integer greater than or equal to 1;
[0202] The second data sequence acquisition module is used to acquire the target user behavior data and target page screenshot on which the determination of the i-th corresponding pre-read data sequence is based when the difference between the actual read data sequence and the pre-read data sequence exceeds the target difference.
[0203] The model update module is used to update the prediction model based on the target user behavior data, the target page screenshot, and the actual read data sequence.
[0204] Optionally, the device further includes:
[0205] The sample addition module is used to add the target user behavior data and target page screenshot corresponding to the i-th time as incremental samples to the incremental sample pool;
[0206] The model update module includes:
[0207] The sample update unit is used to periodically obtain newly added incremental samples from the incremental sample pool in the current period;
[0208] The model update unit is used to update the prediction model by taking the incremental samples added in the current period as input and the corresponding actual read data sequence as the truth value.
[0209] Optionally, the user behavior data sample includes multiple read data sequence samples, and the prediction model is trained in the following manner:
[0210] Obtain the first feature vector corresponding to each of the multiple page screenshot samples and the second feature vector corresponding to each of the multiple read data sequence samples;
[0211] By concatenating the first feature vector and the second feature vector, a joint vector is obtained;
[0212] Based on the joint vector, the pre-read data sequence output by the target neural network is obtained;
[0213] Based on the pre-read data sequence and the actual read data samples, the parameters of the target neural network are updated multiple times to obtain the prediction model.
[0214] Optionally, the device further includes:
[0215] The configuration parameter acquisition module is used to acquire the current performance configuration parameters of the terminal running the target application;
[0216] Data prediction module 702 includes:
[0217] The first prediction mode unit is used to send the multiple page screenshots and the user behavior data to the prediction model configured in the terminal when the current performance configuration parameters meet the target conditions, so as to obtain the pre-read data to be read next.
[0218] The second prediction mode unit is used to send the multiple page screenshots and the user behavior data to the second server when the current performance configuration parameters do not meet the target conditions, so as to obtain the pre-read data to be read next.
[0219] Optionally, the device further includes:
[0220] The data packet acquisition module is used to acquire the startup package and startup image package of the target application in advance when the target application is not installed; wherein, the startup image package includes the startup data of the target application;
[0221] The application startup module is used to, after starting the target application through the startup runtime package, read the data corresponding to the read request from the startup image package and / or the first server in response to the read request of the target application; wherein, the first server includes all the original data of the target application.
[0222] It should be noted that the device embodiments are similar to the method embodiments, so the description is relatively simple. For relevant details, please refer to the method embodiments.
[0223] This application also discloses an electronic device, including a memory 1101, a processor 1102, and a computer program stored in the memory 1101 and executable on the processor 1102. When executed by the processor 1102, the data reading method, apparatus, device, and medium described above are implemented.
[0224] This application also discloses a computer-readable storage medium that stores a computer program that causes a processor to execute the data reading method, apparatus, device, and medium described in this application.
[0225] This application also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the data reading method, apparatus, device, and medium described above.
[0226] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0227] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0228] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0229] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0230] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0231] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0232] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0233] The above provides a detailed description of a data reading method, apparatus, device, medium, and product provided in this application. 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 method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data reading method, characterized in that, The method includes: The system acquires multiple page screenshots and user behavior data of the target application up to the current moment; wherein the page screenshots are obtained by taking screenshots of the displayed page of the target application; and the user behavior data includes multiple read data sequences. Based on the time of each of the multiple page screenshots and the time of each of the multiple read data sequences, the multiple page screenshots and the multiple read data sequences are aligned; Based on multiple screenshots of the page and the user behavior data, determine the pre-read data that the target application needs to read next; The pre-read data is downloaded from the first server and stored locally so that when the next read request of the target application hits the pre-read data, the pre-read data is read from the local storage. The determination of the pre-read data to be read by the target application next time, based on multiple page screenshots and user behavior data, includes: Based on each aligned page screenshot and the corresponding read data sequence, determine the attention score between each page screenshot and the multiple read data sequences; Based on the attention score, the target application is determined in the next read of pre-read data.
2. The method according to claim 1, characterized in that, Based on multiple screenshots of the page and the user behavior data, the pre-read data to be read by the target application in the next iteration is determined, including: Multiple screenshots of the page and user behavior data are input into the prediction model to obtain the pre-read data that the target application will read next time. The prediction model is obtained by training the target neural network with multiple joint training samples as input and the actual read data samples corresponding to each joint training sample as the true value. Each of the joint training samples includes multiple page screenshot samples and user behavior data samples, and the actual read data samples are the data actually read by the target application.
3. The method according to claim 2, characterized in that, The method further includes: When the target application issues the i-th read request, obtain the actual read data sequence of the i-th actual read and the pre-read data sequence of the i-th read; where i is an integer greater than or equal to 1; If the difference between the actual read data sequence and the pre-read data sequence exceeds the target difference, obtain the target user behavior data and target page screenshot on which the pre-read data sequence for the i-th read is determined; The prediction model is updated based on the target user behavior data, the target page screenshot, and the actual read data sequence.
4. The method according to claim 3, characterized in that, The method further includes: The target user behavior data and target page screenshot corresponding to the i-th read request are used as incremental samples and added to the incremental sample pool; Based on the target user behavior data, the target page screenshot, and the actual read data sequence, the prediction model is updated, including: Periodically retrieve newly added incremental samples from the incremental sample pool within the current period; The prediction model is updated using the incremental samples added in the current period as input and the corresponding actual read data sequence as the truth value.
5. The method according to claim 2, characterized in that, The user behavior data sample includes multiple read data sequence samples, and the prediction model is trained in the following way: Obtain the first feature vector corresponding to each of the multiple page screenshot samples and the second feature vector corresponding to each of the multiple read data sequence samples; By concatenating the first feature vector and the second feature vector, a joint vector is obtained; Based on the joint vector, the pre-read data sequence output by the target neural network is obtained; Based on the pre-read data sequence and the actual read data samples, the parameters of the target neural network are updated multiple times to obtain the prediction model.
6. The method according to claim 2, characterized in that, The method further includes: Obtain the current performance configuration parameters of the terminal running the target application; Based on multiple screenshots of the page and the user behavior data, the pre-read data to be read by the target application in the next iteration is determined, including: If the current performance configuration parameters meet the target conditions, the multiple page screenshots and the user behavior data are sent to the prediction model configured in the terminal to obtain the pre-read data to be read next. If the current performance configuration parameters do not meet the target conditions, the multiple page screenshots and the user behavior data are sent to the second server to obtain the pre-read data to be read next.
7. The method according to any one of claims 1-6, characterized in that, The method includes: Before the target application is installed, obtain the startup package and startup image package of the target application; wherein, the startup image package includes the startup data of the target application; After the target application is launched via the startup package, in response to a read request from the target application, data corresponding to the read request is read from the startup image package and / or the first server; wherein, the first server includes all the original data of the target application.
8. A data reading device, characterized in that, The device includes: The data acquisition module is used to acquire multiple page screenshots and user behavior data of the target application up to the current moment; wherein, the page screenshots are obtained by taking screenshots of the display page of the target application; and the user behavior data includes multiple read data sequences. An alignment module is used to align multiple page screenshots and multiple read data sequences based on the time of each of the multiple page screenshots and the time of each of the multiple read data sequences. The data prediction module is used to determine the pre-read data that the target application needs to read next, based on multiple screenshots of the page and the user behavior data. The download module is used to download the pre-read data from the first server and store the pre-read data locally, so that when the next read request of the target application hits the pre-read data, the pre-read data is read from the local storage. The data prediction module includes: An attention score determination unit is used to determine the attention score between each page screenshot and multiple read data sequences based on each aligned page screenshot and the corresponding read data sequence. A prediction unit is used to determine, based on the attention score, the target application to be read in the next pre-read data.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executed, implements the data reading method as described in any one of claims 1-7.
Citation Information
Patent Citations
System security method and device, computer device and storage medium
CN109325335A
Map scene preloading method, model training method, equipment and storage medium
CN111729305A