WO2019028977A1 - Data preloading method and system - Google Patents

Data preloading method and system Download PDF

Info

Publication number
WO2019028977A1
WO2019028977A1 PCT/CN2017/102720 CN2017102720W WO2019028977A1 WO 2019028977 A1 WO2019028977 A1 WO 2019028977A1 CN 2017102720 W CN2017102720 W CN 2017102720W WO 2019028977 A1 WO2019028977 A1 WO 2019028977A1
Authority
WO
WIPO (PCT)
Prior art keywords
index value
data
terminal
storage area
file
Prior art date
Application number
PCT/CN2017/102720
Other languages
French (fr)
Chinese (zh)
Inventor
殷辉
洪伟
Original Assignee
上海斐讯数据通信技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海斐讯数据通信技术有限公司 filed Critical 上海斐讯数据通信技术有限公司
Publication of WO2019028977A1 publication Critical patent/WO2019028977A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present invention relates to the field of computer technology, and more particularly to a method and system for data preloading.
  • the data in the database is not classified according to the query condition, so that the query efficiency at the time of query is reduced, and when the prior art application is installed, all the data is stored in the RAM, when the user needs to use certain attributes.
  • the data is retrieved, the data of the attribute is searched from the RAM and then the display is loaded. Since a large amount of data is stored in the RAM, the data for finding the attribute takes a long time, and the RAM is occupied a large amount, which reduces the processing performance of the RAM and affects the user experience.
  • the object of the present invention is to provide a data preloading method and system, which can improve the query loading rate when starting an application.
  • the present invention provides a data preloading method, including the steps of: S600 terminal receiving and installing an application; S700, the terminal acquiring a loading command including a first query condition; and S800, the terminal generating a first according to the first query condition
  • the index value is obtained by the terminal according to the first index value, and is loaded into the first storage area.
  • the step S600 includes the following steps: the S100 server acquires a load command including the first query condition and the second query condition; the second query condition includes the first a query condition; the server of S200 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes The first index value; S300, the server classifies the data information according to the second index value, to obtain a corresponding data file; and the server in S400 names the data file according to the second index value, and classifies the storage file a data file; the server in S500 sends an application file to the terminal.
  • step S600 includes the following steps: S610: the terminal receives the application file sent by the server; S620, the terminal installs the application in a second storage area according to the application file, and The first storage area runs the application script.
  • the step S900 includes the following steps: the S910 obtains a corresponding second index value according to the first index value, and sends the first index value and the corresponding second index value to the server; S930: The server receives the first index value and the corresponding second index value, and searches for a corresponding data file according to the corresponding second index value; S930, the server according to the first index value Finding the target data in the corresponding data file, and sending the target data to the terminal; S940, the terminal receives the target data, and displays the target data in the first storage area, and displays While loading the display, the target data is classified and saved to the second storage area according to the corresponding second index value.
  • step S500 includes the following steps: S510: the server sends the application file and the data file to the terminal; the step S600 further includes the following steps: S630: the terminal receives the An application file and the data file; the terminal, according to the application file, installing the application in a second storage area, and running the application script in the first storage area; And saving the data file to the second storage area according to the second index value.
  • the step S900 further includes the following steps: the terminal: S950 obtains a corresponding second index value according to the first index value; and S960, the terminal, according to the corresponding second index value, from the second storage area Find a corresponding data file; the terminal described in S970 is according to the first An index value acquires the target data in the corresponding data file; and the terminal displays the target data in the first storage area to be loaded and displayed, and displays the target data according to the loading display
  • the corresponding second index value classification is saved to the third storage area.
  • step S900 further includes the following steps: S990: the terminal saves the remaining loading data to the third storage area according to the corresponding second index value; the remaining loading data is the data file except the Data outside the target data.
  • the invention also provides a data preloading system, comprising: a terminal and a server; the terminal comprises: a receiving module, receiving an application file; installing a module, installing an application; and the first obtaining module acquiring the first query condition a first generating module, the first query condition generates a first index value; the first storage area is configured to load data; and the control module acquires target data according to the first index value and loads the a first storage area; the server includes: a second obtaining module, acquiring a loading command including the first query condition and the second query condition; the second query condition includes the first query condition; and the second generating module Generating the first index value according to the first query condition, and generating, by the second query condition, the second index value according to the second query condition; the second index value includes the first index value; a classifying module, classifying data information according to the second index value, to obtain a corresponding data file; and saving a module, respectively, according to the second index value Said data file, and storing the classified data files; a
  • the second sending module further sends the application file and the data file to the terminal;
  • the receiving module further receives the application file and the data file;
  • the installation module And installing, according to the application file, the application in a second storage area, and running the application script in the first storage area;
  • the terminal further includes a second storage area, according to the second index value Saving the data file to the second storage area.
  • control module includes: a processing unit, obtaining a corresponding second index value according to the first index value; and a searching unit, searching for corresponding data from the second storage area according to the corresponding second index value a acquiring unit, acquiring the target data in the corresponding data file according to the first index value; loading unit, placing the target data in the first The storage area is loaded and displayed; and the control unit saves the target data to the third storage area according to the corresponding second index value while loading the display.
  • the invention enables the application display interface to display the target data, which can speed up the startup of the application and achieve the effect of optimizing the RAM.
  • the invention solves the problem of loading memory consumption, APK size control and the time-consuming problem of the first startup of the application, so that the application loads the target data faster when the application starts, and the memory space is occupied less and the APK file is smaller.
  • FIG. 1 is a flow chart of an embodiment of a method of data preloading according to the present invention
  • FIG. 2 is a flow chart of another embodiment of a method of data preloading according to the present invention.
  • FIG. 3 is a flow chart of another embodiment of a method of data preloading according to the present invention.
  • FIG. 4 is a flow chart of another embodiment of a method of data preloading according to the present invention.
  • FIG. 5 is a flow chart of another embodiment of a method of data preloading according to the present invention.
  • FIG. 6 is a schematic structural diagram of an embodiment of a data preloading system according to the present invention.
  • FIG. 7 is a block diagram showing another embodiment of a data preloading system of the present invention.
  • RAM Random Access Memory
  • main memory main memory
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • Cache is generally used for RAM memory to store temporary data. The content stored after power off will disappear.
  • the cache is a temporary file swap area. Putting the most commonly used files from the memory and putting them in the cache is like putting the tools and materials on the workbench. This is more convenient than going to the warehouse.
  • the first storage area is a RAM
  • the second storage area is a ROM
  • the third storage area is a cache or a database.
  • FIG. 1 is an embodiment of a method for data preloading according to the present invention, including:
  • the S600 terminal receives and installs the application
  • S700 The terminal acquires a load command that includes a first query condition.
  • the terminal of S800 generates a first index value according to the first query condition
  • the terminal acquires target data according to the first index value and loads the data into the first storage area.
  • the application terminal of the mobile phone, the computer, the tablet, and the like is connected from the server through the network.
  • Obtain an installation package of the application thereby installing the corresponding application, obtaining a loading command of the user, generating a first index value according to the first query condition in the loading command, and acquiring the target data according to the first index value and preloading to the first A storage area, where the first storage area is RAM.
  • all data is pre-stored in the RAM, but all data is stored in the RAM.
  • storing the larger data to the RAM increases the waiting time. Second, it will cause all the data to be loaded before it can be displayed.
  • the present invention obtains the loading command of the first query condition in real time, obtains the first index value according to the first query condition, and obtains the target data according to the first index value for preloading, so that the user can select according to the query request or
  • the performance of the RAM so that when the application display interface displays the target data, it can speed up the application startup speed and optimize the RAM.
  • FIG. 2 is another embodiment of a method for data preloading according to the present invention, including:
  • the S100 server acquires a load command including the first query condition and the second query condition; the second query condition includes the first query condition;
  • the server of S200 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes the first index value Index value
  • the server classifies the data information according to the second index value, to obtain a corresponding data file
  • the server separately names the data file according to the second index value, and classifies and stores the data file;
  • the server sends an application file to the terminal
  • the terminal receives the application file sent by the server
  • the terminal installs the application in a second storage area according to the application file, and runs the application script in the first storage area;
  • S700 The terminal acquires a load command that includes a first query condition.
  • the terminal of S800 generates a first index value according to the first query condition
  • S910 The terminal, according to the first index value, obtains a corresponding second index value, and sends the first index value and the corresponding second index value to the server;
  • S920 The server receives the first index value and the corresponding second index value, and searches for a corresponding data file according to the corresponding second index value;
  • S930 The server searches for the target data in the corresponding data file according to the first index value, and sends the target data to the terminal;
  • the terminal receives the target data, loads and displays the target data in the first storage area, and saves the target data according to the corresponding second index value to the loading display.
  • the second storage area The terminal receives the target data, loads and displays the target data in the first storage area, and saves the target data according to the corresponding second index value to the loading display.
  • the second storage area The second storage area.
  • the present invention separately stores and stores different data files according to the second index value by using the server, and then stores the data files in the server's own storage, only the user needs
  • the application file is packaged in the APK package, and the server sends the APK data packet to the terminal, and the terminal decompresses the packaged APK data package.
  • the user needs to use the application, the first index value is obtained, the corresponding second index value is obtained according to the first index value, and then the corresponding data file is found from the server's storage according to the corresponding second index value.
  • the target data is searched and acquired from the corresponding data file, and then the server sends the target data together to the terminal through the network in real time, and the terminal receives the target data sent by the server, and then loads the data in the terminal's RAM.
  • the data processing method of the present invention can improve the loading speed of the Android platform application, and optimize the memory occupancy and the size of the APK file to improve the user experience.
  • the invention solves the problem of loading memory consumption, the size control of the APK and the time-consuming problem of the first startup of the application, so that the application loads the target data faster when the application starts, and the memory space is occupied less and the APK file is smaller.
  • the invention splits the preloaded data, so that when the application is started for the first time, only the target data needs to be loaded before the display interface, so the application startup speed and the memory usage can be accelerated.
  • FIG. 3 is another embodiment of a method for data preloading according to the present invention, including:
  • the S100 server acquires a load command including the first query condition and the second query condition; the second query condition includes the first query condition;
  • the server of S200 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes the first index value Index value
  • the server classifies the data information according to the second index value, to obtain a corresponding data file
  • the server separately names the data file according to the second index value, and classifies and stores the data file;
  • the server sends the application file and the data file to the terminal
  • the terminal receives the application file and the data file sent by the server;
  • the terminal installs the application in a second storage area according to the application file, and runs the application script in the first storage area;
  • S650 The terminal saves the data file to the second storage area according to the second index value
  • S700 The terminal acquires a load command that includes a first query condition.
  • the terminal of S800 generates a first index value according to the first query condition
  • S910 The terminal acquires the target data in the corresponding data file according to the first index value
  • the terminal loads and displays the target data in the first storage area, and saves the target data to the third storage area according to the corresponding second index value while loading the display.
  • the server first needs to classify and classify a large amount of irregular data, and the present invention performs data acquired on the network or data stored by the server itself according to the obtained second query condition.
  • the data written by the manager is classified and stored, and generated in real time. Name the saved data file with the second index value to speed up the search or search.
  • APK application installation package
  • the preset data file in the APK can be binary code.
  • the file is parsed and read into the memory, so that the data can be directly queried and displayed, and the cache file or database can be generated. The supply is used directly at the next startup.
  • the above two methods are feasible in the case of a small amount of data, but in the case of a large amount of data, there are obvious drawbacks.
  • the database file is used in mode 1. When the amount of data is large, the file must be large. At this time, the APK is inevitably large, affecting the user experience, and it is time-consuming to copy the database file when starting the application.
  • the use of binary files in mode 2 can relatively eliminate redundant data, and solve the problem that the APK is too large, and this method needs to load all the data into the memory when the application is loaded, which occupies a large amount of memory, and defines the virtual machine memory. Smaller devices can easily reach the upper limit and exit with Out Of Memory (OOM), and do not solve the time-consuming problem.
  • OOM Out Of Memory
  • the invention separately stores and stores different data files according to the second index value by the server side, and then packages the data files together with the application files in the APK package, and the server sends the APK data packet to the terminal, and the terminal will package the data.
  • the APK packet is decompressed, and the data file is saved to the second storage area of the terminal, where the second storage area is ROM.
  • the first index value is obtained, and the corresponding second index value is obtained according to the first index value, and then matched with the second index value generated by the server according to the corresponding second index value, according to the matching.
  • the corresponding data file is found from the ROM, and the target data is searched and acquired from the corresponding data file according to the first index value. Because only the target data is acquired, the loading of the Android platform application can be improved by the data processing method of the present invention. Speed, and optimize the memory footprint and the size of the APK file, improve User experience.
  • the step S900 further includes the following steps:
  • S990 The terminal saves the remaining loading data to the third storage area according to the corresponding second index value; the remaining loading data is data in the data file other than the target data.
  • the late user can quickly call the remaining loading data to load and display the target data when the user uses the application.
  • the application's loading speed improves the user experience.
  • the calendar program is required to specify the calendar data between 1900 and 2100 as an example, and the calendar data includes the date and the data information of Yihe. As shown in Figure 4, the steps are included:
  • the first query condition is the date.
  • the direct splicing algorithm is used to calculate the index value.
  • the calculated first index value is 20170624 integer type data (if it is other types)
  • the hash algorithm you can use the hash algorithm to calculate the hash value as an index value, not to mention here).
  • the first 4 bits of the first index value are taken to generate a second index value, for example, the first index value is 20170624, and the first 4 bits get 2017 as the second index value.
  • the second index value calculated in S12 is used as a file name of the data file, and the data classification is saved into a plurality of corresponding data files.
  • the calendar data of the 200 years between 1900 and 2100 can be divided into 200 data files, and compressed and packaged into APK packets with the application files and sent to the terminal.
  • the steps are included:
  • the data packet generated in step S13 is decompressed into the application data directory.
  • the terminal After receiving the APK data packet, the terminal decompresses the APK data packet, installs the application according to the application file, and saves the data file to the ROM according to the corresponding second index value.
  • the calendar of the current month is displayed and the calendar information of the day is displayed, so at least the data of the day is required, and the first index value is calculated according to the date of the day of June 24, 2017, and the same step S11 is required. Algorithm, get the first index value 20170624.
  • the second index value is obtained according to the same algorithm as S12, and the data file with the file name 2017 is found.
  • the child thread is created, and the target data loaded by the S24 is asynchronously saved as a cache file in the child thread or stored in the database, and the remaining data of the remaining 199 years is loaded, and saved as a cache file or a cache database for the next application. Used at startup.
  • the loading speed of applications such as the Android platform and the IOS application platform can be improved, and the memory usage and the size of the APK file are optimized, and the user experience is improved.
  • the present invention provides an embodiment of a data preloading system 1000, including: a terminal 100 and a server 200; the terminal 100 includes:
  • the receiving module 110 receives the application file
  • the first obtaining module 130 acquires a load command including the first query condition
  • the first generating module 140 generates the first index value by using the first query condition
  • the control module 160 acquires target data according to the first index value and loads it into the first storage area 150;
  • the server 200 includes:
  • the second obtaining module 210 acquires a loading command including the first query condition and the second query condition; the second query condition includes the first query condition;
  • the second generation module 220 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes the First index value;
  • the classification module 230 classifies the data information according to the second index value to obtain a corresponding data file
  • the saving module 240 names the data files according to the second index value, and stores the data files in categories;
  • the second sending module 250 sends the application file to the terminal 100.
  • the server 200 generates a data file, and then the terminal 100 obtains a loading command of the first query condition in real time, and obtains a first index value according to the first query condition, thereby acquiring target data according to the first index value for preloading.
  • the target data can be acquired in a targeted and purposeful manner according to the user's query needs or usage requirements, thereby pre-loading the target data to the RAM, so that the data loaded into the RAM can be reduced relative to the prior art.
  • the size of the RAM reduces the load on the RAM and improves the performance of the RAM, so that when the application display interface displays the target data, it can speed up the application startup speed and optimize the RAM.
  • the present invention provides another embodiment of a data preloading system 1000.
  • the other parts of this embodiment are the same as the previous embodiment;
  • the second sending module 250 further sends the application file and the data file to the terminal 100;
  • the receiving module 110 further receives the application file and the data file
  • the installation module 120 installs the application program in the second storage area 170 according to the application file, and runs the application script in the first storage area 150;
  • the terminal 100 further includes a second storage area 170, and saves the data file to the second storage area 170 according to the second index value;
  • the terminal further includes a third storage area 180, and saves the data file to the third storage area 180 according to the second index value;
  • control module 160 includes:
  • the processing unit 161 is configured to obtain a corresponding second index value according to the first index value
  • the searching unit 162 searches for the corresponding data file from the second storage area 170 according to the corresponding second index value
  • the obtaining unit 163 is configured to acquire the target data in the corresponding data file according to the first index value
  • the loading unit 164 is configured to load and display the target data in the first storage area 150;
  • the control unit 165 saves the target data to the third storage area 180 according to the corresponding second index value while loading the display.
  • the data file and the loading target data are divided into two parts, wherein the generation of the data file is completed by the server 200, and the loading of the target data is completed by the terminal 100.
  • the server 200 classifies the data into a plurality of data files. The number of data files is determined according to the size and type of the data.
  • the server 200 names each data file according to the second index value, wherein the data file is generated by the server 200 according to the data.
  • the first query condition is used, and the first index value is obtained by using the direct splicing method or the hash algorithm in the method embodiment, and then the first index value is calculated by the method in the method embodiment to obtain the second index value.
  • the range of the second index value needs to be within a reasonable range, and the second index value is required to include the first index value, where the range determines the number of data file partitions. Sorting the data into the second index value, respectively generating a data file named with the corresponding second index value, compressing and packaging the application file and all the data files to the terminal 100, and the terminal 100 installs the application, and The data file is stored in its own ROM according to the second index value, and the terminal 100 acquires the first query condition, and generates the first index value by using the same algorithm as the server 200 according to the first query condition, and then according to the first index value and The algorithm of the server 200 generates a second index value, searches for a corresponding data file from the ROM according to the second index value, and then searches for the target data from the corresponding data file, separately loads the target data into the RAM for use, and uses the child.
  • Threads asynchronously store data in a database or cache. If you use caching, you can use a similar method, that is, the data file classification is stored in its own ROM, and the target data is loaded into the cache as needed. Use the child thread to asynchronously load the remaining data files and store the data in a database or cache. In the subsequent use of the application, you can directly read the data in the cache or database.
  • the target data is preloaded before all data is loaded to provide a better experience for the user and reduce the waiting time. Otherwise, if the target data of the application is too large, the application that does not use the preloading technology will appear as a blank for a long time, until all the content is loaded before the display can be loaded.
  • the invention can improve the loading speed, can also significantly reduce the occupation of the RAM, reduce the burden of the RAM, and improve the performance of the first storage area, so that when the application display interface displays the target data, the startup speed of the application can be accelerated. Optimize the effect of RAM.
  • the network connection status between the terminal 100 and the server 200 can be determined to check whether the network speed reaches a preset value, and the terminal 100 can use the method of the second embodiment to perform data preloading. If the network speed does not reach the preset value, the terminal 100 can perform preloading of the data using the method of the third embodiment.

