Data monitoring method, device, computer readable storage medium and processor

By determining the restore point in the operating system and analyzing the command line source information, the monitoring and security protection of the command line is realized, which solves the problem that existing tools cannot monitor and restore the command line execution, and provides powerful security measures and repair capabilities.

CN114721868BActive Publication Date: 2024-10-15GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110020958.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-06
Publication Date
2024-10-15
Estimated Expiration
2041-01-06

AI Technical Summary

Technical Problem

Existing monitoring tools cannot effectively monitor the command line, especially after the system is refreshed, the previous running state cannot be restored, and there is a lack of monitoring and security protection measures for command line execution.

Method used

By determining the restore point of the operating system, analyzing the source information of the command line, running the command line based on the source information, obtaining the running status, and selecting the target restore point to restore the operating system when necessary, providing an optional restore mechanism to avoid reinstallation operating system.

Benefits of technology

It realizes the monitoring and security protection of the command line, provides powerful and precise security measures, can repair the system when it is damaged, avoids system reinstallation, and improves the functional integrity of the monitoring tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721868B_ABST
    Figure CN114721868B_ABST
Patent Text Reader

Abstract

The present invention discloses a data monitoring method, device, computer-readable storage medium and processor. The method comprises: determining at least one restore point of an operating system; determining source information of a command line to be run by the operating system, wherein the source information is used to indicate the source of the command line; running the command line based on the source information to obtain an operating state; and when it is determined based on the operating state that the operating system needs to be restored, selecting a target restore point from at least one restore point, and restoring the operating system according to the target restore point. The present invention solves the technical problem of lack of monitoring of command lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a data monitoring method, device, computer-readable storage medium and processor. Background Art

[0002] Currently, monitoring tools are usually used to implement process monitoring. For example, they can display the usage of the Central Processing Unit (CPU), memory usage, swap memory, cache size, buffer size, process control, users, process-related information and more commands. They can also display the file system, registry and process activities in real time.

[0003] However, the above monitoring tools can only observe phenomena locally, and once the system is refreshed, the previous running status cannot be restored. In particular, command line operations play an indispensable role in the operating system, but there is a lack of monitoring of the corresponding command line execution.

[0004] With respect to the above-mentioned technical problem of lack of monitoring of command lines, no effective solution has been proposed yet. Summary of the invention

[0005] Embodiments of the present invention provide a data monitoring method, device, computer-readable storage medium, and processor to at least solve the technical problem of lack of command line monitoring.

[0006] According to one aspect of an embodiment of the present invention, a data monitoring method is provided. The method may include: determining at least one restore point of an operating system; determining source information of a command line to be run by the operating system, wherein the source information is used to indicate the source of the command line; running the command line based on the source information to obtain an operating status; and when it is determined based on the operating status that the operating system needs to be restored, selecting a target restore point from at least one restore point, and restoring the operating system according to the target restore point.

[0007] In an embodiment of the present invention, a restore mechanism is provided, which can provide at least one selectable restore point for the operating system, and then run the command line based on the source information of the command line to obtain the running status, thereby achieving the purpose of monitoring the command line. If it is determined based on the running status that the operating system does need to be restored, the operating system can be restored according to the target restore point in at least one restore point, and reinstalling the operating system can be avoided, thereby providing a powerful and accurate security protection measure for the operating system, thereby solving the technical problem of lack of command line monitoring and achieving the technical effect of monitoring the command line. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0009] Figure 1 is a flow chart of a data monitoring method according to an embodiment of the present invention;

[0010] Figure 2 is a flow chart of a command line monitoring and status recovery method according to an embodiment of the present invention;

[0011] Figure 3 is a schematic diagram of a data monitoring device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0012] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0013] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0014] Example 1

[0015] According to an embodiment of the present invention, an embodiment of a data monitoring method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0016] Figure 1 FIG. 1 is a flow chart of a data monitoring method according to an embodiment of the present invention. Figure 1As shown, the data monitoring method may include the following steps:

[0017] Step S102: determining at least one restore point of the operating system.

