An inbuilt method, system, terminal and storage medium of a data file

By generating and adding data block files outside the target terminal, the problems of CPU resource consumption and space waste in the existing technology are solved, and efficient data file embedding is achieved, which improves the running efficiency of the APP and the system performance.

CN116303282BActive Publication Date: 2026-04-07SHENZHEN DEEJOY LIGHTING TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies that embed data files into electronic product systems result in increased CPU resource consumption, heavier system load, and wasted space, especially when the data files are large, which affects the operating efficiency of third-party apps.

Method used

A data block file is generated and added outside the target terminal. The file data is transferred to the target terminal through steps such as mounting, unmounting, and packaging. When the read/write path is the same as the preset path, it is replaced with the data path to avoid copying operations within the system.

Benefits of technology

It improves the operating efficiency of third-party apps, reduces the burden on electronic product systems and space waste, and ensures the security and accuracy of data files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116303282B_ABST
    Figure CN116303282B_ABST
Patent Text Reader

Abstract

This application relates to a method, system, terminal, and storage medium for embedding data files, belonging to the technical field of data management. The method includes: acquiring file data of a target application; acquiring a data block file, the data block file including a file system with a preset format; adding the file data to the data block file to obtain a new data block file; adding the new data block file to a preset target terminal; acquiring the data path of the new data block file on the target terminal; acquiring the read / write path of the target application on the target terminal; determining whether the read / write path is the same as a preset path; if they are the same, acquiring a modification instruction to replace the read / write path with the data path; if they are different, not acquiring a modification instruction. This application enables third-party apps on electronic products to read and write embedded data files faster, reducing the burden on the electronic product system and reducing wasted space.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data management, and in particular to an in-built method, system, terminal and storage medium for data files. BACKGROUND

[0002] The in-built method for data files is currently commonly applied to all electronic products equipped with Android, Android-like and Harmony systems, and is to in-build data files into the system firmware partition of the electronic product. Due to the limitation of related permissions such as reading and writing, the third-party APP cannot directly access and use the system partition, and the data files need to be copied to the internal storage area (generally, the built-in sdcard) that can be read and written after the completion of the device startup.

[0003] However, the above-mentioned method needs to perform a copy action in the system of the electronic product, and the copy not only occupies CPU and DDR resources to increase the system burden, but also increases a data space occupation, causing additional space waste, which is particularly obvious when the data file is large, thus also leading to low running efficiency of the APP. SUMMARY

[0004] In order to enable the third-party APP of the electronic product to read and write the in-built data file faster, reduce the burden of the system of the electronic product, reduce the space waste, and improve the running efficiency of the APP, the present application provides an in-built method, system, terminal and storage medium for data files.

[0005] In a first aspect, the present application provides an in-built method for data files, which adopts the following technical solution:

[0006] An in-built method for data files, comprising:

[0007] obtaining file data of a target application;

[0008] obtaining a data block file, wherein the data block file comprises a file system in a preset format;

[0009] adding the file data to the data block file, and obtaining a new data block file;

[0010] adding the new data block file to a preset target terminal;

[0011] obtaining a data path of the new data block file in the target terminal;

[0012] obtaining a reading and writing path of the target application of the target terminal;

[0013] judging whether the reading and writing path is the same as a preset path;

[0014] If the same, obtaining modification instructions to replace the read-write path with the data path;

[0015] If different, not obtaining the modification instructions.

[0016] By adopting the above technical solution, the file data is added to the data block file outside the target terminal to obtain a new data block file, and then the new data block file is added to the target terminal, and the read-write path is replaced with the data path when the read-write path is the same as the preset path. The third-party APP of the electronic product can directly read and write the data file in the new data block file according to the data path, improve the running efficiency of the APP, and do not need to copy the file in the electronic product system, which can reduce the burden of the electronic product system and reduce the waste of space.

[0017] Preferably, the data block file comprises:

