Method and device for reducing standby power consumption of POS equipment

By detecting the WiFi connection status in the POS device and disconnecting and re-establishing the P2P connection when switching channels, the problem of increasing standby power consumption caused by frequent switching between WiFi and P2P communication under the shared antenna architecture is solved, and lower standby power consumption and higher energy efficiency are achieved.

CN119584257APending Publication Date: 2025-03-07SHENZHEN XINGUODU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411513298.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Under the shared antenna architecture of existing Android platform POS devices, frequent switching of WiFi and P2P communications leads to a significant increase in standby power consumption, and the energy-saving effect of deep sleep cannot be fully utilized.

Method used

By detecting the WiFi connection status, obtain the channel used by the WiFi connection, disconnect the P2P connection during channel switching, and re-establish the P2P connection on the new channel, ensuring the consistent frequency used during communication and reducing resource consumption.

Benefits of technology

It reduces the standby power consumption of POS equipment, reduces resource consumption and communication interruptions caused by channel switching, and improves the energy efficiency of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119584257A_ABST
    Figure CN119584257A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for reducing standby power consumption of POS (Point of Sale) equipment, which are used for reducing the standby power consumption when WiFi (Wireless Fidelity) connection and P2P (Peer-to-Peer) connection are carried out simultaneously. The method for reducing the standby power consumption of the POS device comprises the following steps: detecting a WiFi connection state to obtain a detection result; when the detection result represents that the WiFi is connected and is in an active state, acquiring a first channel used by the WiFi connection; establishing a P2P connection using the first channel; when it is detected that the channel used by the WiFi connection is switched from the first channel to the second channel, obtaining the second channel, and disconnecting the P2P connection on the first channel; the P2P connection is established using the second channel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method and device for reducing standby power consumption of a POS device. Background Art

[0002] Current Android platform POS devices often use a shared antenna architecture, that is, the WiFi module and the P2P communication module share the same antenna for signal transmission and reception, which saves hardware costs and simplifies the device structure to a certain extent. Among them, due to the differences between WiFi and P2P in communication protocols, frequency band usage and signal processing methods, the design of shared antennas requires that an efficient time-sharing multiplexing mechanism must be implemented at the software level to ensure that the two communication modes can operate without interfering with each other. However, this time-sharing multiplexing strategy has become the main reason for abnormal standby power consumption in actual applications - the frequent switching requirements between WiFi and P2P require the system to maintain a certain wake-up state to respond to possible communication requests, thereby failing to fully utilize the energy-saving effect brought by deep sleep, which significantly increases the standby power consumption of POS devices. Summary of the invention

[0003] In order to solve the above technical problems, the present application provides a method and apparatus for reducing the standby power consumption of a POS device, which is used to reduce the standby power consumption when WiFi connection and P2P connection are performed simultaneously.

[0004] The technical solution provided in this application is described below:

[0005] The first aspect of the present application provides a method for reducing standby power consumption of a POS device, comprising:

[0006] Detect WiFi connection status and obtain detection results;

[0007] When the detection result indicates that the WiFi is connected and in an active state, obtaining a first channel used by the WiFi connection;

[0008] Establishing a P2P connection using the first channel;

[0009] When detecting that the channel used by the WiFi connection is switched from the first channel to the second channel, acquiring the second channel and disconnecting the P2P connection on the first channel;

[0010] The P2P connection is established using the second channel.

[0011] Optionally, the detecting that a channel used by the WiFi connection is switched from the first channel to a second channel includes:

[0012] It is detected that the network connected by the WiFi is switched from the first network to the second network, and the channel used by the WiFi to connect to the first network is the first channel;

[0013] If it is determined that the channel used by the WiFi connection to the second network is a second channel different from the first channel, it is determined that the channel used by the WiFi connection is detected to switch from the first channel to the second channel.

[0014] Optionally, the method further includes:

[0015] If it is determined that the channel used by the WiFi to connect to the second network is the same as the first channel, the P2P connection on the first channel is maintained.

[0016] Optionally, after establishing the P2P connection using the first channel, the method further includes:

[0017] Regularly monitor the WiFi connection and the P2P connection to obtain monitoring data, wherein the monitoring data includes: information of multiple channels used by the WiFi connection and the P2P connection, connection strength, and transmission rate;