[0018] In the technical solution provided in the above step S102 of the present invention, the operating system can be any computer program for managing and controlling computer hardware and software resources, such as a Linux operating system, a Windows operating system, an IOS operating system, etc., and no specific limitation is made here.

[0019] This embodiment determines at least one restore point of the operating system, which may be to record at least one restore point, which may also be called a restore base point, used to indicate the storage status of computer system files, and the at least one restore point may be 5 restore points. Optionally, the restore point records of this embodiment may be divided into manually recorded restore points and automatically recorded restore points. Among them, manually recorded restore points require a large amount of storage space, which is mainly used to back up important system configuration files, writable partition redirection, mirror copy, etc.; automatically recorded restore points are lightweight, which can simply record and back up some system configuration files and program list status records, etc., and can create restore points at specific time intervals, and can also create restore points when it is detected that the computer begins to change.

[0020] Step S104, determining source information of the command line to be executed by the operating system, wherein the source information is used to indicate the source of the command line.

[0021] In the technical solution provided in the above step S104 of the present invention, after determining at least one restore point of the operating system, source information of the command line to be executed by the operating system can be determined.

[0022] In this embodiment, the command line can also be called the command status of the operating system. The source information of the command line to be run by the operating system can be analyzed to determine the source of the command line. For example, the source of the command line is remote issuance, manual input, script execution, etc.

[0023] Optionally, the command line of this embodiment can be an executable command line such as ip addr command, rm -r* command under Linux operating system, ipconfig command, ping command and telnet command under Windows operating system. The client may not be able to identify whether such command line causes harm to other programs and systems, and it may have high execution rights.

[0024] Step S106, running the command line based on the source information to obtain the running status.

[0025] In the technical solution provided in the above step S106 of the present invention, after the source information of the command line to be executed by the operating system is determined, the command line can be executed based on the source information to obtain the running status.

[0026] In this embodiment, the source information of the command line is different, and the way of running the command line can also be different. For example, if the command line comes from a remote distribution, the command line can be executed in a sandbox first. If the command line comes from manual input or script running, it can be directly run in the operating system to obtain the running status of the command line. Among them, the sandbox is a security mechanism in the field of computer security, which can provide an isolated environment for running programs and provide experimental purposes for some programs whose sources are unreliable, destructive, or whose program intentions cannot be determined. That is, in this embodiment, when the command line comes from a remote distribution, the command line is unreliable, may be destructive, or the program intention cannot be determined. Then, the command line can be executed in a sandbox, which provides an isolated environment for the program corresponding to the command line during operation, thereby improving the security of executing the command line. The running status can include the operation log, operation behavior, corresponding executor, instruction information, etc. of the command line, thereby realizing comprehensive and multi-dimensional monitoring of the command line.

[0027] Step S108: When it is determined based on the running state that the operating system needs to be restored, a target restore point is selected from at least one restore point, and the operating system is restored according to the target restore point.

[0028] In the technical solution provided in the above step S108 of the present invention, after the command line is run based on the source information and the running state is obtained, it can be determined based on the above running state whether the operating system needs to be restored. For example, when it is determined based on the above running state that the execution of the command line has damaged the operating system, the operating system needs to be restored. Optionally, if it is determined that the operating system needs to be restored, a target restore point can be selected from the above at least one restore point, and then a restore method can be selected. The operating system is restored according to the selected restore method and target restore point, and a corresponding strategy can be executed to repair the operating system.

[0029] Through the above steps S102 to S108 of the present application, at least one restore point of the operating system is determined; the source information of the command line to be run by the operating system is determined, wherein the source information is used to indicate the source of the command line; the command line is run based on the source information to obtain the running state; when it is determined based on the running state that the operating system needs to be restored, a target restore point is selected from at least one restore point, and the operating system is restored according to the target restore point. In other words, this embodiment provides a restore mechanism, firstly provides at least one selectable restore point for the operating system, and then runs the command line based on the source information of the command line to obtain the running state, thereby achieving the purpose of monitoring the command line. If it is determined based on the running state that the operating system does need to be restored, the operating system can be restored according to the target restore point in at least one restore point, and the operating system can be avoided from being reinstalled, providing a powerful and accurate security protection measure for the operating system, thereby solving the technical problem of lack of command line monitoring and achieving the technical effect of command line monitoring.