[0018] Obtaining a partition generation command and a file size of the file data;

[0019] Generating an empty data block file based on the partition generation command and the file size;

[0020] Obtaining a system production command, the production instruction comprising the preset format;

[0021] Generating the file system of the preset format in the empty data block file based on the system production instruction;

[0022] The empty data block file comprising the file system is taken as the data block file.

[0023] By adopting the above technical solution, the empty data block file is generated according to the partition generation command and the file size, so that the size of the empty data block file can match the file size, and the waste of space can be reduced. Then, the file system of the preset format is generated, which facilitates access to the data in the data block file.

[0024] Preferably, the file data is added to the data block file to obtain a new data block file, comprising:

[0025] Obtaining a mounting node;

[0026] Obtaining a mounting instruction to mount the data block file to the mounting node;

[0027] Copying the file data to the data block file based on the corresponding mounting node, and taking the copied data;

[0028] Obtaining permission information of the file data based on the target application;

[0029] modify data permission of the copy data based on the permission information;

[0030] add the data block file with the modified data permission as the new data block file.

[0031] By using the above technical solution, the data in the data block file can be conveniently read according to the mounting mode, and the data permission of the copy data in the data block file can be modified, so that each preset file can be set as permission that can be accessed by the target application in advance, which is more convenient.

[0032] Preferably, the adding of the new data block file to the preset target terminal comprises:

[0033] obtaining an uninstall instruction to uninstall the new data block file and obtaining an uninstall file;

[0034] obtaining a packaging instruction to package the uninstall file into firmware;

[0035] obtaining a flashing instruction to add the uninstall file in the firmware to the target terminal when the target terminal is identified.

[0036] By using the above technical solution, when the file data is added to the data block file to obtain the new data block file, the occupation of the new data block file can be contacted through the uninstall instruction, and then the new data block file is packaged into the firmware, and then the firmware is flashed to the target terminal, so that the possibility of error occurring in the packaging process can be reduced.

[0037] Preferably, the preset format comprises an EXT4 format, an EXT3 format or a VFAT format.

[0038] By using the above technical solution, different preset format file systems are used, so that the diversity of system format selection can be improved.

[0039] Preferably, before the new data block file is obtained, the method further comprises:

[0040] obtaining verification information based on the target application;

[0041] adding the verification information to the data block file;

[0042] obtaining a verification keyword of the file data when the file data is added to the data block file;

[0043] judging whether the verification keyword matches the verification information;

[0044] if not, obtaining error prompt information;

[0045] if yes, proceeding to the next step.

[0046] By adopting the technical scheme, whether the verification keyword matches the verification information is judged, it can be determined whether the file data is moved to the wrong file data due to errors and the like when the file data is added to the data block file, if not matching, error prompt information is obtained for prompting, which can reduce the probability of error of the data block file, and further reduce unnecessary additional operations.

[0047] Preferably, before the new data block file is added to the preset target terminal, the method further comprises:

[0048] An execution password is obtained;

[0049] It is judged whether the execution password matches a preset password;

[0050] If not matching, the step of adding the new data block file to the preset target terminal is stopped;

[0051] If matching, the next step is performed.

[0052] By adopting the technical scheme, it is judged whether the execution password matches the preset password, when matching, the step of adding the new data block file to the preset target terminal is performed, which can improve the security in the data transfer process.

[0053] In a second aspect, the application provides a built-in system of a data file, which adopts the following technical scheme:

[0054] A built-in system of a data file comprises:

[0055] A data acquisition module is configured to acquire file data of a target application;

[0056] A first data block file acquisition module is configured to acquire a data block file, wherein the data block file comprises a file system in a preset format;

[0057] A second data block file acquisition module is configured to add the file data to the data block file and obtain a new data block file;

[0058] A data block file addition module is configured to add the new data block file to a preset target terminal;

[0059] A first path acquisition module is configured to acquire a data path of the new data block file in the target terminal;

