CN111209049A - Dormancy control method and device of electronic equipment and electronic equipment - Google Patents

Dormancy control method and device of electronic equipment and electronic equipment Download PDF

Info

Publication number
CN111209049A
CN111209049A CN202010006108.7A CN202010006108A CN111209049A CN 111209049 A CN111209049 A CN 111209049A CN 202010006108 A CN202010006108 A CN 202010006108A CN 111209049 A CN111209049 A CN 111209049A
Authority
CN
China
Prior art keywords
time
data packets
time interval
electronic equipment
sleep
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010006108.7A
Other languages
Chinese (zh)
Other versions
CN111209049B (en
Inventor
谢从涩
谭轩
叶文杰
郭升升
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Pantum Electronics Co Ltd
Original Assignee
Zhuhai Pantum Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Pantum Electronics Co Ltd filed Critical Zhuhai Pantum Electronics Co Ltd
Priority to CN202010006108.7A priority Critical patent/CN111209049B/en
Priority claimed from CN202010006108.7A external-priority patent/CN111209049B/en
Publication of CN111209049A publication Critical patent/CN111209049A/en
Application granted granted Critical
Publication of CN111209049B publication Critical patent/CN111209049B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Abstract

The invention belongs to the technical field of data communication, and aims to solve the problems that in the prior art, an electronic device is normally dormant in a time period when a data packet is frequent or the data volume is large, the response speed of the data packet is reduced, the user experience is influenced, and excessive power consumption is caused if an image forming device is kept in a complete awakening state. The invention provides a dormancy control method and a dormancy control device for electronic equipment, the electronic equipment and a readable storage medium, wherein the method comprises the following steps: acquiring data packet information received by a port of electronic equipment within preset time; analyzing the number P of the received data packets in the preset time and/or the shortest time interval T between the data packets; and adjusting the moment when the electronic equipment enters the dormant state based on whether the number P and/or the shortest time interval T meet the preset conditions. Therefore, a technical solution for adjusting the sleep time of the electronic device according to the number and/or frequency of received data packets is provided.

Description

Dormancy control method and device of electronic equipment and electronic equipment
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of data communication technologies, and in particular, to a sleep control method and apparatus for an electronic device, and a readable storage medium.
[ background of the invention ]
With the development of computer technology, many electronic devices are becoming more popular, which can perform data interaction with a computer and perform a specific function by communicating with the computer, and can perform at least one of printing, copying, and scanning, for example, using an image forming apparatus.
In recent years, energy saving and environmental protection are becoming more and more important, and in order to save energy, current image forming apparatuses are designed to enter a so-called energy saving mode (or sleep mode) when they are not used for a while, so that users do not need to turn off their power supplies at any time in order to save power consumption of the image forming apparatuses when they are not used. However, this creates a problem: the data packets received by the image forming apparatus have a peak characteristic that the data packets received in a certain period of time are frequent or large in amount of data, and the data packets received in another period of time are infrequent or small in amount of data. Thus, the judgment time for entering the sleep state is set to be a fixed value, which causes that if the image forming device is in normal sleep state, the image forming device is frequently switched between the sleep state and the awakening state to process the data packet when the data packet received in a certain period is frequent or the data volume is large, thereby reducing the response speed of the data packet and influencing the user experience; however, if the image forming apparatus is kept in the fully awake state, excessive power consumption is caused.
[ summary of the invention ]
In order to solve the technical problems that the response speed of a data packet is slow and excessive power consumption is caused by keeping the electronic equipment in a fully awakened state due to the fact that the judging time of the electronic equipment entering the dormancy state is set to be a fixed value in the prior art, the invention provides a dormancy control method and device of the electronic equipment, the electronic equipment and a readable storage medium, the appropriate time when the electronic equipment enters the dormancy state can be confirmed based on the number and/or frequency of the data packets currently received by the electronic equipment, and the response speed of the data packets can be improved under the condition that the requirements of energy conservation and environmental protection are met.
In order to achieve the above object, the technical solution provided by the present invention comprises:
a first aspect of an embodiment of the present invention provides a sleep control method for an electronic device, where the sleep control method includes:
acquiring data packet information received by a port of the electronic equipment within preset time;
analyzing the number P of the data packets received in the preset time and/or the shortest time interval T between the data packets;
and adjusting the moment when the electronic equipment enters the sleep state based on whether the number P and/or the shortest time interval T meet a preset condition.
In a preferred embodiment of the present invention, the analyzing the number P of the data packets received in the predetermined time specifically includes: averagely dividing the preset time into a plurality of time periods n, and calculating to obtain the average number of the received data packets in each time period according to the counted number Pi of the actually received data packets in each time period
Figure BDA0002355347970000021
In a preferred embodiment of the present invention, the adjusting the time when the electronic device enters the sleep state based on whether the number P satisfies a predetermined condition includes: if the relation between the number P of the received data packets in the preset time or each average time period and the threshold value X is more than 0 and less than or equal to P and less than or equal to X, controlling the electronic equipment to enter the sleep mode after delaying the first time; and if the relation between the number P of the received data packets in the preset time or each average time period and the threshold value X is P & gt X, controlling the electronic equipment to enter the sleep mode after delaying for a second time longer than the preset first time.
In a preferred embodiment of the present invention, the analyzing the shortest time interval T between the data packets received within the predetermined time specifically includes: and calculating each time interval between the received data packets in the preset time, and taking the time interval with the minimum time difference between two adjacent data packets as the shortest time interval T.
In a preferred embodiment of the present invention, the adjusting the time when the electronic device enters the sleep state based on whether the shortest time interval T satisfies a predetermined condition includes: if the relation between the shortest time interval T between the received data packets and the time threshold T is T ≧ T, enabling the electronic equipment to immediately enter the sleep state; if the relation between the shortest time interval T between the received data packets and the time threshold T is T < T, the electronic equipment is delayed to enter the sleep mode.
In a preferred embodiment of the present invention, the adjusting the time when the electronic device enters the sleep state based on whether the number P and/or the shortest time interval T satisfy a predetermined condition specifically includes: and adjusting the moment when the electronic equipment enters a second sleep mode from a first sleep mode based on whether the number P and/or the shortest time interval T meet a preset condition, wherein the energy consumption of the first sleep mode is larger than that of the second sleep mode.
A second aspect of the embodiments of the present invention further provides a sleep control apparatus for an electronic device, including:
the data packet information acquisition module is used for acquiring data packet information received by a port of the electronic equipment within preset time;
the data packet information analysis module is used for analyzing the number P of the data packets received in the preset time and/or the shortest time interval T between the data packets;
and the dormant state control module is used for adjusting the time when the electronic equipment enters the dormant state based on whether the number P and/or the shortest time interval T meet the preset conditions.
In a preferred implementation manner of the embodiment of the present invention, the analyzing, by the packet information analyzing module, the number P of packets received within the predetermined time specifically includes: averagely dividing the preset time into a plurality of time periods n, and calculating to obtain the average number of the received data packets in each time period according to the counted number Pi of the actually received data packets in each time period
Figure BDA0002355347970000031
In a preferred implementation manner of the embodiment of the present invention, the sleep state control module adjusts a time when the electronic device enters the sleep state, based on whether the number P satisfies a predetermined condition: if the relation between the number P of the received data packets in the preset time or each average time period and the threshold value X is more than 0 and less than or equal to P and less than or equal to X, controlling the electronic equipment to enter the sleep mode after delaying the first time; and if the relation between the number P of the received data packets in the preset time or each average time period and the threshold value X is P & gt X, controlling the electronic equipment to enter the sleep mode after delaying for a second time longer than the preset first time.
In a preferred implementation manner of the embodiment of the present invention, the analyzing, by the packet information analyzing module, the shortest time interval T between the packets received within the predetermined time specifically includes: and calculating each time interval between the received data packets in the preset time, and taking the time interval with the minimum time difference between two adjacent data packets as the shortest time interval T.
In a preferred implementation manner of the embodiment of the present invention, the adjusting, by the sleep state control module, the time when the electronic device enters the sleep state based on whether the shortest time interval T satisfies a predetermined condition includes: if the relation between the shortest time interval T between the received data packets and the time threshold T is T ≧ T, enabling the electronic equipment to immediately enter the sleep state; if the relation between the shortest time interval T between the received data packets and the time threshold T is T < T, the electronic equipment is delayed to enter the sleep mode.
In a preferred implementation manner of the embodiment of the present invention, the sleep state control module is configured to adjust a time when the electronic device enters the sleep state based on whether the number P and/or the shortest time interval T satisfy a predetermined condition, and specifically: the sleep state control module is configured to adjust a time when the electronic device enters a second sleep mode from a first sleep mode based on whether the number P and/or the shortest time interval T satisfy a predetermined condition, where energy consumption of the first sleep mode is greater than that of the second sleep mode.
A third aspect of the present invention provides an electronic device, comprising:
the sleep control apparatus according to any one of the second aspect,
the port of the electronic equipment, and a controller and/or an operation unit which completes the processing of the data packet received in the preset time.
A fourth aspect of the present invention provides an electronic device communication system, including:
an electronic device as claimed in the third aspect, and a data packet transmitting device for transmitting data to the electronic device.
A fifth aspect of the present invention provides a processing apparatus, comprising: a memory, a processor, and a computer program, the computer program being stored in the memory, the processor running the computer program to perform the sleep control method according to any one of the first aspect.
A sixth aspect of the present invention provides a readable storage medium, wherein the readable storage medium stores a computer program, and the computer program is used for implementing the sleep control method according to any one of the first aspect when executed by a processor.
By adopting the technical scheme provided by the embodiment, the number and/or frequency of the data packets which can be received in the next period of time can be estimated through the relationship between the number and/or frequency of the data packets received in the preset time and the set threshold, and the time when the printer enters the sleep state can be further adjusted. Therefore, the response speed of the data packet is improved, and the user experience is also improved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a block diagram of a communication system of an electronic device according to an embodiment of the present invention.
Fig. 2 is a schematic diagram illustrating a sleep control method of an electronic device according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a sleep control method of an electronic device according to a second embodiment of the present invention.
Fig. 4 is a schematic diagram illustrating a sleep control method of an electronic device according to a third embodiment of the present invention.
Fig. 5 is a schematic diagram illustrating a sleep control method of an electronic device according to a fourth embodiment of the present invention.
Fig. 6 is a schematic diagram illustrating a sleep control method of an electronic device according to a fifth embodiment of the present invention.
Fig. 7 is a schematic diagram illustrating a sleep control method of an electronic device according to a seventh embodiment of the present invention.
Fig. 8 is a schematic diagram illustrating a sleep control method of an electronic device according to an eighth embodiment of the present invention.
Fig. 9 is a schematic diagram of a sleep control method of an electronic device according to a tenth embodiment of the present invention.
Fig. 10 is a schematic diagram illustrating a sleep control method of an electronic device according to an eleventh embodiment of the invention.
Fig. 11 is a schematic diagram illustrating a sleep control method of an electronic device according to a twelfth embodiment of the present invention.
Fig. 12 is a schematic diagram illustrating a sleep control method of an electronic device according to a thirteenth embodiment of the invention.
Fig. 13 is a block diagram of an electronic device according to a fifteenth embodiment of the present invention.
Fig. 14 is a block diagram showing a configuration of an image forming apparatus according to a sixteenth embodiment of the present invention.
Fig. 15 is a block diagram of a processing device according to a seventeenth embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
As shown in fig. 1, the present embodiment provides an electronic device communication system including:
the electronic device 200, and a data transmitting device for transmitting data packets to the electronic device, the transmitting device may be the computer 100.
The electronic device may be an image forming apparatus, a printer, a scanner, or the like, or may be an apparatus capable of data communication in another field. The computer 100 may be a terminal device having a printing function, such as a desktop computer, a notebook computer, a tablet computer, a mobile phone, a Personal Digital Assistant (PDA), and the like, and the specific form of the electronic device and the computer is not limited in the present invention. The connection mode between the computer 100 and the electronic device 200 may be a wireless connection mode such as Wi-Fi or bluetooth, or may be a connection mode through a USB data line. The embodiment is improved for a network communication mode, but for other communication modes, if the problem similar to the network communication mode exists, the technical scheme provided by the embodiment can be also adopted.
A computer 100 in which a CPU generally controls devices connected to a system bus according to a program stored in, for example, a RAM serving as a storage unit. The RAM is also used as a main memory, a work memory, and the like of the CPU. The ROM stores various programs and data. The input interface receives input from an input device and a pointing device (e.g., a touch screen: not shown). The display interface controls a display on the display device. The DKS controls access to an external memory such as a flash memory or an SSD (solid state disk). The external memory stores an OS (operating system), applications corresponding to various functions, and an image forming apparatus driver (print driver). The external memory is used as a storage medium that can be read/written by the computer. The PRTC is a print interface that communicates with the image forming apparatus.
The CPU of the electronic device 200 controls the overall operation and can process the packet transmitted from the computer 100. The RAM is used as a main memory, a work memory, and the like of the CPU, and also used as an image information rasterization area and an environment data storage area. The RAM also includes an NVRAM (non-volatile RAM) area, and is configured to expand the memory capacity by an optional RAM connected to an expansion port (not shown). The ROM stores various fonts, control programs executed by the CPU, and the like, as well as various data. The I/O interface transmits/receives data between the electronic device 200 and the computer 100. The image forming apparatus control unit controls and functions as a process of the image forming apparatus engine unit. The MC controls access to the external memory. The external memory includes a flash memory, an SSD, etc., and can store hardware information. Note that when an external memory such as a hard disk is not connected, the ROM stores information to be used in the computer and the like. The operation panel includes switches for operation, an LED display, and the like. The electronic device further includes an operation unit of at least one of a printing unit, a scanning unit, and a facsimile unit.
As shown in fig. 2, the present embodiment provides a sleep control method for an electronic device, but the present embodiment can also be applied to other similar technical fields, and the present embodiment does not specifically limit the same.
The method comprises the following steps:
s110, acquiring data packet information received by a port of the electronic equipment within preset time;
s120, analyzing the number P of the data packets received in the preset time and/or the shortest time interval T between the data packets;
and S130, adjusting the time when the electronic equipment enters the sleep state based on whether the number P and/or the shortest time interval T meet the preset conditions.
In a preferred embodiment, S130 specifically includes: and adjusting the moment when the electronic equipment enters a second sleep mode from the first sleep mode based on whether the number P and/or the shortest time interval T meet the preset conditions, wherein the energy consumption of the first sleep mode is larger than that of the second sleep mode.
In particular, the hibernation may include a first hibernation mode and a second hibernation mode, the first hibernation mode may be a one-stage hibernation mode, for example, turning off the engine unit and the operation unit, but not turning off the external memory or the external memory does not enter a low power consumption mode (e.g., a self-refresh mode), so that the first hibernation mode not only saves power than a normal wake-up mode, but also can respond to a packet in time; the second sleep mode may be a secondary sleep, for example, in which the external memory is turned off or enters a low power consumption mode in addition to turning off the engine unit and the operation unit, so that the second sleep mode is a deep sleep state that is more energy-saving than the first sleep mode, and a timely response to the packet is not possible.
It should be noted that the primary sleep and the secondary sleep are only one preferred embodiment of the first sleep mode and the second sleep mode, and are not intended to limit the present invention.
Example two
As shown in fig. 3, the present embodiment provides a sleep control method for an electronic device, where the electronic device is an image forming apparatus, but the present embodiment can also be applied to other similar technical fields, and the present embodiment does not specifically limit the present invention. The method comprises the following steps:
s210, acquiring the appointed port of the electronic equipment in a preset time period Tt=[Tx,Ty]Number of data packets received in P, where Tx、TyRespectively representing time information;
taking the TCP/IP protocol as an example, in the network communication process, a host that sends out data is referred to as a source host (e.g., a computer), and a host that receives data is referred to as a destination host (e.g., an image forming apparatus). When a source host sends out data, the data is transferred from an upper layer to a lower layer in the source host. The application program in the source host now passes the data to the application layer, which, together with the necessary control information, becomes a message stream that is passed down to the transport layer. The transmission layer adds the received data unit with the control information of the layer to form a data segment, and then delivers the data segment to the network layer. The network layer adds the control information of the layer to form an IP datagram or data packet which is transmitted to the data link layer. The data link layer assembles IP datagrams or packets from the network layer into frames and passes them to the network hardware (i.e., the physical layer) in the form of a bit stream, and the data leaves the source host. When the data is transmitted to the target host, the data is transmitted from the lower layer to the upper layer, the protocol control information is removed layer by layer, the appointed function of each layer is completed, and finally the source data is obtained.
The data packets received by the image forming device include three types, wherein the first type is data packets irrelevant to the image forming device, the second type is data packets simply interacted with the image forming device, such as inquiry commands, control commands and the like, and the third type is image forming operation data packets, and in order to prevent the first type of data packets from influencing the normal dormancy of the image forming device, the data packets of the designated port are received and counted.
S220, determining whether the number P of packets received by the designated port is greater than 0, and if the determination result is no (i.e. P is 0), the process goes to S240 and outputs Ty+Th1A signal for entering a sleep state at a moment, and then entering the sleep state (S270) until a wake-up signal is received, re-confirming Tx、TyAfter (S280), go to S210, where Ty-Tx>Th1(ii) a If the judgment result in the step S220 is yes, turning to a step S230;
s230, judging whether the number P of the data packets received by the appointed port is larger than X, if the judgment result is negative (namely P is more than 0 and less than or equal to X), turning to S250, and outputting Ty+Th2A signal for entering a sleep state at a moment, and then entering the sleep state (S270) until a wake-up signal is received, re-confirming Tx、TyAfter (S280), go to S210, where Ty-Tx>Th2(ii) a If the judgment result in the step S230 is yes, the process goes to a step S260;
s260, outputting Ty+Th3A signal for entering a sleep state at a moment, and then entering the sleep state (S270) until a wake-up signal is received, re-confirming Tx、TyAfter (S280), go to S210, where Ty-Tx>Th3
Specifically, the entering into the sleep state may be that the image forming apparatus is at Ty+Th1Time, Ty+Th2Time or Ty+Th3The time is from the primary dormancy to the secondary dormancy.
For ease of understanding, the following is illustrated by way of example:
statistics of Tt=[12:00:00,12:00:10]The number P of packets received by the image forming apparatus in a time period; let T beh1=2s,Th2=5s,Th38s, 15 for threshold X;
when the number P of the data packets received by the image forming device is 0, the output time is 12:00:10+2sEntering into a sleep state, namely outputting a signal entering into the sleep state at the moment of 12:00:12, then entering into the sleep state until receiving a wake-up signal, and re-determining TtCounting and circulating again after two time values in the time period;
when the number P of the data packets received by the image forming device is 10, outputting a signal which enters the sleep state at the time of 12:00:10+5s, namely outputting a signal which enters the sleep state at the time of 12:00:15, then entering the sleep state until receiving a wake-up signal, and re-determining TtCounting and circulating again after two time values in the time period;
when the number P of the data packets received by the image forming device is 16, outputting a signal for entering the sleep state at the time of 12:00:10+8s, namely outputting a signal for entering the sleep state at the time of 12:00:18, then entering the sleep state until receiving a wake-up signal, and re-determining TtAnd counting again and circulating after two time values in the time period.
The present embodiment is only a preferred embodiment of the present invention, the threshold for comparing with the received number of packets P may be 0 and X, or may be only 0 or only X, or may be two or more thresholds, and the signal indicating the time when the sleep state is entered is output according to the determination result of the size of the received number of packets P.
Further, the executed operation steps may be interchanged according to the size determination result of the received data packet number P, and the specific steps are not limited in this embodiment.
EXAMPLE III
The present embodiment modifies the information of S260 based on the second embodiment.
As shown in FIG. 4, S310, obtaining the designated port of the electronic device in the predetermined time period Tt=[Tx,Ty]Number of data packets received in P, where Tx、TyRespectively representing time information;
s320, judging whether the number P of the data packets received by the appointed port is larger than 0 or not, and judgingIf the result is no (i.e., P is 0), the process goes to S340, and T is outputy+Th1A signal for entering a sleep state at a time, and then entering the sleep state (S370) until a wake-up signal is received, re-confirming Tx、TyAfter (S380), go to S310, where Ty-Tx>Th1(ii) a If the judgment result of S320 is yes, turning to S330;
s330, judging whether the number P of the data packets received by the appointed port is larger than X, if not (namely P is more than 0 and less than X), turning to S350, and outputting Ty+Th2A signal for entering a sleep state at a time, and then entering the sleep state (S370) until a wake-up signal is received, re-confirming Tx、TyAfter (S380), go to S310, where Ty-Tx>Th2(ii) a If the judgment result in the step S330 is yes, turning to the step S360;
s360, outputting Ty+Th3Signal to enter sleep state at the moment, and then go to S390, where Ty-Tx≤Th3
S390, counting Tt1=[Ty+Th3-Tg3,Ty+Th3]During the time period, the image forming apparatus designates the number P of packets received by the port, and then goes to S400, where T ish3、Tg3Respectively characterize duration information, and Th3>Tg3I.e. counting Tg3The number P of data packets received by a designated port of the image forming device in the time length;
s400, order Ty=Ty+Th3Then, the process goes to S320 to perform a new judgment cycle.
Example four
In this embodiment, the information of S390 and S400 is modified on the basis of the second embodiment, and other steps similar to those in the second embodiment are referred to in the second embodiment, which is not repeated herein.
As shown in fig. 5, the deformation portions of the present embodiment are: when outputting Ty+Th3After the signal of entering the dormant state at any moment (S360), let Tx=Tx+Tc(S390)、Ty=Ty+Tc(S400), go to S310 for a loop where Ty-Tx≤Th3,Tc≤Th3
EXAMPLE five
The present embodiment modifies the information of S350 based on the third embodiment.
As shown in FIG. 6, S410, obtaining the designated port of the electronic device in the predetermined time period Tt=[Tx,Ty]Number of data packets received in P, where Tx、TyRespectively representing time information;
s420, determining whether the number P of packets received by the designated port is greater than 0, and if the determination result is no (i.e. P is 0), the process goes to S440 and outputs Ty+Th1A signal for entering a sleep state at a moment, and then entering the sleep state (S470) until a wake-up signal is received, re-confirming Tx、TyAfter (S480), go to S410, where Ty-Tx>Th1(ii) a If the judgment result of the step S420 is yes, turning to a step S430;
s430, judging whether the number P of the data packets received by the appointed port is larger than X, if not (namely P is larger than 0 and is less than or equal to X), turning to S450, and outputting Ty+Th2Signal to enter sleep state at the moment, and then go to S490, where Ty-Tx≤Th2
S490, statistics of Tt2=[Ty+Th2-Tg2,Ty+Th2]During the time period, the image forming apparatus designates the number P of packets received by the port, and then goes to S500, where T ish2、Tg2Respectively characterize duration information, and Th2>Tg2I.e. counting Tg2The number P of data packets received by a designated port of the image forming device in the time length;
s500, order Ty=Ty+Th2Then, the process goes to S520 to perform a new judgment cycle.
If the judgment result in S430 is yes, the process goes to S460 and T is outputy+Th3Enter into rest at any momentSignals a sleep state, and then goes to S510, where Ty-Tx<Th3
S510, counting Tt1=[Ty+Th3-Tg3,Ty+Th3]During the time period, the image forming apparatus designates the number P of packets received by the port, and then goes to S520, where T ish3、Tg3Respectively characterize duration information, and Th3>Tg3I.e. counting Tg3The number P of data packets received by a designated port of the image forming device in the time length;
s520, order Ty=Ty+Th3Then, the process goes to S420 to perform a new judgment cycle.
EXAMPLE six
In this embodiment, the information of S490, S500, S510, and S520 is modified based on the fifth embodiment, and other steps that are the same as those in the fifth embodiment are referred to in the fifth embodiment, which is not repeated herein.
The deformation part of the embodiment is as follows: when outputting Ty+Th2After the signal that the time goes into the sleep state (S450), let Tx=Tx+Tb(S490)、Ty=Ty+Tb(S500), go to S410 to cycle, where Ty-Tx≤Th2,Tb≤Th2
When outputting Ty+Th3After the signal that the time goes into the sleep state (S460), let Tx=Tx+Tc(S510)、Ty=Ty+Tc(S520), go to S410 to cycle, where Ty-Tx<Th3,Tc≤Th3
EXAMPLE seven
The present embodiment modifies the information of S440 on the basis of the fifth embodiment.
As shown in FIG. 7, S610, obtaining the designated port of the electronic device in the predetermined time period Tt=[Tx,Ty]Number of data packets received in P, where Tx、TyRespectively representing time information;
s620, determining whether the number P of the data packets received by the designated port is greater than 0, if the determination result is no (i.e. P is 0), the process goes to S640, and outputs Ty+Th1Signal to enter sleep state at time, and then go to S670, where Ty-Tx≤Th1
S670, counting Tt3=[Ty+Th1-Tg3,Ty+Th1]During the time period, the image forming apparatus designates the number of packets P' received by the port and then shifts to S690, where Th1、Tg3Respectively characterize duration information, and Th1>Tg3I.e. counting Tg3The number P of data packets received by a designated port of the image forming device in the time length;
s690, determining whether the number P 'of packets received by the designated port of the image forming apparatus is greater than 0, and if the determination result is no (i.e. P' is 0), entering a sleep state (S730), and reconfirming T until receiving the wake-up signalx、TyAfter (S750), go to S610; if the judgment result is yes, the P is equal to P' and Ty=Ty+Th1(S740), then go to S630;
if the judgment result in the step S620 is yes, the process goes to the step S630;
s630, judging whether the number P of the data packets received by the appointed port is larger than X, if not (namely P is larger than 0 and is less than or equal to X), turning to S650, and outputting Ty+Th2Signal to enter sleep state at time, then go to S680 where Ty-Tx<Th2
S680, counting Tt2=[Ty+Th2-Tg2,Ty+Th2]During the time period, the image forming apparatus designates the number P of packets received by the port, and then goes to S700, where T ish2、Tg2Respectively characterize duration information, and Th2>Tg2I.e. counting Tg2The number P of data packets received by a designated port of the image forming device in the time length;
s700, order Ty=Ty+Th2Then turn to S6And 20, performing a new judgment cycle.
If the determination result in S630 is yes, the process goes to S660 and T is outputy+Th3Signal to enter sleep state at the moment, and then go to S710, where Ty-Tx<Th3
S710, counting Tt1=[Ty+Th3-Tg3,Ty+Th3]During the time period, the image forming apparatus designates the number P of packets received by the port, and then goes to S720, where Th3、Tg3Respectively characterize duration information, and Th3>Tg3I.e. counting Tg3The number P of data packets received by a designated port of the image forming device in the time length;
s720, order Ty=Ty+Th3Then, the process goes to S620 to perform a new judgment cycle.
Example eight
The embodiment is modified on the basis of the seventh embodiment, and specifically, the following is performed:
as shown in FIG. 8, S810, obtaining the designated port of the electronic device in the predetermined time period Tt=[Tx,Ty]Number of data packets received in P, where Tx、TyRespectively representing time information;
s820, determining whether the number P of packets received by the designated port is greater than 0, and if the determination result is no (i.e. P is 0), the process goes to S840 to output Ty+Th1Signal that the time goes to sleep, and then goes to S870, where Ty-Tx≤Th1
S870, order Tx=Tx+Ta,Ty=Ty+TaThen turn to S880;
s880, counting Tt=[Tx,Ty]During the time period, the image forming apparatus designates the number of packets P' received by the port and then goes to S900, where Tx、TyRespectively representing time information;
s900, judging the data received by the appointed port of the image forming deviceIf the number of packets P 'is greater than 0, if the determination result is negative (i.e., P' is 0), the method enters a sleep state (S940), and the method reconfirms T until receiving the wakeup signalx、TyAfter (S960), go to S810; if yes, making P equal to P' (S950), and then turning to S830;
if the judgment result of S820 is yes, turning to S830;
s830, judging whether the number P of the data packets received by the appointed port is larger than X, if the judgment result is negative (namely P is more than 0 and less than or equal to X), turning to S850, and outputting Ty+Th2Signal to enter sleep state at the moment, and then go to S890 where Ty-Tx<Th2
S890, order Tx=Tx+TbThen turn to S910;
s910, order Ty=Ty+TbThen, the process goes to S810 to perform a loop.
If the judgment result in S830 is YES, the process goes to S860 to output Ty+Th3Signal to enter sleep state at time, then go to S920, where Ty-Tx<Th3
S920, order Tx=Tx+TcThen go to S930;
s930, order Ty=Ty+TcThen, the process goes to S810 to perform a loop.
Example nine
This embodiment is to divide the time period into a plurality of time periods n averagely, and count the number P of actually received data packets per time period according to the statisticsiCalculating the average number of the received data packets in each time period
Figure BDA0002355347970000141
I.e. the number of received and determined data packets in this embodiment
Figure BDA0002355347970000142
Other steps similar to those of the second to eighth embodiments are providedReference is made to the second to eighth embodiments, which are not described herein again.
Example ten
This embodiment is another expression of the second embodiment.
As shown in FIG. 9, the present embodiment is statistic Tt=[Tx,Ty]The method comprises the steps of receiving the shortest time interval T (S1100) between data packets in a time period, and outputting T if the shortest time interval T meets the relation T not more than T (S1200), wherein T is threshold timey+Th1A signal for entering a sleep state at a moment (S1400), and then entering the sleep state (S1500) until a wake-up signal is received, and re-confirming Tx、TyAfter (S1600), go to S1100, where Ty-Tx>Th1(ii) a If the shortest time interval T does not satisfy the relation T ≦ T (S1200), outputting Ty+Th2A signal for entering a sleep state at a time (S1300), and then entering the sleep state (S1500) until a wake-up signal is received, re-confirming Tx、TyAfter (S1600), go to S1100, where Ty-Tx>Th2
The present embodiment is only a preferred embodiment of the present invention, and the threshold time for comparing with the shortest time interval T may be only the threshold time T, or the shortest time interval T may be compared with a plurality of threshold times, and a signal indicating the time when the sleep state is entered is output according to the size determination result of the shortest time interval T.
Further, the executed operation steps may be interchanged according to the judgment result of the size of the shortest time interval T, and the specific steps are not limited in this embodiment.
EXAMPLE eleven
This embodiment is another expression of the third embodiment or the fifth embodiment.
As shown in FIG. 10, the present embodiment is statistic Tt=[Tx,Ty]A shortest time interval T between data packets received within a time period (S2100), if the shortest time interval T satisfies the relation T ≦ T (S2200), whichIf T is the threshold time, T is outputy+Th1A signal for entering a sleep state at a moment (S2400), and then entering the sleep state (S2600) until a wake-up signal is received, re-confirming Tx、TyAfter the value of (S2800), go to S2100, where Ty-Tx>Th1(ii) a If the shortest time interval T satisfies the relation T ≦ T (S2200), outputting Ty+Th2A signal to enter a sleep state at a time (S2300), where Ty-Tx≤Th2Then, T is countedt1=[Ty+Th2-Tg2,Ty+Th2]During the time period, the shortest time interval T (S2500) between the data packets received by the ports of the image forming device is formed, wherein Th2、Tg2Respectively represent the duration information, let Ty=Ty+Th2(S2700), the process then proceeds to S2200, where a new cycle of determination is performed.
Example twelve
In this embodiment, the information of S2500 and S2700 is modified based on the first embodiment, and other steps that are the same as those in the first embodiment are omitted for brevity.
As shown in fig. 11, the deformation portions of the present embodiment are: when outputting Ty+Th2After the signal that the time goes into the sleep state (S2300), let Tx=Tx+Tb(S2500)、Ty=Ty+Tb(S2700) go to S2100 for cycle, where Ty-Tx≤Th2
EXAMPLE thirteen
This embodiment is another expression of the seventh embodiment.
As shown in FIG. 12, the present embodiment is statistic Tt=[Tx,Ty]A shortest time interval T between data packets received within a time period (S3100), and if the shortest time interval T satisfies a relation T ≦ T (S3200), where T is a threshold time, outputting Ty+Th1A signal of entering a sleep state at a moment (S3300), and then T is countedt2=[Ty+Th1-Tg1,Ty+Th1]The shortest time interval T' (S3500) between the data packets received by the image forming device port in the time period, wherein Th1、Tg1Respectively represent time length information, and Ty-Tx≤Th1(ii) a If the shortest time interval T 'does not satisfy the relation T' ≦ T (S3700), entering a sleep state (S3900) until a wake-up signal is received and reconfirming Tx、TyAfter the value of (S4100), turn to S3100;
if the shortest time interval T satisfies T ≦ T (S3200) or the shortest time interval T ' satisfies T ' ≦ T (S3700), let T equal to T ' (S4000), and output Ty+Th2A signal of entering a sleep state at a time (S3400), and then T is countedt1=[Ty+Th2-Tg2,Ty+Th2]The shortest time interval T between the data packets received by the image forming apparatus port during the time period (S3600), wherein Th2、Tg2Respectively represent the duration information, let Ty=Ty+Th2(S3800), and then shifts to S3200, a new determination cycle is performed.
Example fourteen
In this embodiment, the information of S3600, S3800, and S4000 is modified on the basis of embodiment thirteen, and other steps similar to those in embodiment thirteen are omitted for brevity.
The deformation part of the embodiment is as follows: when the shortest time interval T ' satisfies T ' ≦ T (S3700), let T ≦ T ' (S4000), and output Ty+Th2A signal to enter a sleep state at a time (S3400), and then let Tx=Tx+Tb(S3600)、Ty=Ty+Tb(S3800), proceed to S3100 for a loop, where Ty-Tx<Th2
Example fifteen
As shown in fig. 13, the present embodiment provides a sleep control apparatus 300 of an electronic device, where the sleep control apparatus 300 includes:
a data packet information obtaining module 310, configured to obtain that a port of the electronic device receives data packet information within a predetermined time;
a data packet information analyzing module 320, configured to analyze the number P of data packets and/or the shortest time interval T between data packets within a predetermined time;
the sleep state control module 330 is configured to control the sleep state of the electronic device after determining that the predetermined time is met based on whether the number P and/or the shortest time interval T meet a predetermined condition.
In a preferred embodiment, the analyzing, by the data information analyzing module, the number P of the data packets in the predetermined time specifically includes: and adjusting the sleep time of the electronic equipment according to the comparison result of the number P of the received data packets in the preset time and the threshold value.
In a preferred embodiment, the analyzing, by the data information analyzing module, the number P of the data packets in the predetermined time specifically includes: according to the number Pi of the actually received data packets in each time period counted by averagely dividing the preset time into a plurality of time periods n, the average number of the actually received data packets in each time period is calculated
Figure BDA0002355347970000171
And adjusting the sleep time of the electronic equipment according to the comparison result with the threshold value.
In a preferred embodiment, the step of analyzing, by the data information analysis module, the shortest time interval T between data packets within a predetermined time is specifically as follows: and within the preset time, adjusting the sleep time of the electronic equipment according to the comparison result of the actual length of the shortest time interval T between the received data packets and the time threshold.
The data receiving apparatus 300 provided in this embodiment may execute the data receiving method according to any one of the first to fourteenth embodiments, and the specific execution process may refer to the explanation of the foregoing embodiment, and the data receiving apparatus provided in this embodiment may also obtain corresponding technical effects, which is not described herein again.
Example sixteen
As shown in fig. 14, the present embodiment provides an electronic device 200, where the electronic device 200 includes:
as in the sleep control apparatus 300 according to the fourth embodiment,
and a controller and/or an operation unit that completes processing of the data packet received within the predetermined time. The controller may be a CPU of the electronic device in the first embodiment, and the operation unit may be at least one of a printing unit, a scanning unit, and a facsimile unit.
Example seventeen
As shown in fig. 15, the present embodiment provides a processing apparatus 10 including:
a processor 11, a memory 12 and a computer program; wherein
A memory 12 for storing said computer program, which memory may also be a flash memory (flash). The computer program is, for example, an application program, a functional module, or the like that implements the above method.
A processor 11 for executing the computer program stored by the memory to implement the steps of the above method. Reference may be made in particular to the description relating to the preceding method embodiment.
Alternatively, the memory 12 may be separate or integrated with the processor 11.
When the memory 12 is a device independent of the processor 11, the processing apparatus 10 may further include:
a bus 13 for connecting the memory 12 and the processor 11.
The present invention also provides a readable storage medium, in which a computer program is stored, which, when being executed by a processor, is adapted to implement the methods provided by the various embodiments described above.
The readable storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, a readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Additionally, the ASIC may reside in user equipment. Of course, the processor and the readable storage medium may also reside as discrete components in a communication device.
The present invention also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the device may read the execution instructions from the readable storage medium, and the execution of the execution instructions by the at least one processor causes the device to implement the methods provided by the various embodiments described above.
In the above embodiments of the processing device, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (16)