[0018] The priorities of the multiple channels are determined according to the monitoring data, so that the system selects channels from high to low priorities when the POS device is started and selects channels next time.

[0019] Optionally, the monitoring data further includes power consumption data of the P2P connection, and after the periodic monitoring of the WiFi connection and the P2P connection and acquisition of the monitoring data, the following further includes:

[0020] According to the power consumption data, identifying high power consumption periods, high power consumption components and high power consumption response actions of the P2P connection;

[0021] An optimization solution is output according to the high power consumption period, the high power consumption component and the high power consumption response action.

[0022] Optionally, the output optimization scheme according to the high power consumption period, the high power consumption component and the high power consumption response action includes:

[0023] By analyzing the monitoring data, possible channel changes in the future are predicted to obtain prediction information;

[0024] The configuration parameters of the WiFi connection or the P2P connection are adjusted according to the prediction information to reduce communication interruption and data loss caused by channel switching.

[0025] Optionally, after establishing the P2P connection using the second channel, the method further includes:

[0026] The timestamp of the WiFi connection switching to the second channel, information of the second channel, connection strength of the WiFi connection and the P2P connection in the second channel, and data transmission rate of the WiFi connection and the P2P connection in the second channel are obtained and stored in the switching log, so that the system can troubleshoot or solve the fault according to the switching log.

[0027] Optionally, before disconnecting the P2P connection on the first channel, the method further includes:

[0028] Determine whether the second channel is congested, and if so, search for a third channel and use the third channel to establish a WiFi connection.

[0029] A second aspect of the present application provides a device for reducing standby power consumption of a POS device, which is applied to a POS device and includes:

[0030] A detection unit, used to detect the WiFi connection status of the POS device and obtain a detection result;

[0031] A first channel unit, configured to obtain a first channel used to connect to the WiFi when the detection result indicates that the WiFi is connected and in an active state;

[0032] A first connection unit, configured to establish a connection with the P2P using the first channel;

[0033] A second channel unit is used to obtain the second channel and disconnect the P2P connection on the first channel when detecting that the channel used by the WiFi connection is switched from the first channel to the second channel;

[0034] The second connection unit is used to establish a connection with the P2P using the second channel.

[0035] A third aspect of the present application provides a device for reducing standby power consumption of a POS device, the device comprising:

[0036] Processor, memory, input-output unit, and bus;

[0037] The processor is connected to the memory, the input and output unit, and the bus;

[0038] The memory stores a program, and the processor calls the program to execute the first aspect and any optional method of reducing standby power consumption of a POS device in the first aspect.

[0039] A fourth aspect of the present application provides a computer-readable storage medium having a program stored thereon. When the program is executed on a computer, the method for reducing the standby power consumption of a POS device according to the first aspect and any optional item in the first aspect is executed.

[0040] It can be seen from the above technical solutions that this application has the following advantages:

[0041] The present application provides a method for reducing the standby power consumption of POS devices, firstly detecting the WiFi connection status and obtaining the detection result; when the detection result indicates that the WiFi is connected and in an active state, obtaining the first channel used by the WiFi connection; secondly using the first channel to establish a P2P connection; when detecting that the channel used by the WiFi connection switches from the first channel to the second channel, obtaining the second channel, disconnecting the P2P connection on the first channel; and then using the second channel to establish a P2P connection. The WiFi connection and the P2P connection are both on the first channel, and when the WiFi connection switches the channel, the P2P connection is also switched to the same channel, ensuring that the frequency used by the devices is consistent during communication, reducing the resource consumption of searching for different channels for the WiFi connection and the P2P connection at the same time, thereby reducing the standby power consumption of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 A flow chart of an embodiment of a method for reducing standby power consumption of a POS device provided in the present application;

[0044] Figure 2 A flowchart of another embodiment of the method for reducing the standby power consumption of a POS device provided by the present application;

[0045] Figure 3 A flowchart of another embodiment of the method for reducing the standby power consumption of a POS device provided by the present application;

[0046] Figure 4 A flowchart of another embodiment of the method for reducing the standby power consumption of a POS device provided by the present application;

