Resource loading method, system, electronic device and storage medium
By predicting the usage probability of functional modules and configuring appropriate storage locations, the problem of reduced response speed caused by insufficient device storage space is solved, and faster resource loading and device response are achieved.
Patent Information
- Application Number
- CN202410536370.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-04-30
AI Technical Summary
Insufficient storage space of the device causes the resource files required by the functional modules to be deleted, resulting in a decrease in the response speed of the device. The response speed of the existing technology is poor when downloading resource files from the server.
By obtaining the work record information of the functional module, predicting its usage probability, generating resource configuration information based on the probability, and determining the storage location of the resource file to improve the loading speed.
Improves the speed of the device loading resource files when it needs to use function modules, thus improving the response speed of the device.
Smart Images

Figure CN118113232B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data storage, and in particular to a resource loading method, system, electronic device and storage medium. Background Art
[0002] The resource files of general storage devices can be saved in the storage space of the device, but the storage space of the device is limited. When the storage space of the device is insufficient, the resource files required by some functional modules have to be deleted from the storage space of the device, resulting in some functions that the device could originally support being forced to be cut due to insufficient storage space.
[0003] In the prior art, some resource files deleted due to insufficient storage space can be stored in the server and downloaded to the storage space of the device when they are needed. However, each time the functions corresponding to these resource files need to be used, the resource files need to be downloaded from the server first, resulting in a decrease in the response speed of the device.
[0004] Therefore, how to improve the response speed of the device becomes an urgent problem to be solved. Summary of the invention
[0005] The present application at least provides a resource loading method, system, electronic device and storage medium to improve the response speed of the device.
[0006] The first aspect of the present application provides a resource loading method, comprising: obtaining work record information of each functional module in a target device during each data processing; based on the work record information of the functional module, obtaining a probability set of target state combinations occurring in the functional module; wherein the target state combination involves at least one target state of the functional module, and the probability set includes the statistical probabilities of various target states; based on the probability set of the target state combinations occurring in the functional module, predicting the use probability of the functional module; based on the use probability of each functional module in the target device, generating resource configuration information of each functional module; wherein the resource configuration information of the functional module represents the storage location of the resource file required by the functional module; in response to the functional module in the target device starting to work, selecting the functional module as the target module, and loading the resource file of the target module based on the resource configuration information of the target module.
[0007] The above scheme predicts the usage probability of each functional module through the work record information of each functional module, and configures the storage location for the resource files required by each functional module according to the usage probability of each functional module, which helps to configure a suitable storage location for each functional module, thereby improving the speed of loading the required resource files when the device needs to use the above functional modules, thereby improving the response speed of the device.
[0008] A second aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the resource loading method in the first aspect.
[0009] A third aspect of the present application provides a resource loading system, including a server and a target device, wherein the server and the target device are communicatively connected, wherein the target device is used to execute the resource loading method of the first aspect.
[0010] A fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, which implement the resource loading method of the first aspect when the program instructions are executed by a processor.
[0011] The above scheme predicts the usage probability of each functional module through the work record information of each functional module, and configures the storage location for the resource files required by each functional module according to the usage probability of each functional module, which helps to configure a suitable storage location for each functional module, thereby improving the speed of loading the required resource files when the device needs to use the above functional modules, thereby improving the response speed of the device.
[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0014] Figure 1 It is a flowchart of an embodiment of a resource loading method of the present application;
[0015] Figure 2 This is a schematic diagram of the working record information of the SNMP module;
[0016] Figure 3 It is a flowchart of another embodiment of the resource loading method of the present application;
[0017] Figure 4 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;
[0018] Figure 5 It is a schematic diagram of the framework of an embodiment of the resource loading system of the present application;
[0019] Figure 6 A schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0020] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0021] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0022] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0023] Storage space can be divided into hard disk, memory, flash memory, etc. according to different access speeds. Usually, the resource files of a device can be stored in the storage space of the device itself, for example, in flash memory. Since the access speed of flash memory is fast, when the device needs to use a certain function, it can quickly obtain the resource files required for a certain function from the flash memory. However, the flash memory space of the device is limited, so resource files that cannot be stored in the flash memory can be stored in other storage spaces in the device, or can be uploaded to the server and downloaded from the server when the corresponding resource files are needed. However, the speed at which the device downloads resource files from the server is slow. If the device needs to download from the server every time it needs to use a resource file, the response speed of the device will decrease.
[0024] In order to improve the response speed of the device, this application proposes a resource loading method; please refer to Figure 1 , Figure 1 : is a flowchart of an embodiment of a resource loading method of the present application; specifically, the resource loading method may include the following steps:
[0025] Step S100: Acquire the work record information of each functional module in the target device during each data processing.
[0026] Step S120: Based on the work record information of the functional module, a probability set of the target state combination of the functional module is obtained.
[0027] The target state combination involves at least one target state of the functional module, and the probability set includes the statistical probabilities of various target states.
[0028] Exemplarily, the target state may include whether a functional module is used, the time interval between two adjacent uses, the average value of several usage durations, etc. The target state combination may be a combination of the above-mentioned target states, a combination of two or a combination of three target states, and the present application does not impose any restrictions on this.
[0029] Step S140: predicting the usage probability of the functional module based on the probability set of the target state combination of the functional module.
[0030] Step S160: Generate resource configuration information of each functional module based on the usage probability of each functional module in the target device.
[0031] The resource configuration information of the functional module represents the storage location of the resource files required by the functional module.
[0032] Step S180: In response to the function module in the target device starting to work, the function module is selected as the target module, and based on the resource configuration information of the target module, the resource file of the target module is loaded.
[0033] Specifically, the storage location of the resource may include a server, a hard disk of the target device, a memory of the target device, and a flash memory of the target device. Exemplarily, resource files with a higher probability of use may be stored in the flash memory, while resource files with a lower probability of use may be stored in other storage locations.
[0034] The above scheme predicts the usage probability of each functional module through the work record information of each functional module, and configures a suitable storage location for the resource files required by each functional module according to the usage probability of each functional module. The resource files required by the functional modules with a higher usage probability can be stored in a location with a higher access speed, thereby improving the speed of loading the required resource files when the device needs to use the above functional modules, thereby improving the response speed of the device.
[0035] In some embodiments, the work record information may be the work information of each functional module recorded by the target device during the work process, such as whether a functional module is in a working state (i.e., whether it is used) at a certain moment, the use characteristics of the functional module, etc.; wherein, the use characteristics of the functional module may at least represent at least one of the following: the time interval between two consecutive uses of the functional module by the target device is greater than the first time threshold, the average time duration of the target device's previous uses of the functional module is greater than the second time threshold, the target device has a function module focus event in the first time range, and the target device uses the target function of the function module in the second time range. The first time threshold, the second time threshold, the first time range, and the second time range can be selected as needed, and are not limited in this application. In other embodiments, the use characteristics of the functional module can also be used to represent, for example: the time interval between two consecutive uses of the functional module by the target device is less than the first time threshold, the average time duration of the target device's previous uses of the functional module is less than the second time threshold, and the target device does not have a function module focus event in the first time range.
[0036] For example, the SNMP (simple network management protocol) module is used to monitor the status of the device. The events that the SNMP module focuses on include hard disk error events and external alarm events. The target function of SNMP can be a hard disk detection function or a network switching function. Therefore, when the functional module is an SNMP module, the usage characteristics can be characterized as follows: the time interval between two consecutive uses of the SNMP module by the target device is greater than the first duration threshold, the average duration of the target device's previous uses of the SNMP module is greater than the second duration threshold, the target device has a hard disk error event or an external alarm event within the first time range, and the target device uses the hard disk detection function or the network switching function of the functional module within the second time range.
[0037] In some embodiments, step S120 may be implemented by the following steps:
[0038] Step S121: Based on the work record information of the functional module, obtain a first statistical probability that the functional module is in a working state, a second statistical probability that the functional module has several usage characteristics, and a third statistical probability that the functional module has several usage characteristics when in a working state.
[0039] Similarly, the SNMP module is used as an example to illustrate step S121. Referring to the above-mentioned embodiment, the use characteristics of the SNMP module can be characterized as follows: the time interval between two consecutive uses of the SNMP module by the target device is greater than the first time threshold, the average time duration of the target device's previous uses of the SNMP module is greater than the second time threshold, the target device has a hard disk error event or an external alarm event within the first time range, and the target device uses the hard disk detection function or network switching function of the functional module within the second time range. Therefore, the second statistical probability of the SNMP module may include: the probability that the time interval between two consecutive uses of the SNMP module by the target device is greater than the first time threshold, the probability that the average time duration of the target device's previous uses of the SNMP module is greater than the second time threshold, etc., which are not listed one by one here. The third statistical probability of the SNMP module may include: when SNMP is in a working state, the probability that the time interval between two consecutive uses of the SNMP module by the target device is greater than the first time threshold; when SNMP is in a working state, the probability that the average time duration of the target device's previous uses of the SNMP module is greater than the second time threshold, etc., which are not listed one by one here.
[0040] For example, please refer to Figure 2 , Figure 2 This is a schematic diagram of the work record information of the SNMP module; Figure 2 As shown, the work record information records 16 records of the SNMP module, among which the SNMP module is used 7 times, so the first statistical probability of the SNMP module is 7 / 16; in the 16 records, the SNMP module has 8 time intervals greater than the first duration threshold, so the second statistical probability corresponding to the average duration of the target device's use of the SNMP module is greater than the first duration threshold is 1 / 2. Among them, when the SNMP module is used, there are 5 time intervals greater than the first duration threshold, so the third statistical probability corresponding to the average duration of the target device's use of the SNMP module is greater than the first duration threshold is 5 / 7; when the SNMP module is used, there are 3 times when the average usage duration is greater than the second duration threshold (in this embodiment, the second duration threshold is 1 day), then when SNMP is in the working state, the third statistical probability corresponding to the average duration of the target device's use of the SNMP module is greater than the second duration threshold is 3 / 7; referring to the above calculation method, the second statistical probability and the third statistical probability corresponding to each usage feature of the SNMP module when it is used can be calculated one by one.
[0041] It should be noted that, corresponding to different functional modules, such as WiFi module, three-party access module, etc., their usage characteristics can represent different content from SNMP module, so as to predict the usage probability of the functional module. The specific content represented by the usage characteristics is not limited in this application. The functional module can have several different usage characteristics. Therefore, the "second statistical probability that the functional module has several usage characteristics respectively" mentioned in this application may include: in several work record information, the probability that the functional module has A usage characteristic, the probability that it has B usage characteristic, etc. The "third statistical probability that the functional module has several usage characteristics when it is in working state" may include: when the functional module is in working state, the probability of having A usage characteristic, the probability of having B usage characteristic, etc.
[0042] In this embodiment, the target state combination may exemplarily include: when the functional module is in a working state, the time interval between two consecutive uses of the SNMP module by the target device is greater than a first duration threshold, etc.; in other embodiments, the target state combination may also include: when the functional module is not in a working state, the time interval between two consecutive uses of the SNMP module by the target device is greater than a first duration threshold, etc.
[0043] In some embodiments, the above step S140 can be implemented by the following method:
[0044] Step S141: obtaining the usage probability of the functional module based on the first statistical probability, the second statistical probability and the third statistical probability of the functional module.
[0045] For example, since the first statistical probability represents the probability that the functional module is in a working state, the first statistical probability can be used as the predicted usage probability of the functional module.
[0046] In some embodiments, step S141 may be implemented by the following method:
[0047] Step S1411: Based on the first statistical probability, the second statistical probability and the third statistical probability of the functional module, a fourth statistical probability that the functional module is in a working state when it has the usage feature is calculated as the usage probability of the functional module.
[0048] For example, referring to the above embodiments and Figure 2, the first statistical probability that the SNMP module is in working state is P1; the second statistical probability of the SNMP module may include: the probability P21 that the time interval between two consecutive uses of the SNMP module by the target device is greater than the first time threshold; the probability P22 that the average time duration of the target device's previous uses of the SNMP module is greater than the second time threshold; the probability P23 that a hard disk error event or an external alarm event is triggered within the first time range; the probability P24 that the hard disk detection function or the network switching function is used within the second time range. The third statistical probability of the SNMP module may include: the probability P31 that the time interval between two consecutive uses of the SNMP module by the target device is greater than the first time threshold when SNMP is in working state; the probability P32 that the average time duration of the target device's previous uses of the SNMP module is greater than the second time threshold when SNMP is in working state; the probability P33 that a hard disk error event or an external alarm event is triggered within the first time range when SNMP is in working state; the probability P34 that the hard disk detection function or the network switching function is used within the second time range when SNMP is in working state. Then the fourth statistical probability P4 that the functional module is in working state when it has the use feature can be calculated by the following formula:
[0049] ;
[0050] In other embodiments, the fourth statistical probability P4 may also be calculated in other ways, such as using a conditional probability formula, etc., and the present application does not limit this.
[0051] In some embodiments, step S160 may be implemented by the following method:
[0052] Step S161: based on the usage probability of each functional module in the target device, the resource files required by the functional modules are stored in the first storage space of the target device in sequence.
[0053] Step S162: In response to the first storage space being insufficient, storing the remaining resource files required by the functional module in the second storage space of the target device; wherein the access speed of the first storage space is greater than the access speed of the second storage space.
[0054] Step S163: Generate resource configuration information of each functional module according to the storage location of the resource file corresponding to the functional module.
[0055] Exemplarily, the first storage space of the target device may be a flash memory, and the second storage space of the target device may be a hard disk; when the second storage space is insufficient, the remaining resource files required by the functional module may also be stored in the third storage space, and the third storage space may be a server. The present application does not limit the specific types of each storage space.
[0056] The access speed of the storage location of the resources required by the functional module may be positively correlated with the usage probability of the functional module. Specifically, in the present embodiment, after obtaining the usage probability of the functional module, the resource files required by the functional module with a higher usage probability may be first stored in a storage space with a faster access speed, such as a flash memory. Subsequently, the resource files required by each functional module may be stored in the flash memory in order of usage probability from high to low. If the flash memory space is insufficient, the resource files required by the remaining functional modules may be stored in a storage space with a slower access speed, such as a hard disk. If the hard disk space is also insufficient, the resource files required by the remaining functional modules may be stored in a storage space with an even slower access speed, such as a server, and so on. Based on the usage probability of the functional module, after storing the resource files required by the functional module in the corresponding storage space, the resource configuration information of the functional module may be generated, and the resource configuration information of the functional module represents the storage location of the resource files required by the functional module.
[0057] In other embodiments, the implementation of the above-mentioned step S160 may include: after obtaining the usage probability of the functional module, each functional module may be sorted according to the usage probability. According to the order of the size of the usage probability, a storage location is allocated for the resource files required by each functional module. For example, for a functional module with a higher usage probability, the resource files required by it can be stored in a storage space with a faster access speed, such as a flash memory. For a functional module with a lower usage probability, the resource files required by it can be stored in a storage space with a slower access speed, such as a hard disk or a server. After allocating storage locations based on the usage probability of the functional module, resource configuration information of each functional module can be generated. The resource configuration information of the functional module represents the storage location of the resource files required by the functional module, and then according to the resource configuration information, the resource files corresponding to each functional module are stored in the corresponding storage location.
[0058] In some embodiments, after generating resource configuration information of each functional module, a mapping relationship can be established between each functional module and the storage location where its resource file is stored. Therefore, when a resource file of a functional module needs to be used, the storage location of the resource file can be found through the mapping relationship to obtain the resource file.
[0059] In some embodiments, after step S180, the resource loading method may further include:
[0060] Step 200: In response to the completion of data processing of the target module, return to the step of acquiring work record information of each functional module in the target device during previous data processing to update resource configuration information of each functional module.
[0061] For example, please refer to Figure 3 , Figure 3It is a flow chart of another embodiment of the resource loading method of the present application; when storing resource files, the resource files required by the function modules can be stored in their respective corresponding storage locations. In response to the function module in the target device starting to work, the function module is selected as the target module, and based on the resource configuration information of the target module, the resource file of the target module is loaded, the function module is run, and then the work record information is updated; specifically, the resource file of the function module can be obtained from the corresponding storage location to run the function module and update the work record information. During the operation of the function module, the work record information of each function module can be kept updated, that is, during the operation of the current function module, the various usage characteristics of the current function module can be recorded, and the record information of other function modules that are not used can be recorded. If the function module is not used up, it returns to the running function module and executes the subsequent steps. When the data processing of the target module is completed, that is, the function module is used up, the work record information of each function module in the target device during the previous data processing is obtained, and the subsequent steps, that is, the aforementioned steps S100 to S180 are executed to re-predict the use probability of each function module and configure a new storage location for each function module.
[0062] In some embodiments, after the predicted usage probability of the functional modules is updated, a new storage location can be configured for each functional module based on the new usage probability order. For example, the resource files required by the four functional modules A to D are stored in the flash memory of the current device, and the resource files required by the four functional modules E to H are stored in the hard disk. After the predicted usage probability of the functional modules is updated, since the usage probability order of each functional module has changed, it is necessary to reconfigure the storage space for the resource files required by each functional module. Assuming that the predicted usage probability of the D functional module is less than the usage probability of the E functional module after the update, the resource files required by the D functional module can be removed from the flash memory and stored in the hard disk instead; and the resource files required by the E functional module can be transferred from the hard disk to the flash memory.
[0063] In the above embodiment, by continuously re-predicting the usage probability of each functional module during its working process and updating the storage space of the resource files required by each functional module, as the working time increases, the sample size of the work record information continues to grow, and the prediction result of the usage probability will become more accurate; the resource files required by the commonly used functional modules can be stored in a storage space with a faster access speed, thereby speeding up the response speed of the device.
[0064] In some embodiments, before step S100, the resource loading method may further include:
[0065] Step S010: Detecting the storage status of the second storage space in the target device to obtain a detection result; wherein the detection result indicates whether there is a resource file in the second storage space that is not stored in the first storage space in the target device, and the access speed of the first storage space is greater than the access speed of the second storage space;
[0066] Step S020: In response to the detection result indicating that there is no resource file in the second storage space that is not stored in the first storage space, the resource file that is not stored in the first storage space is downloaded to the second storage space, and the resource configuration information of the functional module is updated.
[0067] The first storage space may be a flash memory, and the second storage space may be a hard disk. Usually, the resource files required by the commonly used functional modules may be stored in the flash memory, and the resource files required by the infrequently used functional modules may be stored in the server. If the target device has a hard disk, the resource files required by the infrequently used functional modules stored in the server may be downloaded to the hard disk first. With the above scheme, when the device needs to use a functional module whose required resource files are not stored in the flash memory during operation, it can be directly obtained from the hard disk without downloading from the server. Since the access speed of the hard disk is faster than that of the server, the response speed of the device can be further improved.
[0068] In step S010, the detection result can be used to determine whether the hard disk stores resource files that are not in the flash memory. For example, if the flash memory only stores resource files of commonly used functional modules, the detection result can be used to determine whether the hard disk stores resource files of infrequently used functional modules. If the hard disk does not store resource files of infrequently used functional modules, the resource configuration information of the functional modules is downloaded from the server and updated. Since the resource configuration information indicates the storage location of the resource files required by the functional modules, after the resource configuration information is updated, for example, the storage location is changed from the server to the hard disk, when the resource files of the corresponding functional modules need to be used later, the corresponding resource files can be directly obtained from the hard disk.
[0069] In some embodiments, the resource loading method may further include configuring an initial storage location for each functional module. Specifically, the initial storage location may be the original storage location of each resource file when the device is started; or, the initial storage location of each functional module may be configured according to preference, which is not limited in this application.
[0070] In some embodiments, the resource loading method may further include establishing a mapping relationship between each functional module and its required resource files, and when the device needs to use the functional module, the required resource files may be determined based on the mapping relationship. For example, the SNMP functional module may be mapped with the SNMP service process, the SNMP dynamic library, and the SNMP related images.
[0071] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0072] See also Figure 4 , Figure 4 4 is a schematic diagram of a framework of an embodiment of an electronic device of the present application. The electronic device 40 includes a memory 41 and a processor 42 coupled to each other, and the processor 42 is used to execute program instructions stored in the memory 41 to implement the steps in any of the above resource loading method embodiments. In a specific implementation scenario, the electronic device 40 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 40 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0073] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above-mentioned resource loading method embodiments. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.
[0074] The above scheme predicts the usage probability of each functional module through the work record information of each functional module, and configures a suitable storage location for the resource files required by each functional module according to the usage probability of each functional module. The resource files required by the functional modules with a higher usage probability can be stored in a location with a higher access speed, thereby improving the speed of loading the required resource files when the device needs to use the above functional modules, thereby improving the response speed of the device.
[0075] See also Figure 5 , Figure 5It is a framework diagram of an embodiment of a resource loading system of the present application; specifically, the resource loading system 500 includes a server 510 and a target device 520, and the server 510 and the target device 520 are communicatively connected, wherein the target device 520 is used to execute the steps in any of the above-mentioned resource loading method embodiments.
[0076] The above scheme predicts the usage probability of each functional module through the work record information of each functional module, and configures a suitable storage location for the resource files required by each functional module according to the usage probability of each functional module. The resource files required by the functional modules with a higher usage probability can be stored in a location with a higher access speed, thereby improving the speed of loading the required resource files when the device needs to use the above functional modules, thereby improving the response speed of the device.
[0077] See also Figure 6 , Figure 6 The computer-readable storage medium 60 stores program instructions 601 that can be executed by a processor, and the program instructions 601 are used to implement the steps in any of the above resource loading method embodiments.
[0078] The above scheme predicts the usage probability of each functional module through the work record information of each functional module, and configures a suitable storage location for the resource files required by each functional module according to the usage probability of each functional module. The resource files required by the functional modules with a higher usage probability can be stored in a location with a higher access speed, thereby improving the speed of loading the required resource files when the device needs to use the above functional modules, thereby improving the response speed of the device.
[0079] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0080] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0081] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0082] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0083] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0084] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
Claims
1. A resource loading method, It is characterized in that include: Obtain the work record information of each functional module in the target device during each data processing; The work record information at least includes usage characteristics related to the functions performed by the functional module itself; Based on the work record information of the functional module, a first statistical probability that the functional module is in a working state, a second statistical probability that the functional module has a plurality of usage characteristics, and a third statistical probability that the functional module has a plurality of usage characteristics when in the working state are obtained; Obtaining a usage probability of the functional module based on the first statistical probability, the second statistical probability and the third statistical probability of the functional module; Generate resource configuration information of each functional module based on the usage probability of each functional module in the target device; wherein the resource configuration information of the functional module represents the storage location of the resource file required by the functional module; In response to the function module in the target device starting to work, selecting the function module as a target module, and loading a resource file of the target module based on resource configuration information of the target module; The several usage characteristics represent at least two of the following: The time interval between two consecutive uses of the functional module by the target device is greater than a first time threshold; The average duration of the target device's use of the functional module is greater than a second duration threshold; The target device has a concerned event of the functional module within a first time range; The target device uses the target function of the function module within a second time range.
2. The method according to claim 1, It is characterized in that The obtaining the usage probability of the functional module based on the first statistical probability, the second statistical probability and the third statistical probability of the functional module includes: Based on the first statistical probability, the second statistical probability and the third statistical probability of the functional module, a fourth statistical probability that the functional module is in the working state when having the usage feature is calculated as the usage probability of the functional module.
3. The method according to claim 1, It is characterized in that The generating resource configuration information of each functional module based on the usage probability of each functional module in the target device includes: Based on the order of usage probability of each of the function modules in the target device, sequentially storing resource files required by the function modules in the first storage space of the target device; In response to the first storage space being insufficient, storing the remaining resource files required by the functional module in a second storage space of the target device; wherein the access speed of the first storage space is greater than the access speed of the second storage space; The resource configuration information of each functional module is generated according to the storage location of the resource file corresponding to the functional module.
4. The method according to claim 1, It is characterized in that After loading the resource file of the target module based on the resource configuration information of the target module, the method further includes: In response to the completion of the data processing of the target module, the step of obtaining the work record information of each functional module in the target device during the previous data processing is returned to update the resource configuration information of each functional module.
5. The method according to claim 1, It is characterized in that Before obtaining the work record information of each functional module in the target device during the previous data processing, the method further includes: Detecting the storage status of the second storage space in the target device to obtain a detection result; wherein the detection result indicates whether there is a resource file in the second storage space that is not stored in the first storage space in the target device, and the access speed of the first storage space is greater than the access speed of the second storage space; In response to the detection result indicating that there is no resource file in the second storage space that is not stored in the first storage space, the resource file that is not stored in the first storage space is downloaded to the second storage space, and the resource configuration information of the functional module is updated.
6. An electronic device, It is characterized in that It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the resource loading method according to any one of claims 1 to 5.
7. A resource loading system, It is characterized in that It comprises a server and a target device, wherein the server and the target device are in communication connection, wherein the target device is used to execute the resource loading method according to any one of claims 1 to 5.
8. A computer-readable storage medium having program instructions stored thereon, It is characterized in that When the program instructions are executed by a processor, the resource loading method described in any one of claims 1 to 5 is implemented.
