Device control method, device, electronic device, storage medium and program
By obtaining the device instance path and setting matching fields, determining the device access method and controlling it, the defect of system operation problems caused by the complete disabling of the device type in the prior art is solved, and more refined control of the device is achieved.
Patent Information
- Application Number
- CN202010873303.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-26
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2040-08-26
AI Technical Summary
Existing methods control devices according to device type, which may cause all devices of a certain device type to be disabled, affecting the normal operation of the system.
By obtaining the device instance path of the target device and determining the access method of the device based on the path and the setting matching field, the device is controlled according to the access method.
It realizes more refined control of the equipment, can distinguish equipment with different device access methods, and avoid system operation problems caused by the complete disabling of the device type.
Smart Images

Figure CN114116019B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a device control method, apparatus, electronic equipment, storage medium and program. Background Art
[0002] In some application scenarios, it is necessary to connect devices to the system externally or internally. For example, connect a network card, optical drive, keyboard, mouse, etc. to a computer system. Currently, the system controls connected devices based on the device type, for example, disabling all connected keyboards. This device control method will cause all devices of a certain device type in the system to be disabled, which brings inconvenience to the use of the system.
[0003] It can be seen that the existing method controls devices according to device types, which may affect the normal operation of the system due to disabling all devices of a certain device type. Summary of the invention
[0004] The embodiments of the present invention provide a device control method, apparatus, electronic device, storage medium and program to solve the problem that the existing method controls devices according to device types, which may affect the normal operation of the system due to disabling all devices of a certain device type.
[0005] In view of the above technical problems, in a first aspect, an embodiment of the present invention provides a device control method, including:
[0006] Obtaining a device instance path of a target device; the target device is any device to be started;
[0007] Determining a device access mode of the target device according to the device instance path and a set matching field;
[0008] controlling the target device according to the device access mode of the target device;
[0009] Among them, the device access methods include external method and built-in method.
[0010] Optionally, determining the device access mode of the target device according to the device instance path and a set matching field includes:
[0011] Determine whether the device instance path matches a set matching field; wherein the set matching field includes at least one of the following: a field containing a USB, a field containing a device manufacturer name VID, and a field containing a device model PID;
[0012] If the device instance path matches the set matching field, the device access mode of the target device is an external mode; otherwise, the device access mode of the target device is a built-in mode.
[0013] Optionally, controlling the target device according to the device access mode of the target device includes:
[0014] Acquire a target control strategy corresponding to the device type of the target device from a preset control strategy, wherein the preset control strategy is provided with a control operation performed on the device under each different device access mode, and the control operation is one of device release and device disable;
[0015] Determining, from the target control strategy, a target control operation corresponding to the device access mode of the target device;
[0016] The target control operation is performed on the target device so that the target device is released or disabled.
[0017] Optionally, before acquiring the target control strategy corresponding to the device type of the target device from the preset control strategy, the method further includes:
[0018] Set up preset control strategies corresponding to each device type;
[0019] Among them, in the preset control strategy corresponding to any device type, a corresponding control operation is set for any device access mode, and the control operation is one of device release and device disable.
[0020] Optionally, it also includes:
[0021] Set a monitoring strategy for monitoring the device, the monitoring strategy includes:
[0022] Setting monitoring screening conditions for the devices to be monitored, and setting monitoring items for the devices that meet the monitoring screening conditions;
[0023] The monitoring screening conditions include at least one of the following conditions: device type, device manufacturer, and device access method; the monitoring items include at least one of the following items: device access time, device dial-out time, and device instance path.
[0024] Optionally, it also includes:
[0025] Determine whether the target device meets any monitoring screening condition, and if so, obtain the monitoring item corresponding to any monitoring screening condition;
[0026] The information obtained from the target device according to the monitoring item corresponding to any one of the monitoring screening conditions is reported to a preset server, so that the target device is monitored through the preset server.
[0027] In a second aspect, an embodiment of the present invention provides a device control apparatus, including:
[0028] An acquisition module, used to acquire a device instance path of a target device; the target device is any device to be started;
[0029] A determination module, used to determine a device access mode of the target device according to the device instance path and a set matching field;
[0030] A control module, used for controlling the target device according to the device access mode of the target device;
[0031] Among them, the device access methods include external method and built-in method.
[0032] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned device control method when executing the program.
[0033] In a fourth aspect, an embodiment of the present invention provides a non-transitory readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described device control methods.
[0034] In a fifth aspect, an embodiment of the present invention provides a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned device control methods.
[0035] The embodiments of the present invention provide a device control method, apparatus, electronic device, storage medium and program, which determine the device access mode of the target device through the device instance path of the target device and the set matching field. The target device is controlled according to the device access mode of the target device. On the basis of the existing control of devices according to device types, the device is controlled according to the device access mode, thereby achieving more precise control of the device. Devices with different device access modes in a certain device type can be controlled differently, avoiding the situation where all devices of a certain device type can be disabled, which affects the normal operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 is a flow chart of a device control method provided by an embodiment of the present invention;
[0038] Figure 2 It is a schematic diagram of a flow chart of installing a filter device driver before controlling a device provided by another embodiment of the present invention;
[0039] Figure 3 is a schematic diagram of a process of performing differentiated control on a device provided by another embodiment of the present invention;
[0040] Figure 4 is a structural block diagram of a device control device provided by another embodiment of the present invention;
[0041] Figure 5 It is a schematic diagram of the physical structure of an electronic device provided by another embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 are within the scope of protection of the present invention.
[0043] Figure 1 The flowchart of the device control method provided in this embodiment is generally applied in a system, for example, in an operating system of a computer, and can be executed by a device driver (for example, a device filter driver) in the system. A device filter driver is a type of device driver, and is a low-level program in an operating system. When a device is started, the device filter driver needs to be called. As a low-level device, the device filter driver has high permissions and can obtain various information about the device, for example, the device name, device model, device manufacturer, etc. See Figure 1 , the device control method comprises the following steps:
[0044] Step 101: Obtain a device instance path of a target device; the target device is any device to be started.
[0045] The device instance path is a unique identifier of different devices in an operating system (eg, Windows operating system), including the device name, device interface information, device manufacturer information, device model, and the like.
[0046] Specifically, in a system with a filter device driver (QAXDevm) installed, when any device to be started is started by calling the filter device driver, the filter device driver reads various information of the device, obtains the device instance path of the device based on the various information of the device read, determines the device access mode of the device based on the obtained device instance path, and then controls the device according to the device access mode.
[0047] Step 102: Determine the device access mode of the target device according to the device instance path and the set matching field; wherein the device access mode includes an external mode and a built-in mode.
[0048] The set matching field may be a field existing in the device instance path when the device access mode is external (in this case, if the device instance path of the target device successfully matches a certain set matching field, the device access mode of the target device is external), or a field existing in the device instance path when the device access mode is built-in (in this case, if the device instance path of the target device successfully matches a certain set matching field, the device access mode of the target device is built-in). For the external mode, specifically, when the device access mode is external, there may be a field containing keywords such as USB, device manufacturer name VID, or device model PID in the device instance path, and these fields are used to match the device instance path of the target device, and the device access mode of the device is determined according to the matching result (wherein, when the device is built-in, VID and PID do not exist in the device instance path, and when the device is external, VID and PID exist in the device instance path, so it is also possible to determine whether the device is external or built-in by whether the device instance path contains a field containing VID or PID).
[0049] Step 103: Control the target device according to the device access mode of the target device.
[0050] This embodiment provides a device control method, which determines the device access mode of the target device through the device instance path of the target device and the set matching field. The target device is controlled according to the device access mode of the target device. On the basis of the existing control of devices according to device types, the device is controlled according to the device access mode, thereby achieving more precise control of the device. Devices with different device access modes in a certain device type can be controlled differently, avoiding disabling all devices of a certain device type and affecting the normal operation of the system.
[0051] Further, based on the above embodiments, determining the device access mode of the target device according to the device instance path and the set matching field includes:
[0052] Determine whether the device instance path matches at least one set matching field; wherein the set matching field includes at least one of the following: a field containing a USB, a field containing a device manufacturer name VID, and a field containing a device model PID;
[0053] If the device instance path matches at least one set matching field, the device access mode of the target device is an external mode; otherwise, the device access mode of the target device is a built-in mode.
[0054] In this embodiment, the setting match field is set to a field existing in the device instance path when the device access mode is external. When the device instance path of the target device successfully matches any field in the setting match field, the device access mode of the target device is external, otherwise, the device access mode of the target device is internal.
[0055] In this embodiment, the device access mode of the target device is determined by setting the matching field, so that the device can be controlled more precisely according to the determined device access mode.
[0056] Further, based on the above embodiments, controlling the target device according to the device access mode of the target device includes:
[0057] Acquire a target control strategy corresponding to the device type of the target device from a preset control strategy, wherein the preset control strategy is provided with a control operation performed on the device under each different device access mode, and the control operation is one of device release and device disable;
[0058] Determining, from the target control strategy, a target control operation corresponding to the device access mode of the target device;
[0059] The target control operation is performed on the target device so that the target device is released or disabled.
[0060] For each device type, a preset control strategy for controlling the device of the device type is preset. Each preset control strategy sets the control operations taken by the device for the device of the device type under different device access modes.
[0061] Therefore, in the process of controlling the target device, it is necessary to first obtain a preset control policy corresponding to the device type of the target device (for example, the preset control policy is a target control policy), and then obtain a control operation corresponding to the device access mode of the target device according to the target control policy, and control the target device according to the control operation. For example, if the control operation is release, the target device is successfully started, and if the control operation is disable, the target device fails to start.
[0062] In this embodiment, when controlling the target device, the target control policy corresponding to the device type of the target device is first obtained from the preset control policy, and then according to the device access mode of the target device, the target device is released or disabled according to the control operation corresponding to the device access mode set in the target control policy, thereby realizing differentiated control of the target device according to the device access mode.
[0063] Further, based on the above embodiments, before acquiring the target control strategy corresponding to the device type of the target device from the preset control strategy, it also includes:
[0064] Set up preset control strategies corresponding to each device type;
[0065] Among them, in the preset control strategy corresponding to any device type, a corresponding control operation is set for any device access mode, and the control operation is one of device release and device disable.
[0066] Before controlling the device according to the device access mode, it is necessary to set preset control policies for different device types, for example, to set preset control policies corresponding to keyboards. In each preset control policy, it is necessary to set control operations corresponding to different device access modes. For example, for the device type of keyboard, when the device access mode is set to external in the preset control policy corresponding to the keyboard, the corresponding control operation is disabled, and when the device access mode is set to internal, the corresponding control operation is released.
[0067] In this embodiment, preset control strategies are set for devices of different device types, and control operations corresponding to different device access modes are set in each preset control strategy. Differential control of devices of different device access modes is achieved through the preset control strategies.
[0068] In order to improve the control of the device, further, based on the above embodiments, it also includes:
[0069] Set a monitoring strategy for monitoring the device, the monitoring strategy includes:
[0070] Setting monitoring screening conditions for the devices to be monitored, and setting monitoring items for the devices that meet the monitoring screening conditions;
[0071] The monitoring screening conditions include at least one of the following conditions: device type, device manufacturer, and device access method; the monitoring items include at least one of the following items: device access time, device dial-out time, and device instance path.
[0072] In addition to controlling devices by disabling or releasing them when they start, you can also set monitoring policies for devices to monitor them. For example, in some scenarios, although some devices can be allowed to access the operating system, it is necessary to monitor the time when the device is connected to the operating system, the time when the device is unplugged from the operating system, and other information about the device (for example, the device instance path).
[0073] In the monitoring strategy, the devices to be monitored are determined by monitoring screening conditions, and the content to be monitored is set by monitoring items. For example, in the monitoring strategy, the monitoring screening conditions include: the device type is a CD, and the device access method is external, which means that the CD with an external access method needs to be monitored. In the monitoring strategy, the monitoring items are set as the device access time and the device withdrawal time, which means that the time when the "CD with an external access method" is connected to the operating system (i.e., the time when the device filter driver is successfully started) and the time when it is pulled out from the operating system (i.e., the time when the operating system is exited) need to be monitored. It is understandable that the monitoring screening conditions and monitoring items can be set according to actual conditions, and this embodiment does not make specific limitations on this.
[0074] In this embodiment, the devices to be monitored and the monitoring items to be monitored are set through monitoring policies, and the monitoring of devices is achieved on the basis of controlling the release and disabling of devices, which is conducive to understanding the situation of devices being connected or unplugged from the operating system.
[0075] Furthermore, based on the above embodiments, it also includes:
[0076] Determine whether the target device meets any monitoring screening condition, and if so, obtain the monitoring item corresponding to any monitoring screening condition;
[0077] The information obtained from the target device according to the monitoring item corresponding to any one of the monitoring screening conditions is reported to a preset server, so that the target device is monitored through the preset server.
[0078] The preset server may be a cloud server, a backend server, etc. For example, for an enterprise, an employee terminal reports the device access time and device dial-out time of a device of a certain device type to the preset server, and the enterprise can monitor the device access time and device dial-out time of the device of the device type through the preset server.
[0079] Specifically, when the device filter driver detects a target device to be started, in addition to determining whether to release or disable the target device based on the device access method, it also needs to determine whether the target device meets any monitoring screening condition. If so, monitor the target device according to the monitoring items corresponding to any of the monitoring screening conditions.
[0080] In this embodiment, the monitoring screening condition is used to determine whether the target device needs to be monitored. At the same time, if the target device needs to be monitored, the information of the target device is obtained according to the monitoring items corresponding to any monitoring screening condition, and the monitoring of the target device under each monitoring item corresponding to any monitoring screening condition is monitored, so that the information of the target device under each monitoring item can be queried when necessary.
[0081] Specifically, Figure 2 For a flow chart of installing a filter device driver before controlling the device provided in this embodiment, see Figure 2 In order to achieve control over the device, you need to first install a self-starting filter device driver service in the system, so that after the operating system (OS) starts, you can obtain the device instance path of the device through the filter device driver service to achieve control over the device. After the self-starting filter device driver service is installed, you can also traverse all devices in the registry to set preset control policies for each device type. Setting the Lower Filter of the device means setting a control policy for a device of a certain device type based on the device access method.
[0082] Figure 3 A schematic diagram of the process of differentiating the control of the device provided in this embodiment. Figure 2 After installing the filter device driver service, follow the steps shown in the following Figure 3 The process shown controls the external and internal devices differently, specifically including the following:
[0083] (1) Install the filtering device driver service (QAXDevm) and set the device to be filtered. If filtering is required, use our device as the LowerFilter device of the device to control and distinguish the device.
[0084] (2) When the user connects to a peripheral or changes the status of an (internal / external) device, if QAXDevm is not started, it will be loaded by the system. If it has been loaded, it will continue to create the filter driver device object QAXDevObj.
[0085] (3) The device instance path of the device object is extracted, and the device can also be monitored in combination with the monitoring policy set for the device.
[0086] (4) Determine whether the instance path matches the USB***** format. If so, it is a peripheral device; otherwise, it is a built-in device.
[0087] (5) Differentiate and independently control internal / external devices based on device control strategies.
[0088] (6) Send the above monitored device information to the device operation audit interface of the application layer to complete the device audit.
[0089] Figure 4 For a structural block diagram of the device control device provided in this embodiment, see Figure 4 The device control apparatus includes an acquisition module 401, a determination module 402 and a control module 403, wherein:
[0090] The acquisition module 401 is used to acquire a device instance path of a target device; the target device is any device to be started;
[0091] A determination module 402, configured to determine a device access mode of the target device according to the device instance path and a set matching field;
[0092] A control module 403, configured to control the target device according to the device access mode of the target device;
[0093] Among them, the device access methods include external method and built-in method.
[0094] The device control apparatus provided in this embodiment is applicable to the device control methods provided in the above embodiments, which will not be described in detail here.
[0095] This embodiment provides a device control device, which determines the device access mode of the target device through the device instance path of the target device and the set matching field. The target device is controlled according to the device access mode of the target device. On the basis of the existing control of devices according to device types, the device is controlled according to the device access mode, thereby achieving more precise control of the device. Devices with different device access modes in a certain device type can be controlled differently, avoiding the situation where all devices of a certain device type can be disabled, which affects the normal operation of the system.
[0096] Optionally, determining the device access mode of the target device according to the device instance path and a set matching field includes:
[0097] Determine whether the device instance path matches a set matching field; wherein the set matching field includes at least one of the following: a field containing a USB, a field containing a device manufacturer name VID, and a field containing a device model PID;
[0098] If the device instance path matches the set matching field, the device access mode of the target device is an external mode; otherwise, the device access mode of the target device is a built-in mode.
[0099] Optionally, controlling the target device according to the device access mode of the target device includes:
[0100] Acquire a target control strategy corresponding to the device type of the target device from a preset control strategy, wherein the preset control strategy is provided with a control operation performed on the device under each different device access mode, and the control operation is one of device release and device disable;
[0101] Determining, from the target control strategy, a target control operation corresponding to the device access mode of the target device;
[0102] The target control operation is performed on the target device so that the target device is released or disabled.
[0103] Optionally, before acquiring the target control strategy corresponding to the device type of the target device from the preset control strategy, the method further includes:
[0104] Set up preset control strategies corresponding to each device type;
[0105] Among them, in the preset control strategy corresponding to any device type, a corresponding control operation is set for any device access mode, and the control operation is one of device release and device disable.
[0106] Optionally, it also includes:
[0107] Set a monitoring strategy for monitoring the device, the monitoring strategy includes:
[0108] Setting monitoring screening conditions for the devices to be monitored, and setting monitoring items for the devices that meet the monitoring screening conditions;
[0109] The monitoring screening conditions include at least one of the following conditions: device type, device manufacturer, and device access method; the monitoring items include at least one of the following items: device access time, device dial-out time, and device instance path.
[0110] Optionally, it also includes:
[0111] Determine whether the target device meets any monitoring screening condition, and if so, obtain the monitoring item corresponding to any monitoring screening condition;
[0112] The information obtained from the target device according to the monitoring item corresponding to any one of the monitoring screening conditions is reported to a preset server, so that the target device is monitored through the preset server.
[0113] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 communicate with each other through the communication bus 504. The processor 501 may call the logic instructions in the memory 503 to execute the following method: obtaining the device instance path of the target device; the target device is any device to be started; determining the device access mode of the target device according to the device instance path and the set matching field; controlling the target device according to the device access mode of the target device; wherein the device access mode includes an external mode and a built-in mode.
[0114] In addition, the logic instructions in the above-mentioned memory 503 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the 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 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 method described in each embodiment of the present invention. 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.
[0115] Furthermore, an embodiment of the present invention discloses a computer program product, which includes a computer program stored on a non-transitory readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining a device instance path of a target device; the target device is any device to be started; determining a device access mode of the target device based on the device instance path and a set matching field; controlling the target device based on the device access mode of the target device; wherein the device access mode includes an external mode and a built-in mode.
[0116] On the other hand, an embodiment of the present invention further provides a non-transitory readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the transmission methods provided by the above-mentioned embodiments, for example, including: obtaining a device instance path of a target device; the target device is any device to be started; determining a device access mode of the target device based on the device instance path and a set matching field; controlling the target device based on the device access mode of the target device; wherein the device access mode includes an external mode and a built-in mode.
[0117] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A device control method, characterized in that: Applies to device drivers, including: Obtaining a device instance path of a target device; the target device is any device to be started; Determining a device access mode of the target device according to the device instance path and a set matching field; controlling the target device according to the device access mode of the target device; The device access mode includes an external mode and a built-in mode, wherein the controlling the target device according to the device access mode of the target device includes: Acquire a target control strategy corresponding to the device type of the target device from a preset control strategy, wherein the preset control strategy is provided with a control operation performed on the device under each different device access mode, and the control operation is one of device release and device disable; Determining, from the target control strategy, a target control operation corresponding to the device access mode of the target device; The target control operation is performed on the target device so that the target device is released or disabled.
2. The device control method according to claim 1, characterized in that: The determining, according to the device instance path and the set matching field, the device access mode of the target device includes: Determine whether the device instance path matches a set matching field; wherein the set matching field includes at least one of the following: a field containing a USB, a field containing a device manufacturer name VID, and a field containing a device model PID; If the device instance path matches the set matching field, the device access mode of the target device is an external mode; otherwise, the device access mode of the target device is a built-in mode.
3. The device control method according to claim 2, characterized in that: Before acquiring the target control strategy corresponding to the device type of the target device from the preset control strategy, the method further includes: Set up preset control strategies corresponding to each device type; Among them, in the preset control strategy corresponding to any device type, a corresponding control operation is set for any device access mode, and the control operation is one of device release and device disable.
4. The device control method according to claim 1, characterized in that: Also includes: Set a monitoring strategy for monitoring the device, the monitoring strategy includes: Setting monitoring screening conditions for the devices to be monitored, and setting monitoring items for the devices that meet the monitoring screening conditions; The monitoring screening conditions include at least one of the following conditions: device type, device manufacturer, and device access method; the monitoring items include at least one of the following items: device access time, device dial-out time, and device instance path.
5. The device control method according to claim 4, characterized in that: Also includes: Determine whether the target device meets any monitoring screening condition, and if so, obtain the monitoring item corresponding to any monitoring screening condition; The information obtained from the target device according to the monitoring item corresponding to any one of the monitoring screening conditions is reported to a preset server, so that the target device is monitored through the preset server.
6. A device control device, characterized in that: include: An acquisition module, used to acquire a device instance path of a target device; the target device is any device to be started; A determination module, used to determine a device access mode of the target device according to the device instance path and a set matching field; A control module, configured to control the target device according to the device access mode of the target device, wherein the control of the target device according to the device access mode of the target device includes: Acquire a target control strategy corresponding to the device type of the target device from a preset control strategy, wherein the preset control strategy is provided with a control operation performed on the device under each different device access mode, and the control operation is one of device release and device disable; Determining, from the target control strategy, a target control operation corresponding to the device access mode of the target device; Performing the target control operation on the target device so that the target device is released or disabled; Among them, the device access methods include external method and built-in method.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the device control method according to any one of claims 1 to 5 are implemented.
8. A non-transitory readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the device control method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
USB device loading method, storage medium and smart television
CN109947482A