1. A sleep control method of an electronic device, comprising:
acquiring data packet information received by a port of the electronic equipment within preset time;
analyzing the number P of the data packets received in the preset time and/or the shortest time interval T between the data packets;
and adjusting the moment when the electronic equipment enters the sleep state based on whether the number P and/or the shortest time interval T meet a preset condition.
2. The method according to claim 1, wherein the analyzing the number P of the packets received within the predetermined time is specifically: averagely dividing the preset time into a plurality of time periods n, and calculating to obtain the average number of the received data packets in each time period according to the counted number Pi of the actually received data packets in each time period
Figure FDA0002355347960000011
3. The method of claim 2, wherein adjusting the time at which the electronic device enters the sleep state based on whether the number P satisfies a predetermined condition comprises: if the relation between the number P of the received data packets in the preset time or each average time period and the threshold value X is more than 0 and less than or equal to P and less than or equal to X, controlling the electronic equipment to enter the sleep mode after delaying the first time; and if the relation between the number P of the received data packets in the preset time or each average time period and the threshold value X is P & gt X, controlling the electronic equipment to enter the sleep mode after delaying for a second time which is longer than the first time.
4. The method according to claim 1, wherein the analyzing the shortest time interval T between the data packets received within the predetermined time is specifically: and calculating each time interval between the received data packets in the preset time, and taking the time interval with the minimum time difference between two adjacent data packets as the shortest time interval T.
5. The method of claim 4, wherein adjusting the time at which the electronic device enters the sleep state based on whether the shortest time interval T satisfies a predetermined condition comprises: if the relation between the shortest time interval T between the received data packets and the time threshold T is T ≧ T, enabling the electronic equipment to immediately enter the sleep state; if the relation between the shortest time interval T between the received data packets and the time threshold T is T < T, the electronic equipment is delayed to enter the sleep mode.
6. The method according to any one of claims 1 to 5, wherein: the adjusting the time when the electronic device enters the sleep state based on whether the number P and/or the shortest time interval T satisfy a predetermined condition specifically includes: and adjusting the moment when the electronic equipment enters a second sleep mode from a first sleep mode based on whether the number P and/or the shortest time interval T meet a preset condition, wherein the energy consumption of the first sleep mode is larger than that of the second sleep mode.
7. A sleep control apparatus for an electronic device, comprising:
the data packet information acquisition module is used for acquiring data packet information received by a port of the electronic equipment within preset time;
the data packet information analysis module is used for analyzing the number P of the data packets received in the preset time and/or the shortest time interval T between the data packets;
and the dormant state control module is used for adjusting the time when the electronic equipment enters the dormant state based on whether the number P and/or the shortest time interval T meet the preset conditions.
8. The apparatus according to claim 7, wherein the analyzing, by the packet information analyzing module, the number P of packets received within the predetermined time is specifically: averagely dividing the preset time into a plurality of time periods n, and calculating to obtain the average number of the received data packets in each time period according to the counted number Pi of the actually received data packets in each time period
Figure FDA0002355347960000021
9. The apparatus of claim 8, wherein the sleep state control module adjusts a time when the electronic device enters the sleep state based on whether the number P satisfies a predetermined condition: if the relation between the number P of the received data packets in the preset time or each average time period and the threshold value X is more than 0 and less than or equal to P and less than or equal to X, controlling the electronic equipment to enter the sleep mode after delaying the first time; and if the relation between the number P of the received data packets in the preset time or each average time period and the threshold value X is P & gt X, controlling the electronic equipment to enter the sleep mode after delaying for a second time longer than the preset first time.
10. The apparatus according to claim 7, wherein the analyzing, by the packet information analyzing module, the shortest time interval T between the packets received within the predetermined time is specifically: and calculating each time interval between the received data packets in the preset time, and taking the time interval with the minimum time difference between two adjacent data packets as the shortest time interval T.
11. The apparatus of claim 10, wherein the sleep state control module adjusts the time when the electronic device enters the sleep state based on whether the shortest time interval T satisfies a predetermined condition comprises: if the relation between the shortest time interval T between the received data packets and the time threshold T is T ≧ T, enabling the electronic equipment to immediately enter the sleep state; if the relation between the shortest time interval T between the received data packets and the time threshold T is T < T, the electronic equipment is delayed to enter the sleep mode.
12. The apparatus of any one of claims 7 to 11, wherein: the sleep state control module is configured to adjust a time when the electronic device enters a sleep state based on whether the number P and/or the shortest time interval T satisfy a predetermined condition, specifically: the sleep state control module is configured to adjust a time when the electronic device enters a second sleep mode from a first sleep mode based on whether the number P and/or the shortest time interval T satisfy a predetermined condition, where energy consumption of the first sleep mode is greater than that of the second sleep mode.
13. An electronic device, comprising:
the sleep control apparatus as claimed in any one of claims 7 to 12,
the port of the electronic equipment, and a controller and/or an operation unit which completes the processing of the data packet received in the preset time.
14. An electronic device communication system, comprising:
the electronic device of claim 13, and a data transmission device that transmits a data packet to the electronic device.
15. A processing device, comprising: a memory, a processor, and a computer program, the computer program being stored in the memory, the processor running the computer program to perform the sleep control method of any one of claims 1 to 6.
16. A readable storage medium, in which a computer program is stored, which, when being executed by a processor, is adapted to carry out the sleep control method according to any one of claims 1 to 6.
CN202010006108.7A 2020-01-03 Sleep control method and device of electronic equipment and electronic equipment Active CN111209049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010006108.7A CN111209049B (en) 2020-01-03 Sleep control method and device of electronic equipment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010006108.7A CN111209049B (en) 2020-01-03 Sleep control method and device of electronic equipment and electronic equipment