[0030] The above method of this embodiment is further introduced below.

[0031] As an optional implementation, step S104, determining source information of a command line to be run by the operating system, includes: determining first source information of the command line, wherein the first source information is used to indicate that the command line is input in response to an input operation instruction or obtained by running a script; step S106, running the command line based on the source information to obtain a running status, includes: running the command line based on the first source information to obtain a first running status.

[0032] In this embodiment, the source information includes first source information. When determining the source information of the command line to be run by the operating system, the first source information of the command line can be determined. Through the first source information, it can be determined that the command line is input in response to an input operation instruction, that is, the command line can be manually input by the user; through the first source information, it can also be determined that the command line is obtained by running a script. After determining the first source information of the command line, the command line can be run based on the first source information. For example, if the first source information corresponds to a method of directly running the command line, the command line can be directly run to obtain the first running state.

[0033] As an optional implementation, in step S108, before restoring the operating system according to the target restore point, the method further includes: determining that the operating system needs to be restored when the first running state indicates that the running of the command line is in an abnormal state.

[0034] In this embodiment, before restoring the operating system according to the target restore point, it may be determined whether the first operation status indicates that the operation of the command line is in an abnormal operation status, for example, whether the operation of the command line is safe, whether it damages other programs, the operating system, etc. If it is determined that the first operation status indicates that the operation of the command line is in an abnormal state, the most recent operation log may be displayed, and it may be determined that the operating system needs to be restored based on the operation log.

[0035] Optionally, when the first running status indicates that the command line is running in an abnormal state, after displaying the most recent operation log, it can be determined based on the operation log that the operating system does not need to be restored. At this time, the first running status can be recorded, for example, by logging and behavior registration, thereby achieving the purpose of status recording.

[0036] As an optional implementation, step S108, restoring the operating system according to the target restore point, includes: when the operating system is in a normal state, restoring the operating system according to the target restore point in the target time period; when the operating system is in an abnormal state, restoring the operating system according to the target restore point in the pre-installed environment of the operating system.

[0037] In this embodiment, when restoring the operating system according to the target restore point, the operating system can be restored by hot backup according to the target restore point. The premise of the hot backup restoration is that the state of the operating system is normal, that is, the operating system can operate normally. A target restore point can be selected from at least one restore point, the information of the target restore point will be reset to the hardware partition, and then the machine will be restarted, and then the operating system will be restored according to the target restore point in the target time period.

[0038] Optionally, when restoring the operating system according to the target restore point, this embodiment can also perform a cold backup restore of the operating system according to the target restore point. The cold backup restore is mainly for the case where the operating system is in an abnormal state. For example, if the operating system is damaged and the operating system cannot be entered, the operating system can be restored according to the target restore point in the pre-installation environment of the operating system, wherein the pre-installation environment can be a pre-installation environment (Preinstallation Environment, referred to as PE) system under the Windows operating system. This embodiment can enter the pre-installation environment through a boot disk, perform various operations on the original system in the pre-installation environment or directly run a special program, which can be used to restore some routine and normal configuration information, wherein the boot disk can be a USB booter. At this time, the target restore point can default to the most recent restore point, thereby saving a lot of time for reinstalling the system and avoiding the problem of completely clearing the system disk.

[0039] Optionally, in this embodiment, another program B is executed in the PE system, and the program B can be used to restore the backed-up files, for example, to restore the backed-up files in the path C:\Windows\System32\config. The above program B can also pull the command line operations of the last few days from the cloud server (including which program is executed and the address IP can be queried if it is sent remotely).

[0040] As an optional implementation, restoring the operating system according to a target restore point in a target time period includes: restoring the operating system according to the target restore point in a first time period after the device where the operating system is located is started and before the operating system is entered; or restoring the operating system according to the target restore point in a second time period after the device where the operating system is located enters the operating system and before an operation instruction is received.

[0041] In this embodiment, when implementing hot backup and restoration, the operating system can be restored according to the target restore point in the first time period after the device where the operating system is located is started and before the operating system is entered. The configuration information and files of the operating system can be copied, overwritten, deleted, moved, etc. through hardware instructions and non-system programs according to the target restore point, thereby achieving the purpose of hot backup and restoration of the operating system.

