Method and device for determining adjustment strategy, storage medium and electronic device

By adjusting the network mode and transmission power in the device's WiFi module according to the network environment, the problem of unstable WiFi module connection under different network environments is solved, and a more stable network connection is achieved.

CN119835720BActive Publication Date: 2025-11-04QINGDAO HAIER TECH +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411929472.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-11-04
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

In existing technologies, the WiFi module of the device uses a single fixed transmission power, which cannot guarantee the stability of the network connection under different network environments.

Method used

The system determines whether to switch network modes based on the network environment in which the device is located, and obtains the target transmission power value and indicator from the cloud server to adjust the transmission power of the WiFi module to adapt to different network environments.

Benefits of technology

It improves the network connection stability of the WiFi module in different network environments, ensuring the normal operation of the device in various environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835720B_ABST
    Figure CN119835720B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for determining adjustment strategy, a storage medium and an electronic device, and relates to the technical field of smart home. The method for determining adjustment strategy comprises the following steps: determining whether the current network mode of a device needs to be switched according to the network environment where the device is located; in the case of needing to switch, switching the current network mode of the device to a target network mode, and obtaining a target value of transmitting power of the device, a factory value of transmitting power, and an indication mark for indicating whether the transmitting power of the device is forced to be adjusted to the target value of transmitting power from a cloud server; determining whether the transmitting power of the device needs to be adjusted according to the target network mode currently adopted by the device, the target value of transmitting power, the factory value of transmitting power and the indication mark, and the adjustment strategy of the transmitting power of the device when adjustment is needed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of smart home, in particular to a method and device for determining adjustment strategy, a storage medium and an electronic device. BACKGROUND

[0002] In the Internet of Things model of home appliances, the WiFi module of the device is used as a smart module to connect to the network, and needs to adapt to various network environments. However, in the prior art, the WiFi module of the device uses a single fixed transmission power, and cannot ensure the stability of network connection in different network environments.

[0003] In the prior art, the WiFi module of the device uses a single fixed transmission power, and cannot ensure the stability of network connection in different network environments. Therefore, an effective solution has not been proposed. SUMMARY

[0004] The embodiments of the present application provide a method and device for determining adjustment strategy, a storage medium and an electronic device to at least solve the problem that the WiFi module of the device uses a single fixed transmission power, and cannot ensure the stability of network connection in different network environments in the prior art.

[0005] According to one embodiment of the present application, a method for determining adjustment strategy is provided, including: determining whether the current network mode of the device needs to be switched according to the network environment in which the device is located; in the case of needing to switch, switching the current network mode of the device to a target network mode, and obtaining the target transmission power value of the device, the factory transmission power value of the device, and an indication flag indicating whether to force the device to adjust the transmission power to the target transmission power value from a cloud server; determining whether to adjust the transmission power of the device according to the target network mode currently used by the device, the target transmission power value, the factory transmission power value and the indication flag, and the adjustment strategy of the transmission power of the device when adjustment is needed.

[0006] In an optional embodiment, determining whether the current network mode of the device needs to be switched according to the network environment in which the device is located comprises: when the current network mode is the normal mode, and one of the following conditions is met, determining that the current network mode of the device needs to be switched to the target network mode: the AP signal strength scanned by the device for N times is less than a first value, and the device fails to connect to a router for N times, where N is an integer greater than 1; the device fails to establish a TLS connection, and the AP signal strength scanned by the device is less than the first value; the device does not receive interaction data from the cloud server within a preset time range after connecting to the cloud server, and the AP signal strength scanned by the device is less than the first value; after the device receives heartbeat data sent by the cloud server, the network diagnosis connection fails within a time threshold, and the AP signal strength scanned by the device is less than the first value.

[0007] In an optional embodiment, determining whether the current network mode of the device needs to be switched according to the network environment in which the device is located comprises: obtaining the connection time of the device from connecting to a router to successfully connecting to the cloud server; when the current network mode is the weak network mode, and the following conditions are met, determining that the current network mode of the device needs to be switched to the target network mode: the device successfully connects to the cloud server for M times, where M is an integer greater than a second value; the connection time of the device for K times is less than a third value, where K is an integer greater than a third value.