[0047] Figure 5 A schematic diagram of the structure of an embodiment of a device for reducing standby power consumption of a POS device provided in the present application;

[0048] Figure 6 This is a schematic structural diagram of another embodiment of the apparatus for reducing standby power consumption of POS equipment provided in the present application. DETAILED DESCRIPTION

[0049] The present application provides a method and apparatus for reducing standby power consumption of a POS device, which are used to reduce standby power consumption when WiFi connection and P2P connection are performed simultaneously.

[0050] It should be noted that the POS terminal battery safety monitoring method provided in the present application can be applied to the terminal, the system, or the server. For example, the terminal can be a smart phone or computer, tablet computer, smart TV, smart watch, portable computer terminal, or a fixed terminal such as a desktop computer.

[0051] It should also be noted that the terms "first", "second", etc. in the specification and drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order, sequence or importance.

[0052] See also Figure 1 The present application provides an embodiment of a method for reducing standby power consumption of a POS device, the method comprising:

[0053] Step S101, detecting the WiFi connection status and obtaining the detection result;

[0054] Step S102: When the detection result indicates that the WiFi is connected and in an active state, obtain a first channel used by the WiFi connection;

[0055] Step S103: Establish a P2P connection using the first channel;

[0056] Step S104: when it is detected that the channel used by the WiFi connection is switched from the first channel to the second channel, the second channel is acquired, and the P2P connection on the first channel is disconnected;

[0057] Step S105: Use the second channel to establish a P2P connection.

[0058] The method for reducing the standby power consumption of POS devices of the present invention first detects the WiFi connection state and obtains the detection result; when the detection result indicates that the WiFi is connected and in an active state, obtains the first channel used by the WiFi connection; secondly, uses the first channel to establish a P2P connection; when the detection result indicates that the WiFi connection is switched to the second channel, obtains the second channel, disconnects the P2P connection on the first channel; and then uses the second channel to establish a P2P connection. The WiFi connection and the P2P connection are both on the first channel, and when the WiFi connection switches the channel, the P2P connection is also switched to the same channel, ensuring that the frequency used by the devices is consistent during communication, reducing the resource consumption of searching for different channels for the WiFi connection and the P2P connection at the same time, thereby reducing the standby power consumption of the device.

[0059] In step S101 of some embodiments, the WiFi connection status is detected and the detection result is obtained. In the startup process of the POS device, the system automatically starts a background service, which is used to detect the WiFi connection status. The background service can set a timing mechanism, which can be periodic (such as every second, every minute, or other time intervals set according to needs) or event-triggered (such as automatically starting the detection when the background service detects a change in network status). The timing mechanism ensures the timeliness and accuracy of the detection operation. WiFi connection status information includes but is not limited to whether WiFi is turned on, whether it is connected to a certain network, the stability of the connection, etc.

[0060] In step S102 of some embodiments, when the detection result indicates that the WiFi is connected and in an active state, the first channel used by the WiFi connection is obtained. The detection result will clearly indicate whether the WiFi is connected. If the WiFi is not connected, it may not be necessary to further obtain other detailed information; if it is connected, the next step of detailed detection is entered, that is, in addition to the connection status, the detection result will also include information on whether the connection is active. The degree of activity can be determined by detecting whether there is data transmission. If there is data transmitted on the WiFi network, it means that the WiFi connection is active; if the network is temporarily idle or there is a connection problem, it may indicate that the connection is not active. For a connected WiFi network, the detection result may also include the SSID (Service Set Identifier) ​​and BSSID (Basic Service Set Identifier) ​​of the network. SSID is the name of the WiFi network, which is used to identify and select the network to be connected through the SSID; BSSID is part of the MAC address of the WiFi network, which is used to uniquely identify a network access point (AP).

[0061] After confirming that the WiFi is connected and active, query the WiFi interface configuration information or call the system API (application programming interface) to obtain the channel used by the current WiFi connection, which is recorded as the first channel. Once the WiFi interface configuration information is obtained, it is necessary to parse the information to find the channel number. The channel number is usually expressed in digital form, and the range usually depends on the WiFi frequency band used.