[0042] Optionally, in this embodiment, after the device where the operating system is located enters the operating system and before receiving the operation instruction, the second time period can be a second time period in which a mask is immediately pulled up after entering the operating system to prohibit user operations, and the operating system is restored according to the target restore point, and then a series of restore operations are performed on some user applications, user files, user configuration information, etc. according to the target restore point, thereby achieving the purpose of hot backup and restoration of the operating system. Among them, the target restore point can be any restore point of at least one restore point, thereby achieving the purpose of restoring the operating system to any backed up restore point.

[0043] As an optional implementation, in step S108, before restoring the operating system according to the target restore point, the method further includes: recording the first running state when the first running state indicates that the command line is running in a normal state.

[0044] In this embodiment, before restoring the operating system according to the target restore point, it is determined whether the first operating state indicates that the command line is running in a normal state. If it is determined that the first operating state indicates that the command line is running in a normal state, the first operating state can be directly recorded, for example, by logging and behavior registration, thereby achieving the purpose of status recording.

[0045] As an optional implementation, step S104, determining the source information of the command line to be run by the operating system, includes: determining second source information of the command line, wherein the second source information is used to indicate that the command behavior is obtained by remote distribution; step S106, running the command line based on the source information to obtain the running status, includes: running the command line based on the second source information to obtain the second running status.

[0046] In this embodiment, the source information may include second source information. When determining the source information of the command line to be executed by the operating system, this embodiment may be the second source information for determining the command line. The second source information is used to determine that the command line is obtained by remote delivery, that is, to determine that the command line is in a remote command state, which may be a set of executable command lines issued remotely. This embodiment may execute the command line in the client based on the second source information, thereby obtaining the second running state.

[0047] As an optional implementation, running the command line based on the second source information to obtain the second running state includes: running the command line in a sandbox based on the second source information to obtain the second running state.

[0048] In this embodiment, when implementing the execution of the command line based on the second source information, it can be determined based on the second source information that the command line needs to be executed in a sandbox, and then the client first runs the command line in the sandbox, observes its behavior, and obtains the second running state, rather than directly running the command line in the operating system.

[0049] As an optional implementation, after the command line is run in the sandbox based on the second source information to obtain a second operating state, the method further includes: when the second operating state indicates that the command line is running in an abnormal state, reporting the second operating state to the cloud server, wherein the second operating state is recorded by the cloud server; when the second operating state indicates that the command line is running in a normal state, executing the command line in the operating system and recording a third operating state obtained.

[0050] In this embodiment, after the command line is run in the sandbox based on the second source information to obtain the second running state, if the second running state indicates that the running of the command line is in an abnormal state, for example, the running of the command line is harmful to the operating system or application, it will not be executed. At the same time, other behaviors and consequences are analyzed to obtain the second running state, which is reported to the cloud server (cloud). The above-mentioned second running state can be recorded in the record center of the cloud server, thereby providing cloud data backup, and then providing remote functions such as query.

[0051] Optionally, if the second running state indicates that the command line is running normally, that is, the command line is running harmlessly and can be actually run, the command line can be further executed in the operating system and the obtained third running state can be recorded. The third running state may include the corresponding executor and instruction information, etc.

[0052] As an optional implementation, when the running status indicates that the running of the command line is in an abnormal state, the reason why the running of the command line is in the abnormal state is determined based on the running status.

[0053] In this embodiment, if the running status indicates that the command line is in an abnormal state, the reason why the command line is in an abnormal state can be determined based on the running status. For example, if the command line is a remotely issued command line, its source can be traced back to the running status, such as tracing the IP, MAC address, and the entire link of the jump router, to determine the reason why the command line is in an abnormal state. At the same time, it can also be found out whether the command line is issued by the real centralized control background or is tampered with or forged in the middle, thereby providing powerful and accurate security protection measures for the operating system.