Abstract

Provided in the present invention are a data preloading method and system. The method comprises: S600, a terminal receives and installs an application; S700, the terminal acquires a loading command including a first query condition; S800, the terminal generates a first index value according to the first query condition; S900, the terminal acquires target data according to the first index value and loads the target data into a first storage area. According to the present invention, the startup speed of an application is accelerated when starting the application, and at the same time, the loading rate and the user experience are improved.

Description

一种数据预加载的方法和系统Method and system for data preloading 技术领域Technical field
本发明涉及计算机技术领域,尤指一种数据预加载的方法和系统。The present invention relates to the field of computer technology, and more particularly to a method and system for data preloading.
背景技术Background technique
随着信息技术的发展,数据量呈现爆炸式增长的趋势,在平台开发中,经常会涉及到需要展示特定数据的功能,这通常需要从应用程序安装包中加载大量的数据到内存中,并根据加载的数据使用特定条件查询出需要的数据进行展示。而如何在应用启动时加载大量数据并且不影响数据展示成为该功能实现中最核心的问题。With the development of information technology, the amount of data is exploding. In the development of the platform, it is often necessary to display the function of displaying specific data, which usually requires loading a large amount of data from the application installation package into the memory, and According to the loaded data, use the specific conditions to query the required data for display. How to load a large amount of data when the application starts and does not affect the data display becomes the core problem in the implementation of this function.
现有技术中,未将数据库中的数据根据查询条件进行分类,导致查询时的查询效率降低,并且现有技术应用程序安装时,将所有数据储存到RAM中,当用户需要使用某些属性的数据时,才从RAM中遍寻查找到该属性的数据后再加载显示。由于RAM中储存有大量的数据,使得查找该属性的数据耗时较大,而且会RAM占用较大,会降低RAM的处理性能,影响用户的使用体验。In the prior art, the data in the database is not classified according to the query condition, so that the query efficiency at the time of query is reduced, and when the prior art application is installed, all the data is stored in the RAM, when the user needs to use certain attributes. When the data is retrieved, the data of the attribute is searched from the RAM and then the display is loaded. Since a large amount of data is stored in the RAM, the data for finding the attribute takes a long time, and the RAM is occupied a large amount, which reduces the processing performance of the RAM and affects the user experience.
发明内容Summary of the invention
本发明的目的是提供一种数据预加载的方法和系统,实现启动应用时,提升查询加载速率的效果。The object of the present invention is to provide a data preloading method and system, which can improve the query loading rate when starting an application.
本发明提供的技术方案如下:The technical solution provided by the present invention is as follows:
本发明提供一种数据预加载的方法,包括步骤:S600终端接收并安装应用程序;S700所述终端获取包括第一查询条件的加载命令;S800所述终端根据所述第一查询条件生成第一索引值;S900所述终端根据所述第一索引值,获取目标数据并加载至第一储存区域。The present invention provides a data preloading method, including the steps of: S600 terminal receiving and installing an application; S700, the terminal acquiring a loading command including a first query condition; and S800, the terminal generating a first according to the first query condition The index value is obtained by the terminal according to the first index value, and is loaded into the first storage area.
进一步的,所述步骤S600之前包括步骤:S100服务器获取包括所述第一查询条件和第二查询条件的加载命令;所述第二查询条件包括所述第 一查询条件;S200所述服务器根据所述第一查询条件生成所述第一索引值,根据所述第二查询条件将所述第一索引值生成第二索引值;所述第二索引值包括所述第一索引值;S300所述服务器根据所述第二索引值分类数据信息,得到对应的数据文件;S400所述服务器根据所述第二索引值分别命名所述数据文件,并分类储存所述数据文件;S500所述服务器发送应用程序文件至所述终端。Further, the step S600 includes the following steps: the S100 server acquires a load command including the first query condition and the second query condition; the second query condition includes the first a query condition; the server of S200 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes The first index value; S300, the server classifies the data information according to the second index value, to obtain a corresponding data file; and the server in S400 names the data file according to the second index value, and classifies the storage file a data file; the server in S500 sends an application file to the terminal.
进一步的,所述步骤S600包括步骤:S610所述终端接收所述服务器发送的所述应用程序文件;S620所述终端根据所述应用程序文件,在第二储存区域安装所述应用程序,并在所述第一储存区域运行所述应用程序脚本。Further, the step S600 includes the following steps: S610: the terminal receives the application file sent by the server; S620, the terminal installs the application in a second storage area according to the application file, and The first storage area runs the application script.
进一步的,所述步骤S900包括步骤:S910所述终端根据所述第一索引值得到对应的第二索引值,发送所述第一索引值和所述对应的第二索引值至所述服务器;S920所述服务器接收所述第一索引值和所述对应的第二索引值,并根据所述对应的第二索引值查找对应的数据文件;S930所述服务器根据所述第一索引值在所述对应的数据文件中查找所述目标数据,并发送所述目标数据至所述终端;S940所述终端接收所述目标数据,将所述目标数据在所述第一储存区域进行加载显示,并在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至所述第二储存区域。Further, the step S900 includes the following steps: the S910 obtains a corresponding second index value according to the first index value, and sends the first index value and the corresponding second index value to the server; S930: The server receives the first index value and the corresponding second index value, and searches for a corresponding data file according to the corresponding second index value; S930, the server according to the first index value Finding the target data in the corresponding data file, and sending the target data to the terminal; S940, the terminal receives the target data, and displays the target data in the first storage area, and displays While loading the display, the target data is classified and saved to the second storage area according to the corresponding second index value.
进一步的,所述步骤S500包括步骤:S510所述服务器发送所述应用程序文件和所述数据文件至所述终端;所述步骤S600还包括步骤:S630所述终端接收所述服务器发送的所述应用程序文件和所述数据文件;S640所述终端根据所述应用程序文件,在第二储存区域安装所述应用程序,并在所述第一储存区域运行所述应用程序脚本;S650所述终端根据所述第二索引值保存所述数据文件至所述第二储存区域。Further, the step S500 includes the following steps: S510: the server sends the application file and the data file to the terminal; the step S600 further includes the following steps: S630: the terminal receives the An application file and the data file; the terminal, according to the application file, installing the application in a second storage area, and running the application script in the first storage area; And saving the data file to the second storage area according to the second index value.
进一步的,所述步骤S900还包括步骤:S950所述终端根据所述第一索引值得到对应的第二索引值;S960所述终端根据所述对应的第二索引值从所述第二储存区域查找对应的数据文件;S970所述终端根据所述第 一索引值在所述对应的数据文件中获取所述目标数据;S980所述终端将所述目标数据在所述第一储存区域进行加载显示,并在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至第三储存区域。Further, the step S900 further includes the following steps: the terminal: S950 obtains a corresponding second index value according to the first index value; and S960, the terminal, according to the corresponding second index value, from the second storage area Find a corresponding data file; the terminal described in S970 is according to the first An index value acquires the target data in the corresponding data file; and the terminal displays the target data in the first storage area to be loaded and displayed, and displays the target data according to the loading display The corresponding second index value classification is saved to the third storage area.
进一步的,所述步骤S900还包括步骤:S990所述终端将其余加载数据按照对应的第二索引值分类保存至所述第三储存区域;所述其余加载数据为所述数据文件中除所述目标数据外的数据。Further, the step S900 further includes the following steps: S990: the terminal saves the remaining loading data to the third storage area according to the corresponding second index value; the remaining loading data is the data file except the Data outside the target data.
本发明还提供一种数据预加载的系统,包括:终端和服务器;所述终端包括:接收模块,接收应用程序文件;安装模块,安装应用程序;第一获取模块,获取包括第一查询条件的加载命令;第一生成模块,将所述第一查询条件生成第一索引值;第一储存区域,用于加载数据;控制模块,根据所述第一索引值,获取目标数据并加载至所述第一储存区域;所述服务器包括:第二获取模块,获取包括所述第一查询条件和第二查询条件的加载命令;所述第二查询条件包括所述第一查询条件;第二生成模块,根据所述第一查询条件生成所述第一索引值,根据所述第二查询条件将所述第一索引值生成第二索引值;所述第二索引值包括所述第一索引值;分类模块,根据所述第二索引值分类数据信息,得到对应的数据文件;保存模块,根据所述第二索引值分别命名所述数据文件,并分类储存所述数据文件;第二发送模块,发送所述应用程序文件至终端。The invention also provides a data preloading system, comprising: a terminal and a server; the terminal comprises: a receiving module, receiving an application file; installing a module, installing an application; and the first obtaining module acquiring the first query condition a first generating module, the first query condition generates a first index value; the first storage area is configured to load data; and the control module acquires target data according to the first index value and loads the a first storage area; the server includes: a second obtaining module, acquiring a loading command including the first query condition and the second query condition; the second query condition includes the first query condition; and the second generating module Generating the first index value according to the first query condition, and generating, by the second query condition, the second index value according to the second query condition; the second index value includes the first index value; a classifying module, classifying data information according to the second index value, to obtain a corresponding data file; and saving a module, respectively, according to the second index value Said data file, and storing the classified data files; a second sending module, sending the file to the terminal application.
进一步的,所述第二发送模块,还发送所述应用程序文件和所述数据文件至所述终端;所述接收模块,还接收所述应用程序文件和所述数据文件;所述安装模块,根据所述应用程序文件,在第二储存区域安装所述应用程序,并在所述第一储存区域运行所述应用程序脚本;所述终端还包括第二储存区域,根据所述第二索引值保存所述数据文件至所述第二储存区域。Further, the second sending module further sends the application file and the data file to the terminal; the receiving module further receives the application file and the data file; the installation module, And installing, according to the application file, the application in a second storage area, and running the application script in the first storage area; the terminal further includes a second storage area, according to the second index value Saving the data file to the second storage area.
进一步的,所述控制模块包括:处理单元,根据所述第一索引值得到对应的第二索引值;查找单元,根据所述对应的第二索引值从所述第二储存区域查找对应的数据文件;获取单元,根据所述第一索引值在所述对应的数据文件中获取所述目标数据;加载单元,将所述目标数据在所述第一 储存区域进行加载显示;控制单元,在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至第三储存区域。Further, the control module includes: a processing unit, obtaining a corresponding second index value according to the first index value; and a searching unit, searching for corresponding data from the second storage area according to the corresponding second index value a acquiring unit, acquiring the target data in the corresponding data file according to the first index value; loading unit, placing the target data in the first The storage area is loaded and displayed; and the control unit saves the target data to the third storage area according to the corresponding second index value while loading the display.
通过本发明提供的一种数据预加载的方法和系统,能够带来以下至少一种有益效果:The data preloading method and system provided by the present invention can bring at least one of the following beneficial effects:
1)本发明实现启动应用时,加快应用程序的启动速度,同时还能提升加载的速率,提升用户使用体验。1) When the invention is implemented, the startup speed of the application is accelerated, and the loading rate is improved, and the user experience is improved.
2)本发明使得应用程序显示界面显示目标数据时,可以加快应用程序的启动速度,达到优化RAM的效果。2) The invention enables the application display interface to display the target data, which can speed up the startup of the application and achieve the effect of optimizing the RAM.
3)本发明解决了加载内存耗费,APK大小控制以及应用第一次启动的耗时问题,使得应用启动时较快的加载目标数据,并且使得内存空间占用较小以及APK文件较小。3) The invention solves the problem of loading memory consumption, APK size control and the time-consuming problem of the first startup of the application, so that the application loads the target data faster when the application starts, and the memory space is occupied less and the APK file is smaller.
附图说明DRAWINGS
下面将以明确易懂的方式,结合附图说明优选实施方式,对一种数据预加载的方法和系统的上述特性、技术特征、优点及其实现方式予以进一步说明。The above described features, technical features, advantages and implementations of a data preloading method and system will be further described below in a clear and understandable manner in conjunction with the accompanying drawings.
图1是本发明一种数据预加载的方法的一个实施例的流程图;1 is a flow chart of an embodiment of a method of data preloading according to the present invention;
图2是本发明一种数据预加载的方法的另一个实施例的流程图;2 is a flow chart of another embodiment of a method of data preloading according to the present invention;
图3是本发明一种数据预加载的方法的另一个实施例的流程图;3 is a flow chart of another embodiment of a method of data preloading according to the present invention;
图4是本发明一种数据预加载的方法的另一个实施例的流程图;4 is a flow chart of another embodiment of a method of data preloading according to the present invention;
图5是本发明一种数据预加载的方法的另一个实施例的流程图;5 is a flow chart of another embodiment of a method of data preloading according to the present invention;
图6是本发明一种数据预加载的系统的一个实施例的结构示意图;6 is a schematic structural diagram of an embodiment of a data preloading system according to the present invention;
图7是本发明一种数据预加载的系统的另一个实施例的结构示意图。7 is a block diagram showing another embodiment of a data preloading system of the present invention.
具体实施方式Detailed ways
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对照附图说明本发明的具体实施方式。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图,并获得其他的实施方式。 In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the specific embodiments of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without obtaining creative labor, and obtain Other embodiments.
为使图面简洁,各图中只示意性地表示出了与本发明相关的部分,它们并不代表其作为产品的实际结构。另外,以使图面简洁便于理解,在有些图中具有相同结构或功能的部件,仅示意性地绘示了其中的一个,或仅标出了其中的一个。在本文中,“一个”不仅表示“仅此一个”,也可以表示“多于一个”的情形。In order to simplify the drawings, only the parts related to the present invention are schematically shown in the drawings, and they do not represent the actual structure of the product. In addition, in order to make the drawings simple and easy to understand, components having the same structure or function in some of the figures are only schematically illustrated, or only one of them is marked. In the present context, "a" means not only "only one" but also "more than one".
RAM(Random Access Memory-随机存取存储器),是与CPU直接交换数据的内部存储器,也叫主存(内存)。它可以随时读写,而且速度很快,通常作为操作系统或其他正在运行中的程序的临时数据存储媒介。它的特点是易挥发性,即掉电失忆,速度高于ROM,对于手机配置性能起着重要的决定性,另外掉电后,数据被清空,比如手机运行着QQ与其它应用程序,重启手机后,应用程序就没有处于登录状态。RAM (Random Access Memory) is an internal memory that exchanges data directly with the CPU, also called main memory (memory). It can be read and written at any time and is fast, often acting as a temporary data storage medium for operating systems or other running programs. It is characterized by volatility, that is, power loss and memory loss, and the speed is higher than ROM. It plays an important role in the performance of the mobile phone. In addition, after the power is turned off, the data is cleared. For example, the mobile phone runs QQ and other applications, and after restarting the mobile phone, The application is not logged in.
ROM(Read-Only Memory,只读内存),是一种只能读出事先所存数据的固态半导体存储器,其特性是一旦储存资料就无法再将之改变或删除,通常用在不需经常变更资料的电子或电脑系统中,并且资料不会因为断电后信息而丢失,存取速度很低,(较RAM而言)且不能改写,常用于存储各种固定程序和数据。ROM (Read-Only Memory) is a solid-state semiconductor memory that can only read pre-stored data. Its characteristic is that once the data is stored, it can no longer be changed or deleted. It is usually used without changing the data frequently. In electronic or computer systems, and data is not lost due to information after power failure, access speed is very low, (more than RAM) and can not be rewritten, often used to store a variety of fixed programs and data.
缓存(Cache),一般是用于RAM存储器,用于存储临时数据,断电后存储的内容会消失。缓存是临时文件交换区,把最常用的文件从存储器里提出来临时放在缓存里,就像把工具和材料搬上工作台一样,这样会比需要使用再去仓库取更方便。Cache is generally used for RAM memory to store temporary data. The content stored after power off will disappear. The cache is a temporary file swap area. Putting the most commonly used files from the memory and putting them in the cache is like putting the tools and materials on the workbench. This is more convenient than going to the warehouse.
以下所有实施例中,第一储存区域为RAM,第二储存区域为ROM;第三储存区域为缓存或数据库。In all of the following embodiments, the first storage area is a RAM, the second storage area is a ROM, and the third storage area is a cache or a database.
图1是本发明一种数据预加载的方法的一个实施例,包括:1 is an embodiment of a method for data preloading according to the present invention, including:
S600终端接收并安装应用程序;The S600 terminal receives and installs the application;
S700所述终端获取包括第一查询条件的加载命令;S700: The terminal acquires a load command that includes a first query condition.
S800所述终端根据所述第一查询条件生成第一索引值;The terminal of S800 generates a first index value according to the first query condition;
S900所述终端根据所述第一索引值,获取目标数据并加载至第一储存区域。The terminal acquires target data according to the first index value and loads the data into the first storage area.
具体的,本实施例中,手机、电脑、平板等等应用终端通过网络从服务器 获取应用程序的安装包,从而安装相应的应用程序,获取用户的加载命令,从而根据加载命令中的第一查询条件生成第一索引值,再根据第一索引值获取目标数据并预加载至第一储存区域,这里第一储存区域为RAM。现有技术中,将所有数据均预先储存到RAM,然而将所有数据储存到RAM中,一是将容量较大的数据储存至RAM会增加等待时间。二是会导致需要将所有数据加载完成后才能显示,这样会使得终端的应用程序界面会长时间出现空白内容,影响用户的使用体验。不同于现有技术,本发明实时获取第一查询条件的加载命令,根据第一查询条件得到第一索引值,从而根据第一索引值获取目标数据进行预加载,这样能够根据用户的查询需要或使用要求来有针对性的,有目的性的获取目标数据,从而至预先加载目标数据到RAM,这样,能够相对于现有技术,减少了加载至RAM的数据的大小,减轻RAM的负担,提升RAM的性能,从而使得应用程序显示界面显示目标数据时,可以加快应用程序的启动速度,达到优化RAM的效果。Specifically, in this embodiment, the application terminal of the mobile phone, the computer, the tablet, and the like is connected from the server through the network. Obtain an installation package of the application, thereby installing the corresponding application, obtaining a loading command of the user, generating a first index value according to the first query condition in the loading command, and acquiring the target data according to the first index value and preloading to the first A storage area, where the first storage area is RAM. In the prior art, all data is pre-stored in the RAM, but all data is stored in the RAM. First, storing the larger data to the RAM increases the waiting time. Second, it will cause all the data to be loaded before it can be displayed. This will cause the terminal's application interface to appear blank for a long time, which will affect the user's experience. Different from the prior art, the present invention obtains the loading command of the first query condition in real time, obtains the first index value according to the first query condition, and obtains the target data according to the first index value for preloading, so that the user can select according to the query request or The use of the target to obtain the target data in a targeted and purposeful manner, so as to preload the target data to the RAM, so that the size of the data loaded into the RAM can be reduced, the burden on the RAM can be reduced, and the load can be improved. The performance of the RAM, so that when the application display interface displays the target data, it can speed up the application startup speed and optimize the RAM.
图2是本发明一种数据预加载的方法的另一个实施例,包括:2 is another embodiment of a method for data preloading according to the present invention, including:
S100服务器获取包括所述第一查询条件和第二查询条件的加载命令;所述第二查询条件包括所述第一查询条件;The S100 server acquires a load command including the first query condition and the second query condition; the second query condition includes the first query condition;
S200所述服务器根据所述第一查询条件生成所述第一索引值,根据所述第二查询条件将所述第一索引值生成第二索引值;所述第二索引值包括所述第一索引值;The server of S200 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes the first index value Index value
S300所述服务器根据所述第二索引值分类数据信息,得到对应的数据文件;S300, the server classifies the data information according to the second index value, to obtain a corresponding data file;
S400所述服务器根据所述第二索引值分别命名所述数据文件,并分类储存所述数据文件;S400, the server separately names the data file according to the second index value, and classifies and stores the data file;
S500所述服务器发送应用程序文件至所述终端;S500, the server sends an application file to the terminal;
S610所述终端接收所述服务器发送的所述应用程序文件;S610, the terminal receives the application file sent by the server;
S620所述终端根据所述应用程序文件,在第二储存区域安装所述应用程序,并在所述第一储存区域运行所述应用程序脚本;S920, the terminal installs the application in a second storage area according to the application file, and runs the application script in the first storage area;
S700所述终端获取包括第一查询条件的加载命令; S700: The terminal acquires a load command that includes a first query condition.
S800所述终端根据所述第一查询条件生成第一索引值;The terminal of S800 generates a first index value according to the first query condition;
S910所述终端根据所述第一索引值得到对应的第二索引值,发送所述第一索引值和所述对应的第二索引值至所述服务器;S910: The terminal, according to the first index value, obtains a corresponding second index value, and sends the first index value and the corresponding second index value to the server;
S920所述服务器接收所述第一索引值和所述对应的第二索引值,并根据所述对应的第二索引值查找对应的数据文件;S920: The server receives the first index value and the corresponding second index value, and searches for a corresponding data file according to the corresponding second index value;
S930所述服务器根据所述第一索引值在所述对应的数据文件中查找所述目标数据,并发送所述目标数据至所述终端;S930: The server searches for the target data in the corresponding data file according to the first index value, and sends the target data to the terminal;
S940所述终端接收所述目标数据,将所述目标数据在所述第一储存区域进行加载显示,并在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至所述第二储存区域。S940: The terminal receives the target data, loads and displays the target data in the first storage area, and saves the target data according to the corresponding second index value to the loading display. The second storage area.
具体的,本实施例中,本发明通过服务器端对所有数据根据第二索引值分别命名储存得到不同的数据文件,然后将这些数据文件储存在服务器端自身的储存器中,仅仅将用户需要的应用程序文件打包在APK包中,服务器将APK数据包发送至终端,终端将打包的APK数据包进行解压安装。当用户需要使用应用程序时,就会获取第一索引值,根据第一索引值得到对应的第二索引值,然后根据对应的第二索引值从服务器的储存器中查找到对应的数据文件,再根据第一索引值从对应的数据文件中查找并获取目标数据,之后服务器就会通过网络实时将目标数据一起打包发送给终端,终端接收服务器发送的目标数据,然后在终端的RAM中进行加载显示,因为只获取目标数据,通过本发明的数据处理方法,可提高Android平台应用的加载速度,并且优化了内存占用和APK文件的大小,提高用户体验。另外,如果目标数据太大,即使使用二进制编码和压缩技术,仍然占用较大的空间无法达到要求时,可以将目标数据放至服务器数据库中,在应用程序启动时使用网络加载的方式动态下载数据给予解决。本发明解决了加载内存耗费,APK大小控制以及应用第一次启动的耗时问题,使得应用启动时较快的加载目标数据,并且使得内存空间占用较小以及APK文件较小。本发明分割了预加载的数据,使得应用程序在第一次启动时,显示界面前只需要加载目标数据,所以可以加快应用启动速度和优化内存占用。Specifically, in this embodiment, the present invention separately stores and stores different data files according to the second index value by using the server, and then stores the data files in the server's own storage, only the user needs The application file is packaged in the APK package, and the server sends the APK data packet to the terminal, and the terminal decompresses the packaged APK data package. When the user needs to use the application, the first index value is obtained, the corresponding second index value is obtained according to the first index value, and then the corresponding data file is found from the server's storage according to the corresponding second index value. Then, according to the first index value, the target data is searched and acquired from the corresponding data file, and then the server sends the target data together to the terminal through the network in real time, and the terminal receives the target data sent by the server, and then loads the data in the terminal's RAM. Display, because only the target data is obtained, the data processing method of the present invention can improve the loading speed of the Android platform application, and optimize the memory occupancy and the size of the APK file to improve the user experience. In addition, if the target data is too large, even if you use binary encoding and compression technology, still occupy a large space can not meet the requirements, you can put the target data into the server database, use the network loading method to dynamically download data when the application starts. Give a solution. The invention solves the problem of loading memory consumption, the size control of the APK and the time-consuming problem of the first startup of the application, so that the application loads the target data faster when the application starts, and the memory space is occupied less and the APK file is smaller. The invention splits the preloaded data, so that when the application is started for the first time, only the target data needs to be loaded before the display interface, so the application startup speed and the memory usage can be accelerated.
图3是本发明一种数据预加载的方法的另一个实施例,包括: 3 is another embodiment of a method for data preloading according to the present invention, including:
S100服务器获取包括所述第一查询条件和第二查询条件的加载命令;所述第二查询条件包括所述第一查询条件;The S100 server acquires a load command including the first query condition and the second query condition; the second query condition includes the first query condition;
S200所述服务器根据所述第一查询条件生成所述第一索引值,根据所述第二查询条件将所述第一索引值生成第二索引值;所述第二索引值包括所述第一索引值;The server of S200 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes the first index value Index value
S300所述服务器根据所述第二索引值分类数据信息,得到对应的数据文件;S300, the server classifies the data information according to the second index value, to obtain a corresponding data file;
S400所述服务器根据所述第二索引值分别命名所述数据文件,并分类储存所述数据文件;S400, the server separately names the data file according to the second index value, and classifies and stores the data file;
S510所述服务器发送所述应用程序文件和所述数据文件至所述终端;S510, the server sends the application file and the data file to the terminal;
S630所述终端接收所述服务器发送的所述应用程序文件和所述数据文件;S630, the terminal receives the application file and the data file sent by the server;
S640所述终端根据所述应用程序文件,在第二储存区域安装所述应用程序,并在所述第一储存区域运行所述应用程序脚本;S240, the terminal installs the application in a second storage area according to the application file, and runs the application script in the first storage area;
S650所述终端根据所述第二索引值保存所述数据文件至所述第二储存区域;S650: The terminal saves the data file to the second storage area according to the second index value;
S700所述终端获取包括第一查询条件的加载命令;S700: The terminal acquires a load command that includes a first query condition.
S800所述终端根据所述第一查询条件生成第一索引值;The terminal of S800 generates a first index value according to the first query condition;
S950所述终端根据所述第一索引值得到对应的第二索引值;S950: The terminal, according to the first index value, obtain a corresponding second index value;
S960所述终端根据所述对应的第二索引值从所述第二储存区域查找对应的数据文件;S1900: The terminal searches for a corresponding data file from the second storage area according to the corresponding second index value;
S970所述终端根据所述第一索引值在所述对应的数据文件中获取所述目标数据;S910: The terminal acquires the target data in the corresponding data file according to the first index value;
S980所述终端将所述目标数据在所述第一储存区域进行加载显示,并在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至第三储存区域。In S980, the terminal loads and displays the target data in the first storage area, and saves the target data to the third storage area according to the corresponding second index value while loading the display.
具体的,本实施例中,首先需要服务器将大量的,无规律性的数据进行归类并分类处理,本发明根据获取的第二查询条件进行将网络上获取的数据或者服务器自身储存的数据或者管理人员写入的数据进行分类储存,实时生成以不 同第二索引值命名保存的数据文件,加快对查找或搜索的效率。例如,在Android平台开发中,经常会涉及到需要展示目标数据的功能,这通常需要从应用程序安装包(APK,以下简称APK)中预加载大量的数据到内存中,并根据加载的数据使用特定条件查询出需要的数据进行展示。而如何在应用启动时加载大量数据而不影响数据展示成为该功能实现中最核心的问题。目前在Android平台大量数据的预加载通常采用以下两种方式:Specifically, in this embodiment, the server first needs to classify and classify a large amount of irregular data, and the present invention performs data acquired on the network or data stored by the server itself according to the obtained second query condition. The data written by the manager is classified and stored, and generated in real time. Name the saved data file with the second index value to speed up the search or search. For example, in the Android platform development, it often involves the function of displaying target data. This usually requires preloading a large amount of data into the memory from the application installation package (APK, hereinafter referred to as APK) and using it according to the loaded data. Specific conditions are queried for the required data for display. How to load a large amount of data when the application starts without affecting data display becomes the core problem in the implementation of this function. Currently, a large amount of data preloading on the Android platform usually adopts the following two methods:
1、APK中预置SQLite数据库表文件,在应用第一次启动时,将该文件复制到该应用程序指定数据库路径下从而可以直接读取数据库进行数据查询和展示。1. Preset the SQLite database table file in the APK. When the application starts for the first time, copy the file to the specified database path of the application, so that the database can be directly read for data query and display.
2、APK中预置数据文件,该文件可以是二进制编码,在应用第一次启动时,将该文件解析并读入内存,从而可以直接进行数据查询和展示,并可以生成缓存文件或数据库,供应用下一次启动时直接使用。2. The preset data file in the APK, the file can be binary code. When the application is first started, the file is parsed and read into the memory, so that the data can be directly queried and displayed, and the cache file or database can be generated. The supply is used directly at the next startup.
上述两种方式,在数据量较小的情况下是可行的,但是对于数据量较大的情况下,则出现较为明显的弊端。方式1中使用数据库文件,在数据量较大时,文件必定较大。此时APK必然较大,影响用户体验,并且启动应用时需要将数据库文件进行复制,较为耗时。而方式2中使用二进制文件,可以相对舍去冗余数据,解决了APK太大的问题,而这种方式需要在应用加载时将数据全部加载到内存中,占用大量内存,对于虚拟机内存定义较小的设备极容易达到上限而发生内存不足(Out Of Memory,OOM)而退出,并且没有解决耗时问题。The above two methods are feasible in the case of a small amount of data, but in the case of a large amount of data, there are obvious drawbacks. The database file is used in mode 1. When the amount of data is large, the file must be large. At this time, the APK is inevitably large, affecting the user experience, and it is time-consuming to copy the database file when starting the application. The use of binary files in mode 2 can relatively eliminate redundant data, and solve the problem that the APK is too large, and this method needs to load all the data into the memory when the application is loaded, which occupies a large amount of memory, and defines the virtual machine memory. Smaller devices can easily reach the upper limit and exit with Out Of Memory (OOM), and do not solve the time-consuming problem.
本发明通过服务器端对所有数据根据第二索引值分别命名储存得到不同的数据文件,然后将这些数据文件与应用程序文件一起打包在APK包中,服务器将APK数据包发送至终端,终端将打包的APK数据包进行解压,将数据文件保存至终端的第二储存区域,这里第二储存区域为ROM。当用户需要使用应用程序时,就会获取第一索引值,根据第一索引值得到对应的第二索引值,然后根据对应的第二索引值与服务器生成的第二索引值进行匹配,根据匹配结果从ROM中查找到对应的数据文件,再根据第一索引值从对应的数据文件中查找并获取目标数据,因为只获取目标数据,通过本发明的数据处理方法,可提高Android平台应用的加载速度,并且优化了内存占用和APK文件的大小,提高用 户体验。The invention separately stores and stores different data files according to the second index value by the server side, and then packages the data files together with the application files in the APK package, and the server sends the APK data packet to the terminal, and the terminal will package the data. The APK packet is decompressed, and the data file is saved to the second storage area of the terminal, where the second storage area is ROM. When the user needs to use the application, the first index value is obtained, and the corresponding second index value is obtained according to the first index value, and then matched with the second index value generated by the server according to the corresponding second index value, according to the matching. As a result, the corresponding data file is found from the ROM, and the target data is searched and acquired from the corresponding data file according to the first index value. Because only the target data is acquired, the loading of the Android platform application can be improved by the data processing method of the present invention. Speed, and optimize the memory footprint and the size of the APK file, improve User experience.
优选的,所述步骤S900还包括步骤:Preferably, the step S900 further includes the following steps:
S990所述终端将其余加载数据按照对应的第二索引值分类保存至所述第三储存区域;所述其余加载数据为所述数据文件中除所述目标数据外的数据。S990: The terminal saves the remaining loading data to the third storage area according to the corresponding second index value; the remaining loading data is data in the data file other than the target data.
通过预先将其余加载数据分类储存至第三储存区域,这里第三储存区域为缓存或数据库,能够使得后期用户使用应用程序时,能够快速的调用需要的其余加载数据为目标数据进行加载显示,提高应用程序的加载速度,提高用户体验。By pre-storing the remaining loading data into the third storage area, where the third storage area is a cache or a database, the late user can quickly call the remaining loading data to load and display the target data when the user uses the application. The application's loading speed improves the user experience.
下面,为了便于理解,举个例子,这里使用日历程序需要1900~2100年间的黄历数据作为例子来具体说明,黄历数据包括日期,宜和忌的数据信息。如图4所示,包括步骤:In the following, for the sake of easy understanding, for example, the calendar program is required to specify the calendar data between 1900 and 2100 as an example, and the calendar data includes the date and the data information of Yihe. As shown in Figure 4, the steps are included:
S11、对所有的数据根据第一查询条件计算索引值;S11. Calculate an index value according to the first query condition for all the data;
这里需要计算所有数据的索引值。针对黄历数据,显而易见第一查询条件是日期,这里使用直接拼接的算法计算索引值,例如2017年6月24日,计算出的第一索引值为20170624的整型类型数据(如果是其他类型的数据,可以使用哈希算法算出哈希值作为索引值,在此不例举)。Here you need to calculate the index value of all the data. For the calendar data, it is obvious that the first query condition is the date. Here, the direct splicing algorithm is used to calculate the index value. For example, on June 24, 2017, the calculated first index value is 20170624 integer type data (if it is other types) Data, you can use the hash algorithm to calculate the hash value as an index value, not to mention here).
S12、根据第二查询条件,将第一索引值生成第二索引值;S12. Generate a second index value by using the first index value according to the second query condition.
这里根据需要,取第一索引值的前4位来生成第二索引值,例如第一索引值为20170624,取前4位得到2017为第二索引值。Here, as needed, the first 4 bits of the first index value are taken to generate a second index value, for example, the first index value is 20170624, and the first 4 bits get 2017 as the second index value.
S13、将S12算出的第二索引值作为数据文件的文件名,并将数据分类保存至若干对应的数据文件中。S13. The second index value calculated in S12 is used as a file name of the data file, and the data classification is saved into a plurality of corresponding data files.
这样,1900~2100年间这200年间的黄历数据可分为200个数据文件,并与应用程序文件一起压缩打包成APK数据包发送给终端。如图5所示,包括步骤:In this way, the calendar data of the 200 years between 1900 and 2100 can be divided into 200 data files, and compressed and packaged into APK packets with the application files and sent to the terminal. As shown in Figure 5, the steps are included:
S21、将所有数据文件根据对应的第二索引值分类保存至ROM中;S21. Save all the data files to the ROM according to the corresponding second index value.
这里,将S13步中生成的数据包解压至应用程序数据目录下。终端接收APK数据包后,解压APK数据包,根据应用程序文件进行安装应用程序,并将数据文件根据对应的第二索引值分类保存至ROM中。Here, the data packet generated in step S13 is decompressed into the application data directory. After receiving the APK data packet, the terminal decompresses the APK data packet, installs the application according to the application file, and saves the data file to the ROM according to the corresponding second index value.
S22、根据第一查询条件和与S11相同的算法进行计算得到第一索引值; S22. Perform a calculation according to the first query condition and the same algorithm as S11 to obtain a first index value.
这里,针对黄历数据,日历程序加载时显示的是当月日历并显示当天的黄历信息,所以需要至少当天的数据,根据当天日期2017年6月24日计算第一索引值,需要使用S11步相同的算法,得到第一索引值20170624。Here, for the calendar data, when the calendar program is loaded, the calendar of the current month is displayed and the calendar information of the day is displayed, so at least the data of the day is required, and the first index value is calculated according to the date of the day of June 24, 2017, and the same step S11 is required. Algorithm, get the first index value 20170624.
S23、根据S22得到的第一索引值得到对应的第二索引值,并根据第二索引值找到相应的数据文件,根据第一索引值从相应的数据文件中查找获取目标数据;S23. Obtain a corresponding second index value according to the first index value obtained in S22, and find a corresponding data file according to the second index value, and search for the target data from the corresponding data file according to the first index value;
这里,计算出第一索引值20170624后,根据与S12相同的算法得到第二索引值为2017,并找到文件名为2017的数据文件。Here, after calculating the first index value 20170624, the second index value is obtained according to the same algorithm as S12, and the data file with the file name 2017 is found.
S24、在RAM加载S23查找获取的目标数据并显示;S24. Load the S23 in the RAM to search for the acquired target data and display it;
这里,由于总数据量只有所有数据的二百分之一,所以加载速度和内存占用均较小,并可以尽快完成应用程序的显示目标数据。Here, since the total amount of data is only one-twoth of all data, the loading speed and memory usage are small, and the display target data of the application can be completed as soon as possible.
S25、加载显示的同时,将目标数据储存至缓存,并将其余数据储存至缓存;S25. While loading the display, storing the target data to the cache, and storing the remaining data to the cache;
这里,创建子线程,在子线程中异步将S24加载的目标数据保存为缓存文件或者储存至数据库中,并且加载其余199年的其余数据,同时保存为缓存文件或者缓存数据库,供下次应用程序启动时使用。Here, the child thread is created, and the target data loaded by the S24 is asynchronously saved as a cache file in the child thread or stored in the database, and the remaining data of the remaining 199 years is loaded, and saved as a cache file or a cache database for the next application. Used at startup.
通过本发明的数据处理方法,可提高如Android平台、IOS应用平台等应用程序的加载速度,并且优化了内存占用和APK文件的大小,提高用户体验。Through the data processing method of the present invention, the loading speed of applications such as the Android platform and the IOS application platform can be improved, and the memory usage and the size of the APK file are optimized, and the user experience is improved.
参考图6所示,本发明提供一种数据预加载的系统1000的一个实施例,包括:终端100和服务器200;所述终端100包括:Referring to FIG. 6, the present invention provides an embodiment of a data preloading system 1000, including: a terminal 100 and a server 200; the terminal 100 includes:
接收模块110,接收应用程序文件;The receiving module 110 receives the application file;
安装模块120,安装应用程序;Installing module 120, installing an application;
第一获取模块130,获取包括第一查询条件的加载命令;The first obtaining module 130 acquires a load command including the first query condition;
第一生成模块140,将所述第一查询条件生成第一索引值;The first generating module 140 generates the first index value by using the first query condition;
第一储存区域150,用于加载数据;a first storage area 150 for loading data;
控制模块160,根据所述第一索引值,获取目标数据并加载至所述第一储存区域150;The control module 160 acquires target data according to the first index value and loads it into the first storage area 150;
所述服务器200包括: The server 200 includes:
第二获取模块210,获取包括所述第一查询条件和第二查询条件的加载命令;所述第二查询条件包括所述第一查询条件;The second obtaining module 210 acquires a loading command including the first query condition and the second query condition; the second query condition includes the first query condition;
第二生成模块220,根据所述第一查询条件生成所述第一索引值,根据所述第二查询条件将所述第一索引值生成第二索引值;所述第二索引值包括所述第一索引值;The second generation module 220 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes the First index value;
分类模块230,根据所述第二索引值分类数据信息,得到对应的数据文件;The classification module 230 classifies the data information according to the second index value to obtain a corresponding data file;
保存模块240,根据所述第二索引值分别命名所述数据文件,并分类储存所述数据文件;The saving module 240 names the data files according to the second index value, and stores the data files in categories;
第二发送模块250,发送所述应用程序文件至终端100。The second sending module 250 sends the application file to the terminal 100.
具体的,本实施例中,服务器200生成数据文件,然后终端100实时获取第一查询条件的加载命令,根据第一查询条件得到第一索引值,从而根据第一索引值获取目标数据进行预加载,这样能够根据用户的查询需要或使用要求来有针对性的,有目的性的获取目标数据,从而至预先加载目标数据到RAM,这样,能够相对于现有技术,减少了加载至RAM的数据的大小,减轻RAM的负担,提升RAM的性能,从而使得应用程序显示界面显示目标数据时,可以加快应用程序的启动速度,达到优化RAM的效果。Specifically, in this embodiment, the server 200 generates a data file, and then the terminal 100 obtains a loading command of the first query condition in real time, and obtains a first index value according to the first query condition, thereby acquiring target data according to the first index value for preloading. In this way, the target data can be acquired in a targeted and purposeful manner according to the user's query needs or usage requirements, thereby pre-loading the target data to the RAM, so that the data loaded into the RAM can be reduced relative to the prior art. The size of the RAM reduces the load on the RAM and improves the performance of the RAM, so that when the application display interface displays the target data, it can speed up the application startup speed and optimize the RAM.
参考图7所示,本发明提供一种数据预加载的系统1000的另一个实施例,本实施例中其他部分与上一实施例相同;此外:Referring to FIG. 7, the present invention provides another embodiment of a data preloading system 1000. The other parts of this embodiment are the same as the previous embodiment;
所述第二发送模块250,还发送所述应用程序文件和所述数据文件至所述终端100;The second sending module 250 further sends the application file and the data file to the terminal 100;
所述接收模块110,还接收所述应用程序文件和所述数据文件;The receiving module 110 further receives the application file and the data file;
所述安装模块120,根据所述应用程序文件,在第二储存区域170安装所述应用程序,并在所述第一储存区域150运行所述应用程序脚本;The installation module 120 installs the application program in the second storage area 170 according to the application file, and runs the application script in the first storage area 150;
所述终端100还包括第二储存区域170,根据所述第二索引值保存所述数据文件至所述第二储存区域170;The terminal 100 further includes a second storage area 170, and saves the data file to the second storage area 170 according to the second index value;
所述终端还包括第三储存区域180,根据所述第二索引值保存所述数据文件至所述第三储存区域180;The terminal further includes a third storage area 180, and saves the data file to the third storage area 180 according to the second index value;
此外,所述控制模块160包括: In addition, the control module 160 includes:
处理单元161,根据所述第一索引值得到对应的第二索引值;The processing unit 161 is configured to obtain a corresponding second index value according to the first index value;
查找单元162,根据所述对应的第二索引值从所述第二储存区域170查找对应的数据文件;The searching unit 162 searches for the corresponding data file from the second storage area 170 according to the corresponding second index value;
获取单元163,根据所述第一索引值在所述对应的数据文件中获取所述目标数据;The obtaining unit 163 is configured to acquire the target data in the corresponding data file according to the first index value;
加载单元164,将所述目标数据在所述第一储存区域150进行加载显示;The loading unit 164 is configured to load and display the target data in the first storage area 150;
控制单元165,在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至第三储存区域180。The control unit 165 saves the target data to the third storage area 180 according to the corresponding second index value while loading the display.
具体的,本实施例中,分为生成数据文件和加载目标数据两个部分,其中数据文件的生成有服务器200端进行完成,目标数据的加载由终端100完成。服务器200将数据分类得到若干数据文件,数据文件的数量根据数据的大小和类型决定,服务器200根据第二索引值对每个数据文件进行命名,其中,数据文件的生成是服务器200根据对数据的使用的第一查询条件,使用方法实施例中的直接拼接方法或者哈希算法进行编码,得到第一索引值,然后通过方法实施例中的方法将第一索引值进行计算得到第二索引值,其中,需要保障第二索引值的范围在合理的范围内,需要第二索引值包括第一索引值,该范围决定了数据文件分割的数量。将数据按第二索引值进行分类,分别生成以对应的第二索引值命名的数据文件,将其与应用程序文件与所有数据文件进行压缩打包发送至终端100,终端100安装应用程序,并将数据文件根据第二索引值分类储存至自身的ROM中,终端100获取第一查询条件,根据第一查询条件,使用和服务器200一样的算法生成第一索引值,再根据第一索引值以及和服务器200一样的算法生成第二索引值,根据第二索引值从ROM中查找到对应的数据文件,然后从对应的数据文件中查找获取目标数据,单独加载目标数据到RAM中使用,并使用子线程异步将数据存储到数据库或缓存中。如果使用缓存,则可以使用类似的方法进行,即将数据文件分类储存至自身的ROM中,根据需要获取目标数据加载至缓存中。使用子线程异步加载其余的数据文件,并将数据存储到数据库或缓存中。在应用程序后续的使用中,直接读取缓存或者数据库中的数据即可。 Specifically, in this embodiment, the data file and the loading target data are divided into two parts, wherein the generation of the data file is completed by the server 200, and the loading of the target data is completed by the terminal 100. The server 200 classifies the data into a plurality of data files. The number of data files is determined according to the size and type of the data. The server 200 names each data file according to the second index value, wherein the data file is generated by the server 200 according to the data. The first query condition is used, and the first index value is obtained by using the direct splicing method or the hash algorithm in the method embodiment, and then the first index value is calculated by the method in the method embodiment to obtain the second index value. The range of the second index value needs to be within a reasonable range, and the second index value is required to include the first index value, where the range determines the number of data file partitions. Sorting the data into the second index value, respectively generating a data file named with the corresponding second index value, compressing and packaging the application file and all the data files to the terminal 100, and the terminal 100 installs the application, and The data file is stored in its own ROM according to the second index value, and the terminal 100 acquires the first query condition, and generates the first index value by using the same algorithm as the server 200 according to the first query condition, and then according to the first index value and The algorithm of the server 200 generates a second index value, searches for a corresponding data file from the ROM according to the second index value, and then searches for the target data from the corresponding data file, separately loads the target data into the RAM for use, and uses the child. Threads asynchronously store data in a database or cache. If you use caching, you can use a similar method, that is, the data file classification is stored in its own ROM, and the target data is loaded into the cache as needed. Use the child thread to asynchronously load the remaining data files and store the data in a database or cache. In the subsequent use of the application, you can directly read the data in the cache or database.
本发明所有实施例中,在所有数据全部加载之前,对目标数据进行预先加载,以提供给用户更好的体验,减少等待的时间。否则,如果应用程序的目标数据过于庞大,没有使用预加载技术的应用程序就会长时间的展现为一片空白,直到所有内容加载完毕才能加载显示。本发明能够提升加载的速度,还能够显著减小RAM的占用,减轻RAM的负担,提升第一储存区域的性能,从而使得应用程序显示界面显示目标数据时,可以加快应用程序的启动速度,达到优化RAM的效果。In all embodiments of the present invention, the target data is preloaded before all data is loaded to provide a better experience for the user and reduce the waiting time. Otherwise, if the target data of the application is too large, the application that does not use the preloading technology will appear as a blank for a long time, until all the content is loaded before the display can be loaded. The invention can improve the loading speed, can also significantly reduce the occupation of the RAM, reduce the burden of the RAM, and improve the performance of the first storage area, so that when the application display interface displays the target data, the startup speed of the application can be accelerated. Optimize the effect of RAM.
本发明所有实施例中,可以先判断终端100与服务器200之间的网络连接状态,查看网速是否达到预设值,达到终端100可以使用第二个实施例的方法进行数据的预加载,如果网速未达到预设值,终端100就可以使用第三个实施例的方法进行数据的预加载。In all the embodiments of the present invention, the network connection status between the terminal 100 and the server 200 can be determined to check whether the network speed reaches a preset value, and the terminal 100 can use the method of the second embodiment to perform data preloading. If the network speed does not reach the preset value, the terminal 100 can perform preloading of the data using the method of the third embodiment.
应当说明的是,上述实施例均可根据需要自由组合。以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。 It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.

