CN111209049B - Sleep control method and device of electronic equipment and electronic equipment - Google Patents

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

Info

Publication number
CN111209049B
CN111209049B CN202010006108.7A CN202010006108A CN111209049B CN 111209049 B CN111209049 B CN 111209049B CN 202010006108 A CN202010006108 A CN 202010006108A CN 111209049 B CN111209049 B CN 111209049B
Authority
CN
China
Prior art keywords
time
data packets
sleep
time interval
received
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.)
Active
Application number
CN202010006108.7A
Other languages
Chinese (zh)
Other versions
CN111209049A (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
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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Facsimiles In General (AREA)

Abstract

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

Description

Sleep control method and device of electronic equipment and electronic equipment
[ Field of technology ]
The present invention relates to the field of data communications technologies, and in particular, to a sleep control method and apparatus for an electronic device, and a readable storage medium.
[ Background Art ]
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, such as printing, copying, and scanning, by communicating with the computer.
In recent years, energy saving and environmental protection have become more and more important, and in order to enable an image forming apparatus to save energy, current image forming apparatuses are designed to be unused for a while, and enter a so-called energy saving mode (or referred to as a sleep mode), so that a user does not need to turn off the power supply of the image forming apparatus at any time in order to save the power consumption of the image forming apparatus when not in use. But this creates a problem: the data packets received by the image forming apparatus have a peak characteristic in which the data packets are received frequently or in a large amount during a certain period of time, and the data packets are received infrequently or in a small amount during another period of time. Therefore, when the judging time for entering the dormant state is set to be a fixed value, the data packet received in a certain period of time is frequent or the data volume is large, if the image forming device is dormant normally, the image forming device is switched between the dormant state and the awakened state frequently, so that the data packet is processed, the response speed of the data packet is reduced, and the user experience is affected; however, if the image forming apparatus is kept in the fully awake state, excessive power consumption is caused.
[ Invention ]
In order to solve the technical problems of slow response speed of data packets and excessive power consumption caused by setting the judging time of the electronic equipment entering the dormant state to a fixed value and keeping the electronic equipment in a completely-awakened state in the prior art, the invention provides a dormant control method and device of the electronic equipment, the electronic equipment and a readable storage medium, which can confirm the proper time of the electronic equipment entering the dormant state based on the number and/or frequency of the data packets currently received by the electronic equipment, and can improve the response speed of the data packets under the condition of meeting the requirements of energy conservation and environmental protection.
In order to achieve the above object, the present invention provides a technical solution comprising:
an embodiment of the present invention provides a sleep control method for an electronic device, including:
acquiring data packet information received by a port of the electronic equipment in a 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 of the electronic equipment entering 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 data packets received in the predetermined time is specifically: 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 actual received data packets in each time period
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 meets a predetermined condition includes: if the relation between the number P of the received data packets and the threshold value X in the preset time or in each time period is more than 0 and less than or equal to X, controlling the electronic equipment to enter dormancy after delaying for the first time; if the relation between the number P of the received data packets in the preset time or the average time period and the threshold value X is P > X, the control electronic equipment delays the second time longer than the preset first time and enters into dormancy.
In a preferred embodiment of the present invention, the parsing the shortest time interval T between data packets received in 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 smallest 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 meets 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 more than or equal to T, enabling the electronic equipment to immediately enter into dormancy; if the relationship between the shortest time interval T between the received data packets and the time threshold T is T < T, the electronic device is delayed to enter sleep.
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 meet a predetermined condition specifically includes: and adjusting the moment when the electronic equipment enters the second sleep mode from the first sleep mode based on whether the quantity 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 embodiment 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 in a 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 sleep state control module is used for adjusting the moment of the electronic equipment entering the sleep state based on whether the quantity P and/or the shortest time interval T meet a preset condition.
In a preferred implementation manner of the embodiment of the present invention, the analyzing the number P of the data packets received in the predetermined time by the data packet information analyzing module specifically includes: 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 actual received data packets in each time period
In a preferred implementation manner of the embodiment of the present invention, the sleep state control module adjusts the time when the electronic device enters the sleep state based on whether the number P meets a predetermined condition: if the relation between the number P of the received data packets and the threshold value X in the preset time or in each time period is more than 0 and less than or equal to X, controlling the electronic equipment to enter dormancy after delaying for the first time; if the relation between the number P of the received data packets in the preset time or the average time period and the threshold value X is P > X, the control electronic equipment delays the second time longer than the preset first time and enters into dormancy.
In a preferred implementation manner of the embodiment of the present invention, the analyzing module of the data packet information analyzes the shortest time interval T between the data packets received in 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 smallest 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 more than or equal to T, enabling the electronic equipment to immediately enter into dormancy; if the relationship between the shortest time interval T between the received data packets and the time threshold T is T < T, the electronic device is delayed to enter sleep.
In a preferred implementation manner of the embodiment of the present invention, the sleep state control module is configured to adjust, based on whether the number P and/or the shortest time interval T satisfy a predetermined condition, a time when the electronic device enters a sleep state, 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 minimum time interval T satisfy a predetermined condition, where the first sleep mode has a greater energy consumption than the second sleep mode.
A third aspect of the present invention provides an electronic apparatus, characterized by comprising:
the sleep control device according to any one of the second aspects,
The port of the electronic device, and a controller and/or an operation unit that completes processing of the data packet received within the predetermined time.
A fourth aspect of the present invention provides an electronic device communication system, comprising:
An electronic device as recited in the third aspect, and a packet transmission device that transmits 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 stored in the memory, the processor running the computer program to perform the sleep control method of any one of the first aspects.
A sixth aspect of the present invention provides a readable storage medium, wherein a computer program is stored in the readable storage medium, and the computer program is executed by a processor to implement any one of the sleep control methods described in the first aspect.
By adopting the technical scheme provided by the embodiment, the number and/or frequency of the data packets possibly received in a next period of time can be presumed through the relation between the number and/or frequency of the data packets received in a preset time and the set threshold value, and the moment when the printer enters the sleep state is further adjusted. Therefore, the response speed of the data packet is improved, and the experience of a user 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 that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
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 of a sleep control method of an electronic device according to an embodiment of the 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 of a sleep control method of an electronic device according to a third embodiment of the present invention.
Fig. 5 is a schematic diagram of a sleep control method of an electronic device according to a fourth embodiment of the present invention.
Fig. 6 is a schematic diagram of a sleep control method of an electronic device according to a fifth embodiment of the present invention.
Fig. 7 is a schematic diagram of a sleep control method of an electronic device according to a seventh embodiment of the present invention.
Fig. 8 is a schematic diagram of 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 of a sleep control method of an electronic device according to an eleventh embodiment of the present invention.
Fig. 11 is a schematic diagram of a sleep control method of an electronic device according to a twelfth embodiment of the present invention.
Fig. 12 is a schematic diagram of a sleep control method of an electronic device according to a thirteenth embodiment of the present 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 an image forming apparatus according to a sixteenth embodiment of the present invention.
Fig. 15 is a block diagram showing a processing apparatus according to a seventeenth embodiment of the present invention.
[ Detailed description ] of the invention
For a better understanding of the technical solution of the present invention, the following detailed description of the embodiments of the present invention refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
As shown in fig. 1, the present embodiment provides an electronic device communication system, which includes:
The electronic device 200, and a data transmission device for transmitting data packets to the electronic device, which may be the computer 100.
The electronic device may be an image forming apparatus, a printer, a scanner, or the like, or may be a device capable of data communication in other fields. 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), etc., and the present invention is not limited to the specific form of the electronic device and the computer. 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 via a USB data line. The embodiment is improved aiming at the network communication mode, but if other communication modes have similar problems as the network communication mode, the technical scheme provided by the embodiment can be adopted as well.
A computer 100 in which a CPU generally controls devices connected to a system bus according to programs 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 external memories such as flash memories or SSDs (solid state disk). The external memory stores an OS (operating system), applications corresponding to various functions, and an image forming apparatus driver (print driver). An external memory is used as a computer-readable/writable storage medium. The PRTC is a print interface that communicates with the image forming apparatus.
The CPU in the electronic device 200 controls the overall operation, and can process the data packet transmitted by the computer 100. The RAM serves as a main memory, a work memory, and the like of the CPU, and also serves as an image information rasterization area and an environmental data storage area. The RAM also includes an NVRAM (nonvolatile 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, and 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, and the like, and is capable of storing hardware information. Note that when an external memory such as a hard disk is not connected, the ROM stores information or the like to be used in the computer. The operation panel includes a switch 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 of an electronic device, and of course, the present embodiment may also be applied to other similar technical fields, and the present embodiment is not limited in particular.
Comprising the following steps:
S110, acquiring data packet information received by an electronic equipment port in a preset time;
s120, analyzing the number P of data packets received in a preset time and/or the shortest time interval T between the data packets;
S130, adjusting the moment when the electronic device enters the sleep state based on whether the quantity 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 device enters the second sleep mode from the first sleep mode based on whether the number P and/or the shortest time interval T meet the preset condition, wherein the energy consumption of the first sleep mode is larger than that of the second sleep mode.
In particular, the sleep may include a first sleep mode and a second sleep mode, the first sleep mode may be a primary sleep, 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 sleep mode not only saves energy than a normal wake mode, but also can respond to the data packet in time; the second sleep mode may be a secondary sleep, for example, in addition to turning off the engine unit and the operation unit, the external memory is turned off or enters a low power mode, so the second sleep mode is a deep sleep state which is more energy-efficient than the first sleep mode, and cannot respond to the data packet in time.
It should be noted that the primary sleep mode and the secondary sleep mode are only a 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 of an electronic device, and the electronic device uses an image forming apparatus as an example, but of course, the present embodiment can also be applied to other similar technical fields, and the present embodiment does not specifically limit the present embodiment. Comprising the following steps:
S210, acquiring the number P of data packets received by an appointed port of the electronic equipment in a preset time period T t=[Tx,Ty, wherein T x、Ty respectively represents 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 the source host issues data, the data is transferred from the upper layer to the lower layer in the source host. The application program in the source host now gives the data to the application layer, and the application layer adds necessary control information to form a message stream, and the message stream is transmitted to the transmission layer. The transmission layer adds the received data unit with the control information of the layer to form a data segment, and then the data segment is delivered to the network layer. The network layer adds the control information of the layer to form IP datagram or data packet, and transmits it to the data link layer. The data link layer assembles the IP datagrams or packets delivered by the network layer into frames and transmits the frames in the form of a bit stream to the network hardware (i.e., physical layer) where the data leaves the source host. When the data is transmitted to the destination host, the data is transmitted from the lower layer to the upper layer, 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 comprise three types, wherein the first type is a data packet irrelevant to the image forming device, the second type is a data packet which is simply interacted with the image forming device, such as a query command, a control command and the like, and the third type is an image forming operation data packet, so that the data packets of a designated port are received and counted in order to prevent the first type data packet from affecting the normal dormancy of the image forming device.
S220, judging whether the number P of the data packets received by the designated port is greater than 0, if the judgment result is negative (namely P=0), turning to S240, outputting a signal for entering a dormant state at the moment T y+Th1, entering the dormant state (S270), turning to S210 after receiving a wake-up signal and reconfirming the value of T x、Ty (S280), wherein T y-Tx>Th1; if the judgment result of S220 is yes, turning to S230;
S230, judging whether the number P of the data packets received by the designated port is larger than X, if the judgment result is NO (namely, 0 < P is less than or equal to X), turning to S250, outputting a signal that the terminal enters a dormant state at the moment T y+Th2, then entering the dormant state (S270), turning to S210 after receiving a wake-up signal and reconfirming the value of the terminal T x、Ty (S280), wherein T y-Tx>Th2; if the judgment result of S230 is yes, the process goes to S260;
And S260, outputting a signal for entering a sleep state at the moment T y+Th3, then entering the sleep state (S270), and turning to S210 after receiving a wake-up signal and reconfirming the value of T x、Ty (S280), wherein T y-Tx>Th3.
Specifically, the sleep state may be that the image forming apparatus enters the second sleep from the first sleep at time T y+Th1, time T y+Th2, or time T y+Th3.
For ease of understanding, the examples illustrate:
Counting the number P of data packets received by the image forming device in a period of T t = [12:00:00,12:00:10 ]; let T h1=2s,Th2=5s,Th3 =8 s, threshold x=15;
When the number of data packets received by the image forming device p=0, outputting a signal for entering a sleep state at the moment of 12:00:10+2s, namely outputting a signal for entering the sleep state at the moment of 12:00:12, entering the sleep state until a wake-up signal is received, re-determining two moment values in a time period of T t, and then carrying out statistics again and circulation;
When the number of data packets received by the image forming device is p=10, outputting a signal for entering a sleep state at the moment of 12:00:10+5s, namely outputting a signal for entering the sleep state at the moment of 12:00:15, entering the sleep state until a wake-up signal is received, re-determining two moment values in a time period of T t, and then carrying out statistics again and circulation;
When the number of data packets received by the image forming apparatus p=16, outputting a signal for entering the sleep state at the time of 12:00:10+8s, that is, outputting a signal for entering the sleep state at the time of 12:00:18, entering the sleep state until a wake-up signal is received, re-determining two time values in the time period of T t, and then re-counting and cycling.
The present embodiment is merely a preferred embodiment of the present invention, the threshold value for comparing with the number P of received data packets may be 0 and X, may be only 0 or only X, may be two or more threshold values, and outputs a signal indicating the time of entering the sleep state according to the determination result of the number P of received data packets, and the present embodiment does not limit the number of threshold values.
Further, according to the result of determining the number P of received data packets, the executed operation steps may be interchanged, and the embodiment does not limit specific steps.
Example III
The present embodiment alters the information of S260 on the basis of embodiment two.
As shown in fig. 4, S310, acquire the number P of data packets received by the designated port of the electronic device in the predetermined period T t=[Tx,Ty ], where T x、Ty characterizes the time information respectively;
S320, judging whether the number P of the data packets received by the designated port is greater than 0, if the judgment result is negative (namely P=0), turning to S340, outputting a signal for entering a dormant state at the moment T y+Th1, entering the dormant state (S370), turning to S310 after receiving a wake-up signal and reconfirming the value of T x、Ty (S380), wherein T y-Tx>Th1; if the judgment result of S320 is yes, turning to S330;
S330, judging whether the number P of the data packets received by the designated port is larger than X, if the judgment result is NO (namely, 0 < P is less than or equal to X), turning to S350, outputting a signal that the designated port enters a dormant state at the moment T y+Th2, entering the dormant state (S370), turning to S310 after receiving a wake-up signal and reconfirming the value of T x、Ty (S380), wherein T y-Tx>Th2; if the judgment result of S330 is yes, turning to S360;
S360, outputting a signal for entering a sleep state at the moment T y+Th3, and then turning to S390, wherein T y-Tx≤Th3;
S390, counting the number P of data packets received by the designated port of the image forming device in the time period T t1=[Ty+Th3-Tg3,Ty+Th3, and turning to S400, wherein T h3、Tg3 respectively represents duration information, and T h3>Tg3 is counting the number P of data packets received by the designated port of the image forming device in the duration T g3;
S400, letting T y=Ty+Th3, turning to S320, and performing a new round of judgment cycle.
Example IV
In this embodiment, the information of S390 and S400 is modified based on the second embodiment, and other steps similar to those in the embodiment are the same as those in the embodiment, please refer to the second embodiment, and the details are not repeated here.
As shown in fig. 5, the modified portion of the present embodiment is: after outputting the signal for entering the sleep state at time T y+Th3 (S360), let T x=Tx+Tc(S390)、Ty=Ty+Tc (S400), go to S310 to loop, where T y-Tx≤Th3,Tc≤Th3.
Example five
The present embodiment modifies the information of S350 on the basis of embodiment three.
As shown in fig. 6, S410, the number P of data packets received by the designated port of the electronic device in the predetermined period T t=[Tx,Ty is acquired, where T x、Ty characterizes the time information respectively;
S420, judging whether the number P of the data packets received by the designated port is greater than 0, if the judgment result is negative (namely P=0), turning to S440, outputting a signal for entering a dormant state at the moment T y+Th1, entering the dormant state (S470), turning to S410 after receiving a wake-up signal and reconfirming the value of T x、Ty (S480), wherein T y-Tx>Th1; if the judgment result of S420 is yes, turning to S430;
S430, judging whether the number P of the data packets received by the designated port is larger than X, if the judgment result is that the number P is not larger than X (namely, 0 is more than or equal to P), turning to S450, outputting a signal that the designated port enters a dormant state at the moment T y+Th2, and turning to S490, wherein T y-Tx≤Th2;
S490, counting the number P of data packets received by the designated port of the image forming device in the time period T t2=[Ty+Th2-Tg2,Ty+Th2, and turning to S500, wherein T h2、Tg2 respectively represents duration information, and T h2>Tg2 is counting the number P of data packets received by the designated port of the image forming device in the duration T g2;
S500, letting T y=Ty+Th2, turning to S520, and performing a new round of judgment cycle.
If the judgment result of the step S430 is yes, turning to the step S460, outputting a signal for entering a sleep state at the moment T y+Th3, and turning to the step S510, wherein T y-Tx<Th3;
S510, counting the number P of data packets received by the designated port of the image forming device in the period of T t1=[Ty+Th3-Tg3,Ty+Th3, and turning to S520, wherein T h3、Tg3 respectively represents duration information, and T h3>Tg3 is counting the number P of data packets received by the designated port of the image forming device in the duration of T g3;
S520, let T y=Ty+Th3, then go to S420, and carry out a new round of judgment cycle.
Example six
In this embodiment, the information of S490, S500, S510, S520 is modified based on the fifth embodiment, and other steps similar to those in the fifth embodiment are not described herein.
The modified part of this embodiment is: after outputting the signal that the time T y+Th2 enters the sleep state (S450), let T x=Tx+Tb(S490)、Ty=Ty+Tb (S500), turn to S410 to cycle, wherein T y-Tx≤Th2,Tb≤Th2;
After outputting the signal for entering the sleep state at time T y+Th3 (S460), let T x=Tx+Tc(S510)、Ty=Ty+Tc (S520), turn to S410 to loop, where T y-Tx<Th3,Tc≤Th3.
Example seven
The present embodiment modifies the information of S440 on the basis of embodiment five.
As shown in fig. 7, S610, acquire the number P of data packets received by the designated port of the electronic device in the predetermined period T t=[Tx,Ty ], where T x、Ty characterizes the time information respectively;
S620, judging whether the number P of the data packets received by the designated port is greater than 0, if the judgment result is negative (namely P=0), turning to S640, outputting a signal for entering a dormant state at the moment T y+Th1, and turning to S670, wherein T y-Tx≤Th1;
S670, counting the number P' of the data packets received by the designated port of the image forming device in the time period T t3=[Ty+Th1-Tg3,Ty+Th1, and turning to S690, wherein T h1、Tg3 respectively represents time length information, and T h1>Tg3 is to count the number P of the data packets received by the designated port of the image forming device in the time length T g3;
S690, judging whether the number P 'of the data packets received by the designated port of the image forming device is greater than 0, if the judging result is negative (namely P' =0), entering a dormant state (S730), and turning to S610 after reconfirming the value of T x、Ty (S750) until a wake-up signal is received; if yes, let p=p', T y=Ty+Th1 (S740), and then go to S630;
If the judgment result of S620 is yes, the process goes to S630;
s630, judging whether the number P of the data packets received by the designated port is larger than X, if the judgment result is that the number P is not larger than X (namely, 0 is more than or equal to P), turning to S650, outputting a signal that the time T y+Th2 enters a dormant state, and turning to S680, wherein T y-Tx<Th2;
S680, counting the number P of data packets received by the designated port of the image forming device in the time period T t2=[Ty+Th2-Tg2,Ty+Th2, and turning to S700, wherein T h2、Tg2 respectively represents duration information, and T h2>Tg2 is to count the number P of data packets received by the designated port of the image forming device in the duration T g2;
S700, let T y=Ty+Th2, then go to S620, and carry out a new round of judgment cycle.
If the judgment result of the step S630 is yes, turning to the step S660, outputting a signal for entering a sleep state at the moment T y+Th3, and turning to the step S710, wherein T y-Tx<Th3;
S710, counting the number P of data packets received by the designated port of the image forming device in the time period T t1=[Ty+Th3-Tg3,Ty+Th3, and turning to S720, wherein T h3、Tg3 respectively represents duration information, and T h3>Tg3 is counting the number P of data packets received by the designated port of the image forming device in the duration T g3;
S720, let T y=Ty+Th3, then go to S620, and carry out a new round of judgment cycle.
Example eight
The present embodiment is modified based on the seventh embodiment, and specifically includes the following steps:
As shown in fig. 8, S810, acquiring the number P of data packets received by a designated port of the electronic device in a predetermined period T t=[Tx,Ty ], where T x、Ty characterizes time information respectively;
S820, judging whether the number P of the data packets received by the designated port is greater than 0, if the judgment result is negative (namely P=0), turning to S840, outputting a signal that the time T y+Th1 enters a dormant state, and turning to S870, wherein T y-Tx≤Th1;
S870, letting T x=Tx+Ta,Ty=Ty+Ta, and then turning to S880;
s880, counting the number P' of data packets received by a designated port of the image forming device in a T t=[Tx,Ty time period, and turning to S900, wherein T x、Ty respectively represents time information;
S900, judging whether the number P 'of data packets received by a designated port of the image forming device is larger than 0, if the judgment result is negative (namely P' =0), entering a dormant state (S940), and turning to S810 after reconfirming the value of T x、Ty (S960) until a wake-up signal is received; if the determination result is yes, let p=p' (S950), and then go 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 designated port is greater than X, if the judgment result is that the number P is not greater than X (namely, 0 is less than or equal to P), turning to S850, outputting a signal that the designated port enters a dormant state at the moment T y+Th2, and turning to S890, wherein T y-Tx<Th2;
s890, letting T x=Tx+Tb, and turning to S910;
s910, let T y=Ty+Tb, then go to S810, and loop.
If the judgment result of S830 is yes, turning to S860, outputting a signal that T y+Th3 enters a sleep state at moment, and then turning to S920, wherein T y-Tx<Th3;
s920, letting T x=Tx+Tc, and then turning to S930;
S930, let T y=Ty+Tc, then go to S810, and loop.
Example nine
In this embodiment, the time period described in the second embodiment to the eighth embodiment is divided into a plurality of time periods n, and the number of the received data packets in each time period is calculated according to the counted number P i of the actually received data packets in each time periodNamely, the number of data packets received and judged in this embodiment/>Other steps are the same as those of the second to eighth embodiments, please refer to the second to eighth embodiments, and the description thereof is omitted.
Examples ten
This embodiment is another expression of the second embodiment.
As shown in fig. 9, the present embodiment is to count a shortest time interval T between data packets received in a period T t=[Tx,Ty (S1100), if the shortest time interval T satisfies a relation t+_t (S1200), where T is a threshold time, output a signal that T y+Th1 is put into a sleep state (S1400), and then put into the sleep state (S1500), until a wake-up signal is received, and reconfirm the value of T x、Ty (S1600), and then turn to S1100, where T y-Tx>Th1; if the shortest time interval T does not satisfy the relation t.ltoreq.t (S1200), a signal for entering the sleep state at the moment T y+Th2 is output (S1300), and then the sleep state is entered (S1500), until a wake-up signal is received, and after reconfirming the value of T x、Ty (S1600), the process goes to S1100, where T y-Tx>Th2.
The present embodiment is merely 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 the signal indicating the time to enter the sleep state is output according to the size determination result of the shortest time interval T, and the present embodiment does not limit the number of threshold times.
Further, according to the result of the determination of the size of the shortest time interval T, the operation steps may be exchanged, and the embodiment does not limit specific steps.
Example eleven
This embodiment is another expression of either embodiment three or embodiment five.
As shown in fig. 10, the present embodiment is to count a shortest time interval T between data packets received in a period T t=[Tx,Ty (S2100), and if the shortest time interval T satisfies a relation t+.t (S2200), where T is a threshold time, output a signal that T y+Th1 is put into a sleep state (S2400), and then put into the sleep state (S2600), until a wake-up signal is received, and reconfirm the value of T x、Ty (S2800), then go to S2100, where T y-Tx>Th1; if the shortest time interval T satisfies the relation T is less than or equal to T (S2200), outputting a signal that the time T y+Th2 enters a sleep state (S2300), wherein T y-Tx≤Th2, and counting the shortest time interval T (S2500) between data packets received by the port of the image forming apparatus in the time period T t1=[Ty+Th2-Tg2,Ty+Th2, wherein T h2、Tg2 respectively represents time length information, and makes T y=Ty+Th2 (S2700), and then turning to S2200 to perform a new round of judgment cycle.
Example twelve
In this embodiment, the information of S2500 and S2700 is modified based on embodiment eleventh, and other steps similar to those of embodiment eleventh are referred to embodiment eleventh, and are not described herein.
As shown in fig. 11, the modified portion of the present embodiment is: when a signal for entering the sleep state at the time T y+Th2 is output (S2300), T x=Tx+Tb(S2500)、Ty=Ty+Tb is caused (S2700), and the process goes to S2100 to loop, where T y-Tx≤Th2 is performed.
Example thirteen
This embodiment is another expression of embodiment seven.
As shown in fig. 12, in this embodiment, a shortest time interval T between data packets received in a period of T t=[Tx,Ty is counted (S3100), if the shortest time interval T satisfies a relation t+_t (S3200), where T is a threshold time, a signal that T y+Th1 is put into a sleep state is output (S3300), and then a shortest time interval T' (S3500) between data packets received by an image forming apparatus port is counted in a period of T t2=[Ty+Th1-Tg1,Ty+Th1, where T h1、Tg1 represents duration information and T y-Tx≤Th1 respectively; 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 after reconfirming the value of T x、Ty (S4100), turning to S3100;
If the shortest time interval T satisfies T less than or equal to T (S3200) or the shortest time interval T ' satisfies T '. Ltoreq.t (S3700), let t=t ' (S4000), output a signal that T y+Th2 enters a sleep state (S3400), then count the shortest time interval T between data packets received by an image forming device port in a period of T t1=[Ty+Th2-Tg2,Ty+Th2 (S3600), where T h2、Tg2 respectively represents duration information, let T y=Ty+Th2 (S3800), then turn to S3200, and perform a new round of judgment cycle.
Examples fourteen
In this embodiment, the information of S3600, S3800, and S4000 is modified based on the thirteenth embodiment, and other steps similar to the thirteenth embodiment are referred to the thirteenth embodiment, and are not described herein.
The modified part of this embodiment is: when the shortest time interval T ' satisfies T '. Ltoreq.t (S3700), let t=t ' (S4000), output a signal that enters a sleep state at time T y+Th2 (S3400), then let T x=Tx+Tb(S3600)、Ty=Ty+Tb (S3800), and go to S3100 to cycle, where T y-Tx<Th2.
Example fifteen
As shown in fig. 13, the present embodiment provides a sleep control apparatus 300 of an electronic device, the sleep control apparatus 300 including:
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 packet information parsing module 320, configured to parse the number P of the packets and/or the shortest time interval T between the packets within a predetermined time;
the sleep state control module 330 is configured to control the sleep state of the electronic device after confirming the predetermined time based on whether the number P and/or the shortest time interval T satisfy a predetermined condition.
In a preferred embodiment, the data information parsing module parses the number P of data packets within a predetermined time specifically: and adjusting the dormancy 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 data information parsing module parses the number P of data packets within a predetermined time specifically: according to the number Pi of the actual received data packets of each time period counted by equally dividing the preset time into a plurality of time periods n, calculating to obtain the average number of the received data packets of each time periodAnd (3) comparing the comparison result with the threshold value, and adjusting the sleep time of the electronic equipment.
In a preferred embodiment, the data information analysis module analyzes the shortest time interval T between data packets within a predetermined time as follows: and in the preset time, the sleep time of the electronic equipment is adjusted 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 perform the data receiving method according to any one of the foregoing embodiments, and the specific execution process may refer to the explanation of the foregoing embodiments, and the data receiving apparatus provided in this embodiment may also achieve the corresponding technical effects, which are not described herein.
Examples sixteen
As shown in fig. 14, the present embodiment provides an electronic apparatus 200, the electronic apparatus 200 including:
As with sleep control device 300 of embodiment four,
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 the method comprises the steps of
A memory 12 for storing said computer program, which memory may also be a flash memory (flash). Such as application programs, functional modules, etc. implementing the methods described above.
A processor 11 for executing the computer program stored in the memory to implement the steps of the above method. Reference may be made in particular to the description of the embodiments of the method described above.
Alternatively, the memory 12 may be separate or integrated with the processor 11.
When the memory 12 is a device separate from 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 having stored therein a computer program for implementing the methods provided by the various embodiments described above when executed by a processor.
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 can 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. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). In addition, the ASIC may reside in a user device. The processor and the readable storage medium may 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, the execution instructions being executed by the at least one processor to cause the device to implement the methods provided by the various embodiments described above.
In the above embodiment of the processing device, it should be understood that the Processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), but may also be other general purpose processors, digital signal processors (english: DIGITAL SIGNAL Processor, abbreviated as DSP), application-specific integrated circuits (english: application SPECIFIC INTEGRATED Circuit, abbreviated as ASIC), and the like. 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 for execution, or in a combination of hardware and software modules in a processor for execution.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the invention.

Claims (12)

1. A sleep control method for an electronic device, comprising:
acquiring data packet information received by a port of the electronic equipment in a preset time;
Analyzing the number P of the data packets received in the preset time and the shortest time interval T between the data packets;
adjusting the time when the electronic equipment enters a sleep state based on whether the number P and the shortest time interval T meet a preset condition;
The analyzing the number P of the data packets received in the predetermined time specifically includes: 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 actual received data packets in each time period
The adjusting the time when the electronic device enters the sleep state based on whether the number P meets a predetermined condition includes: if the relation between the number P of the received data packets and the threshold value X in the preset time or in each time period is more than 0 and less than or equal to X, controlling the electronic equipment to enter dormancy after delaying for the first time; if the relation between the number P of the received data packets and the threshold value X in the preset time or the average time period is P > X, the control electronic equipment delays the second time longer than the first time and enters into dormancy.
2. The method according to claim 1, wherein said parsing the shortest time interval T between data packets received within said 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 smallest time difference between two adjacent data packets as the shortest time interval T.
3. The method of claim 2, wherein adjusting the time at which the electronic device enters the sleep state based on whether the minimum 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 more than or equal to T, enabling the electronic equipment to immediately enter into dormancy; if the relationship between the shortest time interval T between the received data packets and the time threshold T is T < T, the electronic device is delayed to enter sleep.
4.A method according to any one of claims 1 to 3, wherein: the adjusting the time when the electronic device enters the sleep state based on whether the number P and the shortest time interval T meet 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 quantity P and 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.
5. 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 in a 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 the shortest time interval T between the data packets;
A sleep state control module, configured to adjust a time when the electronic device enters a sleep state based on whether the number P and the shortest time interval T satisfy a predetermined condition;
the data packet information analysis module analyzes the number P of the data packets received in the predetermined time, specifically: 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 actual received data packets in each time period
The sleep state control module adjusts the time when the electronic device enters the sleep state based on whether the number P meets a predetermined condition: if the relation between the number P of the received data packets and the threshold value X in the preset time or in each time period is more than 0 and less than or equal to X, controlling the electronic equipment to enter dormancy after delaying for the first time; if the relation between the number P of the received data packets in the preset time or the average time period and the threshold value X is P > X, the control electronic equipment delays the second time longer than the preset first time and enters into dormancy.
6. The apparatus of claim 5, wherein the data packet information parsing module parses a shortest time interval T between data packets received in 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 smallest time difference between two adjacent data packets as the shortest time interval T.
7. The apparatus of claim 6, wherein the sleep state control module adjusts the time at which the electronic device enters the sleep state based on whether the minimum 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 more than or equal to T, enabling the electronic equipment to immediately enter into dormancy; if the relationship between the shortest time interval T between the received data packets and the time threshold T is T < T, the electronic device is delayed to enter sleep.
8. The apparatus of any one of claims 5-7, 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 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 minimum time interval T satisfy a predetermined condition, where the first sleep mode has a greater energy consumption than the second sleep mode.
9. An electronic device, comprising:
The sleep control device according to claim 5 to 8,
The port of the electronic device, and a controller and/or an operation unit that completes processing of the data packet received within the predetermined time.
10. An electronic device communication system, comprising:
The electronic device of claim 9, and a data transmission device to transmit data packets to the electronic device.
11. A processing apparatus, comprising: a memory, a processor and a computer program stored in the memory, the processor running the computer program to perform the sleep control method of any one of claims 1 to 4.
12. A readable storage medium, characterized in that a computer program is stored in the readable storage medium, which computer program, when being executed by a processor, is adapted to implement the sleep control method as claimed in any one of claims 1 to 4.
CN202010006108.7A 2020-01-03 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 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 2020-01-03 Sleep control method and device of electronic equipment and electronic equipment

Publications (2)

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

Family

ID=70786544

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN111209049B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
EP2629470A1 (en) * 2012-02-17 2013-08-21 Mitsubishi Electric R&D Centre Europe B.V. Apparatus and method for optimizing power consumption by traffic shaping in a transmission network
CN103560946A (en) * 2009-03-30 2014-02-05 英特尔公司 Enabling long-term communication idleness for energy efficiency

Family Cites Families (2)

* 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
US9244518B2 (en) * 2012-12-20 2016-01-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
CN103560946A (en) * 2009-03-30 2014-02-05 英特尔公司 Enabling long-term communication idleness for energy efficiency
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
EP2629470A1 (en) * 2012-02-17 2013-08-21 Mitsubishi Electric R&D Centre Europe B.V. Apparatus and method for optimizing power consumption by traffic shaping in a transmission network

Also Published As

Publication number Publication date
CN111209049A (en) 2020-05-29

Similar Documents

Publication Publication Date Title
EP2262327B1 (en) Method and apparatus for managing power of wlan module in portable terminal
US9100917B1 (en) Power save modes for a system-on-chip and a host processor of a wireless device
JP5648670B2 (en) Wireless device for saving power and method for saving power of a wireless device
JP5900760B2 (en) Power management method and apparatus for network access module
US8989096B2 (en) Application-aware radio power saving
JP5010724B2 (en) Method and apparatus for adjusting duty cycle to save power in a computing system
JP5362858B2 (en) Network adapter, system and method enabling long-term communication standby for energy efficiency
CN105813179B (en) Method, device and equipment for waking up equipment in batch
WO2018076988A1 (en) Wakeup method and apparatus
CA2531384A1 (en) Handling broadcast and multicast traffic as unicast traffic in a wireless network
EP3520499B1 (en) Power management techniques for wirelessly-interconnected devices
KR20160132422A (en) System and method for providing dynamic clock and voltage scaling (dcvs) aware interprocessor communication
CN101146004A (en) Electronic apparatus and wireless communication control method
US20180032291A1 (en) Electronic apparatus, wireless communication device, and power control method
WO2013189292A1 (en) Awakening and hot-plugging method based on high speed inter-chip (hsic) and device for same
CN109413723A (en) A kind of power consumption control method and device
CN111209049B (en) Sleep control method and device of electronic equipment and electronic equipment
US20180288702A1 (en) Dynamic power saving mode and configuration changing based on traffic pattern
KR20190129219A (en) Method And Apparatus for Providing Power Saving Optimization
KR20050065394A (en) Method and apparatus for reducing memory current leakage in a mobile device
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
JP2020078003A (en) Communication device, control method, and program
Agarwal et al. On demand paging using Bluetooth radios on 802.11 based networks
CN116610204B (en) Power management method, system, electronic equipment and medium for electric equipment

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
GR01 Patent grant