Data loading method and device, electronic equipment, storage medium and computer program product

By preloading processing and optimizing the storage and loading order of configuration parameters during execution cycles, the problem of excessive memory usage during camera startup is solved, thus improving camera performance.

CN120835202APending Publication Date: 2025-10-24BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410495049.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

As the number of scenes increases, more and more parameter data is required when the camera is started, resulting in a large memory usage of the device and an inability to meet higher-level photography needs.

Method used

The first and second execution cycles of the configuration file are determined through preloading processing, and are cached in corresponding storage spaces respectively. The loading order is determined according to the execution time to optimize memory usage.

Benefits of technology

Optimized the data load and memory usage when the camera starts, improving the overall performance of the camera.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120835202A_ABST
    Figure CN120835202A_ABST
Patent Text Reader

Abstract

The invention relates to a data loading method and device, electronic equipment, a storage medium and a computer program product. The method comprises the steps of determining a configuration file required by a photographing function in response to a starting request for the photographing function; performing preloading processing on the configuration file to obtain preloading information; based on the first execution cycle and the second execution cycle, caching each configuration parameter included in the configuration file to a corresponding storage space; based on the execution time of the configuration parameters in each storage space, determining a loading sequence of each storage space; according to the loading sequence of the storage spaces corresponding to all the configuration files, the configuration parameters in the storage spaces are loaded in sequence. According to the embodiment of the invention, the configuration parameters can be cached to different storage spaces according to the execution cycle of the configuration parameters, the loading sequence of each storage space is determined accordingly, the configuration parameters in the different storage spaces are loaded in a time-sharing manner according to the loading sequence, and the data load and the memory occupation when the camera is started can be optimized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of data loading, and particularly relates to a data loading method and device, electronic equipment, storage medium and computer program product. BACKGROUND

[0002] With the increasing popularity of mobile terminals, users use terminals to take pictures has become a common method. Currently, users need to use different parameters in different scenes to take high-quality photos. Currently, a photo includes parameters such as brightness, color, white balance, and noise reduction. Different parameter files are configured for different scenes, and the camera loads different parameter files when the corresponding environment is identified to make the generated picture higher in quality. With the increase in scenes, the parameter data is increasing, and the parameter data required when the camera starts is also increasing, resulting in a large amount of device memory required when the camera starts and after starting, and a small amount of available device memory for taking pictures, which cannot meet higher-level photographing requirements. SUMMARY

[0003] To overcome the problems in the related art, the present disclosure provides a data loading method, device, electronic equipment, storage medium and computer program product. To solve the problem that the historical operation information of the application program is difficult to find.

[0004] According to a first aspect of an embodiment of the present disclosure, a data loading method is provided, comprising:

[0005] In response to a start request for a photographing function, determining a configuration file required by the photographing function; wherein different configuration files include different configuration parameters;

[0006] Preloading the configuration file to obtain preloading information; wherein the preloading information includes: a first execution period of the preloaded configuration file and a second execution period of each configuration parameter in the preloaded configuration file;

[0007] Based on the first execution period and the second execution period, each configuration parameter included in the configuration file is cached to a corresponding storage space; wherein different storage spaces are respectively used to cache configuration parameters with different execution periods, and one configuration file corresponds to at least two storage spaces;

[0008] Based on the execution time of the configuration parameters in each storage space, determining the loading order of each storage space; wherein the execution time of the configuration parameter is the start time of the second execution period;

[0009] According to the loading order of each storage space corresponding to all configuration files, the configuration parameters in each storage space are loaded in sequence.

[0010] In some embodiments, the caching the configuration parameters included in the configuration file into the corresponding storage spaces respectively based on the first execution period and the second execution period comprises:

[0011] comparing the first execution period of the configuration file with the second execution period of each configuration parameter included in the configuration file respectively to obtain a comparison result corresponding to each configuration parameter;

[0012] caching each configuration parameter into the corresponding storage space based on the comparison result.

[0013] In some embodiments, the caching each configuration parameter into the corresponding storage space based on the comparison result comprises:

[0014] in a case where the comparison result indicates that the second execution period of the configuration parameter is the same as the first execution period of the configuration file to which the configuration parameter belongs, caching the configuration parameter into the first storage space corresponding to the configuration file;

[0015] in a case where the comparison result indicates that the second execution period of the configuration parameter is different from the first execution period of the configuration file to which the configuration parameter belongs, caching the configuration parameter into the second storage space corresponding to the configuration file;

[0016] wherein the release time of the first storage space is different from the release time of the second storage space.

[0017] In some embodiments, the method further comprises:

[0018] releasing the second storage space when the loading of the configuration parameter in the second storage space is completed, and releasing the first storage space when the loading of all configuration parameters corresponding to the configuration file is completed.

[0019] In some embodiments, the method further comprises:

[0020] determining a similarity between the configuration parameters cached in the first storage space and the second storage space corresponding to the configuration file;

[0021] determining a first target configuration parameter from the second storage space based on the similarity;

[0022] filtering out the first target configuration parameter from the second storage space.

[0023] In some embodiments, the determining the first target configuration parameter from the second storage space based on the similarity comprises:

[0024] determining, as the first target configuration parameter, a configuration parameter in the second storage space that has a similarity greater than a preset threshold with the configuration parameter cached in the first storage space.

[0025] In some embodiments, the method further comprises:

[0026] determining a first storage address of the first target configuration parameter in the second storage space;

[0027] determining a second storage address of a configuration parameter same as the first target configuration parameter in the first storage space;

[0028] establishing a mapping relationship between the first storage address and the second storage address.

[0029] In some embodiments, the loading of the configuration parameters in each storage space in sequence comprises:

[0030] when loading to the first storage address in the second storage space, obtaining the configuration parameter stored in the second storage address from the first storage space based on the mapping relationship, and loading the configuration parameter stored in the second storage address.

[0031] In some embodiments, the determining of the loading order of each storage space based on the execution time of the configuration parameters in each storage space comprises:

[0032] determining the configuration parameter closest to the start time of the first execution period of the configuration file in each storage space as the second target configuration parameter;

[0033] determining the start time in the second execution period of each second target configuration parameter as the loading time of each storage space;