Claims (10)

  1. 一种数据预加载的方法,其特征在于,包括步骤:A data preloading method, comprising the steps of:
    S600终端接收并安装应用程序;The S600 terminal receives and installs the application;
    S700所述终端获取包括第一查询条件的加载命令;S700: The terminal acquires a load command that includes a first query condition.
    S800所述终端根据所述第一查询条件生成第一索引值;The terminal of S800 generates a first index value according to the first query condition;
    S900所述终端根据所述第一索引值,获取目标数据并加载至第一储存区域。The terminal acquires target data according to the first index value and loads the data into the first storage area.
  2. 根据权利要求1所述的数据预加载的方法,其特征在于,所述步骤S600之前包括步骤:The method of data preloading according to claim 1, wherein the step S600 comprises the steps of:
    S100服务器获取包括所述第一查询条件和第二查询条件的加载命令;所述第二查询条件包括所述第一查询条件;The S100 server acquires a load command including the first query condition and the second query condition; the second query condition includes the first query condition;
    S200所述服务器根据所述第一查询条件生成所述第一索引值,根据所述第二查询条件将所述第一索引值生成第二索引值;所述第二索引值包括所述第一索引值;The server of S200 generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes the first index value Index value
    S300所述服务器根据所述第二索引值分类数据信息,得到对应的数据文件;S300, the server classifies the data information according to the second index value, to obtain a corresponding data file;
    S400所述服务器根据所述第二索引值分别命名所述数据文件,并分类储存所述数据文件;S400, the server separately names the data file according to the second index value, and classifies and stores the data file;
    S500所述服务器发送应用程序文件至所述终端。The server of S500 sends an application file to the terminal.
  3. 根据权利要求2所述的数据预加载的方法,其特征在于,所述步骤S600包括步骤:The method of data preloading according to claim 2, wherein the step S600 comprises the steps of:
    S610所述终端接收所述服务器发送的所述应用程序文件;S610, the terminal receives the application file sent by the server;
    S620所述终端根据所述应用程序文件,在第二储存区域安装所述应用程序,并在所述第一储存区域运行所述应用程序脚本。The terminal installed by the S620 in the second storage area according to the application file, and runs the application script in the first storage area.
  4. 根据权利要求3所述的数据预加载的方法,其特征在于,所述步骤S900包括步骤:The method of data preloading according to claim 3, wherein the step S900 comprises the steps of:
    S910所述终端根据所述第一索引值得到对应的第二索引值,发送所述第一索引值和所述对应的第二索引值至所述服务器; S910: The terminal, according to the first index value, obtains a corresponding second index value, and sends the first index value and the corresponding second index value to the server;
    S920所述服务器接收所述第一索引值和所述对应的第二索引值,并根据所述对应的第二索引值查找对应的数据文件;S920: The server receives the first index value and the corresponding second index value, and searches for a corresponding data file according to the corresponding second index value;
    S930所述服务器根据所述第一索引值在所述对应的数据文件中查找所述目标数据,并发送所述目标数据至所述终端;S930: The server searches for the target data in the corresponding data file according to the first index value, and sends the target data to the terminal;
    S940所述终端接收所述目标数据,将所述目标数据在所述第一储存区域进行加载显示,并在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至所述第二储存区域。S940: The terminal receives the target data, loads and displays the target data in the first storage area, and saves the target data according to the corresponding second index value to the loading display. The second storage area.
  5. 根据权利要求2所述的数据预加载的方法,其特征在于,所述步骤S500包括步骤:The method of data preloading according to claim 2, wherein the step S500 comprises the steps of:
    S510所述服务器发送所述应用程序文件和所述数据文件至所述终端;S510, the server sends the application file and the data file to the terminal;
    所述步骤S600还包括步骤:The step S600 further includes the steps of:
    S630所述终端接收所述服务器发送的所述应用程序文件和所述数据文件;S630, the terminal receives the application file and the data file sent by the server;
    S640所述终端根据所述应用程序文件,在第二储存区域安装所述应用程序,并在所述第一储存区域运行所述应用程序脚本;S240, the terminal installs the application in a second storage area according to the application file, and runs the application script in the first storage area;
    S650所述终端根据所述第二索引值保存所述数据文件至所述第二储存区域。The terminal saves the data file to the second storage area according to the second index value.
  6. 根据权利要求5所述的数据预加载的方法,其特征在于,所述步骤S900还包括步骤:The method of data preloading according to claim 5, wherein the step S900 further comprises the steps of:
    S950所述终端根据所述第一索引值得到对应的第二索引值;S950: The terminal, according to the first index value, obtain a corresponding second index value;
    S960所述终端根据所述对应的第二索引值从所述第二储存区域查找对应的数据文件;S1900: The terminal searches for a corresponding data file from the second storage area according to the corresponding second index value;
    S970所述终端根据所述第一索引值在所述对应的数据文件中获取所述目标数据;S910: The terminal acquires the target data in the corresponding data file according to the first index value;
    S980所述终端将所述目标数据在所述第一储存区域进行加载显示,并在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至第三储存区域。In S980, the terminal loads and displays the target data in the first storage area, and saves the target data to the third storage area according to the corresponding second index value while loading the display.
  7. 根据权利要求6所述的数据预加载的方法,其特征在于,所述步骤 S900还包括步骤:The method of data preloading according to claim 6, wherein said step The S900 also includes the steps:
    S990所述终端将其余加载数据按照对应的第二索引值分类保存至所述第三储存区域;所述其余加载数据为所述数据文件中除所述目标数据外的数据。S990: The terminal saves the remaining loading data to the third storage area according to the corresponding second index value; the remaining loading data is data in the data file other than the target data.
  8. 一种数据预加载的系统,其特征在于,应用权利要求1-7任一项所述的一种数据预加载的方法,包括:终端和服务器;A data preloading system, characterized by a data preloading method according to any one of claims 1 to 7, comprising: a terminal and a server;
    所述终端包括:The terminal includes:
    接收模块,接收应用程序文件;Receiving module, receiving an application file;
    安装模块,安装应用程序;Install the module and install the application;
    第一获取模块,获取包括第一查询条件的加载命令;a first acquiring module, acquiring a loading command including a first query condition;
    第一生成模块,将所述第一查询条件生成第一索引值;The first generating module generates the first index value by using the first query condition;
    第一储存区域,用于加载数据;a first storage area for loading data;
    控制模块,根据所述第一索引值,获取目标数据并加载至所述第一储存区域;The control module acquires target data according to the first index value and loads the first storage area;
    所述服务器包括:The server includes:
    第二获取模块,获取包括所述第一查询条件和第二查询条件的加载命令;所述第二查询条件包括所述第一查询条件;The second obtaining module acquires a loading command including the first query condition and the second query condition; the second query condition includes the first query condition;
    第二生成模块,根据所述第一查询条件生成所述第一索引值,根据所述第二查询条件将所述第一索引值生成第二索引值;所述第二索引值包括所述第一索引值;The second generation module generates the first index value according to the first query condition, and generates a second index value according to the second query condition; the second index value includes the first An index value;
    分类模块,根据所述第二索引值分类数据信息,得到对应的数据文件;a classification module, classifying data information according to the second index value, to obtain a corresponding data file;
    保存模块,根据所述第二索引值分别命名所述数据文件,并分类储存所述数据文件;Saving a module, respectively naming the data files according to the second index value, and classifying and storing the data files;
    第二发送模块,发送所述应用程序文件至终端。The second sending module sends the application file to the terminal.
  9. 根据权利要求8所述的数据预加载的系统,其特征在于:A data preloading system according to claim 8 wherein:
    所述第二发送模块,还发送所述应用程序文件和所述数据文件至所述终端;The second sending module further sends the application file and the data file to the terminal;
    所述接收模块,还接收所述应用程序文件和所述数据文件;The receiving module further receives the application file and the data file;
    所述安装模块,根据所述应用程序文件,在第二储存区域安装所述应用 程序,并在所述第一储存区域运行所述应用程序脚本;The installation module installs the application in a second storage area according to the application file a program, and running the application script in the first storage area;
    所述终端还包括第二储存区域,根据所述第二索引值保存所述数据文件至所述第二储存区域;The terminal further includes a second storage area, and the data file is saved to the second storage area according to the second index value;
    所述终端还包括第三储存区域,根据所述第二索引值保存所述数据文件至所述第三储存区域。The terminal further includes a third storage area, and the data file is saved to the third storage area according to the second index value.
  10. 根据权利要求9所述的数据预加载的系统,其特征在于:所述控制模块包括:The data preloading system according to claim 9, wherein the control module comprises:
    处理单元,根据所述第一索引值得到对应的第二索引值;The processing unit obtains a corresponding second index value according to the first index value;
    查找单元,根据所述对应的第二索引值从所述第二储存区域查找对应的数据文件;a searching unit, searching for a corresponding data file from the second storage area according to the corresponding second index value;
    获取单元,根据所述第一索引值在所述对应的数据文件中获取所述目标数据;Obtaining a unit, acquiring the target data in the corresponding data file according to the first index value;
    加载单元,将所述目标数据在所述第一储存区域进行加载显示;Loading unit, loading and displaying the target data in the first storage area;
    控制单元,在加载显示的同时,将所述目标数据按照所述对应的第二索引值分类保存至第三储存区域。 The control unit saves the target data to the third storage area according to the corresponding second index value while loading the display.