[0062] In step S103 of some embodiments, a P2P connection is established using the first channel. Using the acquired first channel information, a P2P connection request is initiated or responded to through a P2P communication protocol (such as Wi-Fi Direct), and a stable P2P connection is established on the first channel. Wi-Fi Direct is a technology that allows devices to communicate directly with each other without a traditional wireless access point (AP). It is based on the WiFi standard, but simplifies the connection process so that devices can more easily establish a P2P connection. In addition to Wi-Fi Direct, there are other protocols that also support P2P communication, such as Bluetooth, Zigbee, etc. In a WiFi environment, Wi-Fi Direct is usually the preferred protocol because it can use existing WiFi hardware and infrastructure to provide higher data transmission rates and longer communication distances. Before establishing a P2P connection, a specific service discovery protocol (such as the service discovery protocol in Wi-Fi Direct) is usually broadcast and monitored to scan for devices that need to be connected near the POS device. After scanning the device to be connected, the connection parameters are negotiated, including the first channel used, encryption method, and data transmission rate. After the negotiation is completed, the POS device and the device to be connected will establish a P2P connection on the first channel.

[0063] Reference Figure 2 In order to improve the efficiency of establishing WiFi connections and P2P connections, the information of the connected channels can be stored, and the connection can be established by selecting the best channel from multiple connected channels, thereby improving the communication efficiency of POS devices and reducing communication power consumption and standby power consumption. Specifically, it may include, but is not limited to, the following:

[0064] Step S201: regularly monitor WiFi connections and P2P connections to obtain monitoring data, where the monitoring data includes: information on multiple channels used by WiFi connections and P2P connections, connection strengths, and transmission rates;

[0065] Step S202: Determine the priorities of the multiple channels according to the monitoring data, so that the system selects the channels from high to low priority when the POS device is started and selects the channels next time.

[0066] In step S201 of some embodiments, the WiFi connection and the P2P connection are monitored regularly to obtain monitoring data, which includes: information of multiple channels used by the WiFi connection and the P2P connection, connection strength and transmission rate. The purpose is to evaluate the health and performance of the current communication environment by regularly monitoring the information of the WiFi connection and the P2P connection. Among them, the monitoring data includes: information of multiple channels used by the WiFi connection and the P2P connection, connection strength and transmission rate. The signal strength of the WiFi connection and the P2P connection on the channel reflects the stability and reliability of the connection. The data transmission rate of the WiFi connection and the P2P connection on the channel is an important indicator for measuring communication efficiency.

[0067] Reference Figure 3 The monitoring data also includes the power consumption data of the P2P connection, and can further provide an optimization solution for channel selection based on the actual needs of the P2P connection and historical connection data, which may include, but is not limited to, the following:

[0068] Step S301: Identify high power consumption periods, high power consumption components, and high power consumption response actions of the P2P connection according to the power consumption data;

[0069] Step S302: output an optimization solution according to the high power consumption period, high power consumption component and high power consumption response action.

[0070] In steps S301 to S302 of some embodiments, the high power consumption time period, high power consumption components and high power consumption response actions of the P2P connection are first identified based on the power consumption data; then, based on the high power consumption time period, high power consumption components and high power consumption response actions, an optimization plan is output. The power consumption data of the P2P connection includes power consumption conditions in different time periods and different operations, which are used to identify high power consumption time periods, high power consumption components and high power consumption response actions. Among them, by analyzing the changes in power consumption in different time periods, the time periods with higher power consumption can be found. Then identify which hardware components (such as processors, wireless modules, etc.) have higher power consumption in specific time periods or operations. Then analyze the impact of different operations or response actions on power consumption, and find out the specific response actions that lead to increased power consumption.

[0071] It should be noted that, according to the high power consumption period, high power consumption components and high power consumption response actions, the output optimization scheme may specifically include, but is not limited to, the following: predicting possible channel changes in the future by analyzing the monitoring data and obtaining prediction information; adjusting the configuration parameters of the WiFi connection or P2P connection according to the prediction information to reduce communication interruption and data loss caused by channel switching. Reduce unnecessary operations or response actions during high power consumption periods to reduce power consumption. Optimize the use efficiency of high power consumption components and reduce power consumption through software or hardware upgrades. Use data such as channel information and connection strength in the monitoring data to predict possible channel changes in the future and adjust the configuration parameters of the WiFi connection or P2P connection in advance.