[0034] determining the loading order of each storage space based on the order of the loading time.

[0035] In some embodiments, the method further comprises:

[0036] compiling the configuration parameters loaded from each storage space to obtain a compiled file;

[0037] starting the photographing function based on the compiled file.

[0038] According to a second aspect of the embodiments of the present disclosure, a data loading apparatus is provided, comprising:

[0039] a first determining module configured to determine a configuration file required by a photographing function in response to a start request for the photographing function; wherein different configuration files include different configuration parameters;

[0040] a preloading module configured to perform preloading processing on the configuration file to obtain preloading information; wherein the preloading information includes a first execution period of the preloaded configuration file and a second execution period of each configuration parameter in the preloaded configuration file;

[0041] The cache module is configured to cache each configuration parameter included in the configuration file into a corresponding storage space based on the first execution period and the second execution period; wherein different storage spaces are respectively used to cache configuration parameters with different execution periods, and one configuration file corresponds to at least two storage spaces;

[0042] The second determination module is configured to determine the loading order of each storage space based on the execution time of the configuration parameter in each storage space; wherein the execution time of the configuration parameter is the start time of the second execution period;

[0043] The loading module is configured to load the configuration parameters in each storage space in turn according to the loading order of each storage space corresponding to all configuration files.

[0044] In some embodiments, the apparatus further comprises:

[0045] Comparing the first execution period of the configuration file with the second execution period of each configuration parameter included in the configuration file respectively to obtain a comparison result corresponding to each configuration parameter;

[0046] Based on the comparison result, each configuration parameter is cached into a corresponding storage space.

[0047] In some embodiments, the apparatus further comprises:

[0048] In the case where the comparison result indicates that the second execution period of the configuration parameter is the same as the first execution period of the configuration file to which the configuration parameter belongs, the configuration parameter is cached into the first storage space corresponding to the configuration file;

[0049] In the case where the comparison result indicates that the second execution period of the configuration parameter is different from the first execution period of the configuration file to which the configuration parameter belongs, the configuration parameter is cached into the second storage space corresponding to the configuration file;

[0050] Wherein the release time of the first storage space is different from the release time of the second storage space.

[0051] In some embodiments, the apparatus further comprises:

[0052] Upon completion of loading the configuration parameter in the second storage space, the second storage space is released, and upon completion of loading all configuration parameters corresponding to the configuration file, the first storage space is released.

[0053] In some embodiments, the apparatus further comprises:

[0054] Determine the similarity between the configuration parameters cached in the first storage space and the second storage space corresponding to the configuration file;

[0055] determine the first target configuration parameter from the second storage space based on the similarity;

[0056] filter the first target configuration parameter from the second storage space.

[0057] In some embodiments, the apparatus further includes:

[0058] determine, as the first target configuration parameter, a configuration parameter in the second storage space that has a similarity greater than a preset threshold to the configuration parameter cached in the first storage space.

[0059] In some embodiments, the apparatus further includes:

[0060] determine a first storage address of the first target configuration parameter in the second storage space;

[0061] determine a second storage address of a configuration parameter identical to the first target configuration parameter in the first storage space;

[0062] establish a mapping relationship between the first storage address and the second storage address.

[0063] In some embodiments, the apparatus further includes:

[0064] based on the mapping relationship, obtain the configuration parameter stored in the second storage address from the first storage space when loaded into the first storage address in the second storage space, and load the configuration parameter stored in the second storage address.

[0065] In some embodiments, the apparatus further includes:

[0066] determine, as the second target configuration parameter, a configuration parameter in each storage space closest to a start time of a first execution period of the configuration file;

[0067] determine, as a loading time of each storage space, a start time in a second execution period of each second target configuration parameter;

[0068] determine a loading order of each storage space based on the loading time.

[0069] In some embodiments, the apparatus further includes:

[0070] compile the configuration parameters loaded from each storage space to obtain a compiled file;

[0071] start the photographing function based on the compiled file.

[0072] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including:

[0073] a processor;

[0074] a memory for storing computer programs or instructions;

[0075] The processor executes the computer programs or instructions to implement the steps of the method according to any one of the first aspect.

[0076] According to a fourth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, and the storage medium stores computer programs or instructions, and when the computer programs or instructions in the storage medium are executed by a processor, the steps of the method according to any one of the first aspect are implemented.

[0077] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, and the computer program product includes computer programs or instructions, and when the computer programs or instructions are executed by a processor, the steps of the method according to any one of the first aspect are implemented.

[0078] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:

[0079] In the data loading method provided by the embodiments of the present disclosure, in response to a start request of a photographing function, configuration files required by the photographing function are determined; the configuration files are preloaded to obtain preloading information; based on a first execution period and a second execution period, each configuration parameter included in the configuration files is cached to a corresponding storage space; based on the execution time of the configuration parameters in each storage space, the loading order of each storage space is determined; and the configuration parameters in each storage space are loaded in sequence according to the loading order of each storage space corresponding to all configuration files.

[0080] That is, when receiving a start request of a photographing function, first, configuration files required by the photographing function are determined, and then the configuration files are preloaded to obtain preloading information including a first execution period and a second execution period. Then, according to the preloading information, the configuration parameters are cached to corresponding storage spaces. Next, based on the execution time of the configuration parameters in each storage space, the loading order is determined. Finally, the configuration parameters in the storage spaces are loaded in sequence according to the loading order of the storage spaces corresponding to all configuration files. The configuration parameters can be cached to different storage spaces according to the execution period, and the loading order of the storage spaces is determined accordingly, and then the configuration parameters in different storage spaces are loaded in time according to the loading order, which can optimize the data load and memory occupation when the camera starts.

[0081] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0082] The accompanying drawings, which are incorporated herein and constitute part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure.

[0083] Figure 1 is a flowchart of a data loading method according to an example embodiment Figure One .

[0084] Figure 2 is a storage diagram of configuration parameters when no preloading process is performed on the configuration parameters.

[0085] Figure 3 is a flowchart of configuration parameter caching according to an example embodiment.

[0086] Figure 4 is a storage space diagram according to an example embodiment.

[0087] Figure 5 is a flowchart of a data loading method according to an example embodiment Figure Two .