[0008] In an optional embodiment, determining whether to adjust the transmission power of the device and the adjustment strategy of the transmission power of the device according to the target network mode currently adopted by the device, the transmission power target value, the transmission power factory value, and the indication flag comprises: when the target network mode is the normal mode or the weak network mode, the transmission power target value is a fourth value, the transmission power factory value is a fifth value, and the indication flag is non-mandatory, determining that the transmission power of the device does not need to be adjusted; when the target network mode is the normal mode, the transmission power target value is the fifth value, the transmission power factory value is the fourth value, and the indication flag is non-mandatory, determining that the transmission power of the device does not need to be adjusted; when the target network mode is the weak network mode, the transmission power target value is the fifth value, the transmission power factory value is the fourth value, and the indication flag is non-mandatory, determining that the transmission power of the device needs to be adjusted, and adjusting the transmission power of the device by a sixth value, where the sixth value is the difference between the fifth value and a calibration maximum value.

[0009] In an alternative embodiment, the determination of whether to adjust the transmit power of the device and the adjustment strategy of the transmit power of the device when adjustment is needed, according to the target network mode currently adopted by the device, the transmit power target value, the transmit power factory value and the indication flag, comprises: in the case that the target network mode is the normal mode, the transmit power target value is the fifth value, the transmit power factory value is the fourth value, and the indication flag is the forced, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by a sixth value, wherein the sixth value is the difference between the fifth value and the calibrated maximum value.

[0010] In an alternative embodiment, the determination of whether to adjust the transmit power of the device and the adjustment strategy of the transmit power of the device when adjustment is needed, according to the target network mode currently adopted by the device, the transmit power target value, the transmit power factory value and the indication flag, comprises: in the case that the target network mode is the normal mode, the transmit power target value is the fifth value, the transmit power factory value is the seventh value, and the indication flag is the non-forced, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by an eighth value; in the case that the target network mode is the weak network mode, the transmit power target value is the fifth value, the transmit power factory value is the seventh value, and the indication flag is the non-forced, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by a ninth value, wherein the eighth value is less than the ninth value.

[0011] In an alternative embodiment, the determination of whether to adjust the transmit power of the device and the adjustment strategy of the transmit power of the device when adjustment is needed, according to the target network mode currently adopted by the device, the transmit power target value, the transmit power factory value and the indication flag, comprises: in the case that the target network mode is the normal mode, the transmit power target value is the fifth value, the transmit power factory value is the seventh value, and the indication flag is the forced, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by a tenth value, wherein the tenth value is the difference between the fifth value and the seventh value.

[0012] According to another aspect of the present application, there is also provided a device for determining an adjustment strategy, comprising: a first determining module configured to determine whether a current network mode of a device needs to be switched according to a network environment in which the device is located; an obtaining module configured to, in the case that the current network mode needs to be switched, switch the current network mode of the device to a target network mode, and obtain, from a cloud server, a target transmission power value of the device, a factory transmission power value of the device, and an indication flag indicating whether the transmission power of the device needs to be adjusted to the target transmission power value; and a second determining module configured to determine whether the transmission power of the device needs to be adjusted according to the target network mode currently adopted by the device, the target transmission power value, the factory transmission power value, and the indication flag, and determine an adjustment strategy of the transmission power of the device in the case that the transmission power of the device needs to be adjusted.

[0013] According to yet another aspect of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above method for determining an adjustment strategy when running.

[0014] According to yet another aspect of the present application, there is also provided an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above method for determining an adjustment strategy through the computer program.

[0015] According to yet another aspect of the present application, there is also provided a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the above method for determining an adjustment strategy.

[0016] In the embodiments of the present application, it is determined whether a current network mode of a device needs to be switched to a target network mode according to a network environment in which the device is located. In the case that the current network mode needs to be switched, the current network mode of the device is switched to the target network mode, and three key parameters, i.e., a target transmission power value, a factory transmission power value, and an indication flag indicating whether the transmission power needs to be adjusted to the target transmission power value, are obtained from a cloud server. It is determined whether the transmission power of the device needs to be adjusted according to the above three key parameters and the target network mode, and an adjustment strategy of the transmission power is determined in the case that the transmission power of the device needs to be adjusted. By using the above technical solution, the problem that a WiFi module of a device uses a single fixed transmission power and cannot guarantee the stability of network connection in different network environments in the related art is solved. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced as follows. Obviously, those skilled in the art can obtain other drawings according to these drawings without any creative effort.

[0019] Figure 1 FIG. 1 is a hardware environment schematic diagram of a method for determining an adjustment strategy according to an embodiment of the present application;

[0020] Figure 2 FIG. 2 is a flowchart of a method for determining an adjustment strategy according to an embodiment of the present application;

[0021] Figure 3 FIG. 3 is a schematic diagram of a method for determining an adjustment strategy according to an embodiment of the present application;

[0022] Figure 4 FIG. 4 is a structural block diagram of a device for determining an adjustment strategy according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the personnel in the technical field better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should be within the scope of the present application.

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