[0072] In step S202 of some embodiments, the priorities of multiple channels are determined based on the monitoring data, so that the system selects channels from high to low priority when the POS device is started and selects channels next time. When the number of regular monitoring reaches a preset number (e.g., 10 times), all monitoring data can be collected together for analysis, and each channel can be scored or ranked based on factors such as channel usage, connection strength, data transmission rate, and power consumption data in the monitoring data. Afterwards, when the POS device is started, channels can be selected in descending order of channel priority for WiFi connection and P2P connection.

[0073] In step S104 of some embodiments, when it is detected that the channel used by the WiFi connection is switched from the first channel to the second channel, the second channel is obtained and the P2P connection on the first channel is disconnected. The WiFi connection status is detected, with particular attention to changes in the channel. When it is detected that the WiFi connection is switched from the first channel to the second channel, the channel switching process is immediately triggered. The information of the second channel is obtained, and the P2P connection established on the first channel is disconnected to release related resources. It should be noted that before disconnecting the P2P connection, the POS device and the connected device can be notified of the upcoming operation, and a specific disconnection request or signal can be sent so that both devices can adjust the status accordingly. After disconnecting, all resources related to the connection need to be released, including network sockets, memory buffers or timers, etc. The timely release of these resources can avoid resource leakage and potential performance issues.

[0074] It should be noted that in order to avoid the second channel being too crowded and unable to realize the P2P communication function, the congestion of the second channel can be judged before disconnecting the P2P connection, which may include, but is not limited to, the following: judging whether there is channel congestion on the second channel, and if so, searching for the third channel and using the third channel to establish a WiFi connection. The activity of other WiFi networks and devices on the second channel can be monitored by scanning the network, such as judging whether it is congested by indicators such as signal strength, signal conflict rate, and data transmission rate. After confirming that the second channel is congested, all available WiFi channels should be scanned to find the most suitable alternative channel. After finding a third channel that meets the conditions, first establish a WiFi connection on the third channel, then obtain the information of the third channel, and disconnect the P2P connection on the first channel.

[0075] Reference Figure 4 In fact, sometimes the WiFi connection is disconnected and re-established due to problems such as temporary signal interruption. In order to avoid the P2P connection being disconnected and re-established on the same channel as before due to signal interruption, which leads to a new increase in standby power consumption, before disconnecting the P2P connection, it can be determined whether it is the same channel as before. Specifically, it may include, but is not limited to, the following:

[0076] Step S401: It is detected that the network connected by the WiFi is switched from the first network to the second network, and the channel used by the WiFi to connect to the first network is the first channel;

[0077] Step S402: if it is determined that the channel used by the WiFi connection to the second network is a second channel different from the first channel, it is determined that the channel used by the WiFi connection is detected to be switched from the first channel to the second channel;

[0078] Step S403: If it is determined that the channel used by the WiFi to connect to the second network is the same as the first channel, the P2P connection on the first channel is maintained.

[0079] In steps S401 to S403 of some embodiments, it is detected that the network connected by WiFi switches from the first network to the second network, and the channel used by the WiFi connection to the first network is the first channel; if it is determined that the channel used by the WiFi connection to the second network is the second channel different from the first channel, it is determined that the channel used by the WiFi connection is detected to switch from the first channel to the second channel; if it is determined that the channel used by the WiFi connection to the second network is the same as the first channel, the P2P connection on the first channel is maintained. It can be determined whether the first channel and the second channel are the same by comparing their identifiers (such as channel numbers). If the first channel and the second channel are the same, there is no need to switch channels, because doing so will not improve the communication conditions, but may introduce additional resource overhead and power consumption. If the first channel and the second channel are different, all devices participating in the P2P connection communication are notified, indicating that the upcoming connection is interrupted. Then, all resources related to the first channel connection (such as network sockets, memory buffers, etc.) are released. The POS device and the device to be connected are reconfigured to use the second channel for communication, and the P2P connection is reestablished.