Publications (2)

Publication Number Publication Date
CN111209049A true CN111209049A (en) 2020-05-29
CN111209049B CN111209049B (en) 2024-04-26

Family

ID=

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070223028A1 (en) * 2006-03-23 2007-09-27 Boyes J W Jr Adjustment of sleep timeouts in printers
CN101626593A (en) * 2009-07-03 2010-01-13 深圳市宏电技术股份有限公司 Method, system and terminal for controlling CDMA service channel
JP2010277162A (en) * 2009-05-26 2010-12-09 Brother Ind Ltd Program, and network system
JP2011010021A (en) * 2009-06-25 2011-01-13 Brother Industries Ltd Communication apparatus
US20140181552A1 (en) * 2012-12-20 2014-06-26 Xerox Corporation Multi-mode device power-saving optimization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070223028A1 (en) * 2006-03-23 2007-09-27 Boyes J W Jr Adjustment of sleep timeouts in printers
JP2010277162A (en) * 2009-05-26 2010-12-09 Brother Ind Ltd Program, and network system
JP2011010021A (en) * 2009-06-25 2011-01-13 Brother Industries Ltd Communication apparatus
CN101626593A (en) * 2009-07-03 2010-01-13 深圳市宏电技术股份有限公司 Method, system and terminal for controlling CDMA service channel
US20140181552A1 (en) * 2012-12-20 2014-06-26 Xerox Corporation Multi-mode device power-saving optimization