[0025] According to an aspect of the embodiments of the present application, a method for determining an adjustment strategy is provided. The method for determining the adjustment strategy is widely applied to the application scenarios of smart home (Smart Home), smart home, smart home device ecology, intelligence house (Intelligence House) ecology, and whole-house intelligent digital control. Optionally, in the embodiments, the method for determining the adjustment strategy can be applied to the hardware environment composed of the device 102 and the cloud server 104 as shown in the following figure. Figure 1 As shown in the following figure, Figure 1 The device 102 is connected with the cloud server 104 through a network, which can be used to provide services (such as application services, etc.) for the device 102 or the client installed on the device 102, set a database on the device 102 or independently of the device 102, provide data storage services for the device 102 and the cloud server 104, configure cloud computing and / or edge computing services on the device 102 or independently of the device 102, and provide data operation services for the device 102 and the cloud server 104.

[0026] The network can include but is not limited to at least one of the following: wired network, wireless network. The wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network. The wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity, Wireless Fidelity), Bluetooth. The device 102 and the cloud server 104 can not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart oven, smart refrigerator, smart oven, smart oven, smart washing machine, smart water heater, smart washing device, smart dishwasher, smart projection device, smart television, smart clothesline, smart curtain, smart audio and video, smart socket, smart sound, smart sound box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, system platform, etc.

[0027] In the embodiments, a method for determining an adjustment strategy is provided, which is applied to the device, Figure 2 The flowchart of the method for determining the adjustment strategy according to the embodiments of the present application includes the following steps:

[0028] In step S202, it is determined whether the current network mode of the device needs to be switched according to the network environment where the device is located.

[0029] Step S204, in the case of needing to switch, switching the current network mode of the device to the target network mode, and obtaining the transmission power target value, the transmission power factory value of the device from the cloud server, and the indication flag indicating whether to force the transmission power of the device to be adjusted to the transmission power target value;

[0030] Step S206, determining whether to adjust the transmission power of the device according to the target network mode currently adopted by the device, the transmission power target value, the transmission power factory value and the indication flag, and the adjustment strategy of the transmission power of the device when needing to adjust.

[0031] In the embodiments of the present application, it is determined whether the current network mode of the device needs to be switched according to the network environment where the device is located; in the case of needing to switch, the current network mode of the device is switched to the target network mode, and the transmission power target value, the transmission power factory value of the device and the indication flag indicating whether to force the transmission power of the device to be adjusted to the transmission power target value are obtained from the cloud server; whether to adjust the transmission power of the device is determined according to the target network mode currently adopted by the device, the transmission power target value, the transmission power factory value and the indication flag, and the adjustment strategy of the transmission power of the device when needing to adjust.

[0032] In an optional embodiment, determining whether the current network mode of the device needs to be switched according to the network environment where the device is located comprises: in the case of the current network mode being the normal mode and one of the following conditions being met, determining that the current network mode of the device needs to be switched to the target network mode: the AP signal strength scanned by the device for N times is less than a first value, and the device fails to connect a router for N times, where N is an integer greater than 1; the transmission layer security (TLS) connection of the device fails, and the AP signal strength scanned by the device is less than the first value; after the device connects the cloud server, no interaction data of the cloud server is received within a preset time range, and the AP signal strength scanned by the device is less than the first value; after the heartbeat data sent by the cloud server is received, the network diagnosis connection fails within a time threshold, and the AP signal strength scanned by the device is less than the first value.

[0033] Optionally, the device defaults to normal mode after power-on or restart, and if one of the following conditions is met, the device switches from the current network mode to the target network mode, wherein the target network mode in this embodiment is the weak network mode.(1) The device scans AP signal strength less than -60 when connecting to the network for the last two times, and the device fails to connect to the router for the last two times, wherein the reason for failure is not limited;(2) The device fails to connect to the Transmission Layer Security (TLS) or the connection times out, and the device scans AP signal strength less than -60;(3) After the device connects to the cloud server, no interaction data is received from the cloud server within 3 minutes, and the device scans AP signal strength less than -60, wherein the interaction data includes the heartbeat data of the cloud server;(4) After the heartbeat data sent by the cloud server is received, the network diagnosis connection fails within 50 seconds, and the device scans AP signal strength less than -60.In an optional embodiment, whether the current network mode of the device needs to be switched is determined according to the network environment in which the device is located, including: obtaining the connection time of the device from connecting to the router to successfully connecting to the cloud server; and determining that the current network mode of the device needs to be switched to the target network mode when the current network mode is the weak network mode and the following conditions are met: the device successfully connects to the cloud server M times, wherein M is an integer greater than a second value; and the connection time of the device for the last K times is less than a third value, wherein K is an integer greater than the third value.