[0060] A second path acquisition module is configured to acquire a read-write path of the target application of the target terminal;

[0061] A path judgment module is configured to judge whether the read-write path is the same as a preset path;

[0062] The path modification module is configured to acquire a modification instruction to replace the read-write path with the data path if the read-write path is the same as the preset path, and not to acquire the modification instruction if the read-write path is different from the preset path.

[0063] By using the above technical solution, the file data is added to the data block file outside the target terminal according to the information transmission between the modules, so as to obtain a new data block file, and then the new data block file is added to the target terminal, and the read-write path is replaced with the data path when the read-write path is the same as the preset path. The third-party APP of the electronic product can directly read and write the data file in the new data block file according to the data path, improve the running efficiency of the APP, and does not need to copy the file in the electronic product system, which can reduce the burden of the electronic product system and reduce the waste of space.

[0064] In a third aspect, the present application provides a kind of intelligent terminal, adopt as follows technical solution:

[0065] A kind of intelligent terminal, comprising:

[0066] Memory, for storing computer program capable of running on processor;

[0067] The processor can execute the steps of the method described in any of the above aspects when running the computer program.

[0068] By using the above technical solution, the memory can store information, the processor can retrieve and issue control instructions, ensure the orderly execution of the program and achieve the effects of the above scheme.

[0069] In a fourth aspect, the present application provides a kind of computer readable storage medium, adopt as follows technical solution:

[0070] A kind of computer readable storage medium, storage has computer program capable of being loaded by processor and executing any of the above methods.

[0071] By using the above technical solution, when the computer readable storage medium is loaded into any computer, any computer can execute the built-in method of a data file provided by the present application.

[0072] In summary, the present application includes at least one of the following beneficial technical effects:

[0073] 1. Adding file data to a data block file outside a target terminal to obtain a new data block file, then adding the new data block file to the target terminal, and replacing a read-write path with a data path when the read-write path is the same as a preset path. The third-party APP of the electronic product can directly read and write the data file in the new data block file according to the data path, improve the running efficiency of the APP, and does not need to copy the file in the electronic product system, which can reduce the burden of the electronic product system and reduce the waste of space;

[0074] 2. Generating an empty data block file according to the partition generation command and the file size, so that the size of the empty data block file can match the file size, which can reduce the waste of space, and then generating a file system in a preset format, which facilitates accessing the data in the data block file;

[0075] 3. Using different file systems in a preset format can improve the diversity of system format selection. BRIEF DESCRIPTION OF DRAWINGS

[0076] Figure 1 is a flowchart of a built-in method of a data file provided by an embodiment of the present application;

[0077] Figure 2 is a flowchart of steps S11 to S15 in an embodiment of the present application;

[0078] Figure 3 is a flowchart of steps S21 to S26 in an embodiment of the present application;

[0079] Figure 4 is a flowchart of steps S31 to S33 in an embodiment of the present application;

[0080] Figure 5 is a flowchart of steps S41 to S46 in an embodiment of the present application;

[0081] Figure 6 is a flowchart of steps S51 to S54 in an embodiment of the present application;

[0082] Figure 7 is a structural block diagram of a built-in system of a data file provided by an embodiment of the present application.

[0083] REFERENCE SIGNS:

[0084] 1, data acquisition module; 2, first data block file acquisition module; 3, second data block file acquisition module; 4, data block file addition module; 5, first path acquisition module; 6, second path acquisition module; 7, path judgment module; 8, path modification module. DETAILED DESCRIPTION

[0085] The following description will be made in conjunction with the accompanying drawings Figures 1 to 7 The application is further described in detail.

[0086] The embodiments of the application disclose an in-built method of data file.

[0087] Referring to Figure 1 The in-built method of data file comprises:

[0088] S1. obtaining file data of a target application;

[0089] The target application refers to a third-party APP application requiring data acquisition, and the file data refers to all data files generated in the storage system of an electronic product after the target application is run on all electronic products carrying an android, an android-like, and a Hongmeng system, and the data files include audio and video, pictures, pdf documents, database files, and all file types required by the APP. The acquisition mode can be copying from the electronic product on which the target application is installed and run.

[0090] S2. obtaining a data block file, the data block file comprising a preset format file system;

[0091] The data block file can be a pre-established data partition, and the data partition is pre-provided with a preset format file system, wherein the preset format can be an EXT4 format, and of course, in other embodiments of the application, the preset format can also be an EXT3 format or a VFAT format.

[0092] S3. adding the file data to the data block file, and obtaining a new data block file;

[0093] The specific mode can be copying the file data into the data block file, so that the data block file containing the file data is the new data block file.

[0094] S4. adding the new data block file to a preset target terminal;

[0095] The preset target terminal can be a target terminal containing a new target application but not having been started, or a terminal device not having installed the target application, i.e., about to install the target application, that is, all electronic products carrying an android, an android-like, and a Hongmeng system.

[0096] Then the data block file is added to the system of the target terminal, and the adding mode can be through the mode of flashing, the in-built system adding the new data block file to the target terminal, and of course, other modes can also be used.

[0097] S5. obtaining a data path of the new data block file in the target terminal;

[0098] When the new data block file is added to the target terminal, an independent storage area is formed, and the system can directly read the storage path formed by the file data in the storage area, that is, the data path.

[0099] S6. Obtain the read-write path of the target application of the target terminal;

[0100] When other target terminals exist and have not yet run the target application and establish a connection relationship with the built-in system, the connection relationship can be established through a data line connection, and when the target terminal is initially run, the sending port accesses the application, and the port access application includes the system directory to be accessed by the target application, that is, the read path, so that the read-write path of the target application of the target terminal can be obtained by receiving the port access application.

[0101] For example, the read-write path and the data path are stored in different drive letters, and the difference between the two is that the root directories of the drive letters are different, for example, the initial root directory of the read-write path is E, and the initial root directory of the data path is F. In addition to the difference in drive letters, the read-write path and the data path are completely the same in the E and F drives.

[0102] S7. Determine whether the read-write path is the same as the preset path;

[0103] That is, it is determined whether the path read during the startup process of the target application of the target terminal is the preset path, wherein the preset path is the path through which the target application should normally read and write data. If the read-write path is the same as the preset path, it is proved that if the target software is started at this time, data cannot be read from the new data block file.

[0104] S8. If the same, obtain a modification instruction to replace the read-write path with the data path;

[0105] S9. If different, do not obtain the modification instruction.

[0106] Therefore, if the read-write path is the same as the preset path, in order to enable the target application on the target terminal where the new data block file is stored to read the file data in the new data block file, a modification instruction, that is, a string modification instruction, is obtained at this time, so as to replace the read-write path with the data path, that is, modify the initial drive letter name of the two, so that the target application can read data according to the data path. Thus, after the target application is installed, the operation of downloading and copying file data is not required, and the required file data can be directly read, thereby improving the running efficiency of the APP, and without the need to copy files in the electronic product system, the burden of the electronic product system can be reduced, and the waste of space can be reduced. If the read-write path is different from the preset path, it is proved that the read-write path does not need to be modified, so the modification instruction does not need to be obtained.

[0107] Referring to Figure 2 In order to reduce the waste of space and facilitate access to data in the data block file, in another embodiment, obtaining the data block file comprises:

[0108] S11. Obtain a partition generation command and a file size of the file data;

[0109] The file size of the file data can be determined by identifying the attributes of the file data, and the partition generation command can be a dd command. The obtaining method can be a manual input method, or it can be automatically executed by a preset program.

[0110] S12. Generate an empty data block file based on the partition generation command and the file size;

[0111] That is, according to the dd command, an empty data space corresponding to the file size is generated in the built-in system, that is, an empty data block file.

[0112] S13. Obtain a system making command;

[0113] The system making command can be a mkfs.ext4 command, and the making instruction includes a preset format, that is, “.ext4” is the preset format. Of course, the preset format can also be an EXT3 format or a VFAT format. By using the characteristics of the ext4 file system, the data block file is an independent file system, which is convenient for access.

[0114] S14. Generate a preset format file system in the empty data block file based on the system making command;

[0115] S15. The empty data block file including the file system is taken as the data block file.

[0116] That is, the mkfs.ext4 command is used to make an ext4 format file system on the data block file, so that the empty data block file includes the file system. Therefore, the empty data block file containing the file system is the data block file.

[0117] Therefore, the empty data block file is generated based on the partition generation command and the file size, so that the size of the empty data block file can match the file size, which can reduce the waste of space, and then a preset format file system is generated, which facilitates access to data in the data block file.

[0118] Referring to Figure 3 In another embodiment, the file data is added to the data block file, and a new data block file is obtained, comprising:

[0119] S21. Obtain a mounting node;

[0120] S22. Obtain a mounting instruction to mount the data block file to a mounting node;

[0121] S23. Copy the file data to the data block file based on the corresponding mounting node, and as copy data;

[0122] S24. Obtain the permission information of the file data based on the target application;

[0123] S25. Modify the data permission of the copy data based on the permission information;

[0124] S26. The data block file with modified data permission is a new data block file.

[0125] Specifically, the mounting node can be any node in the built-in system, or a pre-set blank node, and the system can directly read. Then obtain the mounting instruction, for random mounting ground, the mounting instruction can include any node, then randomly select one, mount the data block file to the mounting node, if it is a pre-set blank node, then the mounting instruction only includes the blank node, so that the data block file is mounted to the blank node.

[0126] When the data block file is mounted to the mounting node, the system can directly read and write the file data in the data block file, and then copy the file data to the data block file according to the obtained copy instruction, and the file data copied into the data block file is as copy data.

[0127] Then obtain the permission information of the file data of the target application, wherein the permission information includes read-write permission, user group and security context, which can be obtained by reading the permission information of the file data of the target terminal running the target application.

[0128] Then modify the data permission of the copy data according to the obtained permission information, so that the permission of the copy data is the same as that of the file data, so that the data block file with modified data permission is a new data block file, so that the new target terminal can directly obtain the operation permission required by the target application when running and reading the new data block file.

[0129] Thus, according to the mounting mode, the data in the data block file can be conveniently read, and the data permission of the copy data in the data block file can be modified, so that each pre-set file can be set as a permission that can be accessed by the target application, which is more convenient.

[0130] In one embodiment of the present application, the data block file is a separate file system which can be mounted to access the data built-in, while the read-write permission, user group and security context of the last setting are retained, that is, the read-write permission, user group and security context of the target application which has been run, so that the preset file, that is, the copy file, can be set as the permission which can be accessed by the app in advance.

[0131] Referring to Figure 4 In another embodiment, adding the new data block file to the preset target terminal includes:

[0132] S13. Obtaining an uninstall instruction to uninstall the new data block file and obtaining an uninstall file;

[0133] S32. Obtaining a packaging instruction to package the uninstall file into the firmware;

[0134] S33. When the target terminal is identified, obtaining a flashing instruction to add the uninstall file in the firmware to the target terminal.

[0135] Specifically, in order to ensure the accuracy of the process of adding the data block file to the target terminal as much as possible and reduce the possibility of errors in the packaging process, after the file data is added to the new data block file, an uninstall instruction is obtained to uninstall the data block file, that is, to release the system occupation of the data block file in the system generation process, and the uninstalled new data block file is taken as an uninstall file.

[0136] Then, a packaging instruction is obtained to package the uninstall file into the firmware, so that the data in the new data block file can be copied and added to the new target terminal through the firmware. Therefore, when the system identifies the target terminal, that is, when the system establishes a communication connection relationship with the target terminal, a flashing instruction is obtained to add the uninstall file in the firmware to the target terminal.

[0137] Referring to Figure 5 In order to reduce the probability of errors of the data block file as much as possible and reduce unnecessary additional operations, in another embodiment, before obtaining the new data block file, the following steps are further included:

[0138] S41. Obtaining verification information based on the target application;

[0139] S42. Adding the verification information to the data block file;

[0140] S43. Obtaining a verification keyword of the file data when the file data is added to the data block file;

[0141] S44. Judging whether the verification keyword matches the verification information;

[0142] S45. If not matched, obtaining error prompt information;

[0143] S46. If matched, executing the step of obtaining the new data block file.

[0144] Specifically, before obtaining the new data block file, the verification information is obtained according to the target application, and the obtaining manner can be that one data keyword in the file data of the target application is obtained through a preset file obtaining path, the data keyword can represent the target application, and the data keyword is the verification information.

[0145] Then the verification information is added to the data block file in the same way as the file data is added to the data block file. Then, when the file data is added to the data block file, the verification keyword of the file data is obtained, and the obtaining manner can be that the keyword corresponding to the position of the same path as the verification information is obtained according to the path corresponding to the file data, that is, the verification keyword. Among them, the keyword can be any one of data, code, name or formula. Of course, the way to obtain the verification keyword can also be to identify all the file data, and the data at the preset position is taken as the verification keyword. When the preset position is identified, the corresponding keyword can be obtained.

[0146] Then it is judged whether the verification keyword matches the verification information, that is, whether the file data to be added to the data block file is the data required by the target application. If not matched, it proves that the copied data is different from the actual demand, which proves that it may be a misoperation that causes the data file to be copied incorrectly, so at this time, error prompt information is obtained, so as to remind the operator. The prompt manner can be through text prompt, or sound or light, etc. If matched, it proves that the data copying process is correct, so there is no need to obtain the error prompt information, so at this time, the step of obtaining the new data block file is continued.

[0147] Reference Figure 6 In order to prevent the data from being randomly copied by others as much as possible, in another embodiment, before the new data block file is added to the preset target terminal, it further comprises:

[0148] S51. Obtaining an execution password;

[0149] S52. Judging whether the execution password matches a preset password;

[0150] S53. If not matched, stopping the step of adding the new data block file to the preset target terminal;

[0151] S54. If matched, executing the step of adding the new data block file to the preset target terminal.

[0152] Specifically, that is, before adding the new data block file to the preset target terminal, an execution password is obtained, and the obtaining manner is that the system records the password of the operator. Then it is judged whether the execution password matches the preset password, and the preset password is the password that has been authorized, that is, it is judged whether the execution password is the same as the preset password. If they are the same, it proves that the operator can perform the operation step, that is, the step of adding the new data block file to the preset target terminal can be continued to be performed. If they are not the same, it proves that the execution password does not match the preset password, at which time the step of adding the new data block file to the preset target terminal is stopped, that is, the window that can continue to operate is not popped up at this time, so as to improve the security of data management as much as possible.

[0153] The implementation principle of the data file built-in method of the embodiment of the application is that: the file data is added to the data block file outside the target terminal, so as to obtain a new data block file, then the new data block file is added to the target terminal, and when the read-write path is the same as the preset path, the read-write path is replaced by the data path. The third-party APP of the electronic product can directly read and write the data file in the new data block file according to the data path, improve the running efficiency of the APP, and does not need to copy the file in the electronic product system, so as to reduce the burden of the electronic product system and reduce the waste of space.

[0154] The embodiment of the application also discloses a data file built-in system, which can achieve the same technical effects as the above-mentioned data file built-in method.

[0155] Reference Figure 7 The data file built-in system comprises:

[0156] A data acquisition module 1 is configured to acquire file data of a target application;