[0088] Figure 6 is a configuration parameter time-sharing loading diagram according to an example embodiment Figure One .

[0089] Figure 7 is a configuration parameter time-sharing loading diagram according to an example embodiment Figure Two .

[0090] Figure 8 is a block diagram of a data loading apparatus according to an example embodiment.

[0091] Figure 9 is a structural block diagram of an apparatus 900 according to an example embodiment.

[0092] Figure 10 is a block diagram of an apparatus 1000 for data loading according to an example embodiment. DETAILED DESCRIPTION

[0093] The example embodiments will be described in detail herein with reference to the accompanying drawings. The following description is presented in terms of the example embodiments, which represent the best understanding of the present disclosure. However, it should be appreciated that all features identified herein can be though of as being typical of those which would be within the scope of the present disclosure as claimed.

[0094] Figure 1is a flow of a data loading method according to an exemplary embodiment Figure One As shown in Figure 1 The method mainly includes the following steps:

[0095] In step 101, in response to a start request for a photographing function, a configuration file required by the photographing function is determined; different configuration files include different configuration parameters;

[0096] In step 102, the configuration file is preloaded to obtain preloading information; the preloading information includes a first execution period of the preloaded configuration file and a second execution period of each configuration parameter in the preloaded configuration file;

[0097] In step 103, based on the first execution period and the second execution period, each configuration parameter included in the configuration file is cached to a corresponding storage space; different storage spaces are respectively used to cache configuration parameters with different execution periods, and one configuration file corresponds to at least two storage spaces;

[0098] In step 104, based on the execution time of the configuration parameters in each storage space, the loading order of each storage space is determined; the execution time of the configuration parameters is the starting time of the second execution period;

[0099] In step 105, according to the loading order of each storage space corresponding to all configuration files, the configuration parameters in each storage space are loaded in sequence.

[0100] It should be noted that the data loading method proposed in the present disclosure can be applied to electronic devices with photographing functions. Here, the electronic device can include a terminal device, such as a mobile terminal or a fixed terminal. The mobile terminal can include a mobile phone, a tablet computer, a notebook computer, a wearable electronic device, etc. The fixed terminal can include a desktop computer, a smart television, a vehicle-mounted device, etc.

[0101] It should be noted that the configuration files required when starting the photographing function mainly include a camera configuration file and a lens configuration file, wherein the camera configuration file is a file used for camera parameter setting, and the lens configuration file is a file used for lens parameter setting. The camera configuration file and the lens configuration file help the camera to quickly adjust to a state suitable for the current shooting scene. The camera configuration file can include preset values of key parameters such as exposure, white balance, sensitivity, shutter speed, etc. According to the shooting mode selected by the user, such as portrait mode, night scene mode, etc., the parameters in the camera configuration file will be adjusted accordingly to obtain the best shooting effect. In addition, the lens configuration file is mainly used to correct lens distortion and dark corners and other problems. When the camera recognizes the lens used, the corresponding lens configuration file will be automatically loaded to correct the picture. The loading and processing process of the camera configuration file and the lens configuration file will be completed before the photographing function is started, so as to ensure that the camera can enter the best shooting state in the shortest time. By optimizing the loading and processing efficiency of the camera configuration file and the lens configuration file, the data load and memory occupation of the camera when starting can be reduced, and the overall performance of the camera can be improved.

[0102] It should be noted that in the preloading process, first, the configuration file loading process of the camera when actually starting, i.e., the actual loading process of the configuration file, is obtained, then each loading process in the actual loading process is analyzed, and then the actual loading process is simulated in the memory based on the analysis of each loading process to load the configuration file, so that the preloading information of each configuration parameter in the configuration file can be obtained, which can provide data support for subsequent memory optimization operations when the camera starts.

[0103] It should be noted that the preloading information not only includes the type and parameter value of the configuration parameter, but also records the size of the required space and other key information. Based on these data, the memory space can be more efficiently utilized, the corresponding memory size can be allocated to the configuration parameter according to the actual demand, meaningless space application in the loading process can be avoided, the memory occupation situation can be effectively optimized, and the overall performance of the system can be improved.

[0104] Figure 2 is a storage diagram of the configuration parameter when the preloading process of the configuration parameter is not performed, as shown in Figure 2 The configuration parameter can be a 64-bit integer, a 32-bit integer, a short integer, or a character type. Taking the 64-bit integer configuration parameter as an example, the space 201 represents the actual memory space size required by the parameter. However, in the case where the preloading process is not performed, since the size of the configuration parameter is not estimated, an additional space 202 is also allocated as idle memory, which causes waste of memory resources. In view of the above problem, through the preloading process, the type and size of the configuration parameter can be estimated, so that appropriate memory space can be allocated to the configuration parameter, the problem of memory waste caused by excessive allocation can be avoided, and the use efficiency of the memory can be improved.

[0105] Here, the first execution cycle refers to a time range during which each configuration file is loaded from the start to the completion. The first execution cycle starts at the earliest start time of the configuration parameters in the configuration file and ends at the latest completion time of the configuration parameters.

[0106] For example, assume that a configuration file contains three configuration parameters A, B and C, each of which has a different loading time. Specifically, the loading of the configuration parameter A starts at 10:28:11 and is completed at 10:28:15; the loading of the configuration parameter B starts at 10:28:25 and is completed at 10:30:34; and the loading of the configuration parameter C starts at 10:29:07 and is completed at 10:29:11. Thus, it can be determined that the configuration parameter A is the earliest to start loading, at 10:28:11, and the configuration parameter B is the latest to complete loading, at 10:30:34. Therefore, the first execution cycle of the configuration file starts at 10:28:11 and ends at 10:30:34.

[0107] Here, the second execution cycle refers to a time range during which each configuration parameter in the configuration file is loaded from the start to the completion. For example, the loading of the configuration parameter D starts at 10:28:56 and is completed at 10:29:15, so the second execution cycle of the configuration parameter D starts at 10:28:56 and ends at 10:29:15.