[0034] Optionally, if the current network mode of the device is the weak network mode, the following conditions need to be met to switch the weak network mode of the device to the normal mode:(1) The device successfully connects to the cloud server for more than 5 consecutive times;(2) The total time from starting the connection process with the router to successfully establishing communication connection with the cloud server is obtained, and the total time does not exceed 5 seconds in the last 3 connection attempts from the current time.

[0035] In an optional embodiment, the target network mode currently adopted by the device, the transmit power target value, the transmit power factory value and the indication flag are used to determine whether to adjust the transmit power of the device and the adjustment strategy of the transmit power of the device when adjustment is needed, including: in the case that the target network mode is the normal mode or the weak network mode, the transmit power target value is the fourth value, the transmit power factory value is the fifth value, and the indication flag is not mandatory, it is determined that the transmit power of the device does not need to be adjusted; in the case that the target network mode is the normal mode, the transmit power target value is the fifth value, the transmit power factory value is the fourth value, and the indication flag is not mandatory, it is determined that the transmit power of the device does not need to be adjusted; in the case that the target network mode is the weak network mode, the transmit power target value is the fifth value, the transmit power factory value is the fourth value, and the indication flag is not mandatory, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by a sixth value, wherein the sixth value is the difference between the fifth value and the calibration maximum value.

[0036] Optionally, assuming that the transmit power target value of the device is 0, whether the target network mode of the device is the normal mode or the weak network mode, the transmit power factory value is 0 or y, and the indication flag is mandatory or not, the transmit power of the device does not need to be adjusted. Assuming that the target network mode of the device is the normal mode, the transmit power target value is x, the transmit power factory value is 0, and the indication flag is not mandatory, the transmit power of the device does not need to be adjusted; assuming that the target network mode of the device is the weak network mode, the transmit power target value is x, the transmit power factory value is 0, and the indication flag is not mandatory, the transmit power is adjusted upward by (x-calibration maximum value), i.e. a sixth value. It needs to be clear that the calibration maximum value in this embodiment is the largest calibration value in the calibration range of the transmit power. Optionally, assuming that the calibration range of the transmit power is 16±2dbm, the calibration maximum value is 18dbm.

[0037] In an optional embodiment, the target network mode currently adopted by the device, the transmit power target value, the transmit power factory value and the indication flag are used to determine whether to adjust the transmit power of the device and the adjustment strategy of the transmit power of the device when adjustment is needed, including: in the case that the target network mode is the normal mode, the transmit power target value is the fifth value, the transmit power factory value is the fourth value, and the indication flag is mandatory, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by a sixth value, wherein the sixth value is the difference between the fifth value and the calibration maximum value.

[0038] Optionally, if the indication flag is mandatory, the transmit power target value is x, and the transmit power factory value is 0, the transmit power of the device is adjusted upward (x - calibration maximum value) regardless of whether the target network mode of the device is normal mode or weak network mode.

[0039] In an optional embodiment, the determination of whether to adjust the transmit power of the device and the adjustment strategy of the transmit power of the device when adjustment is needed, according to the target network mode currently adopted by the device, the transmit power target value, the transmit power factory value, and the indication flag, comprises: if the target network mode is normal mode, the transmit power target value is the fifth value, the transmit power factory value is the seventh value, and the indication flag is non-mandatory, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by the eighth value; if the target network mode is weak network mode, the transmit power target value is the fifth value, the transmit power factory value is the seventh value, and the indication flag is non-mandatory, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by the ninth value, wherein the eighth value is less than the ninth value.

[0040] Optionally, if the target network mode is normal mode, the transmit power target value is x, the transmit power factory value is y, and the indication flag is non-mandatory, the transmit power of the device is adjusted upward by min(x, 19.25) - y; if the target network mode is weak network mode, the transmit power target value is x, the transmit power factory value is y, and the indication flag is non-mandatory, the transmit power of the device is adjusted upward by max(x, 19.25) - y, wherein 14 <= y <= 24.

[0041] In an optional embodiment, the determination of whether to adjust the transmit power of the device and the adjustment strategy of the transmit power of the device when adjustment is needed, according to the target network mode currently adopted by the device, the transmit power target value, the transmit power factory value, and the indication flag, comprises: if the target network mode is normal mode, the transmit power target value is the fifth value, the transmit power factory value is the seventh value, and the indication flag is mandatory, it is determined that the transmit power of the device needs to be adjusted, and the transmit power of the device is adjusted upward by the tenth value, wherein the tenth value is the difference between the fifth value and the seventh value.