PCT/CN2017/102720 2017-08-07 2017-09-21 Data preloading method and system WO2019028977A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710667375.7 2017-08-07
CN201710667375.7A CN107577506B (en) 2017-08-07 2017-08-07 Data preloading method and system

Publications (1)

Publication Number Publication Date
WO2019028977A1 true WO2019028977A1 (en) 2019-02-14

Family

ID=61034138

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/102720 WO2019028977A1 (en) 2017-08-07 2017-09-21 Data preloading method and system

Country Status (2)

Country Link
CN (1) CN107577506B (en)
WO (1) WO2019028977A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112163231A (en) * 2020-09-17 2021-01-01 北京一人一亩田网络科技有限公司 Method and device for automatically packaging pre-cached data by iOS application, electronic equipment and computer readable medium
CN112462366B (en) * 2020-10-10 2023-08-08 深圳大学 SAR data point visualization method, intelligent terminal and storage medium
CN114760622B (en) * 2022-04-20 2023-09-26 四川酷比通信设备有限公司 Software preloading method, terminal and preloading system based on liveness

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663107A (en) * 2012-04-16 2012-09-12 深圳市华曦达科技股份有限公司 Method and system for managing embedded data
CN103377269A (en) * 2012-04-27 2013-10-30 国际商业机器公司 Sensor data positioning method and device
US8756237B2 (en) * 2012-10-12 2014-06-17 Architecture Technology Corporation Scalable distributed processing of RDF data
CN103995869A (en) * 2014-05-20 2014-08-20 东北大学 Data-caching method based on Apriori algorithm
CN105160005A (en) * 2015-09-17 2015-12-16 西安未来国际信息股份有限公司 Mass POI (Point Of Interest) map data display method based on Web browser

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6985910B2 (en) * 2003-02-06 2006-01-10 International Business Machines Corporation Tilting tree spinning cones method and system for mapping XML to n-dimensional data structure using a single dimensional mapping array
CN102184234B (en) * 2011-05-13 2014-12-10 百度在线网络技术(北京)有限公司 Method and equipment used for inquiring, increasing, updating or deleting information processing rules
CN103064933B (en) * 2012-12-24 2016-06-29 华为技术有限公司 Data query method and system
CN104252460B (en) * 2013-06-25 2017-11-24 华为技术有限公司 Date storage method, querying method, apparatus and system
CN105094861A (en) * 2014-05-06 2015-11-25 腾讯科技(深圳)有限公司 Webpage application program loading method, device and system
CN105528463B (en) * 2016-01-21 2018-12-14 北京奇艺世纪科技有限公司 A kind of the index data loading method and device of search engine

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663107A (en) * 2012-04-16 2012-09-12 深圳市华曦达科技股份有限公司 Method and system for managing embedded data
CN103377269A (en) * 2012-04-27 2013-10-30 国际商业机器公司 Sensor data positioning method and device
US8756237B2 (en) * 2012-10-12 2014-06-17 Architecture Technology Corporation Scalable distributed processing of RDF data
CN103995869A (en) * 2014-05-20 2014-08-20 东北大学 Data-caching method based on Apriori algorithm
CN105160005A (en) * 2015-09-17 2015-12-16 西安未来国际信息股份有限公司 Mass POI (Point Of Interest) map data display method based on Web browser