[0108] It can be understood that the first execution cycle of the configuration file can be determined based on the second execution cycle of each configuration parameter in the configuration file. By analyzing the loading time of each configuration parameter, the total time range required for the entire configuration file to be loaded from the start to the completion, i.e., the first execution cycle, can be obtained, which helps to grasp the loading situation of the configuration file and further optimize the data load and memory occupation during the start of the camera.

[0109] It should be noted that the first execution cycle and the second execution cycle each have a clear start time and end time. Specifically, the start time is the time node at which the configuration parameter or the entire configuration file starts to be loaded, and the end time is the time node at which the configuration parameter or the entire configuration file is loaded. Such time definition helps to grasp the length of the loading process and provides data support for subsequent optimization operations.

[0110] It can be understood that based on the first execution cycle of the configuration file and the second execution cycle of each configuration parameter in the configuration file, each configuration parameter can be cached in different storage spaces according to the execution time and the loading order of the storage spaces can be determined based on the execution time, thereby providing a data basis for the subsequent time-sharing loading of the configuration parameters.

[0111] In the data loading method provided by the embodiments of the present disclosure, in response to a start request of a photographing function, configuration files required by the photographing function are determined; the configuration files are preloaded to obtain preloading information; based on a first execution period and a second execution period, each configuration parameter included in the configuration files is cached to a corresponding storage space; based on the execution time of the configuration parameters in each storage space, the loading order of each storage space is determined; and the configuration parameters in each storage space are loaded in sequence according to the loading order of each storage space corresponding to all configuration files.

[0112] That is, when receiving the start request of the photographing function, first, the configuration files required by the start of the photographing function are determined, and then the configuration files are preloaded to obtain preloading information including the first execution period and the second execution period. Then, according to the preloading information, the configuration parameters are cached to the corresponding storage spaces. Next, based on the execution time of the configuration parameters in each storage space, the loading order is determined. Finally, the configuration parameters in the storage spaces are loaded in sequence according to the loading order of the storage spaces corresponding to all configuration files. The configuration parameters can be cached to different storage spaces according to the execution period, and the loading order of the storage spaces is determined accordingly, and then the configuration parameters in different storage spaces are loaded in time according to the loading order, which can optimize the data load and memory occupation when the camera starts.

[0113] In some embodiments, the caching of each configuration parameter included in the configuration files to the corresponding storage space based on the first execution period and the second execution period comprises:

[0114] comparing the first execution period of the configuration files with the second execution period of each configuration parameter included in the configuration files to obtain a comparison result corresponding to each configuration parameter;

[0115] based on the comparison result, caching each configuration parameter to the corresponding storage space.

[0116] It should be noted that the comparison between the first execution period and the second execution period is realized by comparing the start time and the end time of the execution period. Through the comparison, the relationship between the second execution period of each configuration parameter and the first period of the configuration files can be obtained, thereby providing a basis for subsequent caching of each configuration parameter to different storage spaces.

[0117] Figure 3 is a flowchart of configuration parameter caching according to an exemplary embodiment, as shown in Figure 3 the following steps are included:

[0118] In step 301, the configuration file is preloaded to obtain preloading information including a first execution cycle of the preloading configuration file and a second execution cycle of each configuration parameter in the preloading configuration file.

[0119] In step 302, the first execution cycle of the configuration file is compared with the second execution cycle of each configuration parameter included in the configuration file respectively to obtain a comparison result corresponding to each configuration parameter, and each configuration parameter is cached to a corresponding storage space based on the comparison result.

[0120] In step 303, in a case where the comparison result indicates that the second execution cycle of the configuration parameter is the same as the first execution cycle of the configuration file to which the configuration parameter belongs, the configuration parameter is cached to the first storage space corresponding to the configuration file; in a case where the comparison result indicates that the second execution cycle of the configuration parameter is different from the first execution cycle of the configuration file to which the configuration parameter belongs, the configuration parameter is cached to the second storage space corresponding to the configuration file.

[0121] In the embodiments of the present disclosure, by comparing the first execution cycle of the configuration file with the second execution cycle of each configuration parameter one by one, a comparison result corresponding to each configuration parameter can be obtained. Based on the comparison result, each configuration parameter can be cached to a corresponding storage space, thereby providing support for subsequent memory optimization.

[0122] In some embodiments, the caching of each configuration parameter to a corresponding storage space based on the comparison result comprises:

[0123] In a case where the comparison result indicates that the second execution cycle of the configuration parameter is the same as the first execution cycle of the configuration file to which the configuration parameter belongs, the configuration parameter is cached to the first storage space corresponding to the configuration file.

[0124] In a case where the comparison result indicates that the second execution cycle of the configuration parameter is different from the first execution cycle of the configuration file to which the configuration parameter belongs, the configuration parameter is cached to the second storage space corresponding to the configuration file.

[0125] The release time of the first storage space is different from the release time of the second storage space.

[0126] It should be noted that one configuration file corresponds to at least two storage spaces, and the number of storage spaces and how to cache the configuration parameters to these different storage spaces can be flexibly set according to actual application scenarios and requirements, which are not specifically limited here, and can meet the actual requirements in different scenarios, thereby realizing more efficient resource configuration and memory optimization. Figure 4 is a storage space diagram shown according to an example embodiment, as Figure 4As shown, the configuration file A corresponds to two storage spaces, i.e., a first storage space 401 and a second storage space 402.

[0127] It should be noted that when the start time and the end time of the first execution period and the second execution period are consistent, the first execution period and the second execution period are the same. When one of the start time and the end time of the first execution period and the second execution period is different, the first execution period and the second execution period are different. For example, if the first execution period starts at 10:29:11 and ends at 10:30:35, when the start time and the end time of the second execution period are consistent with those of the first execution period, the first execution period and the second execution period are the same. If the second execution period starts at 10:29:15, although the end time of the first execution period and the second execution period is the same, because the start time of the first execution period and the second execution period is different, the first execution period and the second execution period are different. Similarly, if the second execution period ends at 10:30:20, even if the start time of the first execution period and the second execution period is the same, because the end time of the first execution period and the second execution period is different, the first execution period and the second execution period are different. Therefore, the key to determining whether the first execution period and the second execution period are the same is to compare whether the start time and the end time of the first execution period and the second execution period are consistent.