[0042] Optionally, if the indication flag is mandatory, the transmit power target value is x, and the transmit power factory value is y, the transmit power of the device is adjusted upward by x - y regardless of whether the target network mode of the device is normal mode or weak network mode, wherein 14 <= y <= 24.

[0043] For better understanding of the process of the above adjustment strategy determination method, the following will combine optional embodiments to describe the implementation method of the above adjustment strategy determination method, but not used to limit the technical solutions of the embodiments of the present application.

[0044] Figure 3 is a schematic diagram of the adjustment strategy determination method according to the embodiments of the present application, as shown in Figure 3 , specifically including the following contents:

[0045] Before determining whether the transmission power of the device needs to be adjusted and the adjustment strategy of the transmission power when it needs to be adjusted, it is necessary to determine whether the current network mode of the device needs to be switched according to the network environment where the device is located, specifically including the following contents:

[0046] After the device is powered on or restarted, there is no statistical data, so the current network mode of the device is the normal mode by default, and if one of the following conditions is met, the current network mode of the device will be switched to the weak network mode.(1) The AP signal strength scanned by the device when connecting to the network in the last 2 times is less than -60, and the device fails to connect to the router in the last 2 times, wherein the reason for failure is not limited; (2) The TLS connection of the device fails or times out, and the AP signal strength scanned by the device is less than -60; (3) After the device connects to the cloud server, no interaction data from the cloud server is received within 3 minutes, and the AP signal strength scanned by the device is less than -60, wherein the interaction data includes the heartbeat data of the cloud server; (4) After the heartbeat data sent by the cloud server is received, the network diagnosis connection fails within 50 seconds, and the AP signal strength scanned by the device is less than -60.

[0047] If the current network mode of the device is the weak network mode, the following conditions need to be met at the same time to switch the weak network mode of the device to the normal mode: (1) The number of successful connections of the device to the cloud server is more than 5 times in succession; (2) The total time from the start of the connection process of the device to the router to the successful establishment of communication connection with the cloud server is not more than 5 seconds in the last 3 connection attempts from the current time.

[0048] After determining the target network mode of the device by the above method, it is determined whether the transmission power needs to be adjusted according to the target network mode, the transmission power target value, the transmission power factory value and the indication flag, and in the case of needing adjustment, the adjustment strategy of the transmission power is determined according to the following contents.

[0049] In the case of transmission power target value = 0, no matter whether the target network mode of the device is the normal mode or the weak network mode, the transmission power compensation value of the device is 0, i.e. no adjustment is made to the transmission power;

[0050] In the case of the transmission power target value = x, the transmission power factory value = 0, and the indication flag being non-mandatory, if the target network mode of the device is the normal mode, the transmission power is not adjusted, and if the target network mode of the device is the weak network mode, the transmission power of the device is adjusted upward (x - the calibration maximum value) ;

[0051] In the case of the transmission power target value = x, the transmission power factory value = 0, and the indication flag being mandatory, the transmission power of the device is adjusted upward (x - the calibration maximum value) regardless of whether the target network mode of the device is the normal mode or the weak network mode;

[0052] In the case of the transmission power target value = x, the transmission power factory value = y, and the indication flag being non-mandatory, if the target network mode of the device is the normal mode, the transmission power of the device is adjusted upward (min(x, 19.25) - y), and if the target network mode of the device is the weak network mode, the transmission power of the device is adjusted upward (max(x, 19.25) - y), wherein 14 <= y <= 24;

[0053] In the case of the transmission power target value = x, the transmission power factory value = y, and the indication flag being mandatory, the transmission power of the device is adjusted upward (x - y) regardless of whether the target network mode of the device is the normal mode or the weak network mode, wherein 14 <= y <= 24.

[0054] Those skilled in the art can clearly understand from the description of the above embodiments that the method according to the above embodiments can be realized by means of software and a necessary general hardware platform, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, an operation terminal, or a network device) to execute the method of each embodiment of the present application.

[0055] Figure 4 is a structural block diagram of a determination device of an adjustment strategy according to an embodiment of the present application; as shown in Figure 4 , it includes:

[0056] A first determination module 40 is configured to determine whether the current network mode of the device needs to be switched according to the network environment in which the device is located;

[0057] The acquisition module 42 is configured to switch the current network mode of the device to a target network mode when switching is needed, and acquire, from a cloud server, a transmission power target value of the device, a transmission power factory value, and an indication flag indicating whether to force adjustment of the transmission power of the device to the transmission power target value.

