Terminal device control method, device, storage medium and terminal device
By turning off multicast DNS service in the low-power state of terminal devices, the problem of increased WiFi power consumption is solved, and the effect of saving power is achieved.
Patent Information
- Application Number
- CN202210255985.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-03-15
AI Technical Summary
With the increase in WiFi communication rate, WiFi power consumption in terminal devices increases. The prior art avoids the long-term reception status of WiFi modules by periodically monitoring messages sent by APs, resulting in increased power consumption of terminal devices.
When the terminal device enters a low power state, turn off the multicast DNS service to avoid other devices on the LAN from frequently waking up the WiFi module. The low power consumption state includes the screen-off state, the uncharged and the screen-off state is maintained to the preset time, or the stationary state is maintained to the preset time.
By turning off the multicast DNS service, the standby power consumption of terminal devices is reduced, especially when there are many devices in the LAN, the power consumption caused by frequent wake-up of WiFi modules is effectively reduced.
Smart Images

Figure CN114630404B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a terminal device control method, device, storage medium and terminal device. Background Art
[0002] As the communication rate of WiFi (a wireless communication technology) increases, the power consumption required by WiFi in terminal devices is also increasing. In related technologies, messages sent by AP (Access Point) are generally monitored periodically, and data is obtained from the router based on the messages, so as to avoid the WiFi module being in a receiving state for a long time, which causes the power consumption of the terminal device to increase. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a terminal device control method, device, storage medium and terminal device.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a terminal device control method, including:
[0005] Determine the working status of the terminal equipment;
[0006] When the working state of the terminal device is a low power consumption state, the multicast DNS service of the terminal device is turned off, wherein the low power consumption state indicates that the terminal device is at least in a screen-off state.
[0007] Optionally, when the working state of the terminal device is a low power consumption state, shutting down the multicast DNS service of the terminal device includes:
[0008] When the terminal device is in an uncharged state and the terminal device maintains a screen-off state for a first preset time period, if the terminal device is in a mobile state, the multicast DNS service of the terminal device is turned off.
[0009] Optionally, when the working state of the terminal device is a low power consumption state, shutting down the multicast DNS service of the terminal device includes:
[0010] When the terminal device is in an uncharged state, if the terminal device is in a screen-off state, and the terminal device remains stationary for a second preset time period, the multicast DNS service of the terminal device is turned off.
[0011] Optionally, after shutting down the multicast DNS service of the terminal device, the method further includes:
[0012] When the terminal device is in a screen-on state, detecting whether the terminal device is connected to a trusted wireless network;
[0013] When the terminal device accesses a trusted wireless network, a multicast DNS service of the terminal device is enabled.
[0014] Optionally, after enabling the multicast DNS service of the terminal device, the method further includes:
[0015] According to the target service information of the upper-layer application that is active in the terminal device, the service information of the upper-layer application is registered in the multicast DNS service.
[0016] Optionally, the target service information is obtained by the following steps:
[0017] Before closing the multicast DNS service of the terminal device, the first current service information of the upper layer application is saved, and the first service information is used as the target service information.
[0018] Optionally, the method further comprises:
[0019] Before shutting down the multicast DNS service of the terminal device, a notification message is output, where the notification message is used to notify the upper layer application that the multicast DNS service of the terminal device has been shut down.
[0020] Optionally, shutting down the multicast DNS service of the terminal device includes:
[0021] Disable all actions of the multicast DNS service except registration;
[0022] The method further comprises:
[0023] When the multicast DNS service of the terminal device is in a closed state, the first current service information of the upper layer application saved is updated to the second current service information, wherein the second current service information is obtained by the upper layer application based on the registration request generated by the registration behavior.
[0024] According to a second aspect of an embodiment of the present disclosure, there is provided a terminal device control apparatus, including:
[0025] A determination module configured to determine the working state of the terminal device;
[0026] The control module is configured to shut down the multicast DNS service of the terminal device when the working state of the terminal device is a low power consumption state, wherein the low power consumption state indicates that the terminal device is at least in a screen-off state.
[0027] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the terminal device control method provided in the first aspect of the present disclosure are implemented.
[0028] According to a fourth aspect of an embodiment of the present disclosure, a terminal device is provided, including:
[0029] processor;
[0030] a memory for storing processor-executable instructions;
[0031] Wherein, the processor is configured to:
[0032] Execute the executable instructions stored in the memory to implement the steps of the terminal device control method provided in the first aspect of the present disclosure.
[0033] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: through the LAN discovery function provided by the multicast DNS service, the LAN can forward data sent by other devices to the terminal device as long as it is within the multicast of the multicast DNS service. Every time the terminal device receives data sent by other devices, it needs to wake up the wireless communication module. However, when the terminal device enters a low-power state, the terminal device has almost no need to communicate with external devices. Therefore, by turning off the multicast DNS service of the terminal device, it can be avoided that other devices in the LAN frequently wake up the wireless communication module of the terminal device, thereby saving power of the terminal device. In particular, when there are many devices in the LAN, the terminal device will be frequently awakened by different devices, resulting in increased power consumption of the terminal device.
[0034] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0036] Figure 1 The present invention is a flowchart of a terminal device control method according to an exemplary embodiment.
[0037] Figure 2 The figure is a flow chart of a terminal device control method according to another exemplary embodiment.
[0038] Figure 3 is a timing diagram showing adjustment of a multicast DNS service according to an exemplary embodiment.
[0039] Figure 4 The present invention is a schematic diagram showing module connections of a terminal equipment control device according to an exemplary embodiment.
[0040] Figure 5The present invention is a block diagram of a terminal device according to an exemplary embodiment. DETAILED DESCRIPTION
[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0042] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0043] Figure 1 is a flow chart of a terminal device control method according to an exemplary embodiment. Figure 1 As shown, an embodiment of the present disclosure provides a terminal device control method, which is applied in a terminal device and includes the following steps.
[0044] In step 110, the operating status of the terminal device is determined.
[0045] Here, the terminal device may refer to a device that can communicate using a wireless communication module, such as a mobile terminal, a computer, etc. Exemplarily, the terminal device may determine the working state of the terminal device by detecting the charging state, screen state, and location information of the terminal device.
[0046] In some embodiments, the terminal device may periodically detect the working status of the terminal device. For example, a preset time interval is set, and the terminal device detects its own working status every time the preset time interval is exceeded.
[0047] In step 120, when the working state of the terminal device is a low power consumption state, the multicast DNS service of the terminal device is turned off, wherein the low power consumption state indicates that the terminal device is at least in a screen-off state.
[0048] Here, Multicast DNS (mDNS) is a communication protocol that resolves the host name of the terminal device to an IP (Internet Protocol) address in a small network that does not contain a local name server. Through the multicast DNS service, the terminal device can communicate with smart home devices in the local area network. For example, through the local area network discovery function provided by the multicast DNS service, the local area network can forward data sent by other devices to the terminal device as long as it is in the mDNS multicast.
[0049] The working state of the terminal device may include a low power consumption state and a non-low power consumption state, wherein the low power consumption state indicates that the terminal device is at least in a screen-off state.
[0050] As an example, when the terminal device detects that the screen of the terminal device is in an off state, the multicast DNS service of the terminal device is turned off.
[0051] Among them, the screen-off state is a sub-state of the low-power state. When the screen state of the terminal device is the screen-off state, it is determined that the terminal device has entered the low-power state. The terminal device turns off its own multicast DNS service and no longer receives multicast DNS packets (mDNS packets) sent by smart home devices in the local area network. Therefore, after the terminal device turns off the screen, the wireless communication module of the terminal device will not be frequently awakened, thereby saving the power of the terminal device.
[0052] As another example, when the terminal device is in an uncharged state and the terminal device maintains a screen-off state for a first preset time period, if the terminal device is in a mobile state, the multicast DNS service of the terminal device is turned off.
[0053] Here, the terminal device being in an uncharged state means that the terminal device is not connected to an external power source and the terminal device is in a discharging state. When the terminal device is in an uncharged state, if the terminal device maintains the screen-off state for a first preset time, and the terminal device is in a mobile state, it indicates that the terminal device does not have the need to be discovered by an external device or discover an external device. At this time, by turning off the multicast DNS service of the terminal device, the wireless communication module of the terminal device can be prevented from being frequently awakened by data sent by external devices, thereby reducing the standby power consumption of the terminal device.
[0054] It should be understood that by setting the condition that the terminal device maintains the screen-off state for the first preset time, the problem of increased power consumption caused by frequent screen-off of the terminal device and frequent awakening of the multicast DNS service can be avoided. The first preset time can be set according to actual conditions.
[0055] In some embodiments, the terminal device can determine whether the terminal device meets the conditions that the terminal device is in an uncharged state, maintains a screen-off state for a first preset time, and is in a mobile state by detecting whether the terminal device has entered a light low power consumption mode. When the terminal device enters a light low power consumption mode, it is determined that the terminal device is in an uncharged state, the terminal device maintains a screen-off state for a first preset time, and the terminal device is in a mobile state. Among them, there is a corresponding light low power consumption mark for the light low power consumption mode. When the terminal device detects the light low power consumption mark, it can be determined that it has entered the light low power consumption mode.
[0056] In some embodiments, the terminal device may also determine whether to enter the light low power consumption mode by determining whether it is in an uncharged state, whether the screen-off state has been maintained for a first preset time, and whether it is in a moving state. When the terminal device is in an uncharged state, the screen-off state has been maintained for a first preset time, and it is in a moving state, it is determined to enter the light low power consumption mode; when the terminal device is in a charging state, the screen-off state has not been maintained for the first preset time, and / or it is not in a moving state, it is determined that it has not entered the light low power consumption mode.
[0057] Among them, the light Doze mode can be used as a sub-state of the low power consumption state. When the terminal device enters the light Doze mode, it is determined that the terminal device is in a low power consumption state, and the multicast DNS service of the terminal device is turned off. It should be understood that the light Doze mode is a state of the low power consumption mode (Doze mode). In the low power consumption mode, the system of the terminal device will try to save power by limiting application access to services that occupy a large amount of network and CPU (central processing unit) resources.
[0058] When the terminal device is not charging, if the terminal device is in the screen-off state for a first preset time and the terminal device is still in a mobile state, the terminal device enters the light Doze mode. In the light Doze mode, the terminal device will perform maintenance regularly, specifically, regularly accessing and synchronizing the network. It should be understood that how to detect whether the terminal device has entered the light Doze mode can refer to the relevant technology and will not be described in detail in the present embodiment.
[0059] It is worth noting that when a terminal device enters the light Doze mode, it indicates that the terminal device does not need to be discovered or found by external devices. Therefore, when the terminal device enters the light Doze mode, by turning off the multicast DNS service of the terminal device, the wireless communication module of the terminal device can be prevented from being frequently awakened by data sent by other devices in the multicast DNS, thereby saving the power of the terminal device.
[0060] As another example, when the terminal device is in an uncharged state, if the terminal device is in a screen-off state, and the terminal device remains stationary for a second preset time period, the multicast DNS service of the terminal device is turned off.
[0061] Here, the terminal device being in an uncharged state means that the terminal device is not connected to an external power source and the terminal device is in a discharging state. When the terminal device is in an uncharged state, if the terminal device is in a screen-off state and the terminal device remains stationary for a second preset time, it indicates that the terminal device does not have the need to be discovered by an external device or discover an external device. At this time, by turning off the multicast DNS service of the terminal device, the wireless communication module of the terminal device can be prevented from being frequently awakened by data sent by external devices, thereby reducing the standby power consumption of the terminal device.
[0062] It is worth noting that the second preset duration may be greater than the first preset duration. When the terminal device maintains the screen-off state and the static state for the first preset duration, the terminal device continues to monitor whether the location of the terminal device changes. When the terminal device maintains the static state for the second preset duration, it is determined that the terminal device does not have the need to be discovered by external devices or discover external devices, and the multicast DNS service of the terminal device is turned off.
[0063] In some embodiments, the terminal device can determine whether the terminal device meets the conditions that the terminal device is in an uncharged state, the terminal device is in an off-screen state, and the terminal device remains stationary for a second preset time period by detecting whether the terminal device has entered a deep low power consumption mode (Deep Doze mode). When the terminal device enters the deep low power consumption mode, it is determined that the terminal device is in an uncharged state, the terminal device is in an off-screen state, and the terminal device remains stationary for a second preset time period. Among them, there is a corresponding deep low power consumption identification for the deep low power consumption mode. When the terminal device detects the deep low power consumption identification, it can be determined that it has entered the deep low power consumption mode. This embodiment does not limit the specific form of the deep low power consumption identification, as long as the deep low power consumption identification allows the terminal device to identify the deep low power consumption mode.
[0064] In some embodiments, the terminal device may also determine whether it is in an uncharged state, in an off-screen state, and whether the terminal device remains stationary for a second preset time to determine whether to enter a deep low power consumption mode. When the terminal device is in an uncharged state, in an off-screen state, and the terminal device remains stationary for a second preset time, it is determined to enter a deep low power consumption mode; when the terminal device is in a charging state, not in an off-screen state, and the terminal device remains stationary for less than the second preset time, it is determined not to enter a deep low power consumption mode.
[0065] Among them, the deep low power consumption mode is a sub-state of the low power consumption state. When the terminal device enters the deep low power consumption mode, it is determined that the terminal device is in a low power consumption state, and the multicast DNS service of the terminal device is turned off.
[0066] It should be understood that the deep low power consumption mode is another state of the low power consumption mode. After the terminal device enters the light Doze mode, the terminal device will regularly maintain the access and synchronization of the network. After the maintenance continues for the second preset time, if the terminal device is always in a static state and reaches the second preset time, the terminal device switches from the light Doze mode to the Deep Doze mode. When the terminal device enters the Deep Doze mode, it indicates that the terminal device does not have the need to be discovered or found by external devices. By turning off the multicast DNS service of the terminal device, the wireless communication module of the terminal device can be prevented from being frequently awakened by data sent by other devices in the multicast DNS, thereby saving the power of the terminal device.
[0067] It is worth noting that the screen-off state, light Doze mode, and Deep Doze mode can all be used as low-power states. On the timeline, the terminal device first enters the screen-off state, then enters the light Doze mode and the Deep Doze mode in turn.
[0068] Therefore, when the terminal device enters a low-power state, by turning off the multicast DNS service of the terminal device, other devices in the local area network can be prevented from frequently waking up the wireless communication module of the terminal device, thereby saving power for the terminal device. Especially when there are many devices in the local area network, the terminal device will be frequently awakened by different devices, causing the power consumption of the terminal device to increase. After measurement, there is a device in the local area network that broadcasts in a cycle of 10 seconds. If the multicast DNS service of the terminal device is turned off when the terminal device enters the light Doze mode, the standby power consumption of the terminal device can be reduced by at least 10.3%.
[0069] In some embodiments, after turning off the multicast DNS service of the terminal device, the method further includes: when the terminal device is in a screen-on state, detecting whether the terminal device is connected to a trusted wireless network; when the terminal device is connected to the trusted wireless network, turning on the multicast DNS service of the terminal device.
[0070] Here, the terminal device detects the screen state of the terminal device, and when the terminal device is in the screen-on state, further detects whether the terminal device is connected to a trusted wireless network. The trusted wireless network refers to a wireless network trusted by the user. The wireless network can be a wireless network that supports multicast DNS, such as a WiFi network.
[0071] As an example, a whitelist can be set on the terminal device, and the user can add a trusted wireless network to the whitelist. When the wireless network currently accessed by the terminal device is in the whitelist, it is determined that the terminal device is accessing the trusted wireless network, and the multicast DNS service of the terminal device is enabled.
[0072] As another example, the terminal device can detect the location information of the wireless network accessed by the terminal device, and when the location information is trusted location information, it is determined that the terminal device is accessed to the trusted wireless network, and the multicast DNS service of the terminal device is turned on. For example, the user can mark the location information of home, company, etc. as trusted location information, and when the terminal device connects to the wireless network at a trusted location such as home or company, it is determined that the terminal device is accessed to the trusted wireless network.
[0073] It should be understood that when a terminal device accesses an untrusted wireless network, the multicast DNS service of the terminal device is turned off. When in an untrusted wireless network, the terminal device basically has no need to be discovered by other devices in the wireless network or to discover other devices. Therefore, by turning off the multicast DNS service of the terminal device, the wireless communication module of the terminal device can be prevented from being frequently awakened, thereby reducing the power consumption of the terminal device.
[0074] It is worth noting that the request behavior of the multicast DNS service includes the Register behavior, Discovery behavior, Resolve behavior, and GetAddressInfo behavior. When the multicast DNS service is turned off, the multicast DNS service of the terminal device can be turned off by turning off the Discovery behavior, Resolve behavior, and GetAddressInfo behavior of the multicast DNS service. Therefore, when the multicast DNS service is turned on, the Discovery behavior, Resolve behavior, and GetAddressInfo behavior of the multicast DNS service can be turned on to enable the terminal device to discover external devices or be discovered by external devices.
[0075] Therefore, by determining whether the terminal device has the need to be discovered by other devices in the wireless network or discover other devices based on the trust status of the wireless network to which the terminal device is currently connected, when the trusted wireless network is not connected, by turning off the multicast DNS service of the terminal device, it is possible to avoid the multicast DNS service of the terminal device being frequently awakened by upper-layer applications, thereby saving power.
[0076] Below, combined with the attached Figure 2 The above-mentioned embodiment will be described in detail.
[0077] Figure 2is a flow chart of a terminal device control method according to another exemplary embodiment. Figure 2 As shown, the terminal device control method provided by the embodiment of the present disclosure may include the following steps.
[0078] Step 201, monitoring the screen status of the terminal device;
[0079] Step 202, determining whether the terminal device is in a screen-on state;
[0080] Step 203, when the terminal device is not in the screen-on state, determining whether the terminal device has entered a light low power consumption mode;
[0081] Step 204, when the terminal device enters the light low power consumption mode, the multicast DNS service of the terminal device is turned off, and the process returns to step 201;
[0082] Step 205, when the terminal device is in the screen-on state, determining whether the terminal device is connected to a trusted wireless network;
[0083] Step 206: When the terminal device accesses the trusted wireless network, the multicast DNS service of the terminal device is enabled, and the process returns to step 201.
[0084] Among them, the terminal device determines the actual usage scenario of the terminal device by continuously monitoring the screen status of the terminal device. When the terminal device enters the screen-off state and the terminal device enters the mild low-power consumption mode, the terminal device is in a dormant usage scenario and does not have the need to be discovered by external devices or discover external devices. At this time, even if the terminal device is connected to a trusted wireless network, the multicast DNS service of the terminal device is turned off to reduce the standby power consumption of the terminal device.
[0085] When the terminal device enters the screen-on state, the terminal device further detects whether the terminal device is connected to a trusted wireless network. When the terminal device is not connected to a trusted wireless network, it means that the terminal device does not have the need to be discovered by external devices or discover external devices in the current usage scenario. Therefore, the multicast DNS service of the terminal device can continue to be closed to reduce the power consumption of the terminal device. If the terminal device is connected to a trusted wireless network, it means that the terminal device has the need to be discovered by external devices or discover external devices in the current usage scenario. At this time, turn on the multicast DNS service of the terminal device to communicate with other devices in the trusted wireless network through the multicast DNS service.
[0086] It should be understood that the terminal device continuously monitors the screen status of the terminal device and the status of the wireless network to which it is connected, so as to dynamically adjust the multicast DNS service of the terminal device.
[0087] It is worth noting that when the terminal device is in the screen-on state and connected to a trusted wireless network, the multicast DNS service of the terminal device is enabled. In other cases, the multicast DNS service can be kept disabled.
[0088] In some feasible implementations, after enabling the multicast DNS service of the terminal device, the method further comprises: registering service information of the upper-layer application in the multicast DNS service according to target service information of the upper-layer application that is active in the terminal device.
[0089] Here, the target service information includes the IP address, port and service ID of the upper-layer application. After the multicast DNS service is enabled, the terminal device registers the target service information of the upper-layer application saved in the multicast DNS service, so that when other devices discover the terminal device, the services that the upper-layer application can provide are consistent with the registered services. It should be understood that registering the target service information refers to registering the IP address, port and service ID of the upper-layer application in the multicast DNS service. The multicast DNS service broadcasts the IP address, port and service ID of the upper-layer application. When an external device needs to communicate with the terminal device, it sends an mDNS packet to the upper-layer application of the terminal device according to the corresponding IP address, port and service ID.
[0090] The upper layer application may be an application program running on the terminal device for controlling other smart home devices. Whether the upper layer application is in an active state may be determined by detecting the process running in the terminal device. For example, if a resident process of the upper layer application is detected in the terminal device, it is determined that the upper layer application is in an active state.
[0091] In some embodiments, the target service information may be obtained by saving the first current service information of the upper layer application before shutting down the multicast DNS service of the terminal device.
[0092] Here, when the terminal device determines that the multicast DNS service needs to be turned off, the terminal device outputs a notification message, and the notification message is used to notify the upper layer application that the multicast DNS service of the terminal device has been turned off. In addition, the terminal device saves the first current service information of the upper layer application, and then the terminal device turns off the Discovery behavior, Resolve behavior, and GetAddressInfo behavior of the multicast DNS service.
[0093] It is worth noting that the first current service information refers to the latest service information of the upper layer application when the terminal device turns off the multicast DNS service. The first current service information includes the IP address and port of the upper layer application and the service ID of the service provided by the upper layer application.
[0094] Among them, by notifying the upper-layer application terminal device that the multicast DNS service has been closed, the upper-layer application can no longer attempt to call the multicast DNS service to communicate with external devices, thereby saving energy consumption.
[0095] It should be understood that the terminal device shutting down the multicast DNS service of the terminal device means shutting down other behaviors of the multicast DNS service except the registration behavior, wherein the other behaviors refer to the Discovery behavior, the Resolve behavior and the GetAddressInfo behavior of the multicast DNS service.
[0096] When the multicast DNS service of the terminal device is in a closed state, the first current service information of the upper layer application saved is updated to the second current service information, wherein the second current service information is obtained by the upper layer application based on the registration request generated by the registration behavior.
[0097] Here, when the multicast DNS service of the terminal device is in the closed state, the registration behavior of the multicast DNS service is maintained. If the upper-layer application initiates a registration request to the registration behavior of the multicast DNS service, the terminal device responds to the registration request and updates the first current service information of the upper-layer application saved to the second current service information corresponding to the registration request. The second current service information refers to the service information when the upper-layer application initiates the registration request, and the second current service information includes the IP address, port, and service ID of the upper-layer application when the registration request is initiated.
[0098] It should be understood that after the terminal device turns off the multicast DNS service, if there is a change in the service information provided by the upper-layer application, the upper-layer application can register the latest second current service information with the registration behavior of the multicast DNS service, and update the saved first current service information to the second current service information. When the terminal device turns on the multicast DNS service, the second current service information of the upper-layer application is registered in the multicast DNS service, so that when other devices discover the terminal device, the service that the upper-layer application can provide is consistent with the registered service.
[0099] The following is combined with Figure 3 The above-mentioned embodiment will be described in detail.
[0100] Figure 3 FIG. 1 is a timing diagram showing adjustment of a multicast DNS service according to an exemplary embodiment. Figure 3As shown, the system of the terminal device detects the screen status of the terminal device. When the screen status of the terminal device is off, it further monitors whether the terminal device enters a light low power consumption mode. When the terminal device enters a light low power consumption mode, the system notifies the active upper-layer application that the multicast DNS service of the terminal device is closed, saves the first current service information of the upper-layer application, and closes the Discovery behavior, Resolve behavior, and GetAddressInfo behavior of the multicast DNS service.
[0101] When the multicast DNS service of the terminal device is in the closed state, if the upper-layer application needs to update its service information, the upper-layer application initiates a registration request to the registration behavior of the multicast DNS service. In response to the registration request, the system updates the first current service information to the second current service information corresponding to the registration request.
[0102] When the system detects that the terminal device is in the screen-on state and connected to a trusted wireless network, the system starts the Discovery behavior, Resolve behavior, and GetAddressInfo behavior of the multicast DNS service, and registers the service information of the upper-layer application according to the saved second current service information.
[0103] Figure 4 FIG. 1 is a schematic diagram showing module connections of a terminal device control device according to an exemplary embodiment. Figure 4 As shown, an embodiment of the present disclosure provides a terminal device control device, the device 500 includes:
[0104] A determination module 501 is configured to determine the working state of the terminal device;
[0105] The control module 502 is configured to shut down the multicast DNS service of the terminal device when the working state of the terminal device is a low power consumption state, wherein the low power consumption state indicates that the terminal device is at least in a screen-off state.
[0106] Optionally, the control module 502 includes:
[0107] The first control unit is configured to shut down the multicast DNS service of the terminal device when the terminal device is in an uncharged state and the terminal device maintains a screen-off state for a first preset time period, if the terminal device is in a mobile state.
[0108] Optionally, the control module 502 includes:
[0109] The second control unit is configured to shut down the multicast DNS service of the terminal device when the terminal device is in an uncharged state, if the terminal device is in a screen-off state, and the terminal device remains stationary for a second preset time period.
[0110] Optionally, the device 500 further includes:
[0111] A network detection module, configured to detect whether the terminal device is connected to a trusted wireless network when the terminal device is in a screen-on state after the multicast DNS service of the terminal device is turned off;
[0112] The service activation module is configured to activate the multicast DNS service of the terminal device when the terminal device accesses a trusted wireless network.
[0113] Optionally, the device 500 further includes:
[0114] The registration unit is configured to register the service information of the upper layer application in the multicast DNS service after starting the multicast DNS service of the terminal device according to the target service information of the upper layer application that is active in the terminal device.
[0115] Optionally, the registration unit is specifically configured as follows:
[0116] Before closing the multicast DNS service of the terminal device, the first current service information of the upper layer application is saved, and the first service information is used as the target service information.
[0117] Optionally, the device 500 further includes:
[0118] The notification module is configured to output a notification message before shutting down the multicast DNS service of the terminal device, wherein the notification message is used to notify the upper layer application that the multicast DNS service of the terminal device has been shut down.
[0119] Optionally, the control module 502 is specifically configured as follows:
[0120] Disable all actions of the multicast DNS service except registration;
[0121] The registration unit is further configured as:
[0122] When the multicast DNS service of the terminal device is in a closed state, the first current service information of the upper layer application saved is updated to the second current service information, wherein the second current service information is obtained by the upper layer application based on the registration request generated by the registration behavior.
[0123] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0124] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and when the program instructions are executed by a processor, the steps of the mobile terminal control method provided by the present disclosure are implemented.
[0125] Figure 5 800 is a block diagram of a terminal device according to an exemplary embodiment. For example, the terminal device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0126] Reference Figure 5 The terminal device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0127] The processing component 802 generally controls the overall operation of the terminal device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the terminal device control method described above. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0128] The memory 804 is configured to store various types of data to support operations on the terminal device 800. Examples of such data include instructions for any application or method operating on the terminal device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0129] The power component 806 provides power to various components of the terminal device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the terminal device 800.
[0130] The multimedia component 808 includes a screen that provides an output interface between the terminal device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the terminal device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0131] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the terminal device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0132] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0133] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the terminal device 800. For example, the sensor assembly 814 can detect the open / closed state of the terminal device 800, the relative positioning of the components, such as the display and keypad of the terminal device 800, and the sensor assembly 814 can also detect the position change of the terminal device 800 or a component of the terminal device 800, the presence or absence of contact between the user and the terminal device 800, the orientation or acceleration / deceleration of the terminal device 800, and the temperature change of the terminal device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0134] The communication component 816 is configured to facilitate the communication between the terminal device 800 and other devices in a wired or wireless manner. The terminal device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0135] In an exemplary embodiment, the terminal device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned terminal device control method.
[0136] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of a terminal device 800 to complete the terminal device control method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0137] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned terminal device control method when executed by the programmable device.
[0138] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0139] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A terminal device control method, It is characterized in that include: Determine the working status of the terminal equipment; When the working state of the terminal device is a low power consumption state, shutting down the multicast DNS service of the terminal device, wherein the low power consumption state indicates that the terminal device is at least in a screen-off state; When the terminal device is in a screen-on state, detecting whether the terminal device is connected to a trusted wireless network; When the terminal device accesses a trusted wireless network that supports multicast DNS, the multicast DNS service of the terminal device is enabled.
2. The terminal device control method according to claim 1, It is characterized in that When the working state of the terminal device is a low power consumption state, shutting down the multicast DNS service of the terminal device includes: When the terminal device is in an uncharged state and the terminal device maintains a screen-off state for a first preset time period, if the terminal device is in a mobile state, the multicast DNS service of the terminal device is turned off.
3. The terminal device control method according to claim 1, It is characterized in that When the working state of the terminal device is a low power consumption state, shutting down the multicast DNS service of the terminal device includes: When the terminal device is in an uncharged state, if the terminal device is in a screen-off state, and the terminal device remains stationary for a second preset time period, the multicast DNS service of the terminal device is turned off.
4. The terminal device control method according to claim 1, It is characterized in that After enabling the multicast DNS service of the terminal device, the method further includes: According to the target service information of the upper-layer application that is active in the terminal device, the service information of the upper-layer application is registered in the multicast DNS service.
5. The terminal device control method according to claim 4, It is characterized in that The target service information is obtained by the following steps: Before closing the multicast DNS service of the terminal device, the first current service information of the upper layer application is saved, and the first current service information is used as the target service information.
6. The terminal device control method according to claim 4, It is characterized in that The method further comprises: Before shutting down the multicast DNS service of the terminal device, a notification message is output, where the notification message is used to notify the upper layer application that the multicast DNS service of the terminal device has been shut down.
7. The terminal device control method according to claim 5, It is characterized in that The shutting down the multicast DNS service of the terminal device includes: Disable all actions of the multicast DNS service except registration; The method further comprises: When the multicast DNS service of the terminal device is in a closed state, the first current service information of the upper layer application saved is updated to the second current service information, wherein the second current service information is obtained by the upper layer application based on the registration request generated by the registration behavior.
8. A terminal device control device, It is characterized in that include: A determination module configured to determine the working state of the terminal device; A control module, configured to shut down the multicast DNS service of the terminal device when the working state of the terminal device is a low power consumption state, wherein the low power consumption state indicates that the terminal device is at least in a screen-off state; A network detection module, configured to detect whether the terminal device is connected to a trusted wireless network when the terminal device is in a screen-on state after the multicast DNS service of the terminal device is turned off; The service activation module is configured to activate the multicast DNS service of the terminal device when the terminal device accesses a trusted wireless network that supports multicast DNS.
9. The terminal device control device according to claim 8, It is characterized in that The control module comprises: A first control unit is configured to, when the terminal device is in an uncharged state and the terminal device maintains a screen-off state for a first preset time period, if the terminal device is in a mobile state, turn off the multicast DNS service of the terminal device; or The second control unit is configured to shut down the multicast DNS service of the terminal device when the terminal device is in an uncharged state, if the terminal device is in a screen-off state, and the terminal device remains stationary for a second preset time period.
10. A computer-readable storage medium having computer program instructions stored thereon, It is characterized in that When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
11. A terminal device, It is characterized in that include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Execute the executable instructions stored in the memory to implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Wireless local area network scanning method, wireless local area network scanning device, computer equipment and storage medium
CN107949040A
Multicast method and device, terminal equipment and computer readable storage medium
CN113676339A