[0080] In step S105 of some embodiments, a P2P connection is established using a second channel. Using the second channel information, a P2P connection request or response is re-initiated to establish a new P2P connection to ensure the continuity of communication. It should be noted that in order to avoid the difficulty in troubleshooting specific problems and solving faults after the WiFi connection and the P2P connection are switched to the second channel, the connection quality (such as delay, packet loss rate, etc.) can be regularly detected, and the relevant information can be recorded in the log, which may include, but is not limited to, the following: obtaining and storing the timestamp of the WiFi connection switching to the second channel, the information of the second channel, the connection strength of the WiFi connection and the P2P connection in the second channel, and the data transmission rate of the WiFi connection and the P2P connection in the second channel to the switching log, so that the system can troubleshoot or solve the fault according to the switching log. According to the records of the switching log or actual needs, the transmission parameters can be dynamically adjusted or the channel switching can be tried again to improve the communication quality.

[0081] The above embodiment describes the method for reducing the standby power consumption of a POS device provided by the present application. The following describes the device and storage medium for reducing the standby power consumption of a POS device provided by the present application:

[0082] See also Figure 5 The present application provides an embodiment of a device for reducing standby power consumption of a POS device, the device comprising:

[0083] The detection unit 501 is used to detect the WiFi connection status of the POS device and obtain the detection result;

[0084] The first channel unit 502 is used to obtain a first channel used to connect to the WiFi when the detection result indicates that the WiFi is connected and in an active state;

[0085] A first connection unit 503, configured to establish a connection with the P2P using a first channel;

[0086] The second channel unit 504 is used to obtain the second channel and disconnect the P2P connection on the first channel when detecting that the channel used by the WiFi connection is switched from the first channel to the second channel;

[0087] The second connection unit 505 is configured to establish a connection with the P2P using the second channel.

[0088] Optionally, the second channel unit 504 is specifically configured to:

[0089] It is detected that the network connected by the WiFi is switched from the first network to the second network, and the channel used by the WiFi to connect to the first network is the first channel;

[0090] If it is determined that the channel used by the WiFi connection to the second network is a second channel different from the first channel, it is determined that the channel used by the WiFi connection is detected to be switched from the first channel to the second channel.

[0091] Optionally, the second channel unit 504 is specifically configured to:

[0092] If it is determined that the channel used by the WiFi to connect to the second network is the same as the first channel, the P2P connection on the first channel is maintained.

[0093] Optionally, after the first connection unit 503, the method further includes:

[0094] A periodic monitoring unit 506 is configured to periodically monitor the WiFi connection and the P2P connection to obtain monitoring data, wherein the monitoring data includes information on multiple channels used by the WiFi connection and the P2P connection, connection strength, and transmission rate;

[0095] The priority unit 507 is used to determine the priorities of the multiple channels according to the monitoring data, so that the system selects the channels from high to low according to the priorities when the POS device is started and selects the channels next time.

[0096] Optionally, after the periodic monitoring unit 506, the following further includes:

[0097] An identification unit 508, configured to identify a high power consumption period, a high power consumption component, and a high power consumption response action of the P2P connection according to the power consumption data;

[0098] The optimization unit 509 is used to output an optimization solution according to the high power consumption period, the high power consumption component and the high power consumption response action.

[0099] Optionally, the optimization unit 509 is specifically configured to:

[0100] By analyzing monitoring data, possible channel changes in the future are predicted and prediction information is obtained;

[0101] The configuration parameters of the WiFi connection or P2P connection are adjusted according to the prediction information to reduce communication interruption and data loss caused by channel switching.

[0102] Optionally, after the second connection unit 505, the method further includes:

[0103] The storage unit 510 is used to obtain and store the timestamp of the WiFi connection switching to the second channel, the information of the second channel, the connection strength of the WiFi connection and the P2P connection in the second channel, and the data transmission rate of the WiFi connection and the P2P connection in the second channel into the switching log, so that the system can troubleshoot or solve the fault according to the switching log.

[0104] Optionally, before the second connection unit 505, the method further includes:

[0105] The congestion determination unit 511 is used to determine whether there is channel congestion on the second channel. If so, search for a third channel and use the third channel to establish a WiFi connection.

[0106] This application also provides a device for reducing the standby power consumption of POS equipment, see Figure 6 , the device comprises:

[0107] Processor 601, memory 602, input and output unit 603, bus 604;

[0108] The processor 601 is connected to the memory 602, the input and output unit 603 and the bus 604;

[0109] The memory 602 stores a program, and the processor 601 calls the program to execute the following steps: Figures 1 to 4 A method for reducing standby power consumption of a POS device as shown in any one of the embodiments.

[0110] The present application also relates to a computer-readable storage medium, on which a program is stored, and when the program is run on a computer, the computer executes the following Figures 1 to 4 A method for reducing standby power consumption of a POS device as shown in any one of the embodiments.

[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

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

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

[0115] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A method for reducing standby power consumption of a POS device, characterized in that: The method comprises: Detect WiFi connection status and obtain detection results; When the detection result indicates that the WiFi is connected and in an active state, obtaining a first channel used by the WiFi connection; Establishing a P2P connection using the first channel; When detecting that the channel used by the WiFi connection is switched from the first channel to the second channel, acquiring the second channel and disconnecting the P2P connection on the first channel; The P2P connection is established using the second channel.

2. The method according to claim 1, characterized in that The detecting that the channel used by the WiFi connection is switched from the first channel to the second channel includes: It is detected that the network connected by the WiFi is switched from the first network to the second network, and the channel used by the WiFi to connect to the first network is the first channel; If it is determined that the channel used by the WiFi connection to the second network is a second channel different from the first channel, it is determined that the channel used by the WiFi connection is detected to switch from the first channel to the second channel.

3. The method according to claim 2, characterized in that The method further comprises: If it is determined that the channel used by the WiFi to connect to the second network is the same as the first channel, the P2P connection on the first channel is maintained.

4. The method according to claim 1, characterized in that After establishing the P2P connection using the first channel, the method further includes: Regularly monitor the WiFi connection and the P2P connection to obtain monitoring data, wherein the monitoring data includes: information of multiple channels used by the WiFi connection and the P2P connection, connection strength, and transmission rate; The priorities of the multiple channels are determined according to the monitoring data, so that the system selects channels from high to low priorities when the POS device is started and selects channels next time.

5. The method according to claim 4, characterized in that The monitoring data also includes power consumption data of the P2P connection. After the WiFi connection and the P2P connection are regularly monitored and the monitoring data are acquired, the following is further included: According to the power consumption data, identifying high power consumption periods, high power consumption components and high power consumption response actions of the P2P connection; An optimization solution is output according to the high power consumption period, the high power consumption component and the high power consumption response action.

6. The method according to claim 5, characterized in that The output optimization scheme according to the high power consumption period, the high power consumption component and the high power consumption response action includes: By analyzing the monitoring data, possible channel changes in the future are predicted to obtain prediction information; The configuration parameters of the WiFi connection or the P2P connection are adjusted according to the prediction information to reduce communication interruption and data loss caused by channel switching.

7. The method according to claim 1, characterized in that After establishing the P2P connection using the second channel, the method further includes: The timestamp of the WiFi connection switching to the second channel, information of the second channel, connection strength of the WiFi connection and the P2P connection in the second channel, and data transmission rate of the WiFi connection and the P2P connection in the second channel are obtained and stored in the switching log, so that the system can troubleshoot or solve the fault according to the switching log.

8. The method according to any one of claims 1 to 7, characterized in that Before disconnecting the P2P connection on the first channel, the method further includes: Determine whether the second channel is congested, and if so, search for a third channel and use the third channel to establish a WiFi connection.

9. A device for reducing standby power consumption of POS equipment, characterized in that: Applied to POS equipment, the device comprises: A detection unit, used to detect the WiFi connection status of the POS device and obtain a detection result; A first channel unit, configured to obtain a first channel used to connect to the WiFi when the detection result indicates that the WiFi is connected and in an active state; A first connection unit, configured to establish a connection with the P2P using the first channel; A second channel unit is used to obtain the second channel and disconnect the P2P connection on the first channel when detecting that the channel used by the WiFi connection is switched from the first channel to the second channel; The second connection unit is used to establish a connection with the P2P using the second channel.

10. A device for reducing standby power consumption of POS equipment, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method for reducing standby power consumption of a POS device according to any one of claims 1 to 8.