[0058] The second determination module 44 is configured to determine whether to adjust the transmission power of the device according to the target network mode currently used by the device, the transmission power target value, the transmission power factory value, and the indication flag, and determine an adjustment strategy for the transmission power of the device when adjustment is needed.

[0059] In the embodiments of the present application, it is determined whether the current network mode of the device needs to be switched according to the network environment in which the device is located; when switching is needed, the current network mode of the device is switched to a target network mode, and a transmission power target value of the device, a transmission power factory value, and an indication flag indicating whether to force adjustment of the transmission power of the device to the transmission power target value are acquired from a cloud server; and whether to adjust the transmission power of the device is determined according to the target network mode currently used by the device, the transmission power target value, the transmission power factory value, and the indication flag, and an adjustment strategy for the transmission power of the device is determined when adjustment is needed. By using the above technical solution, the problem in the related art that a single fixed transmission power is used by a WiFi module of a device and network connection stability cannot be ensured in different network environments is solved.

[0060] In an optional embodiment, the first determination module 40 is further configured to determine that the current network mode of the device needs to be switched to the target network mode when the current network mode is a normal mode and one of the following conditions is met: AP signal strengths scanned by the device in the last N times are all less than a first value, and connection to a router in the last N times is all failed, where N is an integer greater than 1; a transmission layer security (TLS) connection of the device is failed, and a signal strength scanned by the device is less than the first value; no interaction data of the cloud server is received within a preset time range after the device connects to the cloud server, and a signal strength scanned by the device is less than the first value; after timeout of heartbeat data sent by the cloud server, network diagnosis connection is all failed within a time threshold, and a signal strength scanned by the device is less than the first value.

[0061] In an optional embodiment, the first determining module 40 is further configured to acquire a connection time of the device from connecting to a router to successfully connecting to the cloud server; and determine that the current network mode of the device needs to be switched to the target network mode in a case that the current network mode is a weak network mode and the following conditions are all met: the device successfully connects to the cloud server for M times, where M is an integer greater than a second value; and the connection time of the device in the last K times is less than a third value, where K is an integer greater than the third value.

[0062] In an optional embodiment, the second determining module 44 is further configured to determine that the transmitting power of the device does not need to be adjusted in a case that the target network mode is a normal mode or a weak network mode, the transmitting power target value is a fourth value, the transmitting power factory value is a fifth value, and the indication flag is non-mandatory; determine that the transmitting power of the device does not need to be adjusted in a case that the target network mode is a normal mode, the transmitting power target value is the fifth value, the transmitting power factory value is the fourth value, and the indication flag is non-mandatory; determine that the transmitting power of the device needs to be adjusted in a case that the target network mode is a weak network mode, the transmitting power target value is the fifth value, the transmitting power factory value is the fourth value, and the indication flag is non-mandatory, and adjust the transmitting power of the device upward by a sixth value, where the sixth value is a difference between the fifth value and a calibration maximum value.

[0063] In an optional embodiment, the second determining module 44 is further configured to determine that the transmitting power of the device needs to be adjusted in a case that the target network mode is a normal mode, the transmitting power target value is the fifth value, the transmitting power factory value is the fourth value, and the indication flag is mandatory, and adjust the transmitting power of the device upward by a sixth value, where the sixth value is a difference between the fifth value and a calibration maximum value.

[0064] In an optional embodiment, the second determining module 44 is further configured to determine that the transmitting power of the device needs to be adjusted in a case that the target network mode is a normal mode, the transmitting power target value is the fifth value, the transmitting power factory value is the fourth value, and the indication flag is non-mandatory, and adjust the transmitting power of the device upward by a sixth value; determine that the transmitting power of the device needs to be adjusted in a case that the target network mode is a weak network mode, the transmitting power target value is the fifth value, the transmitting power factory value is the fourth value, and the indication flag is non-mandatory, and adjust the transmitting power of the device upward by a seventh value, where the sixth value is less than the seventh value.

[0065] In an optional embodiment, the second determining module 44 is further configured to, in the case that the target network mode is the normal mode, the target transmission power value is a fifth value, the factory transmission power value is a seventh value, and the indication flag is mandatory, determine that the transmission power of the device needs to be adjusted, and adjust the transmission power of the device upward by a tenth value, wherein the tenth value is the difference between the fifth value and the seventh value.

[0066] Embodiments of the present application also provide a storage medium comprising a stored program, wherein the program performs any of the above methods when executed.