[0128] It can be understood that because the configuration parameters cached in the second storage space have completed their loading tasks before the overall loading of the configuration file is completed, the memory resources occupied by the second storage space can be released in advance, which helps to improve the efficiency of memory management, optimizes the memory occupation of the device, and further improves the overall performance of photographing.

[0129] In the embodiments of the present disclosure, if the comparison result indicates that the second execution period of the configuration parameter is the same as the first execution period of the configuration file to which the configuration parameter belongs, the configuration parameter is cached to the first storage space corresponding to the configuration file; if the comparison result indicates that the second execution period of the configuration parameter is different from the first execution period of the configuration file to which the configuration parameter belongs, the configuration parameter is cached to the second storage space corresponding to the configuration file. The release time of the first storage space and the release time of the second storage space are not the same, and efficient use and flexible management of storage resources can be achieved.

[0130] In some embodiments, the method further comprises:

[0131] When the loading of the configuration parameters in the second storage space is completed, the second storage space is released, and when the loading of all configuration parameters corresponding to the configuration file is completed, the first storage space is released.

[0132] It should be noted that when releasing the second storage space, various release strategies can be adopted. One strategy is to release the storage space occupied by the configuration parameter immediately after loading each configuration parameter, ensuring efficient use of memory. Another strategy is to load a preset number of configuration parameters and then release the space occupied by the configuration parameters in batches to reduce the frequency of release operations. Another strategy is to uniformly release the entire storage space after all configuration parameters in the second storage space are loaded. The selection of different release strategies should be based on actual needs and scenarios, and there is no fixed limit. Regardless of the strategy adopted, the purpose is to release the memory space occupied by the configuration parameters that are no longer needed in advance, thereby optimizing the memory usage of the camera during startup and after startup and improving overall performance.

[0133] In the embodiments of the present disclosure, after all configuration parameters in the second storage space are loaded, the storage space can be released to optimize memory usage. After all configuration parameters corresponding to the entire configuration file are loaded, the first storage space can be released to ensure that the entire loading and caching process is efficient and orderly, and to optimize the memory usage of the camera during startup and after startup.

[0134] In some embodiments, the method further comprises:

[0135] determining the similarity between the configuration parameters cached in the first storage space and the second storage space corresponding to the configuration file;

[0136] determining the first target configuration parameter from the second storage space based on the similarity;

[0137] filtering out the first target configuration parameter from the second storage space.

[0138] Here, the similarity can be determined by analyzing various parameter information of the configuration parameters, such as parameter values, parameter types, type sizes, etc. The similarity can be determined based on the direct similarity between the parameter information, or based on a more complex algorithm or logic.

[0139] It can be understood that since the first storage space is released only after the entire configuration file is loaded, the second storage space can be released as soon as the internal configuration parameters are loaded. Therefore, when there is a first target configuration parameter in the second storage space that has a similarity higher than a preset threshold with the configuration parameters already cached in the first storage space, there is no need to cache the first target configuration parameter in both the first storage space and the second storage space. At this time, the first target configuration parameter can be filtered out from the second storage space. When the first target configuration parameter in the second storage space needs to be loaded, the mapping relationship established is used to directly switch to the first storage space to load the same configuration parameter as the first target configuration parameter. This approach not only helps to reduce memory usage, but also improves the effect of memory optimization, making the operation of the photographing function more efficient and smooth.

[0140] In the embodiments of the present disclosure, the similarity between the configuration parameters cached in the first storage space and the second storage space corresponding to the configuration file is first determined, and then the first target configuration parameter with higher similarity to the configuration parameters cached in the first storage space is determined in the second storage space based on the similarity. Finally, in order to optimize the memory occupation, the first target configuration parameter is filtered out from the second storage space.

[0141] In some embodiments, the first target configuration parameter is determined from the second storage space based on the similarity, comprising:

[0142] The configuration parameter with a similarity greater than a preset threshold between the configuration parameters cached in the first storage space and the second storage space is determined as the first target configuration parameter.

[0143] It should be noted that the preset threshold can be adjusted according to actual application scenarios and specific requirements. For example, the preset threshold can be set to 90% to meet certain requirements for similarity; in a scenario with higher requirements for similarity, the preset threshold can be set to 95% to ensure more accurate matching and screening. Therefore, the setting of the preset threshold should be weighed and adjusted according to actual requirements to achieve the best effect.

[0144] In the embodiments of the present disclosure, the configuration parameters with a similarity exceeding the preset threshold to the configuration parameters cached in the first storage space are confirmed in the second storage space, and these configuration parameters are determined as the first target configuration parameter, so as to be filtered out in the second storage space and optimize the memory occupation.

[0145] In some embodiments, the method further comprises:

[0146] determining a first storage address of the first target configuration parameter in the second storage space;

[0147] determining a second storage address of the configuration parameter identical to the first target configuration parameter in the first storage space;

[0148] establishing a mapping relationship between the first storage address and the second storage address.

[0149] It should be noted that each configuration parameter has a corresponding storage address in the storage space, and when the configuration parameter is filtered out, the storage address corresponding to the configuration parameter can be retained for subsequent use.

[0150] Here, the mapping relationship is used to jump to obtain the configuration parameter stored in the second storage address in the first storage space when the first storage address loaded into the second storage space, and the memory space occupied by the configuration parameter in the second storage space which has a similarity to the configuration parameter in the first storage space exceeding a preset threshold can be released, and the occupation of the memory resource is optimized.

[0151] In the embodiments of the present disclosure, first, the first storage address of the first target configuration parameter in the second storage space is determined, then the second storage address of the configuration parameter similar to the first target configuration parameter in the first storage space is determined, and finally the mapping relationship between the first storage address and the second storage address is established, so that when the first storage address loaded into the second storage space can jump to obtain the configuration parameter stored in the second storage address in the first storage space.

[0152] In some embodiments, the configuration parameters in each storage space are loaded in sequence, including:

[0153] When loaded into the first storage address in the second storage space, the configuration parameter stored in the second storage address is obtained from the first storage space based on the mapping relationship, and the configuration parameter stored in the second storage address is loaded.