[0157] A first data block file acquisition module 2 is configured to acquire a data block file, and the data block file comprises a file system in a preset format;

[0158] A second data block file acquisition module 3 is configured to add the file data to the data block file and obtain a new data block file;

[0159] A data block file adding module 4 is configured to add the new data block file to a preset target terminal;

[0160] A first path acquisition module 5 is configured to acquire a data path of the new data block file in the target terminal;

[0161] A second path acquisition module 6 is configured to acquire a read-write path of the target application of the target terminal;

[0162] A path judgment module 7 is configured to judge whether the read-write path is the same as a preset path;

[0163] The path modification module 8 acquires a modification instruction to replace the read-write path with the data path if the read-write path is the same as the preset path, and does not acquire the modification instruction if the read-write path is different from the preset path.

[0164] Specifically, the data acquisition module 1 first acquires file data of a target application and sends the file data to the second data block file acquisition module 3 connected thereto. Then, the first data block file acquisition module 2 acquires a data block file and sends the data block file to the second data block file acquisition module 3 connected thereto.

[0165] Then, the second data block file acquisition module 3 adds the file data to the data block file and obtains a new data block file, and then sends the new data block file to the data block file addition module 4 connected thereto. The data block file addition module 4 adds the new data block file to a preset target terminal.

[0166] Then, the first path acquisition module 5 acquires a data path of the new data block file in the target terminal and sends the data path to the path modification module 8 connected thereto. The second path acquisition module 6 acquires a read-write path of the target application of the target terminal and sends the read-write path to the path judgment module 7 connected thereto. The path judgment module 7 judges whether the read-write path is the same as a preset path and sends the judgment result to the path modification module 8 connected thereto.

[0167] Finally, the path modification module 8 acquires a modification instruction to replace the read-write path with the data path if the read-write path is the same as the preset path, and does not acquire the modification instruction if the read-write path is different from the preset path.

[0168] Thus, the third-party APP of the electronic product can directly read and write data files in the new data block file according to the data path, improving the running efficiency of the APP, and without the need to copy files in the electronic product system, the burden of the electronic product system can be reduced, and the waste of space can be reduced.

[0169] The embodiment of the application further discloses a smart terminal including a memory and a processor. The memory stores a smart computer program. The processor can execute the steps of the built-in method of the data file when running the smart computer program. The smart computer program can copy, package, modify and perform a series of steps on data by using a known processing program, so as to realize the built-in of the data file.

[0170] The embodiment of the application further discloses a computer readable storage medium which stores a computer program capable of loading and executing the built-in method of the data file as described above by a processor, and the computer readable storage medium comprises, for example, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage program codes.

[0171] The above are preferred embodiments of the application, and do not limit the protection scope of the application, so that: equivalent changes made according to the structure, shape, principle of the application should be covered within the protection scope of the application.

Claims

1. A method for embedding a data file, characterized in that, include: S1. Obtain the file data of the target application; S2. Obtain a data block file, wherein the data block file includes a file system with a preset format; S3. Based on steps S1 and S2, the file data is added to the data block file to obtain a new data block file; S4. Based on step S3, add the new data block file to the preset target terminal; S5. Based on step S4, obtain the data path of the new data block file on the target terminal; S6. Obtain the read / write path of the target application on the target terminal; S7. Based on step S6, determine whether the read / write path is the same as the preset path; S8. If the determination based on step S7 is the same as that in step S5, then obtain the modification instruction to replace the read / write path with the data path. S9. If the determination based on step S7 is different, then the modification instruction is not obtained; Step S3 includes: S21. Obtain the mounted node; the mounted node can be any node in the built-in system or a pre-set blank node, which the system can read directly. S22. Based on step S21, obtain the mount command to mount the data block file to the mount node; S23. Based on step S22, copy the file data to the data block file based on the corresponding mount node, and use it as copied data; S24. Obtain permission information of the file data based on the target application; wherein the permission information includes read and write permissions, user group and security context, and is obtained by reading the permission information of file data of the target terminal that has run the target application. S25. Based on steps S23 and S24, modify the data permissions of the copied data based on the permission information; make the permissions of the copied data the same as the permissions of the file data, so that when the new target terminal runs and reads the new data block file, it can directly obtain the operation permissions required by the target application. S26. Based on step S25, the data block file whose data permissions have been modified is used as the new data block file; the file data is added to the data block file outside the target terminal to obtain the new data block file, and then the new data block file is added to the target terminal. When the read / write path is the same as the preset path, the read / write path is replaced with the data path, so that the third-party APP of the electronic product can directly read and write the data file in the new data block file according to the data path.