[0067] Optionally, in the present embodiment, the storage medium can be configured to store program code for performing the following steps:

[0068] S1, determining whether the current network mode of the device needs to be switched according to the network environment in which the device is located;

[0069] S2, in the case that the switching is needed, switching the current network mode of the device to a target network mode, and obtaining, from a cloud server, a target transmission power value of the device, a factory transmission power value of the device, and an indication flag for indicating whether the transmission power of the device needs to be adjusted to the target transmission power value;

[0070] S3, determining whether the transmission power of the device needs to be adjusted according to the target network mode currently adopted by the device, the target transmission power value, the factory transmission power value, and the indication flag, and the adjustment strategy for the transmission power of the device when the adjustment is needed.

[0071] Embodiments of the present application also provide an electronic device comprising a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.

[0072] Optionally, the electronic device can further comprise a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0073] Optionally, in the present embodiment, the processor can be configured to perform the following steps through the computer program:

[0074] S1, determining whether the current network mode of the device needs to be switched according to the network environment in which the device is located;

[0075] S2, in the case of needing to perform switching, switching a current network mode of the device to a target network mode, and obtaining a transmission power target value, a transmission power factory value of the device, and an indication flag indicating whether to force adjusting the transmission power of the device to the transmission power target value from a cloud server;

[0076] S3, determining whether to adjust the transmission power of the device according to the target network mode currently adopted by the device, the transmission power target value, the transmission power factory value and the indication flag, and an adjustment strategy of the transmission power of the device when adjustment is needed.

[0077] Optionally, in the embodiment, the storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0078] The embodiment of the present application further provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps in any of the method embodiments.

[0079] The embodiment of the present application further provides another computer program product, which includes a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the method embodiments.

[0080] The embodiment of the present application further provides a computer program, which includes computer instructions stored in a computer readable storage medium; a processor of a computer device reads the computer instructions from the computer readable storage medium, and executes the computer instructions, so that the computer device performs the steps in any of the method embodiments.

[0081] Optionally, specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, and the embodiment will not be described herein again.

[0082] It is apparent that those skilled in the art can, without departing from the spirit of the present application, make various changes and modifications of the modules or steps of the present application described above, which can be implemented by general computing devices, and can be centralized on a single computing device or distributed on a network composed of multiple computing devices, and optionally, can be implemented by program codes executable by computing devices, so that they can be stored in storage devices and executed by computing devices, and in some cases, the steps shown or described can be executed in different order, or can be made into individual integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module. Thus, the present application is not limited to any particular combination of hardware and software.

[0083] The above description is only the preferred embodiments of the present application, and it should be pointed out that those skilled in the art can make several improvements and refinements without departing from the principles of the present application, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A method for determining an adjustment policy, characterized in that The method comprises the following steps: determining whether the current network mode of the device needs to be switched according to the network environment where the device is located; in the case of needing to switch, switching the current network mode of the device to a target network mode, and obtaining the transmission power target value, the transmission power factory value and the indication flag for indicating whether to force the transmission power of the device to be adjusted to the transmission power target value from the cloud server; determining whether to adjust the transmission power of the device according to the target network mode currently adopted by the device, the transmission power target value, the transmission power factory value and the indication flag, and the adjustment strategy of the transmission power of the device when adjustment is needed; wherein the determination of whether to adjust the transmission power of the device according to the target network mode currently adopted by the device, the transmission power target value, the transmission power factory value and the indication flag, and the adjustment strategy of the transmission power of the device when adjustment is needed, comprises: in the case of the target network mode being a normal mode or a weak network mode, the transmission power target value being a fourth value, the transmission power factory value being a fifth value, and the indication flag being non-forced, it is determined that the transmission power of the device does not need to be adjusted; in the case of the target network mode being a normal mode, the transmission power target value being the fifth value, the transmission power factory value being the fourth value, and the indication flag being the non-forced, it is determined that the transmission power of the device does not need to be adjusted; in the case of the target network mode being a weak network mode, the transmission power target value being the fifth value, the transmission power factory value being the fourth value, and the indication flag being the non-forced, it is determined that the transmission power of the device needs to be adjusted, and the transmission power of the device is adjusted upward by a sixth value, wherein the sixth value is the difference between the fifth value and the calibration maximum value.