[0054] In this embodiment, on the basis of the original monitoring tool, comprehensive and multi-dimensional monitoring of the command line can be supplemented; remote functions such as cloud data backup and query can be provided; a restoration mechanism can be provided, and when the program or system is damaged, the corresponding strategy can be executed for repair processing; the restoration mechanism of this embodiment is highly flexible, provides selective restore points, and provides hot backup restoration and cold backup restoration; this embodiment also provides powerful and accurate security protection measures. If the command line is issued remotely, its source can be traced, thereby solving the technical problem of lack of command line monitoring and achieving the technical effect of command line monitoring.

[0055] Example 2

[0056] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.

[0057] In the related technologies, most of the monitoring solutions are incomplete and lack status recording and cloud data backup functions. For example, Top--Linux system process monitoring can display CPU usage, memory usage, swap memory, cache size, buffer size, process control, users, process-related information and more commands; Procmon--Process Monitor under Windows system monitoring tools, which is an advanced tool that can display file system, registry and process activities in real time, and is a system monitoring tool recommended by Microsoft.

[0058] Monitoring tools like the ones above can only observe phenomena locally and do not have status recording and cloud backup functions. Once refreshed, they cannot be retrieved or uploaded to the cloud.

[0059] After executing certain operations, there is no record. Especially for command line operations, which play an indispensable role in Windows, Linux, IOS and other systems, there is also a lack of corresponding command line execution monitoring.

[0060] In addition, even if the command line is executed, if the program or operating system is damaged, there is no corresponding solution and the only option is to reinstall the system. For some command lines with less harmful effects, it is impossible to trace their source or find out which program issued a certain operation.

[0061] The technical solution of this embodiment can realize status recording and backup and restoration.

[0062] This embodiment needs to perform restore point recording before implementing status recording. Restore point recording can be divided into manual recording and automatic recording. Manual recording generally requires a large amount of space and is mainly used to back up important system configuration files, writable partition redirection, mirror copy, etc. Automatic recording is generally lightweight and can simply record and back up some system configuration files and program list status records, etc.

[0063] The state record of this embodiment belongs to a process, for example, the remote command state execution. When a set of executable command lines is sent remotely, the client will first execute it in the sandbox to observe its behavior. If it is harmful to the operating system or application, it will not be executed. At the same time, other behaviors and consequences can be analyzed and reported to the recording center of the cloud system for recording; if the command line is harmless, the command line can be actually run, and then the corresponding executor, instruction information, etc. can be recorded. Optionally, when running directly, 5 optional restore points can also be provided.

[0064] This embodiment can include hot backup restoration and cold backup restoration when implementing backup and restoration. Among them, the premise of hot backup restoration is to operate the operating system normally, and a certain restore point can be selected. The selected restore point information will be reset to the hardware partition, and then the machine can be restarted. Then, the idle period after the machine is started and before entering the operating system can be used to copy, overwrite, delete, move, etc. system configuration information and files through hardware instructions and non-system programs; optionally, after entering the operating system, the user can operate the idle period before, for example, after entering the operating system, the mask can be immediately pulled up to prohibit user operations, and then a series of restore operations can be performed on some user applications, user files, and user configuration information.

[0065] The cold backup restoration of this embodiment is mainly aimed at the case where the operating system is damaged and the operating system cannot be entered. For example, under the Windows operating system, you can enter the PE system through the boot disk, perform various operations on the original system or directly run a special program, which can be used to restore some routine and normal configuration information. At this time, the most recent restore point can be restored by default, saving a lot of time for reinstalling the system and avoiding the trouble of clearing the system disk.

[0066] Figure 2 FIG. 1 is a flowchart of a method for command line monitoring and state recovery according to an embodiment of the present invention. Figure 2 As shown, the method may include the following steps:

[0067] Step S201, setting a restore point.

[0068] This embodiment can automatically record restore points for a small number of special configuration files, and can manually record restore points for a large number of files that require time and space.

[0069] Step S202, analyzing the source of the command line.

[0070] Step S203: determine that the source of the command line is remotely issued.

[0071] Step S204, executing the command line in the sandbox to perform behavior detection.

[0072] Step S205, determining whether the execution of the command line is harmful to the operating system or the application program.