Similar Documents

Publication Publication Date Title
EP2262327B1 (en) Method and apparatus for managing power of wlan module in portable terminal
US7957777B1 (en) Wake on wireless LAN schemes
JP5900760B2 (en) Power management method and apparatus for network access module
CA2531384C (en) Handling broadcast and multicast traffic as unicast traffic in a wireless network
US8661167B2 (en) DMA (direct memory access) coalescing
EP3520499B1 (en) Power management techniques for wirelessly-interconnected devices
US9690364B2 (en) Systems and methods for dynamically adjusting memory state transition timers
KR20160132422A (en) System and method for providing dynamic clock and voltage scaling (dcvs) aware interprocessor communication
US20100325463A1 (en) Method and System for Optimized Power Management for a Network Device Supporting PCI-E and Energy Efficient Ethernet
CN101146004A (en) Electronic apparatus and wireless communication control method
US20180032291A1 (en) Electronic apparatus, wireless communication device, and power control method
CN109413723A (en) A kind of power consumption control method and device
EP2691831B1 (en) Activity alignment algorithm by masking traffic flows
US20180288702A1 (en) Dynamic power saving mode and configuration changing based on traffic pattern
CN111209049A (en) Dormancy control method and device of electronic equipment and electronic equipment
CN111209049B (en) Sleep control method and device of electronic equipment and electronic equipment
WO2017063468A1 (en) Power consumption control method, device and computer storage medium
CN112948312B (en) Chip control method and device, intelligent terminal and computer readable storage medium
WO2019127230A1 (en) Network node wake-up method and device
KR20190129219A (en) Method And Apparatus for Providing Power Saving Optimization
WO2016101101A1 (en) Network energy efficiency optimization method and device
US11520628B2 (en) Cooperative dynamic clock and voltage scaling (DCVS) between two processor systems
WO2021103893A1 (en) Wireless fidelity (wifi) chip control method and related device thereof
TWI733179B (en) Energy detection method with low power consumption and communication device thereof
WO2020211861A1 (en) Scheduling method for terminal device, terminal device, and base station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant