A security detection method and device based on application program
By creating a second process of virtual programs when security detection is performed by terminal protection software, the application is overwritten, which solves the problem of application lag or black screen caused by the operation of protection software, and achieves the normal operation of the application and the improvement of user experience.
Patent Information
- Application Number
- CN202111552920.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-12-17
AI Technical Summary
Terminal protection software will occupy the application's process when it is run, causing the application to stutter or black screen, affecting normal use.
Security detection is performed by creating a second process of a virtual program, overwriting the application, making it hide the display, and displaying status prompt information in the virtual program. After the detection is completed, close the second process and restore the normal display of the application.
Avoid application lag or black screen problems during security detection, ensure that application is invisible in the background, improve user experience, and allow application to resume normal use after detection is completed.
Smart Images

Figure CN114238114B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data security protection, and more specifically, to a security detection method and device based on an application program. Background Art
[0002] At present, users usually use terminal protection software for security detection and security protection to ensure the safety of terminal use. However, in practice, it is found that when such terminal protection software is running, it usually occupies the process of the currently operating application, causing the running of the terminal protection software to cause the application to freeze or even black screen, thus making the application unable to be used normally. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an application-based security detection method and device, which can avoid the problem of application freeze or even black screen on the terminal display caused by the operation of protection software, thereby allowing the application to maintain normal operation, while also improving the user experience of terminal protection software.
[0004] A first aspect of an embodiment of the present application provides a security detection method based on an application program, wherein the application program runs in a first process, and the method includes:
[0005] When a detection start instruction is detected, a second process for running a virtual program is created; the virtual program corresponds to the application program;
[0006] Covering the application program with the virtual program so that the application program is hidden; and displaying status prompt information in the virtual program, the status prompt information being used to indicate that the security detection is in progress;
[0007] Performing security detection on the application in the first process;
[0008] When the security check is completed, the second process is closed to restore the display of the application.
[0009] In the above implementation process, the method can create a new second process and display a virtual program that is highly similar to the application in the second process, so that the virtual program can cover the application, and then the application is in an invisible running state. In this way, the application becomes a background detection when it is detected by security protection. Because the detection process is invisible, the problem of freezing or black screen that may occur in the application cannot be seen in the virtual program, so as not to affect the user's normal use of the virtual program, thereby improving the user's experience of terminal protection software. On the other hand, when the security detection is completed, the second process is closed and the normal use of the application is restored, so that the application can be called back normally and used normally.
[0010] Further, the step of creating a second process for running the virtual program includes:
[0011] Create a second process;
[0012] Capturing the current interface of the application to obtain a program screenshot;
[0013] In the second process, a virtual program for displaying the program screenshot is created.
[0014] Furthermore, the step of covering the application program by the virtual program includes:
[0015] The size, style and position of the virtual program are adjusted according to the size, style and position of the application program so that the virtual program covers the application program.
[0016] Furthermore, the step of performing security detection on the application in the first process includes:
[0017] In the first process, a security check is started on the application program through a security check program.
[0018] Furthermore, before the safety detection is completed, the method further includes:
[0019] The detection result is output in the second process.
[0020] Further, the step of outputting the detection result in the second process includes:
[0021] Extract the detection start time, expected end time and current detection time from the detection result;
[0022] The detection start time, the estimated end time and the current detection time are dynamically displayed in the second process.
[0023] A second aspect of an embodiment of the present application provides a security detection device based on an application program, wherein the application program runs in a first process, and the security detection device based on the application program includes:
[0024] A creating unit, configured to create a second process for running a virtual program when a detection start instruction is detected; the virtual program corresponds to the application program;
[0025] A display unit, used to cover the application program with the virtual program so that the application program is hidden and displayed; and to display status prompt information in the virtual program, wherein the status prompt information is used to indicate that the security detection is in progress;
[0026] A detection unit, configured to perform security detection on the application in the first process;
[0027] The closing unit is used to close the second process when the security check is completed so that the application resumes display.
[0028] In the above implementation process, the device can perform security checks on the application. Specifically, the device can create a second process and a virtual program so that the virtual program can replace the application to be displayed on the front end, and the application can perform invisibly security checks on the back end, thereby ensuring stable display during security checks and avoiding freezes or black screens in front of users.
[0029] Furthermore, the creation unit includes:
[0030] A creation subunit, used for creating a second process when a detection start instruction is detected;
[0031] A screenshot subunit, used to capture the current interface of the application to obtain a program screenshot;
[0032] The creation subunit is further used to create a virtual program for displaying the program screenshot in the second process.
[0033] A third aspect of an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the application-based security detection method described in any one of the first aspect of the embodiment of the present application.
[0034] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the application-based security detection method described in any one of the first aspect of the embodiment of the present application is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A schematic diagram of a process flow of a security detection method based on an application program provided in an embodiment of the present application;
[0037] Figure 2 A flowchart of another application-based security detection method provided in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of the structure of a security detection device based on an application program provided in an embodiment of the present application;
[0039] Figure 4 A schematic diagram of the structure of another application-based security detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0041] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0042] Example 1
[0043] Please see Figure 1 , Figure 1 A flowchart of a security detection method based on an application is provided for an embodiment of the present application. The application is run in a first process, and the security detection method based on the application includes:
[0044] S101. When a detection start instruction is detected, a second process for running a virtual program is created; the virtual program corresponds to the application program.
[0045] In this embodiment, when the user operates the application program, the user may input a detection start instruction to start the security protection software in the terminal.
[0046] In this embodiment, the user can input the detection start instruction by himself, and the user can also trigger the detection start instruction when performing other operations, so that the security protection software can start security protection according to various situations. For example, when the user browses a new web page or opens a new chat dialog box, the method can automatically start the security protection software for security detection.
[0047] S102: Cover the application program with a virtual program to hide the application program; and display status prompt information in the virtual program, where the status prompt information is used to indicate that the security detection is in progress.
[0048] In this embodiment, the virtual program will cover the front of the application program so that the user can only see the virtual program and cannot see the application program. It can be seen that in this case, the application program is equivalent to being hidden under the virtual program, thereby realizing the hidden display of the application program.
[0049] In this embodiment, a prompt indicating the processing status will be displayed on the virtual program.
[0050] S103: Perform security detection on the application program in the first process.
[0051] In this embodiment, the method can start to perform security detection on the application program operated by the user through the security protection software. The security detection can be content detection, communication connection detection, etc.
[0052] S104: When the security check is completed, close the second process to restore the application program to display.
[0053] In this embodiment, the method closes the virtual program and restores the application program to the foreground display when the security check is completed.
[0054] Implementing this implementation method can improve the user experience when the security protection software performs security detection and protection on the application.
[0055] In the embodiment of the present application, the execution subject of the method can be a computing device such as a computer or a server, and no limitation is made in this embodiment.
[0056] In the embodiment of the present application, the execution subject of the method can also be a smart device such as a smart phone, a tablet computer, etc., and there is no limitation on this in the present embodiment.
[0057] It can be seen that the implementation of the application-based security detection method described in this embodiment can create a new second process and display a virtual program that is highly similar to the application in the second process, so that the virtual program can cover the application, and then the application is in an invisible running state. In this way, the application becomes a background detection situation when it is detected by security protection. Because the detection process is invisible, the problem of freezing or black screen that may occur in the application cannot be seen in the virtual program, so as not to affect the user's normal use of the virtual program, thereby improving the user's experience of terminal protection software. On the other hand, when the security detection is completed, the second process is closed and the normal use of the application is restored, so that the application can be called back normally and used normally.
[0058] Example 2
[0059] Please see Figure 2 , Figure 2 A flowchart of a security detection method based on an application program provided in an embodiment of the present application is shown below. Figure 2 As shown, the application-based security detection method includes:
[0060] S201: When a detection start instruction is detected, a second process is created.
[0061] In this embodiment, the second process is a process different from the first process.
[0062] S202: Capture the current interface of the application program to obtain a program screenshot.
[0063] In this embodiment, before the terminal uses the security protection software to perform security detection on the application currently operated by the user, it preferentially creates a new second process. At the same time, a screenshot of the application currently operated by the user is taken to obtain a program screenshot. For example, the terminal takes a screenshot of the chat page of a chat program used by the user.
[0064] S203: In the second process, a virtual program for displaying program screenshots is created.
[0065] In this embodiment, the method uses a program screenshot in the newly created second process to generate a virtual program (or window program). Then, the window program is displayed in front of the operated application to cover it, forming a "fake window". Since the "fake window" and the security protection software do not work in the same process, there will be no freeze or black screen, at least the user will not see the freeze or black screen in the application.
[0066] S204: Adjust the size, style and position of the virtual program according to the size, style and position of the application program, so that the virtual program covers the application program.
[0067] In this embodiment, the method can adjust the created virtual program so that the virtual program can effectively cover the application program, thereby preventing the application program from being seen.
[0068] In this embodiment, the method displays status prompt information in the virtual program, and the status prompt information is used to indicate that the security check is in progress.
[0069] S205: In the first process, a security check is started on the application program through a security check program.
[0070] As an optional implementation, after step S205, the method further includes:
[0071] The detection result is output in the second process.
[0072] As a further optional implementation, the step of outputting the detection result in the second process also includes S206 to S207.
[0073] S206: Extract the detection start time, estimated end time and current detection time from the detection results.
[0074] S207. Dynamically display the detection start time, estimated end time and current detection time in the second process.
[0075] In this embodiment, the method can obtain the progress data of the security protection software in the first process detecting the application in the newly created second process. The progress data includes data information such as the detection start time, the expected end time, and the current detection time. Then, the detection progress is dynamically displayed in the virtual program in the second process according to the progress, so that the user can feel that the current application is being detected by the security detection program, and please wait patiently.
[0076] S208. When the security check is completed, close the second process to restore the application to display.
[0077] It can be seen that the implementation of the application-based security detection method described in this embodiment can create a new process, use the new process to take a screenshot of the application page currently operated by the user, and overlay it on the current application page, forming a "fake window" covering the application page. The "fake window" and the security protection software do not work in the same process, so there will be no black screen or freeze. At the same time, the method can also improve the user experience by displaying the detection progress of the security protection software in the "fake window", avoiding the poor experience of being unable to operate and not having any prompt information when the application operated by the user freezes or has a black screen.
[0078] Example 3
[0079] Please see Figure 3 , Figure 3 A schematic diagram of a security detection device based on an application provided in an embodiment of the present application. The application runs in a first process, and the security detection device based on the application includes:
[0080] The creating unit 310 is used to create a second process for running a virtual program when a detection start instruction is detected; the virtual program corresponds to the application program;
[0081] The display unit 320 is used to cover the application program with a virtual program so that the application program is hidden and displayed; and to display status prompt information in the virtual program, the status prompt information is used to indicate that the security detection is in progress;
[0082] A detection unit 330, configured to perform security detection on the application in the first process;
[0083] The closing unit 340 is used to close the second process when the security check is completed so that the application resumes display.
[0084] In the embodiments of the present application, the explanation of the application-based security detection device can refer to the description in Embodiment 1 or Embodiment 2, and will not be further elaborated in this embodiment.
[0085] It can be seen that the application-based security detection device described in this embodiment can perform security detection on the application. Specifically, the device can create a second process and a virtual program so that the virtual program can replace the application to be displayed on the front end, and the application can perform invisible security detection on the back end, thereby ensuring stable display during security detection and avoiding freezes or black screens in front of users.
[0086] Example 4
[0087] Please also read Figure 4 , Figure 4 : is a schematic diagram of a security detection device based on an application program provided in an embodiment of the present application. Figure 4 The application-based safety detection device shown is composed of Figure 3 The application-based security detection device shown is optimized. Figure 4 As shown, the creation unit 310 includes:
[0088] A creation subunit 311, configured to create a second process when a detection start instruction is detected;
[0089] The screenshot subunit 312 is used to capture the current interface of the application program to obtain a program screenshot;
[0090] The creation subunit 311 is further used to create a virtual program for displaying the program screenshot in the second process.
[0091] As an optional implementation, the display unit 320 is specifically configured to adjust the size, style and position of the virtual program according to the size, style and position of the application program, so that the virtual program covers the application program.
[0092] As an optional implementation manner, the detection unit 330 is specifically configured to start, in the first process, a security detection on the application program through a security detection program.
[0093] As an optional implementation, the display unit 320 is also used to output the detection result in the second process.
[0094] As an optional implementation, the display unit 320 includes:
[0095] An extraction subunit 321 is used to extract the detection start time, estimated end time and current detection time in the detection result;
[0096] The display subunit 322 is used to dynamically display the detection start time, the estimated end time and the current detection time in the second process.
[0097] In the embodiments of the present application, the explanation of the application-based security detection device can refer to the description in Embodiment 1 or Embodiment 2, and will not be further elaborated in this embodiment.
[0098] It can be seen that the application-based security detection device described in this embodiment can perform security detection on the application. Specifically, the device can create a second process and a virtual program so that the virtual program can replace the application to be displayed on the front end, and the application can perform invisible security detection on the back end, thereby ensuring stable display during security detection and avoiding freezes or black screens in front of users.
[0099] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute any one of the application-based security detection methods in Embodiment 1 or Embodiment 2 of the present application.
[0100] An embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, any one of the application-based security detection methods in Embodiment 1 or Embodiment 2 of the present application is executed.
[0101] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0102] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0103] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0104] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0105] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0106] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A security detection method based on application program, It is characterized in that The application is run in a first process, and the method includes: When a detection start instruction is detected, a second process for running a virtual program is created; the virtual program corresponds to the application program; Covering the application program with the virtual program so that the application program is hidden; and displaying status prompt information in the virtual program, the status prompt information being used to indicate that the security detection is in progress; Performing security detection on the application in the first process; When the security check is completed, closing the second process to restore the display of the application program; The step of covering the application program with the virtual program includes: The size, style and position of the virtual program are adjusted according to the size, style and position of the application program so that the virtual program covers the application program.
2. The application-based security detection method according to claim 1, It is characterized in that The step of creating a second process for running the virtual program comprises: Create a second process; Capturing the current interface of the application to obtain a program screenshot; In the second process, a virtual program for displaying the program screenshot is created.
3. The application-based security detection method according to claim 1, It is characterized in that The step of performing security detection on the application in the first process includes: In the first process, a security check is started on the application program through a security check program.
4. The application-based security detection method according to claim 1, It is characterized in that Before the safety detection is completed, the method further includes: In the second process, the detection result is output.
5. The application-based security detection method according to claim 4, It is characterized in that The step of outputting the detection result in the second process comprises: Extract the detection start time, expected end time and current detection time from the detection result; The detection start time, the estimated end time and the current detection time are dynamically displayed in the second process.
6. A safety detection device based on application program, It is characterized in that The application program is run in a first process, and the application program-based security detection device includes: A creating unit, configured to create a second process for running a virtual program when a detection start instruction is detected; the virtual program corresponds to the application program; A display unit, used to cover the application program with the virtual program so that the application program is hidden and displayed; and to display status prompt information in the virtual program, wherein the status prompt information is used to indicate that the security detection is in progress; A detection unit, configured to perform security detection on the application in the first process; A closing unit, configured to close the second process when the security check is completed, so that the application resumes display; The display unit is specifically used to adjust the size, style and position of the virtual program according to the size, style and position of the application program, so that the virtual program covers the application program.
7. The application-based security detection device according to claim 6, It is characterized in that The creation unit comprises: A creation subunit, used for creating a second process when a detection start instruction is detected; A screenshot subunit, used to capture the current interface of the application to obtain a program screenshot; The creation subunit is further used to create a virtual program for displaying the program screenshot in the second process.
8. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the application-based security detection method according to any one of claims 1 to 5.
9. A readable storage medium, It is characterized in that The readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the application-based security detection method according to any one of claims 1 to 5 is executed.
Citation Information
Patent Citations
Detection method, graphical interface and related device
CN113641996A