[0073] If it is determined that the execution of the command line does not harm the operating system or the application program, step S206 is executed; if it is determined that the execution of the command line harms the operating system or the application program, step S207 is executed.

[0074] Step S206, actually executing the command line.

[0075] Step S207, record and analyze the behavior corresponding to the command line, and report it to the cloud.

[0076] Step S208: determining that the source of the command line is manual input.

[0077] Step S209, determining that the source of the command line is script execution.

[0078] Step S210, executing the command line.

[0079] Step S211, determining whether the execution of the command line is safe.

[0080] If it is determined that the execution of the command line is safe, step S212 is executed; if it is determined that the execution of the command line is not safe, step S213 is executed.

[0081] Step S212, registering the log and behavior corresponding to the command line.

[0082] Step S213, display the most recent operation log.

[0083] Step S214: determine whether to restore the operating system based on the most recent operation log.

[0084] If it is determined based on the most recent operation log that the operating system is not to be restored, step S215 is executed; if it is determined based on the most recent operation log that the operating system is to be restored, step S216 is executed.

[0085] Step S215, registering the log and behavior corresponding to the command line.

[0086] Step S216, selecting a restoration method.

[0087] Step S217, select hot backup restoration.

[0088] In this embodiment, the hot backup restoration is used when the operating system is running normally, and five selectable restore points can be provided, so that the operating system can be restored to any backed-up restore point according to any restore point.

[0089] Step S218, selecting a restore point, and performing hot backup restoration of the operating system according to the restore point.

[0090] Step S219, select cold backup restoration.

[0091] The cold backup restore of this embodiment can be used in the case where the operating system is damaged and the operating system cannot be entered. You can use a USB flash drive to enter the PE system and execute another program B. Program B can be used to restore the backed-up files, for example, restore the files backed up in the path C:\Windows\System32\config; the above program B can also pull the command lines of the last few days from the cloud for operation (including which program is executed, and if the command line is sent remotely, the IP can be queried).

[0092] Step S220, prompting to enter PE, select a restore point, and perform cold backup and restore of the operating system according to the restore point.

[0093] For example, the command line can be a remote command line for the Spider centralized control, which can issue a series of executable command lines to the specified device in the Spider centralized control background. For example, ip addr, rm-r* under Linux; ipconfig, ping command, telent command, etc. under Windows. The client of the Spider centralized control of this embodiment cannot identify whether such command lines cause harm to other programs or systems, and has high execution permissions. Users can adopt the solution of this embodiment to record restore points in advance. If an incorrect operation is performed according to the command line, they can also directly restore according to the restore point. At the same time, they can also find out whether the command line is issued by the real Spider centralized control background or has been tampered with or forged in the middle.

[0094] This embodiment can supplement the existing monitoring tools on the market with comprehensive and multi-dimensional monitoring of command lines; it can provide remote functions such as cloud data backup and query; it can provide a restoration mechanism, and after the program or system is damaged, it can execute the corresponding strategy for repair processing; the restoration mechanism of this embodiment is highly flexible, provides selective restore points, and provides hot backup restoration and cold backup restoration; this embodiment provides powerful and accurate security protection measures. If a command line is sent remotely, its source can be traced, such as IP, MAC address, and the full link of the jump router, thereby solving the technical problem of lack of command line monitoring and achieving the technical effect of command line monitoring.

[0095] Example 3

[0096] The embodiment of the present invention further provides a data monitoring device. It should be noted that the data monitoring device of this embodiment can be used to execute the data monitoring method of the embodiment of the present invention.

[0097] Figure 3 Schematic diagram of a data monitoring device according to an embodiment of the present invention. Figure 3 As shown, the data monitoring device 30 may include: a first determining unit 31 , a second determining unit 32 , an operating unit 33 and a restoring unit 34 .

[0098] The first determining unit 31 is configured to determine at least one restore point of the operating system.

[0099] The second determining unit 32 is used to determine source information of the command line to be executed by the operating system, wherein the source information is used to indicate the source of the command line.

[0100] The running unit 33 is used to run the command line based on the source information to obtain the running status.