Also Published As

Publication number Publication date
CN107577506A (en) 2018-01-12
CN107577506B (en) 2021-03-19

Similar Documents

Publication Publication Date Title
CN104978215B (en) file updating method, related device and system
US20140298313A1 (en) Method, server, client and system for updating data
WO2017185253A1 (en) Patch upgrade-based file processing method and device, terminal, and storage medium
WO2021223658A1 (en) Mini program update
US20140143647A1 (en) Method for improving browser cache by reducing duplicate stored content
WO2019028977A1 (en) Data preloading method and system
US9973564B2 (en) Determining variable chunk size for transfer of a file
CN110968331B (en) Method and device for running application program
WO2021169298A1 (en) Method and apparatus for reducing back-to-source requests, and computer readable storage medium
CN111400246B (en) Asynchronous file import method, device, computer equipment and storage medium
CN112100152A (en) Service data processing method, system, server and readable storage medium
CN110764688A (en) Method and device for processing data
KR20160048173A (en) Storage processing method, device and terminal
US20150019955A1 (en) Method and system for displaying literal contents, mobile terminal, cloud typesetting server, and storage medium
WO2024078348A1 (en) Method and apparatus for processing registry operation in application porting environment, and medium
WO2023193528A1 (en) File decompression method and apparatus, and electronic device and computer-readable storage medium
CN110457345B (en) Database reading method, device and computer readable storage medium
WO2017177752A1 (en) File storage method and device
CN116185578A (en) Scheduling method of computing task and executing method of computing task
CN113448739B (en) Data processing method and device
CN115033551A (en) Database migration method and device, electronic equipment and storage medium
CN112423117B (en) Web end video playing method and device and computer equipment
CN110377665B (en) Data synchronization method and device, electronic equipment and storage medium
CN114238264A (en) Data processing method, data processing device, computer equipment and storage medium
CN113849524A (en) Data processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17921055

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17921055

Country of ref document: EP

Kind code of ref document: A1