2. The method of claim 1, wherein, The determination of whether the current network mode of the device needs to be switched according to the network environment where the device is located comprises: in the case of the current network mode being a normal mode and one of the following conditions being met, it is determined that the current network mode of the device needs to be switched to the target network mode: the AP signal strength scanned by the device in the last N times is less than a first value, and the device fails to connect to a router in the last N times, wherein N is an integer greater than 1; the transmission layer security (TLS) connection of the device fails, and the AP signal strength scanned by the device is less than the first value; after the device connects to the cloud server, no interaction data of the cloud server is received within a preset time range, and the AP signal strength scanned by the device is less than the first value; after the heartbeat data sent by the cloud server is received, the network diagnosis connection fails within a time threshold, and the AP signal strength scanned by the device is less than the first value.

3. The method of claim 1, wherein, The determination of whether the current network mode of the device needs to be switched according to the network environment where the device is located comprises: acquiring a connection time of the device from connecting a router to successfully connecting the cloud server; in the case that the current network mode is a weak network mode and the following conditions are all met, determining that the current network mode of the device needs to be switched to the target network mode: the device successfully connects the cloud server for M times, where M is an integer greater than a second value; the connection time of the device in the last K times is less than a third value, where K is an integer greater than the third value.

4. The method of claim 1, wherein, determining whether to adjust the transmitting power of the device according to the target network mode currently adopted by the device, the transmitting power target value, the transmitting power factory value and the indication flag, and the adjustment strategy of the transmitting power of the device when adjustment is needed, comprising: in the case that the target network mode is a normal mode, the transmitting power target value is the fifth value, the transmitting power factory value is the fourth value, and the indication flag is forced, determining that the transmitting power of the device needs to be adjusted, and adjusting the transmitting power of the device upward by the sixth value, where the sixth value is the difference between the fifth value and a calibration maximum value.

5. The method of claim 1, wherein, determining whether to adjust the transmitting power of the device according to the target network mode currently adopted by the device, the transmitting power target value, the transmitting power factory value and the indication flag, and the adjustment strategy of the transmitting power of the device when adjustment is needed, comprising: in the case that the target network mode is a normal mode, the transmitting power target value is the fifth value, the transmitting power factory value is the seventh value, and the indication flag is the non-forced, determining that the transmitting power of the device needs to be adjusted, and adjusting the transmitting power of the device upward by the eighth value; in the case that the target network mode is a weak network mode, the transmitting power target value is the fifth value, the transmitting power factory value is the seventh value, and the indication flag is the non-forced, determining that the transmitting power of the device needs to be adjusted, and adjusting the transmitting power of the device upward by the ninth value, where the eighth value is less than the ninth value.

6. The method of claim 1, wherein, determining whether to adjust the transmitting power of the device according to the target network mode currently adopted by the device, the transmitting power target value, the transmitting power factory value and the indication flag, and the adjustment strategy of the transmitting power of the device when adjustment is needed, comprising: in the case that the target network mode is a normal mode, the transmitting power target value is the fifth value, the transmitting power factory value is the seventh value, and the indication flag is forced, determining that the transmitting power of the device needs to be adjusted, and adjusting the transmitting power of the device upward by the tenth value, where the tenth value is the difference between the fifth value and the seventh value.

7. An adjustment policy determination apparatus characterized by comprising: comprising: a first determining module, configured to determine whether the current network mode of the device needs to be switched according to the network environment in which the device is located; The acquisition module is configured to switch the current network mode of the device to a target network mode when handover is required, and acquire a target transmission power value, a factory transmission power value, and an indication flag indicating whether to force adjustment of the transmission power of the device to the target transmission power value from a cloud server. The second determination module is configured to determine whether to adjust the transmission power of the device according to the target network mode currently adopted by the device, the target transmission power value, the factory transmission power value, and the indication flag, and determine an adjustment strategy for the transmission power of the device when adjustment is required. The second determination module is further configured to determine that the transmission power of the device does not need to be adjusted when the target network mode is a normal mode or a weak network mode, the target transmission power value is a fourth value, the factory transmission power value is a fifth value, and the indication flag is a non-force indication; determine that the transmission power of the device does not need to be adjusted when the target network mode is the normal mode, the target transmission power value is the fifth value, the factory transmission power value is the fourth value, and the indication flag is the non-force indication; and determine that the transmission power of the device needs to be adjusted and adjust the transmission power of the device by a sixth value upward when the target network mode is the weak network mode, the target transmission power value is the fifth value, the factory transmission power value is the fourth value, and the indication flag is the non-force indication, where the sixth value is a difference between the fifth value and a calibration maximum value.

8. A computer readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where the program performs the method described in any one of claims 1 to 6 when executed. 9.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 6 by using the computer program.

Citation Information

Patent Citations

  • Electronic apparatus and power adjustment method thereof

    CN102573036A

  • Network parameter adjustment method and device

    CN111918351A