2. The built-in method according to claim 1, characterized in that, Step S2 includes: S11. Obtain the partition generation command and the file size of the file data; S12. Based on step S11, generate an empty data block file based on the partition generation command and the file size; S13. Obtain the system creation command, wherein the creation command includes the preset format; S14. Based on steps S12 and S13, the system creation command generates the file system of the preset format in the empty data block file; S15. Based on step S14, the empty data block file including the file system is used as the data block file.

3. The built-in method according to claim 1, characterized in that, Step S4 includes: S31. Obtain an uninstallation command to uninstall the new data block file and obtain the uninstallation file; S32. Based on step S31, obtain a packaging instruction to package the uninstallation file into the firmware; S33. Based on step S32, when the target terminal is identified, a flashing instruction is obtained to add the uninstallation file in the firmware to the target terminal.

4. The built-in method according to claim 1, characterized in that, The preset formats include: EXT4 format, EXT3 format, or VFAT format.

5. The built-in method according to claim 1, characterized in that, Before obtaining the new data block file in step S3, the method further includes: S41. Obtain verification information based on the target application; S42. Based on step S41, add the verification information to the data block file; S43. Based on step S42, when adding the file data to the data block file, obtain the verification keyword of the file data; S44. Based on step S43, determine whether the verification keyword matches the verification information; S45. If the judgment based on step S44 does not match, obtain an error message. S46. If a match is found based on the judgment in step S44, proceed to the next step.

6. The built-in method according to claim 1, characterized in that, Before step S4, the following is also included: S51. Obtain the execution password; S52. Based on step S51, determine whether the execution password matches the preset password; S53. If the judgment in step S52 does not match, then stop executing step S4 of adding the new data block file to the preset target terminal; S54. If a match is found based on the judgment in step S52, proceed to the next step.

7. A built-in system for data files, characterized in that, A built-in system for performing a data file as described in any one of claims 1 to 6, the built-in system comprising: The data acquisition module (1) is used to acquire file data of the target application; The first data block file acquisition module (2) is used to acquire data block files, wherein the data block files include a file system with a preset format; The second data block file acquisition module (3) is used to add the file data to the data block file and obtain a new data block file; The data block file adding module (4) is used to add the new data block file to a preset target terminal; The first path acquisition module (5) is used to acquire the data path of the new data block file in the target terminal; The second path acquisition module (6) is used to acquire the read and write path of the target application of the target terminal; The path determination module (7) is used to determine whether the read / write path is the same as the preset path; The path modification module (8) is used to obtain a modification instruction to replace the read / write path with the data path if the read / write path is the same as the preset path; if the read / write path is different from the preset path, it is also used not to obtain the modification instruction.

8. A smart terminal, characterized in that, include: Memory is used to store computer programs that can run on a processor; The processor, when running the computer program, is capable of executing the steps of a built-in method for a data file as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: A computer program that stores a built-in method for a data file as described in any one of claims 1 to 6, which can be loaded by a processor and executed.

Citation Information

Patent Citations

  • Memory expanding method, device and terminal based on Android system

    CN102831173A

  • Terminal and partition mounting method

    CN114510754A