[0154] In the embodiments of the present disclosure, when loaded into the first storage address in the second storage space, the second storage address in the first storage space can be located according to the pre-established mapping relationship, and the configuration parameter stored in the second storage address is obtained and loaded, which can effectively optimize the occupation of the memory and realize the rapid calling and loading of the configuration parameter.

[0155] In some embodiments, the loading order of each storage space is determined based on the execution time of the configuration parameter in each storage space, including:

[0156] The configuration parameter closest to the starting time of the first execution period of the configuration file in each storage space is determined as the second target configuration parameter;

[0157] The starting time in the second execution period of each second target configuration parameter is determined as the loading time of each storage space;

[0158] The loading order of each storage space is determined based on the order of the loading time.

[0159] In the embodiments of the present disclosure, the configuration parameter closest to the start time of the first execution period of the configuration file in each storage space is determined as the second target configuration parameter, then the start time in the second execution period of the second target configuration parameter is determined as the loading time of the corresponding storage space, and finally the loading order of each storage space is determined according to the loading time in sequence, so that the configuration parameters in each storage space can be loaded in time according to the loading order, and the memory occupation when the camera starts can be optimized.

[0160] In some embodiments, the method further comprises:

[0161] compiling the configuration parameters loaded from each storage space to obtain a compiled file;

[0162] starting the photographing function based on the compiled file.

[0163] In the embodiments of the present disclosure, the configuration parameters loaded from each storage space are first compiled to generate a corresponding compiled file. Then, the photographing function is started based on the compiled file to ensure that the device can perform the photographing operation according to the expected configuration parameters.

[0164] In the data loading method proposed in the embodiments of the present disclosure, in response to a start request of a photographing function, a configuration file required by the photographing function is determined, the configuration file is preloaded to obtain preloading information, each configuration parameter included in the configuration file is cached to a corresponding storage space based on a first execution period and a second execution period, the loading order of each storage space is determined based on the execution time of the configuration parameter in each storage space, and the configuration parameters in each storage space are loaded in sequence according to the loading order of each storage space corresponding to all configuration files.

[0165] That is, when receiving a start request of a photographing function, first, the configuration file required by the photographing function is determined, then the configuration file is preloaded to obtain preloading information including a first execution period and a second execution period. Then, according to the preloading information, the configuration parameters are cached to the corresponding storage space. Next, the loading order is determined based on the execution time of the configuration parameter in each storage space. Finally, the configuration parameters in these storage spaces are loaded in sequence according to the loading order of the storage spaces corresponding to all configuration files. The configuration parameters can be cached to different storage spaces according to the execution period, and the loading order of each storage space is determined accordingly, and then the configuration parameters in different storage spaces are loaded in time according to the loading order, which can optimize the data load and memory occupation when the camera starts.

[0166] Figure 5 is a flow of a data loading method according to an exemplary embodiment Figure Two AsFigure 5 As shown, the method mainly includes the following steps:

[0167] In step 501, in response to a start request for the photographing function, a configuration file required by the photographing function is determined;

[0168] In step 502, the configuration file is preloaded to obtain preloading information, and then based on the preloading information, each configuration parameter included in the configuration file is cached to the corresponding first storage space and second storage space respectively;

[0169] In step 503, the similarity between the configuration parameters cached in the first storage space and the second storage space corresponding to the configuration file is determined, and then based on the similarity, the first target configuration parameter is determined from the second storage space, and the first target configuration parameter is filtered out from the second storage space;

[0170] In step 504, based on the execution time of the configuration parameters in each storage space, the loading order of each storage space is determined, and then the configuration parameters in each storage space are loaded in sequence according to the loading order of each storage space corresponding to all configuration files;

[0171] In step 505, the configuration parameters loaded from each storage space are compiled to obtain a compiled file, and then based on the compiled file, the photographing function is started.

[0172] Figure 6 is a configuration parameter time-sharing loading schematic diagram according to an example embodiment Figure One , indicating the time-sharing loading process of the configuration parameters in the configuration file B and the configuration file C after being cached to different storage spaces, Figure 7 is a configuration parameter time-sharing loading schematic diagram according to an example embodiment Figure Two , indicating the time-sharing loading process of the configuration parameters in the configuration file D, the configuration file E and the configuration file F after being cached to different storage spaces. As Figure 6 and Figure 7 shown, the configuration parameters in the configuration file are cached to different storage spaces according to the execution period of the configuration parameters, and the loading order of each storage space is determined according to the execution period of the configuration parameters, and then the configuration parameters in different storage spaces are loaded in time according to the loading order, which can optimize the data load and memory occupation when the camera is started.

[0173] Figure 8 is a block diagram of a data loading device according to an example embodiment. As Figure 8 shown, the device mainly includes:

[0174] The first determining module 801 is configured to determine a configuration file required by the photographing function in response to a starting request for the photographing function, wherein different configuration files include different configuration parameters.

[0175] The preloading module 802 is configured to perform preloading processing on the configuration file to obtain preloading information, wherein the preloading information includes a first execution period of the preloaded configuration file and a second execution period of each configuration parameter in the preloaded configuration file.

[0176] The caching module 803 is configured to cache each configuration parameter included in the configuration file to a corresponding storage space based on the first execution period and the second execution period, wherein different storage spaces are respectively used to cache configuration parameters with different execution periods, and one configuration file corresponds to at least two storage spaces.

[0177] The second determining module 804 is configured to determine a loading order of each storage space based on an execution time of the configuration parameter in each storage space, wherein the execution time of the configuration parameter is a starting time of the second execution period.

[0178] The loading module 805 is configured to load the configuration parameters in each storage space in sequence according to the loading order of each storage space corresponding to all configuration files.

[0179] In some embodiments, the apparatus 800 further includes:

[0180] comparing the first execution period of the configuration file with the second execution period of each configuration parameter included in the configuration file to obtain a comparison result corresponding to each configuration parameter;

[0181] caching each configuration parameter to a corresponding storage space based on the comparison result.

[0182] In some embodiments, the apparatus 800 further includes:

[0183] In a case where the comparison result indicates that the second execution period of the configuration parameter is the same as the first execution period of the configuration file to which the configuration parameter belongs, caching the configuration parameter to a first storage space corresponding to the configuration file;