[0101] The restoration unit 34 is used to select a target restoration point from at least one restoration point and restore the operating system according to the target restoration point when it is determined based on the running state that the operating system needs to be restored.

[0102] The data monitoring device of this embodiment provides a restore mechanism, which can provide at least one selectable restore point for the operating system, and then run the command line based on the source information of the command line to obtain the running status, thereby achieving the purpose of monitoring the command line. If it is determined based on the running status that the operating system does need to be restored, the operating system can be restored according to the target restore point in at least one restore point, and reinstalling the operating system is avoided, providing a powerful and accurate security protection measure for the operating system, thereby solving the technical problem of lack of command line monitoring and achieving the technical effect of monitoring the command line.

[0103] Example 4

[0104] According to an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the data monitoring method of the embodiment of the present invention.

[0105] Example 5

[0106] According to an embodiment of the present invention, a processor is further provided. The processor is used to run a program, wherein the data monitoring method of the embodiment of the present invention is executed when the program is run.

[0107] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0108] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0109] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, units or models, which can be electrical or other forms.

[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0111] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0113] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data monitoring method, characterized in that: include: Identify at least one restore point for the operating system; Determining source information of a command line to be executed by the operating system, wherein the source information is used to indicate a source from which the command line is generated; Running the command line based on the source information to obtain a running state, wherein the source information of the command line is different, and the way of running the command line is also different. When the source information of the command line is remotely issued, the command line is executed in a sandbox, and when the source information of the command line is manually input or script running, the command line is run in the operating system; In a case where it is determined based on the running state that the operating system needs to be restored, selecting a target restore point from the at least one restore point, and restoring the operating system according to the target restore point; Restoring the operating system according to the target restore point includes: when the operating system is in a normal state, restoring the operating system according to the target restore point in a target time period; when the operating system is in an abnormal state, restoring the operating system according to the target restore point in a pre-installed environment of the operating system.

2. The method according to claim 1, characterized in that: Determining source information of a command line to be executed by the operating system includes: determining first source information of the command line, wherein the first source information is used to indicate that the command line is input by responding to an input operation instruction or obtained by running a script; Running the command line based on the source information to obtain a running state includes: running the command line based on the first source information to obtain a first running state.

3. The method according to claim 2, characterized in that Before restoring the operating system according to the target restore point, the method further includes: When the first running state indicates that the running of the command line is in an abnormal state, it is determined that the operating system needs to be restored.

4. The method according to claim 1, characterized in that Restoring the operating system according to the target restore point in the target time period includes: After the device where the operating system is located is started and before the operating system is entered, the operating system is restored according to the target restore point; or After the device where the operating system is located enters the operating system and before receiving the operation instruction, the operating system is restored according to the target restore point in a second time period.

5. The method according to claim 2, characterized in that: Before restoring the operating system according to the target restore point, the method further includes: When the first running status indicates that the command line is running normally, the first running status is recorded.

6. The method according to claim 1, characterized in that Determining source information of a command line to be executed by the operating system includes: determining second source information of the command line, wherein the second source information is used to indicate that the command line is obtained by remote delivery; Running the command line based on the source information to obtain a running state includes: running the command line in a sandbox based on the second source information to obtain a second running state.

7. A data monitoring device, characterized in that: include: A first determining unit, configured to determine at least one restore point of the operating system; A second determining unit, configured to determine source information of a command line to be executed by the operating system, wherein the source information is used to indicate a source from which the command line is generated; an operating unit, configured to operate the command line based on the source information to obtain an operating state, wherein the source information of the command line is different, and the mode of operating the command line is also different. When the source information of the command line is remotely issued, the command line is executed in a sandbox, and when the source information of the command line is manually input or script execution, the command line is executed in an operating system; a restoration unit, configured to select a target restoration point from the at least one restoration point and restore the operating system according to the target restoration point when it is determined based on the running state that the operating system needs to be restored; The restoration unit includes: a first restoration module, which is used to restore the operating system according to the target restoration point in a target time period when the operating system is in a normal state; and a second restoration module, which is used to restore the operating system according to the target restoration point in a pre-installed environment of the operating system when the operating system is in an abnormal state.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

9. A processor, characterized in that: The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 6 when running.