Data processing method, data processing device and medium
By updating the verification results before the target application is launched and judging whether to skip the verification process based on conditions, the startup speed problem caused by verification in electronic devices is solved and fast and safe application startup is achieved.
Patent Information
- Application Number
- CN202410865615.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-18
AI Technical Summary
In electronic devices, during the startup process of the target application, various files need to be verified to ensure security, which causes the startup speed to slow down and affects the user experience.
Through a data processing method, in response to the status change of the target application, the data stored in the verification result is updated. If the target application is in the startup state and the verification result meets the conditions, the verification process is skipped and the application is started directly. If the conditions are not met, the application is started. Verify externally.
It improves the startup speed of the target application, saves verification time, improves the user experience, and ensures the security of the application.
Smart Images

Figure CN118796309A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and more specifically, to a data processing method, a data processing device and a medium. Background Art
[0002] During the process of starting the target application in the electronic device, the various files under the target application need to be verified at the request of the security department to ensure the safe startup of the target application. However, the verification process takes time and computing resources. If verification is required every time the target application is started, the startup speed of the target application will be greatly slowed down, which will not allow users to have a better user experience. Summary of the invention
[0003] The present application is provided to solve the above defects in the prior art. A data processing method, a data processing device and a medium are needed, which can skip the verification process of the target application during the startup process of the target application while ensuring security, thereby improving the startup speed.
[0004] According to a first scheme of the present application, a data processing method is provided, the data processing method comprising: in response to a target application not being in a first state, if the first data changes, updating the second data; the first data is data under the file system of the target application that needs to be verified when the target application is started, the second data represents the result of the verification of the first data, and the first state is being started; in response to the target application being in the first state, if the first data is called, obtaining the second data, determining based on the second data that the first data satisfies a first condition, and starting the target application.
[0005] In some embodiments, determining that the first data satisfies a first condition based on the second data and starting the target application includes: starting the target application in response to a first parameter of the second data indicating that the first data has been verified and a second parameter of the second data indicating that the first data has a first verification result.
[0006] In some embodiments, if the first data is called, the data processing method also includes: obtaining third data in response to the first parameter of the second data indicating that the first data has not been verified or the second parameter of the second data indicating that the first data has a second verification result; the third data is the data corresponding to the first data under the file system; and verifying the first data based on the third data to start the target application.
[0007] In some embodiments, after verifying the first data based on the third data, the data processing method further includes: updating the first parameter and / or the second parameter of the second data based on the verification result so that the latest second data is obtained when the first data is called.
[0008] In some embodiments, if the first data changes, the second data is updated, including: if the first data changes, setting the parameter value of the first parameter of the currently stored second data to null; the null value of the first parameter indicates that the corresponding first data has not been verified; or, if the first data changes, verifying the first data, and modifying the second parameter of the currently stored second data based on the verification result.
[0009] In some embodiments, the third data is a digital signature of the first data stored in the file system, and is used to verify the credibility of the first data.
[0010] In some embodiments, in response to the target application not being in the first state, if the first data changes, updating the second data includes: in response to the target application not being in the first state, monitoring based on the underlying driver of the operating system that the first data in the file system changes; triggering the operating system to read and write the second data stored in the target address to update the second data; the target address is only read and written by the operating system.
[0011] In some embodiments, after obtaining the second data, the data processing method further includes: in response to the third parameter of the second data representing that the changed first data and the obtained second data satisfy a second condition, executing a step of determining that the first data satisfies the first condition based on the second data; the third parameter represents a storage path of the corresponding first data under the file system, and the second condition represents that the storage path represented by the third parameter is consistent with the storage path of the changed first data under the file system.
[0012] According to a second solution of the present application, a data processing device is provided, the data processing device comprising an acquisition module and a processing module. The acquisition module is configured to acquire first data corresponding to a target application, second data corresponding to the first data, and first file path information associated with the first data; the processing module is configured to execute the data processing method described in any embodiment of the present application.
[0013] According to a third embodiment of the present application, a non-temporary computer-readable medium is provided, on which instructions are stored. When executed by a processor, the instructions execute the steps of the data processing method described in any embodiment of the present application.
[0014] In the data processing method, data processing device and medium provided by various embodiments of the present application, the target application is not in the first state. If the first data changes, it is possible that the first data has been tampered with, and the second data is updated, so that the change in the credibility of the first data can be obtained in time; the first data is the data that needs to be verified when the target application is started. If the target application is in the first state of being started, the second data is first obtained, and it is determined whether the first data meets the first condition for the previous successful startup. If so, the target application can be started without verifying the first data. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In the drawings, which are not necessarily drawn to scale, the same reference numerals may describe similar parts in different views. The same reference numerals with letter suffixes or different letter suffixes may represent different instances of similar parts. The accompanying drawings generally illustrate various embodiments by way of example and not limitation, and together with the specification and claims, are used to illustrate the embodiments applied for. When appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be exhaustive or exclusive embodiments of the present apparatus or method.
[0016] Figure 1 A flowchart showing a data processing method according to a first embodiment of the present application;
[0017] Figure 2 A flow chart showing a data processing method according to a second embodiment of the present application;
[0018] Figure 3 A flowchart showing a data processing method according to a third embodiment of the present application;
[0019] Figure 4 A flowchart showing a data processing method according to a fourth embodiment of the present application;
[0020] Figure 5 A schematic structural diagram of a data processing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific implementation examples. The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation examples, but are not intended to limit the present application.
[0022] The words "first", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish. The words "include" or "comprise" and similar words mean that the elements before the word include the elements listed after the word, and do not exclude the possibility of including other elements.
[0023] According to an embodiment of the present application, a data processing method is provided. Figure 1 A flow chart of a data processing method according to a first embodiment of the present application is shown. The data processing method comprises:
[0024] In step 101, in response to the target application not being in the first state, if the first data changes, the second data is updated; the first data is data under the file system of the target application that needs to be verified when the target application is started, the second data represents the result of the verification of the first data, and the first state is being started.
[0025] In step 102, in response to the target application being in a first state, if the first data is called, the second data is obtained, and it is determined based on the second data that the first data meets a first condition, and the target application is started.
[0026] In some embodiments, the target application can be any software running in the electronic device. The target application is not specifically limited here, such as housekeeper software. Housekeeper software generally starts automatically after booting up. The device will run normally after the self-starting operation. If a lot of time is required for verification during the self-starting process, it will cause the user to feel that the device is stuck or the boot is delayed. In some embodiments, one or more target applications can be started at the same time, and each target application can have corresponding first data and second data. In the case of multiple target applications, the second data corresponding to each target application is updated respectively according to the change of the first data corresponding to each target application. When multiple target applications are in the first state, the corresponding second data is used to determine whether the first condition is met. If the first condition is met, the verification process of the corresponding target application is skipped. Therefore, the startup speed of a target application can be accelerated, or the startup speed of multiple target applications can be accelerated at the same time as needed to improve the user experience.
[0027] In some embodiments, the first state is being started, and the target application is not in the first state, that is, at this time, the target application is in a running state after startup or a non-running state before startup. In such a state, if the first data changes, the second data is updated, and the change of the first data can be accurately obtained, and the change of the first data can be avoided from being ignored, and the second data is recorded accordingly in time. It can be understood that the first data will change at any time due to the update of the target application or the possible illegal intrusion of the device. This embodiment will monitor the change of the first data when the target application is running normally or when the target application is not running, and update the second data according to the change of the first data.
[0028] The first data is data in the file system of the target application that needs to be verified when the target application is started. In some embodiments, the first data may include one or more of a directory file, an executable file, and a configuration file. If the first data changes, it means that the first data may have been tampered with or the target application may have been updated. At this time, it is judged that the startup or operation of the target application is in an unsafe state, and re-verification is required when the target application is started next time to improve security.
[0029] In some embodiments, the change in the first data includes a change in the data content of the first data. If the configuration parameters of the configuration file are modified, the credibility of the first data may be reduced.
[0030] The second data represents the result of verification of the first data, that is, the second data is used to record whether the first data is credible. If the first data changes, the verification result will be recorded in the second data. When the target application is started, the first data a priori result of the target application can be directly obtained, and there is no need to verify the second data to obtain the corresponding verified result, thereby saving startup time.
[0031] When the target application is started, if the first data is called, the first data needs to be verified at this time, and the acquisition of the second data can be triggered at this time. If the second data determines that the first data meets the first condition, the target application can be directly started and the verification process is skipped. In some embodiments, the first condition can be that the first data has been successfully verified before or the credibility is greater than a threshold. Satisfaction of the first condition indicates that the security of the first data meets the standard.
[0032] Therefore, when the target application is not in the first state, the state of the first data is monitored, so as to timely determine whether the first data has been modified or other changes. Then, when the target application is in the first state, the verification process for the first data that meets the first condition can be skipped, and the target application can be started directly, thereby transferring the verification process to a time other than application startup, which can save verification time at application startup and improve startup speed.
[0033] In some embodiments, if it is determined based on the second data that the first data does not satisfy the first condition, the first data is verified. If the second data indicates that the first data does not have a result of being securely verified, for example, the first data has not been successfully verified before, indicating that the first data may have been tampered with, the first data needs to be re-verified to determine the security of the first data to ensure the security of the target application startup.
[0034] In some embodiments, the second data may be stored in a secure area, such as a TPM (Trusted Platform Module), etc. Compared with a traditional cache mechanism, storage in a secure area enables the second data to be permanently protected, reduces the probability of unsafe events of being modified, and better ensures the security of the second data. When the target application is started, the second data can be trusted as a basis, thereby improving the security of the target application startup.
[0035] In some embodiments, determining that the first data satisfies a first condition based on the second data and starting the target application includes: starting the target application in response to a first parameter of the second data indicating that the first data has been verified and a second parameter of the second data indicating that the first data has a first verification result. The first parameter is used to indicate whether the first data has been verified, and the second parameter is used to indicate whether the verification has been successful. This can distinguish between situations where the data has been verified but not successfully verified and situations where the data has been verified and has been successful. Checking the parameter values of the two parameters separately, when the second data indicates that the first data has been previously verified and successfully verified, there is no need to re-verify the first data and starting the target application can save the startup time of the target application, increase the startup speed, and enhance the user experience.
[0036] It can be understood that the storage structure of the second data of this embodiment includes at least a first parameter and a second parameter, the first parameter is used to store whether the first data was verified when it last changed, and the second parameter is used to store the result of the verification when the first data last changed. For example, if the first data was verified when it last changed, the parameter value of the first parameter is set to 1; if the first data was not verified when it last changed, the parameter value of the first parameter is set to 0; if the result of the verification when the first data last changed was successful, the parameter value of the second parameter is set to 1; if the result of the verification when the first data last changed was unsuccessful, the parameter value of the second parameter is set to 0.
[0037] Figure 2 A flow chart of a data processing method according to a second embodiment of the present application is shown. In some embodiments, if the first data is called, the data processing method further includes:
[0038] In step 201, in response to the first parameter of the second data indicating that the first data has not been verified or the second parameter of the second data indicating that the first data has a second verification result, third data is obtained; the third data is data corresponding to the first data in the file system.
[0039] When the target application is started, it will call the first data of the file system corresponding to the application. When the first data is called, it means that the first data needs to be verified. At this time, if the first parameter indicates that the first data has not been verified before, it may be the first time the target application is started, or the first data of the previous target application has been tampered with, or the previous target application has been updated, and the tampered or updated first data has not been verified. Therefore, in both cases, the verification of the first data cannot be skipped.
[0040] The second parameter represents the verification result, wherein the second verification result indicates that the verification is not successful, for example, the first data is tampered with and therefore the verification is not successful after verification. This means that the security of the first data of the target application does not pass, and the verification of the first data cannot be skipped, and the first data needs to be re-verified. In this embodiment, the third data is also stored in the file system of the target application, which is the digital signature of the first data, and the storage directory is the same as or different from the first data.
[0041] In step 202, the first data is verified based on the third data to start the target application.
[0042] The security of the first data is obtained by performing security authentication on the first data through the third data corresponding to the first data. Therefore, when the target application is called during the startup process, if the security obtained by verifying the second data is not enough, the first data is verified by the third data, and after obtaining the verification result, it is convenient to start the target application.
[0043] In some embodiments, after verifying the first data based on the third data, the data processing method further includes: updating the first parameter and / or the second parameter of the second data based on the verification result so that the latest second data is obtained when the first data is called.
[0044] In the case where the first data has not been verified before or the verification has not been successful, the target application will verify the first data when it is restarted. After verification using the third data, the corresponding verification result will be obtained, and the second data will be updated based on the verification result. For example, if the verification is unsuccessful, the updated first parameter is verified and the second parameter is unsuccessful; if the verification result is successful, the updated first parameter is verified and the second parameter is successful. When the target application is subsequently in the started state, it can determine whether to perform the first data re-verification process based on the latest second data, which helps to improve the accuracy of the second data and the startup speed.
[0045] In this way, each time the first data changes, the second data will be updated. After the first data is verified using the third data, the second data will also be updated, so that the second data can be used as an accurate basis for starting the target application, which can not only improve the user experience but also ensure security.
[0046] In some embodiments, if the first data changes, updating the second data includes:
[0047] If the first data changes, the parameter value of the first parameter of the second data currently stored is set to null; the null value of the first parameter indicates that the corresponding first data has not been verified. If the first data changes, the parameter value of the first parameter of the second data is deleted. In this case, the changed first data is regarded as the new first data, which has not been verified before. So that when the first data is called, when the first parameter is obtained to be a null parameter value, the first data is then verified based on the third data.
[0048] Or, if the first data changes, the first data is verified, and the second parameter of the second data currently stored is modified based on the verification result. In response to the target application not being in the first state, that is, the target application is in a running state or a non-running state after startup, if the first data changes, the first data can be verified to obtain that the changed first data can be successfully verified. If the verification is successful, the second parameter represents the first verification result. The next time the target application is started, the verification process can be skipped when the target application is started to increase the startup speed. If the verification is unsuccessful, the second parameter represents the second verification result.
[0049] In some embodiments, the third data is a digital signature of the first data stored in the file system, which is used to verify the credibility of the first data. In this way, the security of the first data can be obtained. For example, after the digital signature is verified, if the signature verification fails, it means that the credibility of the first data is low; if the signature verification passes, it means that the credibility of the first data is high. It is understandable that the first data can also be verified by other third data.
[0050] Figure 3 A flow chart of a data processing method according to a third embodiment of the present application is shown. In some embodiments, in response to the target application not being in the first state, if the first data changes, updating the second data includes:
[0051] In step 301, in response to the target application not being in the first state, an underlying driver based on the operating system monitors that the first data in the file system changes.
[0052] In this embodiment, when the target application is not started, the underlying driver of the operating system monitors the data in the file system in real time. The underlying driver of the operating system has the authority to access the file system and obtain the content of the first data to determine whether the content of the first data has changed.
[0053] In step 302, the operating system is triggered to read and write the second data stored in the target address to update the second data; the target address is only read and written by the operating system.
[0054] The target address is the address where the second data is stored. For example, if the second data is stored in the secure area of the TPM, the target address is the address corresponding to the secure area of the TPM. The read and write operations of the target address are only open to the operating system, that is, only the operating system can modify the second data, ensuring that the second data is not tampered with, improving the security of the stored second data, and providing an accurate basis for starting the target application.
[0055] In some embodiments, a first list may be established, in which the relevant information of the target application to be monitored is recorded. This allows the bottom layer of the operating system to monitor only the first data under the target application in the first list. This is both targeted, for example, only monitoring the target application that takes a long time to start, and avoiding adding too much burden to the operating system. This can be used to speed up the startup of some target applications.
[0056] Figure 4 A flow chart of a data processing method according to a fourth embodiment of the present application is shown. In some embodiments, after obtaining the second data, the data processing method further includes:
[0057] In step 401, in response to the first data whose third parameter representation of the second data changes and the obtained second data satisfying a second condition, a step of determining that the first data satisfies a first condition based on the second data is performed.
[0058] The third parameter represents a storage path of the corresponding first data in the file system, and the second condition represents that the storage path represented by the third parameter is consistent with the storage path of the changed first data in the file system.
[0059] In order to further optimize the startup speed of the target application, in some embodiments, the storage structure of the second data also includes a third parameter, and the third parameter is used to store the storage path of the first data corresponding to the verification result of the second data record, and is used to ensure that the second data corresponds to the first data, because if they do not correspond, the obtained verification result is meaningless. The third parameter of the second data represents that the changed first data and the obtained second data do not meet the second condition, that is, if the path stored in the third parameter is not the storage path of the currently called first data, it means that the currently obtained second data does not correspond to the currently called first data, that is, the changed first data and the obtained second data do not meet the second condition.
[0060] It should be noted that when the storage path of the first data under the file system changes, you can choose to execute steps including whether the security of the first data of the target application is passed and whether the verification of the first data can be skipped based on the actual requirements for the startup speed of the target application. You can also update the third parameter in the corresponding second data in a linked manner to make the third parameter become the updated storage path of the first data.
[0061] If the storage path of the first data under the file system is consistent with the storage path represented by the third parameter, it means that the third parameter corresponds to the first data, the first data is stored in the original location, and the storage location has not changed. If the storage location of the first data has changed, then the first data corresponding to the target application may have been replaced, or the first data may have been transferred. Therefore, first determine whether the second condition is met. If the second condition is met, then determine whether the first data satisfies the previously verified condition, rather than directly determining whether the first data satisfies the previously verified first condition. This can make the second data more targeted to the first data, and also prevent tampering of the storage location of the first data by moving, further ensuring that the target application can be safely started.
[0062] In some embodiments, the second data may store the situation of the first data of a target application, or store information of various parameters of the first data of multiple target applications. The second data may include identification information corresponding to the first data, so as to find the information corresponding to the first data.
[0063] In some embodiments, the first parameter, the second parameter, and the third parameter in the second data are stored in a key-value pair, wherein the first parameter and / or the second parameter are stored as a key, and the third parameter is stored as a value. In this way, the first parameter and / or the second parameter can correspond to the third parameter, and both correspond to the same target application, so that during the startup of the target application, the security of the first data can be more accurately judged by the corresponding three parameters. It is understandable that the first parameter, the second parameter, and the third parameter can also be stored in other ways.
[0064] According to an embodiment of the present application, a data processing device is also provided. Figure 5 A structural schematic diagram of a data processing device according to an embodiment of the present application is shown. The data processing device 500 includes: an acquisition module 501, which is configured to acquire first data corresponding to a target application, second data corresponding to the first data, and first file path information associated with the first data. A processing module 502, which is configured to execute the data processing method described in any embodiment of the present application. Therefore, the data processing device 500 can monitor the state of the first data when the target application is not in the first state, and can obtain the change of the first data in a timely manner. After that, when the target application is in the first state, it can skip the verification process for the first data that meets the first condition and directly start the target application, which can save verification time and improve the startup speed.
[0065] According to an embodiment of the present application, a non-transitory computer-readable medium is also provided, on which instructions are stored, and when executed by a processor, the instructions execute the steps of the data processing method described in any embodiment of the present application. Therefore, when the target application is not in the first state, the execution of the readable medium can monitor the state of the first data, and can timely obtain the change of the first data. After that, when the target application is in the first state, the verification process can be skipped for the first data that meets the first condition, and the target application can be directly started, which can save verification time and improve the startup speed.
[0066] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of the application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.
[0067] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as a feature of an application that does not require protection being necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of the embodiments of a specific application. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present application should be determined with reference to the full scope of the equivalent forms of the attached claims and these claims.
[0068] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A data processing method, the data processing method include: In response to the target application not being in the first state, if the first data changes, updating the second data; The first data is data in the file system of the target application that needs to be verified when the target application is started, the second data represents the result of the verification of the first data, and the first state is started; In response to the target application being in a first state, if the first data is called, the second data is obtained, it is determined based on the second data that the first data meets a first condition, and the target application is started.
2. The data processing method according to claim 1, determining that the first data satisfies a first condition based on the second data, starting the target application, include: In response to the first parameter of the second data indicating that the first data has been verified and the second parameter of the second data indicating that the first data has a first verification result, the target application is started.
3. The data processing method according to claim 1, if the first data is called, the data processing method further include: In response to the first parameter of the second data indicating that the first data has not been verified or the second parameter of the second data indicating that the first data has a second verification result, obtaining third data; The third data is data corresponding to the first data in the file system; The first data is verified based on the third data to start the target application.
4. The data processing method according to claim 3, after verifying the first data based on the third data, the data processing method further include: The first parameter and / or the second parameter of the second data are updated based on the verification result, so that the latest second data is obtained when the first data is called.
5. The data processing method according to claim 3, if the first data changes, the second data is updated, include: If the first data changes, setting the parameter value of the first parameter of the second data currently stored to empty; The null value of the first parameter indicates that the corresponding first data has not been verified; Or, if the first data changes, the first data is verified, and the second parameter of the second data currently stored is modified based on the verification result.
6. The data processing method according to claim 3, wherein the third data is a digital signature of the first data stored in the file system, and is used to verify the credibility of the first data.
7. The data processing method according to any one of claims 1 to 6, wherein in response to the target application not being in the first state, if the first data changes, the second data is updated, include: In response to the target application not being in the first state, a bottom layer driver based on the operating system monitors that the first data in the file system changes; triggering the operating system to read and write the second data stored in the target address to update the second data; The target address is only used by the operating system to perform read and write operations.
8. The data processing method according to any one of claims 1 to 6, wherein after obtaining the second data, the data processing method further include: In response to the first data whose third parameter representation of the second data changes and the obtained second data satisfying a second condition, performing a step of determining, based on the second data, that the first data satisfies the first condition; The third parameter represents a storage path of the corresponding first data in the file system, and the second condition represents that the storage path represented by the third parameter is consistent with the storage path of the changed first data in the file system.
9. A data processing device, the data processing device include: an acquisition module configured to acquire first data corresponding to a target application, second data corresponding to the first data, and first file path information associated with the first data; A processing module, configured to execute the data processing method according to any one of claims 1 to 8.
10. A non-transitory computer-readable medium having instructions stored thereon, which, when executed by a processor, execute the steps of the data processing method according to any one of claims 1 to 8.