[0184] In a case where the comparison result indicates that the second execution period of the configuration parameter is different from the first execution period of the configuration file to which the configuration parameter belongs, caching the configuration parameter to a second storage space corresponding to the configuration file;

[0185] The release time of the first storage space is different from the release time of the second storage space.

[0186] In some embodiments, the apparatus 800 further includes:

[0187] When the loading of the configuration parameters in the second storage space is completed, the second storage space is released, and when the loading of all the configuration parameters corresponding to the configuration file is completed, the first storage space is released.

[0188] In some embodiments, the apparatus 800 further includes:

[0189] Determining similarity between configuration parameters cached in a first storage space and a second storage space corresponding to the configuration file;

[0190] determining a first target configuration parameter from the second storage space based on the similarity;

[0191] The first target configuration parameter is filtered out from the second storage space.

[0192] In some embodiments, the apparatus 800 further includes:

[0193] A configuration parameter whose similarity between the configuration parameter cached in the second storage space and the configuration parameter cached in the first storage space is greater than a preset threshold is determined as the first target configuration parameter.

[0194] In some embodiments, the apparatus 800 further includes:

[0195] Determining a first storage address of the first target configuration parameter in the second storage space;

[0196] Determine a second storage address of a configuration parameter that is the same as the first target configuration parameter in the first storage space;

[0197] A mapping relationship between the first storage address and the second storage address is established.

[0198] In some embodiments, the apparatus 800 further includes:

[0199] When loading to the first storage address in the second storage space, the configuration parameters stored at the second storage address are obtained from the first storage space based on the mapping relationship, and the configuration parameters stored at the second storage address are loaded.

[0200] In some embodiments, the apparatus 800 further includes:

[0201] Determine the configuration parameter in each storage space that is closest to the start time of the first execution cycle of the configuration file as the second target configuration parameter;

[0202] Determining the start time of the second execution cycle of each second target configuration parameter as the loading time of each storage space;

[0203] The loading order of each storage space is determined based on the order of loading time.

[0204] In some embodiments, the apparatus 800 further includes:

[0205] Compiling the configuration parameters loaded from the respective storage spaces to obtain a compiled file;

[0206] Starting a photographing function based on the compiled file.

[0207] As to the apparatus in the above-described embodiments, the specific manners in which the respective modules perform operations have been described in detail in the embodiments of the method, and thus will not be described in detail here.

[0208] Figure 9 is a structural block diagram of an apparatus 900 according to an exemplary embodiment. The apparatus 900 can be, for example, a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

[0209] Referring to Figure 9 , the apparatus 900 can include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.

[0210] The processing component 902 usually controls overall operations of the apparatus 900, such as operations associated with display, phone call, data communication, camera operation, and recording operation. The processing component 902 can include one or more processors 920 to execute instructions to complete all or part of steps of the methods described above. In addition, the processing component 902 can include one or more modules to facilitate interaction between the processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0211] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of these data include at least one of instructions for any application or method operating on the device 900, contact data, phonebook data, messages, pictures, and videos. The memory 904 can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0212] The power component 906 provides power to the various components of the device 900. The power component 906 can include at least one of a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.

[0213] The multimedia component 908 includes a screen providing an output interface between the device 900 and the user. In some embodiments, the screen includes a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 908 includes a front camera and / or a back camera. When the device 900 is in an operation mode such as a photographing mode or a video mode, the front camera and / or the back camera can receive external multimedia data. Each of the front camera and the back camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0214] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC) that is configured to receive an external audio signal when the device 900 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting an audio signal.

[0215] The I / O interface 912 provides an interface between the processing component 902 and peripheral interface modules, which can be a keyboard, a click wheel, and buttons, etc. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0216] The sensor component 914 includes one or more sensors for providing various state assessments for the device 900. For example, the sensor component 914 can detect an open / closed state of the device 900, relative positioning of components, such as a display and a keypad of the device 900, a change in position of the device 900 or a component of the device 900, presence or absence of user contact with the device 900, a change in orientation of the device 900 or acceleration / deceleration of the device 900, and a temperature change of the device 900. The sensor component 914 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 914 can further include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in an imaging application. In some embodiments, the sensor component 914 can further include at least one of an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, and a temperature sensor, but is not limited thereto.

[0217] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as Wi-Fi, 4G, 5G, or a combination thereof. In an example embodiment, the communication component 916 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 916 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0218] In an example embodiment, the device 900 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements.

[0219] In an example embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 904 including executable instructions or a computer program, is also provided, which can be executed by the processor 920 of the device 900 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0220] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform any one of the above data loading methods according to embodiments of the present disclosure. For example, the method includes:

[0221] determining configuration files required by the photographing function in response to a start request for the photographing function; different configuration files include different configuration parameters;

[0222] performing preloading on the configuration files to obtain preloading information; the preloading information includes a first execution period of the preloaded configuration files and a second execution period of each configuration parameter in the preloaded configuration files;

[0223] based on the first execution period and the second execution period, caching each configuration parameter included in the configuration files to a corresponding storage space; different storage spaces are respectively used to cache configuration parameters with different execution periods, and one configuration file corresponds to at least two storage spaces;

[0224] based on the execution time of the configuration parameters in each storage space, determining the loading order of each storage space; the execution time of the configuration parameters is the start time of the second execution period;

[0225] loading the configuration parameters in each storage space in the loading order of the storage spaces corresponding to all configuration files.

[0226] The embodiment of the disclosure provides a computer program product, which comprises a computer program or executable instructions stored in a computer readable storage medium. The processor of the computer device reads the computer program or executable instructions from the computer readable storage medium, and the processor executes the computer program or executable instructions, so that the computer device executes any one of the data loading methods provided in the embodiment of the disclosure.

[0227] Figure 10 is a block diagram of an apparatus 1000 for data loading according to an exemplary embodiment. For example, the apparatus 1000 can be provided as a server. Referring to Figure 10 , the apparatus 1000 includes a processing component 1022, which further includes one or more processors, and a memory resource represented by a memory 1032, for storing instructions executable by the processing component 1022, such as an application program. The application program stored in the memory 1032 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 1022 is configured to execute the instructions to perform any one of the data loading methods described above. For example, the method includes:

[0228] determining configuration files required by the photographing function in response to a start request for the photographing function; different configuration files include different configuration parameters;

[0229] The preloading process is performed on the configuration file to obtain preloading information; wherein the preloading information includes: a first execution period of the preloading configuration file and a second execution period of each configuration parameter in the preloading configuration file;

[0230] Based on the first execution period and the second execution period, each configuration parameter included in the configuration file is cached to a corresponding storage space; wherein different storage spaces are respectively used to cache configuration parameters with different execution periods, and one configuration file corresponds to at least two storage spaces;

[0231] Based on the execution time of the configuration parameter in each storage space, the loading order of each storage space is determined; wherein the execution time of the configuration parameter is the starting time of the second execution period;

[0232] According to the loading order of each storage space corresponding to all configuration files, the configuration parameters in each storage space are loaded in sequence.

[0233] The apparatus 1000 can also include a power supply component 1026 configured to perform power management for the apparatus 1000, a wired or wireless network interface 1050 configured to connect the apparatus 1000 to a network, and an input / output (I / O) interface 1058. The apparatus 1000 can operate an operating system stored in the memory 1032, such as Windows ServerTM, Mac OSXTM, UnixTMLinuxTM, FreeBSDTM, or the like.

[0234] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. The disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure that come within known or customary practice in the art to which the disclosure pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the disclosure are indicated by the claims.

[0235] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims.

Claims

1. A data loading method, characterized by, The method comprises: in response to a start request for a photographing function, determining a configuration file required by the photographing function; wherein different configuration files comprise different configuration parameters; performing preloading processing on the configuration file to obtain preloading information; wherein the preloading information comprises a first execution period for preloading the configuration file and a second execution period for preloading each configuration parameter in the configuration file; based on the first execution period and the second execution period, respectively caching each configuration parameter comprised in the configuration file to a corresponding storage space; wherein different storage spaces are respectively used to cache configuration parameters with different execution periods, and one configuration file corresponds to at least two storage spaces; based on the execution time of the configuration parameters in each storage space, determining the loading order of each storage space; wherein the execution time of the configuration parameter is the start time of the second execution period; in accordance with the loading order of each storage space corresponding to all configuration files, sequentially loading the configuration parameters in each storage space.

2. The method of claim 1, wherein, The method further comprises: comparing the first execution period of the configuration file with the second execution period of each configuration parameter comprised in the configuration file to obtain a comparison result corresponding to each configuration parameter; based on the comparison result, respectively caching each configuration parameter to a corresponding storage space.

3. The method of claim 2, wherein, The method further comprises: in a case where the comparison result indicates that the second execution period of the configuration parameter is the same as the first execution period of the configuration file to which the configuration parameter belongs, caching the configuration parameter to a first storage space corresponding to the configuration file; in a case where the comparison result indicates that the second execution period of the configuration parameter is different from the first execution period of the configuration file to which the configuration parameter belongs, caching the configuration parameter to a second storage space corresponding to the configuration file; wherein the release time of the first storage space is different from the release time of the second storage space.

4. The method of claim 3, wherein, The method further comprises: when the loading of the configuration parameter in the second storage space is completed, releasing the second storage space, and when the loading of all configuration parameters corresponding to the configuration file is completed, releasing the first storage space.

5. The method of claim 3, wherein, The method further comprises: determining the similarity between the configuration parameters cached in the first storage space and the second storage space corresponding to the configuration file; based on the similarity, determining a first target configuration parameter from the second storage space; filtering out the first target configuration parameter from the second storage space.

6. The method of claim 5, wherein, The method further comprises: The configuration parameters in the second storage space that have a similarity greater than a preset threshold with the configuration parameters cached in the first storage space are determined as the first target configuration parameters.

7. The method of claim 5, wherein, The method further comprises: determining a first storage address of the first target configuration parameters in the second storage space; determining a second storage address of the configuration parameters identical to the first target configuration parameters in the first storage space; establishing a mapping relationship between the first storage address and the second storage address.

8. The method of claim 7, wherein, The method further comprises: when loaded into the first storage address in the second storage space, acquiring the configuration parameters stored in the second storage address from the first storage space based on the mapping relationship, and loading the configuration parameters stored in the second storage address.

9. The method according to any one of claims 1 to 8, characterized in that, The method further comprises: determining a second target configuration parameter in each of the storage spaces closest to a start time of the first execution period of the configuration file; determining a start time in the second execution period of each of the second target configuration parameters as a loading time of each of the storage spaces; determining the loading order of each of the storage spaces based on the loading time.

10. The method according to any one of claims 1 to 8, characterized in that, The method further comprises: compiling the configuration parameters loaded from each of the storage spaces to obtain a compiled file; starting the photographing function based on the compiled file.

11. A data loading apparatus, characterized by comprising: The method comprises: a first determining module configured to determine configuration files required by the photographing function in response to a start request for the photographing function; different configuration files include different configuration parameters; a preloading module configured to perform preloading processing on the configuration files to obtain preloading information; the preloading information includes a first execution period of preloading the configuration files and a second execution period of preloading each of the configuration parameters in the configuration files; a caching module configured to cache each of the configuration parameters included in the configuration files to a corresponding storage space based on the first execution period and the second execution period; different storage spaces are respectively used to cache configuration parameters with different execution periods, and one configuration file corresponds to at least two storage spaces; a second determining module configured to determine a loading order of each of the storage spaces based on an execution time of the configuration parameters in each of the storage spaces; the execution time of the configuration parameters is a start time of the second execution period; a loading module configured to sequentially load the configuration parameters in each of the storage spaces in the loading order of each of the storage spaces corresponding to all the configuration files.

12. An electronic device, comprising: The method comprises: a processor; a memory for storing computer programs or instructions; wherein the processor executes the computer programs or instructions to implement the steps of the method of any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium storing a computer program or instructions, wherein, When the computer program or the instruction in the storage medium is executed by the processor, the steps of the method in any one of claims 1 to 10 are implemented.

14. A computer program product comprising computer programs or instructions, characterized in that, The computer program or the instruction is executed by the processor, and the steps of the method in any one of claims 1 to 10 are implemented.