[go: up one dir, main page]

CN109149673A - A kind of method, charger, server and system for realizing charging - Google Patents

A kind of method, charger, server and system for realizing charging Download PDF

Info

Publication number
CN109149673A
CN109149673A CN201710500790.3A CN201710500790A CN109149673A CN 109149673 A CN109149673 A CN 109149673A CN 201710500790 A CN201710500790 A CN 201710500790A CN 109149673 A CN109149673 A CN 109149673A
Authority
CN
China
Prior art keywords
terminal
power
charging
charger
server
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.)
Pending
Application number
CN201710500790.3A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile Communication Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communication 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 China Mobile Communications Group Co Ltd, China Mobile Communication Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710500790.3A priority Critical patent/CN109149673A/en
Publication of CN109149673A publication Critical patent/CN109149673A/en
Pending legal-status Critical Current

Links

Classifications

    • H02J7/0003
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

本发明提供了一种实现充电的方法、充电器、服务器和系统,方法包括:在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;通过第一通讯连接获取充电器的状态,通过第二通讯连接获取来自终端的电池电量消息;根据所述充电器的状态和所述电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。服务器根据接收到的终端的电池电量消息,结合目前该终端所对应的充电器的状态判断当前终端是否需要进行充电或者断电的操作,从而对充电器下发充电或断电指令,节省能源,保护了终端电路。

The present invention provides a method, charger, server and system for realizing charging. The method includes: establishing a first communication connection between the charger and the server, establishing a second communication connection between the terminal and the server; Connect to obtain the status of the charger, and obtain the battery power message from the terminal through the second communication connection; according to the status of the charger and the battery power message, issue a charging command or a power-off command to the charger, and the The charger performs charging or power-off operations according to the charging instruction or the power-off instruction. The server judges whether the current terminal needs to perform charging or power-off operation according to the received battery power information of the terminal and the current state of the charger corresponding to the terminal, so as to issue a charging or power-off command to the charger to save energy. The terminal circuit is protected.

Description

一种实现充电的方法、充电器、服务器和系统A method, charger, server and system for realizing charging

技术领域technical field

本发明涉及自动充电技术,特别是指一种实现充电的方法、充电器、服务器和系统。The present invention relates to automatic charging technology, in particular to a method, charger, server and system for realizing charging.

背景技术Background technique

随着智能终端的普及,无人值守模式的智能终端广泛应用于移动应用测试、网络测试和智能家居等各种场景,智能终端可以不依赖人类操作来执行各类任务。于此同时,如何在无人值守场景中为智能终端充电的问题亟待解决。传统的充电方式有两种:With the popularity of smart terminals, unattended smart terminals are widely used in various scenarios such as mobile application testing, network testing, and smart homes. Smart terminals can perform various tasks without relying on human operations. At the same time, the problem of how to charge the smart terminal in an unattended scene needs to be solved urgently. There are two traditional charging methods:

终端一直保持电源接通状态,当终端电池充满电后无任何操作。虽然实现简单,不需要人为干预,但是终端电池充满电后继续保持持续充电状态,这会造成能源浪费且对终端电池损害较大,并且持续充电会导致智能终端持续放热,形成安全隐患。The terminal remains powered on and does not operate when the terminal battery is fully charged. Although the implementation is simple and does not require human intervention, the terminal battery will continue to be continuously charged after it is fully charged, which will cause energy waste and greater damage to the terminal battery, and continuous charging will cause the smart terminal to continue to release heat, causing a potential safety hazard.

智能终端接通电源后,定期人为观察是否充满电,如果电量已满,则手动断开电源以保护终端电池;终端电源断开后,定期人为观察终端电量是否不足,如果不足,则手动接通终端电源进行充电。虽然从一定程度上消除了安全隐患,但是由于需要人为干预,人工成本过高,并且不一定能及时准确的发现终端已经充满电或需要充电,当终端数量达到一定规模后,改技术仍然无法实现;此外,需要频繁插拔充电线,影响了终端中充电器件的寿命。After the smart terminal is powered on, regularly observe whether it is fully charged. If the power is full, manually disconnect the power to protect the terminal battery; after the terminal is powered off, regularly observe whether the terminal power is insufficient, and if it is insufficient, manually turn it on terminal power supply for charging. Although the potential safety hazards are eliminated to a certain extent, due to the need for human intervention, the labor cost is too high, and it may not be possible to timely and accurately find that the terminal is fully charged or needs to be charged. When the number of terminals reaches a certain scale, the technology cannot be changed. ; In addition, the charging cable needs to be plugged and unplugged frequently, which affects the life of the charging device in the terminal.

发明内容SUMMARY OF THE INVENTION

本发明实施例要解决的技术问题是提供一种实现充电的方法、充电器、服务器和系统,用以根据获取自终端的电池电量消息,对充电器下发充电或断电指令,保护终端电路。The technical problem to be solved by the embodiments of the present invention is to provide a method, a charger, a server and a system for realizing charging, so as to issue a charging or power-off command to the charger according to the battery power information obtained from the terminal, so as to protect the terminal circuit .

为解决上述技术问题,本发明实施例提供的一种实现充电的方法,应用于服务器,方法包括:In order to solve the above technical problem, a method for implementing charging provided by an embodiment of the present invention is applied to a server, and the method includes:

在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;establishing a first communication connection between the charger and the server, and establishing a second communication connection between the terminal and the server;

通过第一通讯连接获取充电器的状态,通过第二通讯连接获取来自终端的电池电量消息;Obtain the status of the charger through the first communication connection, and obtain the battery power information from the terminal through the second communication connection;

根据所述充电器的状态和所述电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。According to the state of the charger and the battery power information, a charging instruction or a power-off instruction is issued to the charger, and the charger performs a charging or power-off operation according to the charging instruction or the power-off instruction.

所述的方法中,In the method described,

在充电器和服务器之间建立第一通讯连接包括:通过有线和/或无线的方式建立第一通讯连接;Establishing the first communication connection between the charger and the server includes: establishing the first communication connection in a wired and/or wireless manner;

在终端和服务器之间建立第二通讯连接包括:通过有线和/或无线的方式建立第二通讯连接。Establishing the second communication connection between the terminal and the server includes: establishing the second communication connection in a wired and/or wireless manner.

所述的方法中,在充电器和服务器之间建立第一通讯连接包括:In the method, establishing the first communication connection between the charger and the server includes:

当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在每一个所述充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging sub-unit in the charger, and the terminal is charged by the charging sub-unit, a first communication connection is established and maintained between each of the charging sub-units and the server.

所述的方法中,通过第二通讯连接接收来自终端的电池电量消息包括:In the method, receiving the battery level message from the terminal through the second communication connection includes:

当终端周期性上报电量时选择:When the terminal periodically reports power, select:

由终端确定电量上报周期,并根据所述电量上报周期接收由终端上报的所述电池电量消息;The terminal determines the power reporting period, and receives the battery power message reported by the terminal according to the power reporting period;

或者,确定终端的电量上报周期并发送到终端,由终端根据服务器下发的所述电量上报周期周期性上报所述电池电量消息;Or, determine the power reporting period of the terminal and send it to the terminal, and the terminal periodically reports the battery power message according to the power reporting period sent by the server;

或者,周期性获取终端的电池电量消息。Or, periodically acquire the battery level information of the terminal.

所述的方法中,通过第二通讯连接接收来自终端的电池电量消息包括:In the method, receiving the battery level message from the terminal through the second communication connection includes:

当终端非周期性上报电量时选择:When the terminal reports power aperiodically, select:

请求终端上报所述电池电量消息;requesting the terminal to report the battery level message;

或者,接收终端主动上报的所述电池电量消息。Or, receive the battery level message actively reported by the terminal.

所述的方法中,根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令包括:In the method, according to the state of the charger and the battery power information, issuing a charging instruction or a power-off instruction to the charger includes:

当终端处于充电状态,且电池电量高于电量上限D1时,根据终端上报的电池电量消息以及充电器的状态决定进行断电操作,向所述充电器下发断电指令;When the terminal is in a charging state and the battery power is higher than the upper limit D1 of the power, the power-off operation is determined according to the battery power message reported by the terminal and the state of the charger, and a power-off command is sent to the charger;

当终端处于断电状态,且电池电量低于电量下限D2时,根据终端上报的电池电量消息以及充电器的状态决定进行充电操作,向所述充电器下发充电指令。When the terminal is in a power-off state and the battery power is lower than the power lower limit D2, the charging operation is determined according to the battery power message reported by the terminal and the state of the charger, and a charging instruction is sent to the charger.

所述的方法中,还包括进入强制断电模式,包括:The method further includes entering a forced power-off mode, including:

收到来自终端的强制断电的请求,向终端下发强制断电指令,由终端根据所述强制断电指令进入强制断电模式;Receive a forced power-off request from the terminal, issue a forced power-off instruction to the terminal, and the terminal enters the forced power-off mode according to the forced power-off instruction;

服务器直接向充电器下发强制断电指令,由充电器停止向终端进行充电。The server directly sends a forced power-off command to the charger, and the charger stops charging the terminal.

所述的方法中,还包括退出强制断电模式,包括:The method further includes exiting the forced power-off mode, including:

收到来自终端的退出强制断电模式请求,指示终端退出强制断电模式;Receive a request from the terminal to exit the forced power-off mode, instructing the terminal to exit the forced-power-off mode;

或者,or,

当终端电量到达电量下限D2时,由终端自动退出强制断电模式。When the power of the terminal reaches the lower limit of power D2, the terminal automatically exits the forced power-off mode.

所述的方法中,还包括进入强制充电模式,包括:The method further includes entering a forced charging mode, including:

收到来自终端的强制充电的请求,向终端下发强制充电指令,由终端根据所述强制充电指令进入强制充电模式;Receive a forced charging request from the terminal, issue a forced charging instruction to the terminal, and the terminal will enter the forced charging mode according to the forced charging instruction;

服务器直接向充电器下发强制充电指令,由充电器向终端进行强制充电。The server directly issues a forced charging instruction to the charger, and the charger performs forced charging to the terminal.

所述的方法中,还包括退出强制充电模式,包括:The method further includes exiting the forced charging mode, including:

收到来自终端的退出强制充电模式请求,指示终端退出强制充电模式;Receive a request from the terminal to exit the forced charging mode, instructing the terminal to exit the forced charging mode;

或者,or,

当终端电量到达电量上限D1时,由终端自动退出强制充电模式。When the terminal power reaches the power upper limit D1, the terminal automatically exits the forced charging mode.

一种实现充电的服务器,包括:A server for realizing charging, including:

通讯连接单元,用于在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;a communication connection unit, used for establishing a first communication connection between the charger and the server, and establishing a second communication connection between the terminal and the server;

信息处理单元,用于通过第一通讯连接获取充电器的状态,通过第二通讯连接获取终端的电池电量消息;an information processing unit, configured to obtain the status of the charger through the first communication connection, and obtain the battery power information of the terminal through the second communication connection;

充断电指令单元,用于根据所述充电器的状态和所述电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。A charging and power-off command unit, configured to issue a charging command or a power-off command to the charger according to the state of the charger and the battery power message, and the charger will send a charging command or a power-off command according to the charging command or the power-off command Perform charging or power-off operations.

一种实现充电的服务器,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序;其特征在于,所述处理器执行所述程序时实现:A server for implementing charging, comprising a memory, a processor, and a computer program stored on the memory and running on the processor; characterized in that, when the processor executes the program, it realizes:

在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;establishing a first communication connection between the charger and the server, and establishing a second communication connection between the terminal and the server;

通过第一通讯连接获取充电器的状态,通过第二通讯连接获取来自终端的电池电量消息;Obtain the status of the charger through the first communication connection, and obtain the battery power information from the terminal through the second communication connection;

根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。According to the state of the charger and the battery level information, a charging instruction or a power-off instruction is issued to the charger, and the charger performs a charging or power-off operation according to the charging instruction or the power-off instruction.

所述的服务器中,in the server,

在充电器和服务器之间建立第一通讯连接包括:通过有线和/或无线的方式建立第一通讯连接;Establishing the first communication connection between the charger and the server includes: establishing the first communication connection in a wired and/or wireless manner;

在终端和服务器之间建立第二通讯连接包括:通过有线和/或无线的方式建立第二通讯连接。Establishing the second communication connection between the terminal and the server includes: establishing the second communication connection in a wired and/or wireless manner.

所述的服务器中,在充电器和服务器之间建立第一通讯连接包括:In the server, establishing the first communication connection between the charger and the server includes:

当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在每一个所述充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging sub-unit in the charger, and the terminal is charged by the charging sub-unit, a first communication connection is established and maintained between each of the charging sub-units and the server.

所述的服务器中,通过第二通讯连接接收来自终端的电池电量消息包括:In the server, receiving the battery level message from the terminal through the second communication connection includes:

当终端周期性上报电量时选择:When the terminal periodically reports power, select:

由终端确定电量上报周期,并根据所述电量上报周期接收由终端上报的所述电池电量消息;The terminal determines the power reporting period, and receives the battery power message reported by the terminal according to the power reporting period;

或者,确定终端的电量上报周期并发送到终端,由终端根据服务器下发的所述电量上报周期周期性上报所述电池电量消息;Or, determine the power reporting period of the terminal and send it to the terminal, and the terminal periodically reports the battery power message according to the power reporting period sent by the server;

或者,周期性获取终端的电池电量消息。Or, periodically acquire the battery level information of the terminal.

所述的服务器中,通过第二通讯连接接收来自终端的电池电量消息包括:In the server, receiving the battery level message from the terminal through the second communication connection includes:

当终端非周期性上报电量时选择:When the terminal reports power aperiodically, select:

请求终端上报所述电池电量消息;requesting the terminal to report the battery level message;

或者,接收终端主动上报的所述电池电量消息。Or, receive the battery level message actively reported by the terminal.

所述的服务器中,根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令包括:In the server, according to the state of the charger and the battery power information, sending a charging instruction or a power-off instruction to the charger includes:

当终端处于充电状态,且电池电量高于电量上限D1时,根据终端上报的电池电量消息以及充电器的状态决定进行断电操作,向所述充电器下发断电指令;When the terminal is in a charging state and the battery power is higher than the upper limit D1 of the power, the power-off operation is determined according to the battery power message reported by the terminal and the state of the charger, and a power-off command is sent to the charger;

当终端处于断电状态,且电池电量低于电量下限D2时,根据终端上报的电池电量消息以及充电器的状态决定进行充电操作,向所述充电器下发充电指令。When the terminal is in a power-off state and the battery power is lower than the power lower limit D2, the charging operation is determined according to the battery power message reported by the terminal and the state of the charger, and a charging instruction is sent to the charger.

所述的服务器中,处理器执行所述程序时还包括实现:进入强制断电模式:In the server, when the processor executes the program, it further includes implementing: entering a forced power-off mode:

收到来自终端的强制断电的请求,向终端下发强制断电指令,由终端根据所述强制断电指令进入强制断电模式;Receive a forced power-off request from the terminal, issue a forced power-off instruction to the terminal, and the terminal enters the forced power-off mode according to the forced power-off instruction;

服务器直接向充电器下发强制断电指令,由充电器停止向终端进行充电。The server directly sends a forced power-off command to the charger, and the charger stops charging the terminal.

所述的服务器中,还包括退出强制断电模式,包括:The server also includes exiting the forced power-off mode, including:

收到来自终端的退出强制断电模式请求,指示终端退出强制断电模式;Receive a request from the terminal to exit the forced power-off mode, instructing the terminal to exit the forced-power-off mode;

或者,or,

当终端电量到达电量下限D2时,由终端自动退出强制断电模式。When the power of the terminal reaches the lower limit of power D2, the terminal automatically exits the forced power-off mode.

所述的服务器中,处理器执行所述程序时还包括实现:进入强制充电模式:In the server, when the processor executes the program, it further includes implementing: entering a forced charging mode:

收到来自终端的强制充电的请求,向终端下发强制充电指令,由终端根据所述强制充电指令进入强制充电模式;Receive a forced charging request from the terminal, issue a forced charging instruction to the terminal, and the terminal will enter the forced charging mode according to the forced charging instruction;

服务器直接向充电器下发强制充电指令,由充电器向终端进行强制充电。The server directly issues a forced charging instruction to the charger, and the charger performs forced charging to the terminal.

所述的服务器中,处理器执行所述程序时还包括:退出强制充电模式:In the server, when the processor executes the program, it further includes: exiting the forced charging mode:

收到来自终端的退出强制充电模式请求,指示终端退出强制充电模式;Receive a request from the terminal to exit the forced charging mode, instructing the terminal to exit the forced charging mode;

或者,or,

当终端电量到达电量上限D1时,由终端自动退出强制充电模式。When the terminal power reaches the power upper limit D1, the terminal automatically exits the forced charging mode.

一种实现充电的方法,应用于充电器,方法包括:A method for realizing charging, applied to a charger, comprising:

在充电器和服务器之间建立第一通讯连接;establishing a first communication connection between the charger and the server;

根据来自服务器的充电指令或断电指令执行充电或者断电的操作,其中,所述充电指令或断电指令由服务器根据通过第一通讯连接获取充电器的状态,通过与终端的第二通讯连接接收来自终端的电池电量消息之后,根据所述充电器的状态和电池电量消息生成,并向所述充电器下发。The operation of charging or powering off is performed according to the charging instruction or the power-off instruction from the server, wherein the charging instruction or the power-off instruction is obtained by the server according to the state of the charger obtained through the first communication connection, and the second communication connection with the terminal is performed by the server. After receiving the battery level message from the terminal, it is generated according to the state of the charger and the battery level message, and sent to the charger.

所述的方法中,在充电器和服务器之间建立第一通讯连接包括:In the method, establishing the first communication connection between the charger and the server includes:

通过有线和/或无线的方式建立第一通讯连接;establish a first communication connection by wired and/or wireless means;

当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在充电器的每一个充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging subunit in the charger, and the terminal is charged by the charging subunit, a first communication connection is established and maintained between each charging subunit of the charger and the server.

一种实现充电的充电器,包括:A charger for realizing charging, including:

通讯连接单元,用于在充电器和服务器之间建立第一通讯连接;a communication connection unit for establishing a first communication connection between the charger and the server;

指令执行单元,用于根据来自服务器的充电指令或断电指令执行充电或者断电的操作;其中,所述充电指令或断电指令由服务器根据通过第一通讯连接获取充电器的状态,通过与终端的第二通讯连接接收来自终端的电池电量消息之后,根据所述充电器的状态和电池电量消息生成所述充电指令或断电指令,并向所述充电器下发。The instruction execution unit is used to perform the operation of charging or powering off according to the charging instruction or the power-off instruction from the server; wherein, the charging instruction or the power-off instruction is obtained by the server according to the state of the charger through the first communication connection, and the charging instruction or power-off instruction is obtained by the server. After receiving the battery level message from the terminal, the second communication connection of the terminal generates the charging instruction or the power-off instruction according to the state of the charger and the battery level message, and sends it to the charger.

一种自动充电的系统,包括:至少一个终端,充电器,以及,实现充电的服务器。An automatic charging system includes: at least one terminal, a charger, and a server for realizing charging.

一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现应用于服务器的实现充电的方法中的步骤;A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements steps in a method for implementing charging applied to a server;

或者,该计算机程序被处理器执行时实现应用于充电器的实现充电的方法中的步骤。Alternatively, the computer program, when executed by the processor, implements the steps in the method for implementing charging applied to the charger.

与现有技术相比,本发明实施例提供的一种实现充电的方法、充电器、服务器和系统,至少具有以下有益效果:服务器根据接收到的终端的电池电量消息,结合目前该终端所对应的充电器的状态判断当前终端是否需要进行充电或者断电的操作,从而对充电器下发充电或断电指令,节省能源,保护了终端的电路,同时可以解决在某些场景下需要去除充电所引起的电磁干扰的问题。Compared with the prior art, a method, a charger, a server and a system for realizing charging provided by the embodiments of the present invention have at least the following beneficial effects: the server according to the received battery power information of the terminal, combined with the current corresponding to the terminal The state of the charger determines whether the current terminal needs to be charged or powered off, so as to issue a charging or power off command to the charger, save energy, protect the circuit of the terminal, and solve the need to remove charging in some scenarios. caused by electromagnetic interference.

附图说明Description of drawings

图1为一种自动充电的工作原理示意图;Fig. 1 is a schematic diagram of the working principle of automatic charging;

图2为一种实现充电的方法流程示意图;2 is a schematic flowchart of a method for realizing charging;

图3为终端侧周期上报终端电池电量流程图;Fig. 3 is a flow chart of the terminal side periodically reporting the terminal battery power;

图4为服务器侧周期上报终端电池电量流程图;Fig. 4 is a flow chart of the server side periodically reporting the terminal battery power;

图5为终端侧周期上报终端电池电量流程图;Fig. 5 is a flow chart of the terminal side periodically reporting the terminal battery power;

图6为终端侧周期上报终端电池电量流程图;FIG. 6 is a flow chart of the terminal side periodically reporting the terminal battery power;

图7为非周期性上报终端电池电量流程图;Fig. 7 is a flow chart of aperiodically reporting terminal battery power;

图8为非周期性上报终端电池电量流程图;Fig. 8 is a flow chart of aperiodically reporting terminal battery power;

图9为断电过程流程图;Figure 9 is a flow chart of the power-off process;

图10为充电过程流程图;Figure 10 is a flowchart of the charging process;

图11为应用场景示意图;Figure 11 is a schematic diagram of an application scenario;

图12为一种实现充电的服务器结构示意图;12 is a schematic structural diagram of a server for realizing charging;

图13为一种实现充电的服务器的结构示意图。FIG. 13 is a schematic structural diagram of a server implementing charging.

具体实施方式Detailed ways

为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。在下面的描述中,提供诸如具体的配置和组件的特定细节仅仅是为了帮助全面理解本发明的实施例。因此,本领域技术人员应该清楚,可以对这里描述的实施例进行各种改变和修改而不脱离本发明的范围和精神。另外,为了清楚和简洁,省略了对已知功能和构造的描述。In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, the following will be described in detail with reference to the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided merely to assist in a comprehensive understanding of embodiments of the present invention. Accordingly, it should be apparent to those skilled in the art that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.

本发明提供了自动充电的技术,如图1所示,终端连接充电器及服务器,通过终端与服务器交互以及充电器与服务器交互实现终端的自动充断电。The present invention provides an automatic charging technology. As shown in FIG. 1 , the terminal is connected to the charger and the server, and the terminal is automatically charged and powered off through the interaction between the terminal and the server and the interaction between the charger and the server.

本发明实施例提供了一种实现充电的方法,如图2所示,应用于服务器,方法包括:An embodiment of the present invention provides a method for implementing charging, as shown in FIG. 2 , which is applied to a server, and the method includes:

步骤21,在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;Step 21, establishing a first communication connection between the charger and the server, and establishing a second communication connection between the terminal and the server;

步骤22,通过第一通讯连接获取充电器的状态,通过第二通讯连接接收来自终端的电池电量消息;Step 22, obtaining the status of the charger through the first communication connection, and receiving the battery level message from the terminal through the second communication connection;

步骤23,根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。Step 23: According to the state of the charger and the battery power information, a charging instruction or a power-off instruction is sent to the charger, and the charger performs the charging or power-off operation according to the charging instruction or the power-off instruction .

应用本发明实施例提供的技术,服务器根据接收到的终端的电池电量消息,结合目前该终端所对应的充电器的状态判断当前终端是否需要进行充电或者断电的操作,从而对充电器下发充电或断电指令,节省能源,保护了终端电路,同时可以解决在某些场景下需要去除充电所引起的电磁干扰的问题。By applying the technology provided by the embodiment of the present invention, the server judges whether the current terminal needs to perform charging or power-off operation according to the received battery power information of the terminal and the current state of the charger corresponding to the terminal, so as to deliver the battery power to the charger. The charging or power-off command saves energy, protects the terminal circuit, and can solve the problem of electromagnetic interference caused by charging in some scenarios.

充电器包括多个充电子单元,在一个优选实施例中,终端与充电器电连接进行充电包括:The charger includes a plurality of charging sub-units. In a preferred embodiment, the electrical connection between the terminal and the charger for charging includes:

终端与充电器中的一个充电子单元进行电连接,进行充电。The terminal is electrically connected to a charging sub-unit in the charger for charging.

充电器为每一个终端分配一个单独的子单元,即每一个终端对应充电器的一个子单元,服务器可以对每一个充电子单元进行独立控制,以便根据不同终端的不同状态进行单独的充断电操作。The charger allocates a separate sub-unit to each terminal, that is, each terminal corresponds to a sub-unit of the charger, and the server can independently control each charging sub-unit, so as to perform separate charging and discharging according to the different states of different terminals operate.

在一个优选实施例中,在充电器和服务器之间建立第一通讯连接包括:通过有线和/或无线的方式建立第一通讯连接;In a preferred embodiment, establishing the first communication connection between the charger and the server includes: establishing the first communication connection in a wired and/or wireless manner;

在终端和服务器之间建立第二通讯连接包括:通过有线和/或无线的方式建立第二通讯连接。Establishing the second communication connection between the terminal and the server includes: establishing the second communication connection in a wired and/or wireless manner.

在一个优选实施例中,在充电器和服务器之间建立第一通讯连接包括:In a preferred embodiment, establishing the first communication connection between the charger and the server includes:

当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在充电器的每一个充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging subunit in the charger, and the terminal is charged by the charging subunit, a first communication connection is established and maintained between each charging subunit of the charger and the server.

根据接收到的终端电池电量消息,结合目前该终端所对应的充电子单元的状态判断当前终端是否需要进行充电或者断电的操作,从而对充电器的每一个子单元下发充电或断电指令。不会受终端数量限制,节省能源,保护终端电路。According to the received terminal battery power information, combined with the current state of the charging sub-unit corresponding to the terminal, it is judged whether the current terminal needs to perform charging or power-off operation, so as to issue a charging or power-off command to each sub-unit of the charger . It will not be limited by the number of terminals, save energy and protect the terminal circuit.

在本申请的实施例中涉及到了如何获取终端电量。终端通过有线和/或无线的方式连接服务器,每个终端周期或非周期向服务器上报终端电池电量,服务器根据终端电量执行相应的操作。以下对于服务器周期、非周期获取终端的电池电量进行描述。The embodiments of this application relate to how to obtain the terminal power. The terminal is connected to the server in a wired and/or wireless manner, each terminal periodically or aperiodically reports the terminal battery power to the server, and the server performs corresponding operations according to the terminal power. The following describes the periodic and aperiodic acquisition of the battery power of the terminal by the server.

终端周期性向服务器上报电池电量消息有多种实现方式,在一个优选实施例中,步骤22中,通过第二通讯连接接收来自终端的电池电量消息包括:There are multiple implementations for the terminal to periodically report the battery level message to the server. In a preferred embodiment, in step 22, receiving the battery level message from the terminal through the second communication connection includes:

当终端周期性上报电量时选择:When the terminal periodically reports power, select:

方式一,如图3、图4所示,由终端确定电量上报周期T1,并根据所述电量上报周期接收由终端上报的所述电池电量消息;这其中:Mode 1, as shown in FIG. 3 and FIG. 4 , the terminal determines the power reporting period T1, and receives the battery power message reported by the terminal according to the power reporting period; wherein:

方式二,如图5、图6所示,或者,确定终端的电量上报周期并发送到终端,由终端根据服务器下发的电量上报周期进行周期性上报;Mode 2, as shown in Figure 5 and Figure 6, or, determine the power reporting period of the terminal and send it to the terminal, and the terminal performs periodic reporting according to the power reporting period sent by the server;

以及,方式三,或者,周期性获取终端的电池电量消息。And, in the third way, or, periodically acquiring the battery power information of the terminal.

这其中,方式一中,终端的流程如图3所示,服务器的流程如图4所示,终端确定电量上报周期并上报服务器包括:Among them, in the first mode, the process of the terminal is shown in Figure 3, and the process of the server is shown in Figure 4. The terminal determines the power reporting period and reports it to the server, including:

在终端一侧,终端内置应用确定电量上报周期T1,可以选择将该电量上报周期T1上报给服务器或不上报服务器,如果终端将电量上报周期T1上报服务器,则向服务器发送终端电池电量上报周期消息Y2,服务器选择按照该周期T1接收相应终端的终端电池电量上报周期消息Y2,此后,终端以电量上报周期T1为周期,周期性的发送电池电量消息Y1;On the terminal side, the built-in application of the terminal determines the power reporting period T1, and can choose to report the power reporting period T1 to the server or not to the server. If the terminal reports the power reporting period T1 to the server, it sends a terminal battery power reporting period message to the server. Y2, the server selects to receive the terminal battery power reporting period message Y2 of the corresponding terminal according to the period T1, after that, the terminal periodically sends the battery power message Y1 with the power reporting period T1 as the period;

如果终端没有将电量上报周期T1通过终端电池电量上报周期消息Y2上报,则以电量上报周期T1为周期,周期性的发送电池电量消息Y1,此后,执行其余的功能步骤。服务器采取实时监听的方式接收电池电量消息Y1。If the terminal does not report the power reporting period T1 through the terminal battery power reporting period message Y2, the terminal sends the battery power message Y1 periodically with the power reporting period T1 as the period, and then executes the remaining functional steps. The server receives the battery level message Y1 by monitoring in real time.

方式二,终端侧和服务器侧的流程分别如图5和图6所示,服务器确定终端电量上报周期并发送到终端包括:Mode 2, the processes on the terminal side and the server side are shown in Figure 5 and Figure 6 respectively. The server determines the terminal power reporting period and sends it to the terminal, including:

终端一侧,接收服务器发送的终端电池电量上报周期消息Y3,如果终端已经接到了终端电池电量上报周期消息Y3,则根据所述终端电池电量上报周期消息Y3,以周期T2向服务器发送电池电量消息Y4,否则,向服务器请求终端电池电量上报周期消息Y3。The terminal side receives the terminal battery power reporting period message Y3 sent by the server. If the terminal has received the terminal battery power reporting period message Y3, it sends a battery power message to the server with a period T2 according to the terminal battery power reporting period message Y3. Y4, otherwise, request the terminal battery power reporting period message Y3 to the server.

服务器一侧,确定电池电量上报周期T2,向终端发送终端电池电量上报周期指示消息Y3,以电池电量上报周期T2来监听终端电池电量消息Y4。The server side determines the battery power reporting period T2, sends a terminal battery power reporting period indication message Y3 to the terminal, and monitors the terminal battery power message Y4 with the battery power reporting period T2.

通过有线和/或无线的方式下发给特定终端其上报电量的周期T2,终端根据服务器下发的电池电量上报周期T2周期性上报电量。The period T2 for reporting the power is sent to a specific terminal in a wired and/or wireless manner, and the terminal periodically reports the power according to the period T2 for reporting the power of the battery sent by the server.

需要注意的是:在方式一和方式二中,不同的终端均可以配置不同的上报周期。It should be noted that: in the first mode and the second mode, different terminals can be configured with different reporting periods.

方式三,服务器周期获取终端的电池电量包括:The third method, the server periodically obtains the battery power of the terminal includes:

服务器确定终端上报电池电量的上报周期T1,但是不下发到终端,而是按照该周期T1,向终端发送电池电量上报请求来周期性获取终端电量,终端接收到服务器下发的电池电量上报请求后上报其电池电量。The server determines the reporting period T1 for the terminal to report the battery power, but does not send it to the terminal. Instead, it sends a battery power reporting request to the terminal according to this period T1 to periodically obtain the terminal power. After the terminal receives the battery power reporting request sent by the server Report its battery level.

终端非周期性上报电量方式也有多种实现方式,在一个优选实施例中,通过第二通讯连接接收来自终端的电池电量消息包括:There are also multiple implementation manners for the terminal to report the battery level aperiodically. In a preferred embodiment, receiving the battery level message from the terminal through the second communication connection includes:

当终端非周期性上报电量时选择:When the terminal reports power aperiodically, select:

如图7所示,服务器请求终端上报电池电量消息;As shown in Figure 7, the server requests the terminal to report the battery level message;

如图8所示,或者,接收终端主动上报的电池电量消息。As shown in FIG. 8 , or, the battery power message actively reported by the terminal is received.

这其中,如图7所示,服务器请求终端上报包括:Among them, as shown in Figure 7, the server requesting the terminal to report includes:

服务器根据需要下发终端电池电量上报请求Y5,终端接收到服务器下发的终端电池电量上报请求Y5之后,向服务器发送其电池电量消息Y6,服务器接收电池电量消息Y6。The server sends the terminal battery power report request Y5 as needed. After receiving the terminal battery power report request Y5 sent by the server, the terminal sends its battery power message Y6 to the server, and the server receives the battery power message Y6.

如图8所示,终端主动上报电池电量包括:当终端满足一定条件时,判断需要上报电池电量,终端向服务器发送其电池电量消息Y7,服务器接收电池电量消息Y7,并执行后续功能。As shown in FIG. 8 , the terminal actively reporting battery power includes: when the terminal meets certain conditions, judging that the battery power needs to be reported, the terminal sends its battery power message Y7 to the server, and the server receives the battery power message Y7 and executes subsequent functions.

终端周期性与非周期性相结合上报终端电池电量的方式:为了减少终端与服务器之间的交互,在终端电池电量高于某一门限值时,由于此时电池电量较高,没有必要频繁进行电量上报,所以在高于某一门限值时,终端可以选择不上报电量或者将上报周期加长,以减少与服务器间的交互。Combining periodic and aperiodic reporting of terminal battery power: In order to reduce the interaction between the terminal and the server, when the terminal battery power is higher than a certain threshold, because the battery power is relatively high at this time, it is not necessary to frequently The power level is reported, so when it is higher than a certain threshold, the terminal can choose not to report the power level or lengthen the reporting period to reduce the interaction with the server.

服务器进行充断电操作,服务器根据接收到的终端电池电量消息,结合目前该终端所对应的充电子单元的状态判断当前终端是否需要进行充电或者断电的操作,从而对充电器的每一个子单元下发充电或断电指令。The server performs charging and power-off operations. The server judges whether the current terminal needs to perform charging or power-off operations according to the received terminal battery power information and the current state of the charging sub-unit corresponding to the terminal. The unit issues charging or power-off commands.

为了保护终端电池,在一个优选实施例中,步骤23,根据所述电池电量消息和充电器的状态,向所述充电器下发充电指令或断电指令,包括:In order to protect the terminal battery, in a preferred embodiment, step 23, according to the battery level message and the state of the charger, issue a charging instruction or a power-off instruction to the charger, including:

本发明中,服务器可以支持对每一个终端的充放电进行独立控制。In the present invention, the server can support independent control of the charging and discharging of each terminal.

具体而言,由于,充电器为每一个终端分配一个单独的子单元,即每一个终端对应充电器的一个子单元,服务器可以对每一个充电子单元进行独立控制,以便根据不同终端的不同状态进行单独的充断电操作,因此:Specifically, since the charger allocates a separate sub-unit to each terminal, that is, each terminal corresponds to a sub-unit of the charger, the server can independently control each charging sub-unit, so that according to the different states of different terminals Perform separate charging and discharging operations, so:

当终端处于充电状态,且终端电池电量高于电量上限D1时,服务器根据终端上报的电池电量消息Y1及充电子单元充电器的状态决定对充电子单元进行断电操作;When the terminal is in a charging state and the battery power of the terminal is higher than the upper limit of power D1, the server decides to power off the charging sub-unit according to the battery power message Y1 reported by the terminal and the state of the charging sub-unit charger;

而当终端处于断电状态,充电子单元未对终端进行充电,且终端电池消耗到低于电量下限D2时,根据终端上报的电池电量消息Y1及终端所对应的充电子单元的状态决定对终端进行充电操作,即,服务器控制相应的充电子单元进行充电操作。When the terminal is in a power-off state, the charging sub-unit does not charge the terminal, and the battery of the terminal is consumed below the lower limit D2 of power, the terminal decides whether to charge the terminal according to the battery power message Y1 reported by the terminal and the state of the charging sub-unit corresponding to the terminal. The charging operation is performed, that is, the server controls the corresponding charging sub-unit to perform the charging operation.

为了详细描述本发明的发明思想,以下,在不同的实施例中,分别对断电过程、充电过程进行描述。In order to describe the inventive idea of the present invention in detail, in the following, in different embodiments, the power-off process and the charging process are respectively described.

关于断电过程,服务器对终端n进行断电操作的条件为:充电子单元n处于充电状态;终端电池电量达到电量上限D1。Regarding the power-off process, the conditions for the server to perform a power-off operation on the terminal n are: the charging sub-unit n is in a charging state; and the terminal battery power reaches the power upper limit D1.

在一个优选实施例中,步骤23,根据所述电池电量消息和充电器的状态,向所述充电器下发充电指令或断电指令,包括:In a preferred embodiment, step 23, according to the battery level message and the state of the charger, issue a charging instruction or a power-off instruction to the charger, including:

如图9所示,当终端处于充电状态,且电池电量高于电量上限D1时,根据终端上报的电池电量消息以及充电器的状态决定进行断电操作,向所述充电器下发断电指令;As shown in FIG. 9 , when the terminal is in a charging state and the battery level is higher than the upper limit D1 of the battery level, the power-off operation is determined according to the battery level message reported by the terminal and the state of the charger, and a power-off command is sent to the charger. ;

如图10所示,当终端处于断电状态,且电池电量低于电量下限D2时,根据终端上报的电池电量消息以及充电器的状态决定进行充电操作,向所述充电器下发充电指令。As shown in FIG. 10 , when the terminal is in a power-off state and the battery power is lower than the lower power limit D2, the charging operation is determined according to the battery power message reported by the terminal and the status of the charger, and a charging instruction is sent to the charger.

为了保护终端电池,设计了电量上限D1,当终端电量高于电量上限D1时,服务器下发断电指令,进行断电操作。In order to protect the battery of the terminal, an upper limit of power D1 is designed. When the power of the terminal is higher than the upper limit of power D1, the server sends a power-off command to perform a power-off operation.

电量上限D1有几种方式进行配置:There are several ways to configure the battery upper limit D1:

方式i:服务器确定电量上限D1后下发到终端,不同的终端可以配置相同或不同的电量上限D1。Mode i: The server determines the upper power limit D1 and sends it to the terminal, and different terminals can be configured with the same or different upper power limit D1.

方式ii:终端内置应用确定电量上限D1并上报服务器,不同的终端可以配置相同或不同的电量上限D1。Mode ii: The terminal built-in application determines the upper power limit D1 and reports it to the server, and different terminals can be configured with the same or different power upper limit D1.

方式iii:终端和服务器均采用相同的默认配置,不需要互相交互,当需要进行改变时采取方式i或方式ii。Mode iii: Both the terminal and the server use the same default configuration and do not need to interact with each other. When changes are required, mode i or mode ii is adopted.

在实际应用中,可能需要强制对终端进行断电,关于强制进行断电的过程,当某些终端需要进行强制断电时,在一个优选实施例中,还包括进入强制断电模式,包括:In practical applications, the terminal may need to be forcibly powered off. Regarding the process of forcibly powering off, when some terminals need to be forcibly powered off, in a preferred embodiment, it also includes entering a forced power-off mode, including:

收到来自终端的强制断电的请求,向终端下发强制断电指令,由终端根据所述强制断电指令进入强制断电模式;Receive a forced power-off request from the terminal, issue a forced power-off instruction to the terminal, and the terminal enters the forced power-off mode according to the forced power-off instruction;

直接向充电器下发强制断电指令,由充电器停止向终端进行充电。Directly send a forced power-off command to the charger, and the charger stops charging the terminal.

具体而言,可以采取两种方式进入强制断电模式:Specifically, there are two ways to enter the forced power-off mode:

方式1:终端向服务器请求进行强制断电,服务器收到请求后对终端下发强制断电指令,终端进入强制断电模式。需要充电时进行强制充电操作或执行退出强制断电模式的动作。Mode 1: The terminal requests the server to perform a forced power-off, and the server sends a forced-power-off command to the terminal after receiving the request, and the terminal enters the forced-power-off mode. When charging is required, perform a forced charging operation or perform an action to exit the forced power-off mode.

方式2:服务器直接向充电器下发断电指令,所对应的一个或多个充电子单元进行断电操作,终端进入强制断电模式,需要充电时进行强制充电操作或执行退出强制断电模式的动作。Mode 2: The server directly sends a power-off command to the charger, and the corresponding one or more charging sub-units perform a power-off operation, and the terminal enters the forced power-off mode. When charging is required, the forced charging operation is performed or the forced power-off mode is exited. Actions.

终端处于强制断电模式时,为了使终端进行充电,需要在需要的时候退出强制断电模式。在一个优选实施例中,还包括退出强制断电模式,包括:When the terminal is in the forced power-off mode, in order to charge the terminal, it is necessary to exit the forced power-off mode when necessary. In a preferred embodiment, it also includes exiting the forced power-off mode, including:

方式1:电量下限D2生效,当终端电量到达电量下限D2时,自动退出强制断电模式。Mode 1: The lower limit of power D2 takes effect. When the power of the terminal reaches the lower limit of power D2, it will automatically exit the forced power-off mode.

方式2:终端向服务器发出退出强制断电模式请求,服务器收到请求后退出强制断电模式,执行普通充断电流程;Mode 2: The terminal sends a request to the server to exit the forced power-off mode, and the server exits the forced-power-off mode after receiving the request, and executes the normal charging and power-off process;

方式3:服务器下发退出强制断电模式指示,执行普通充断电流程。Method 3: The server sends an instruction to exit the forced power-off mode, and executes the normal charging and power-off process.

关于充电过程,服务器对终端n进行充电操作的条件为:1)充电子单元n处于未充电状态;2)终端电池电量达到电量下限D2。Regarding the charging process, the conditions for the server to perform the charging operation on the terminal n are: 1) the charging subunit n is in an uncharged state; 2) the terminal battery power reaches the lower limit D2 of power.

如图10所示,在一个优选实施例中,步骤23,根据所述电池电量消息和充电器的状态,向所述充电器下发充电指令或断电指令,包括:As shown in FIG. 10, in a preferred embodiment, step 23, according to the battery level message and the state of the charger, issue a charging instruction or a power-off instruction to the charger, including:

当终端处于断电状态,即,充电子单元处于断电状态,服务器获取终端电量后,判断终端电量是否低于电量下限D2,若低于电量下限D2,则服务器向充电器下发充电指令,对应的充电子单元开始进行充电,即终端开始充电;若不低于电量下限D2,则保持终端处于断电状态。When the terminal is in a power-off state, that is, the charging sub-unit is in a power-off state, after the server obtains the power of the terminal, it determines whether the power of the terminal is lower than the lower power limit D2. The corresponding charging sub-unit starts charging, that is, the terminal starts charging; if it is not lower than the lower limit D2 of the electric quantity, the terminal is kept in a power-off state.

电量下限D2的配置方法:The configuration method of the lower power limit D2:

方式i:服务器确定电量下限D2后下发到终端,不同的终端可以配置相同或不同的电量下限D2。Mode i: The server determines the lower power limit D2 and sends it to the terminal, and different terminals can be configured with the same or different lower power limit D2.

方式ii:终端内置应用确定电量下限D2并上报服务器,不同的终端可以配置相同或不同的电量下限D2。Mode ii: The terminal built-in application determines the lower power limit D2 and reports it to the server, and different terminals can be configured with the same or different power lower limit D2.

方式iii:终端和服务器均采用相同的默认配置,不需要互相交互,当需要进行改变时采取方式i或方式ii。Mode iii: Both the terminal and the server use the same default configuration and do not need to interact with each other. When changes are required, mode i or mode ii is adopted.

在实际应用中,可能需要强制对终端进行充电,当某些终端需要进行强制充电时,关于强制进行充电的过程,可以采取两种方式进行强制充电,在一个优选实施例中,还包括进入强制充电模式,包括:In practical applications, it may be necessary to forcibly charge the terminal. When some terminals need to be forcedly charged, there are two methods for the forced charging process. In a preferred embodiment, it also includes entering the forced charging process. Charging modes, including:

收到来自终端的强制充电的请求,向终端下发强制充电指令,由终端根据所述强制充电指令进入强制充电模式;Receive a forced charging request from the terminal, issue a forced charging instruction to the terminal, and the terminal will enter the forced charging mode according to the forced charging instruction;

服务器直接向充电器下发强制充电指令,由充电器向终端进行充电。The server directly issues a forced charging instruction to the charger, and the charger charges the terminal.

方式1:终端向服务器请求进行强制充电,服务器收到请求后对下发强制充电指令,终端进入强制充电模式,需要断电时进行强制断电操作或执行退出强制充电模式的动作。Mode 1: The terminal requests the server to perform forced charging. After receiving the request, the server sends a forced charging instruction, and the terminal enters the forced charging mode. When a power failure is required, a forced power-off operation or an action of exiting the forced charging mode is performed.

方式2:服务器直接向充电器下发充电指令,所对应的一个或多个充电子单元进行充电操作,终端进入强制充电模式,需要断电时进行强制断电操作或执行退出强制充电模式的动作。Mode 2: The server directly sends a charging instruction to the charger, and the corresponding one or more charging sub-units perform the charging operation, and the terminal enters the forced charging mode. .

终端处于强制充电模式时,为了保护终端电池,需要在适当时候退出强制充电模式,有至少三种方式,在一个优选实施例中,还包括退出强制充电模式,退出强制充电模式包括:When the terminal is in the forced charging mode, in order to protect the terminal battery, it is necessary to exit the forced charging mode at an appropriate time. There are at least three ways. In a preferred embodiment, it also includes exiting the forced charging mode. Exiting the forced charging mode includes:

当终端电量到达电量上限D1时,由终端自动退出强制充电模式;When the power of the terminal reaches the upper limit of power D1, the terminal automatically exits the forced charging mode;

或者,or,

收到来自终端的退出强制充电模式请求,指示终端退出强制充电模式。After receiving a request from the terminal to exit the forced charging mode, the terminal is instructed to exit the forced charging mode.

具体而言,退出强制充电模式包括:Specifically, exiting forced charging mode includes:

方式1:电量上限D1生效,当终端电量到达电量上限D1时,自动退出强制充电模式。Mode 1: The power upper limit D1 takes effect. When the terminal power reaches the power limit D1, it automatically exits the forced charging mode.

方式2:终端向服务器发出退出强制充电模式请求,服务器收到请求后退出强制充电模式,执行普通充断电流程。Mode 2: The terminal sends a request to the server to exit the forced charging mode, and the server exits the forced charging mode after receiving the request, and executes the normal charging and power-off process.

方式3:服务器下发退出强制充电模式指示,执行普通充断电流程。Method 3: The server sends an instruction to exit the forced charging mode, and executes the normal charging and power-off process.

在一个采用数百部智能终端进行自动化充断电的场景中,如图11所示,全部智能终端通过无线连接方式受控于服务器,每一部智能终端通过USB线连接一个充电电路板上的一个充电口进行充电,且充电电路板通过有线连接方式连接服务器,受服务器控制进行充断电操作。In a scenario where hundreds of smart terminals are used for automatic charging and power-off, as shown in Figure 11, all smart terminals are controlled by the server through wireless connection, and each smart terminal is connected to a charging circuit board through a USB cable. A charging port is used for charging, and the charging circuit board is connected to the server through a wired connection, and is controlled by the server to perform charging and power-off operations.

当发现系统中的终端1需要将电量充满并保持一段时间时,服务器对充电电路板进行强制充电指令下发,电路板接收到指令后,保持充电口1的充电状态,直到接收到服务器下发的退出强制充电模式命令。When it is found that the terminal 1 in the system needs to be fully charged and maintained for a period of time, the server sends a forced charging command to the charging circuit board. After the circuit board receives the command, it keeps the charging state of the charging port 1 until it receives the server. The Exit Forced Charge Mode command.

当发现终端1需要将电量耗尽时,服务器对充电电路板下发强制断电指令,电路板接收到强制断电指令后,保持充电口1的断电状态,直到接收到服务器下发的退出强制断电模式命令。When it is found that the terminal 1 needs to run out of power, the server sends a forced power-off command to the charging circuit board. After the circuit board receives the forced power-off command, it keeps the power-off state of the charging port 1 until it receives the exit from the server. Forced power down mode command.

这一过程具体包括:This process specifically includes:

一、采用非周期的方式上报电池电量:1. Report battery power in an aperiodic manner:

当服务器需要获取电池电量时,服务器下发电量上报请求,终端接收到服务器请求后上报电量。When the server needs to obtain battery power, the server sends a power generation report request, and the terminal reports the power after receiving the server request.

当终端电量达到配置的电量上限D1和电量下限D2时,终端主动上报电量,请求服务器进行充电或断电操作。When the power of the terminal reaches the configured upper power limit D1 and lower power limit D2, the terminal actively reports the power and requests the server to perform charging or power-off operations.

二、配置电量上限D1和电量下限D2:2. Configure the upper limit D1 and lower limit D2 of the battery:

服务器配置电量上限D1和电量下限D2并通知终端。The server configures the upper power limit D1 and the lower power limit D2 and notifies the terminal.

三、断电过程:3. Power-off process:

以终端1为例,当终端1处于充电状态时,如果电池电量高于电量上限D1,则终端主动向服务器上报电量并请求断电,服务器接收到终端1上报的电量后向充电电路板下发断电指令,指示充电电路板断开充电口1的供电,终端处于断电过程。Taking terminal 1 as an example, when terminal 1 is in the charging state, if the battery power is higher than the upper limit of power D1, the terminal will actively report the power to the server and request power off, and the server will send the power to the charging circuit board after receiving the power reported by terminal 1. Power-off command, instructing the charging circuit board to disconnect the power supply of charging port 1, and the terminal is in the process of power-off.

四、充电过程:Fourth, the charging process:

以终端1为例,当终端1处于断电过程时,如果电池电量低于电量下限D2,则终端主动向服务器上报电量并请求充电,服务器接收到终端1上报的电量后向充电电路板下发充电指令,指示充电电路板在充电口1供电,终端处于充电状态。Taking terminal 1 as an example, when terminal 1 is in the process of power failure, if the battery power is lower than the lower limit of power D2, the terminal actively reports the power to the server and requests charging, and the server receives the power reported by terminal 1 and sends it to the charging circuit board. Charging command, instructing the charging circuit board to supply power in charging port 1, and the terminal is in the charging state.

本发明实施例提供了一种实现充电的服务器,如图12所示,包括:An embodiment of the present invention provides a server for implementing charging, as shown in FIG. 12 , including:

通讯连接单元121,用于在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;The communication connection unit 121 is used for establishing a first communication connection between the charger and the server, and establishing a second communication connection between the terminal and the server;

信息处理单元122,用于通过第一通讯连接获取充电器的状态,通过第二通讯连接接收终端的电池电量消息;The information processing unit 122 is configured to obtain the status of the charger through the first communication connection, and receive the battery level message of the terminal through the second communication connection;

充断电指令单元123,用于根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。The charging and power-off command unit 123 is configured to issue a charging command or a power-off command to the charger according to the state of the charger and the battery power information, and the charger executes the charging command or the power-off command according to the charging command or the power-off command. charging or power-off operation.

在一个优选实施例中,In a preferred embodiment,

通讯连接单元121包括多个通讯子模块;The communication connection unit 121 includes a plurality of communication sub-modules;

通讯子模块,用于当充电器包括多个充电子单元时,与一个充电子单元之间建立并保持第一通讯连接;a communication sub-module for establishing and maintaining a first communication connection with one charging sub-unit when the charger includes a plurality of charging sub-units;

信息处理单元122包括多个信息处理子模块;The information processing unit 122 includes a plurality of information processing sub-modules;

处理子模块,用于通过第一通讯连接获取充电器中对应的充电子单元的状态。The processing sub-module is configured to acquire the state of the corresponding charging sub-unit in the charger through the first communication connection.

在一个优选实施例中,信息处理单元122还包括:In a preferred embodiment, the information processing unit 122 further includes:

周期单元,用于在终端确定了电量上报周期时,接收终端根据所述电量上报周期所上报的所述电池电量消息;a period unit, configured to receive the battery power message reported by the terminal according to the power reporting period when the terminal determines the power reporting period;

或者,确定终端的电量上报周期并发送到终端,由终端根据周期单元下发的电量上报周期周期性上报;Or, determine the power reporting period of the terminal and send it to the terminal, and the terminal will periodically report it according to the power reporting period sent by the periodic unit;

或者,周期性获取终端的电池电量消息。Or, periodically acquire the battery level information of the terminal.

在一个优选实施例中,信息处理单元122还包括:In a preferred embodiment, the information processing unit 122 further includes:

非周期单元,用于当终端非周期性上报电池电量消息时,请求终端上报电池电量消息;The aperiodic unit is used to request the terminal to report the battery level message when the terminal reports the battery level message aperiodically;

或者,接收终端主动上报的电池电量消息。Or, receive the battery level message actively reported by the terminal.

在一个优选实施例中,充断电指令单元123包括:In a preferred embodiment, the charge-off instruction unit 123 includes:

断电模块,用于当终端处于充电状态,且电池电量高于电量上限D1时,根据终端上报的电池电量消息以及充电器的状态决定进行断电操作,向所述充电器下发断电指令;The power-off module is used to decide to perform a power-off operation according to the battery power message reported by the terminal and the state of the charger when the terminal is in a charging state and the battery power is higher than the upper limit D1 of power, and issue a power-off command to the charger ;

充电模块,用于当终端处于断电状态,且电池电量低于电量下限D2时,根据终端上报的电池电量消息以及充电器的状态决定进行充电操作,向所述充电器下发充电指令。The charging module is used to decide to perform a charging operation according to the battery power message reported by the terminal and the state of the charger when the terminal is in a power-off state and the battery power is lower than the lower limit D2, and issue a charging instruction to the charger.

在一个优选实施例中,充断电指令单元123包括:In a preferred embodiment, the charge-off instruction unit 123 includes:

强制断电模块,用于收到来自终端的强制断电的请求,向终端下发强制断电指令,由终端根据所述强制断电指令进入强制断电模式;The forced power-off module is configured to receive a forced power-off request from the terminal, issue a forced power-off instruction to the terminal, and the terminal will enter the forced power-off mode according to the forced power-off instruction;

或者,直接向充电器下发强制断电指令,由终端根据所述强制断电指令进入强制断电模式。Alternatively, a forced power-off instruction is directly issued to the charger, and the terminal enters the forced power-off mode according to the forced power-off instruction.

在一个优选实施例中,充断电指令单元123还包括:In a preferred embodiment, the charge-off instruction unit 123 further includes:

退出强制断电模块,用于收到来自终端的退出强制断电模式请求,指示终端退出强制断电模式。The exit forced power-off module is used to receive a request from the terminal to exit the forced power-off mode, and instruct the terminal to exit the forced-power-off mode.

在一个优选实施例中,充断电指令单元123还包括:In a preferred embodiment, the charge-off instruction unit 123 further includes:

强制充电模块,用于:Forced charging module for:

收到来自终端的强制充电的请求,向终端下发强制充电指令,由终端根据所述强制充电指令进入强制充电模式;Receive a forced charging request from the terminal, issue a forced charging instruction to the terminal, and the terminal will enter the forced charging mode according to the forced charging instruction;

直接向充电器下发强制充电指令,由终端根据所述强制充电指令进入强制充电模式;Directly send a forced charging instruction to the charger, and the terminal enters the forced charging mode according to the forced charging instruction;

在一个优选实施例中,充断电指令单元123还包括:退出强制充电模块,用于收到来自终端的退出强制充电模式请求,指示终端退出强制充电模式。In a preferred embodiment, the charging and power-off instruction unit 123 further includes: an exit forced charging module, configured to receive a request from the terminal to exit the forced charging mode, and instruct the terminal to exit the forced charging mode.

服务器向终端下发退出强制充电模式指令,执行普通充断电流程。The server issues an instruction to exit the forced charging mode to the terminal, and executes the normal charging and power-off process.

本发明实施例提供了一种实现充电的服务器,如图13所示,包括存储器131、处理器132,以及存储在所述存储器131上并可在所述处理器上运行的计算机程序;所述处理器132执行所述程序时实现一种实现充电的方法。An embodiment of the present invention provides a server for implementing charging, as shown in FIG. 13 , including a memory 131, a processor 132, and a computer program stored on the memory 131 and running on the processor; the When the processor 132 executes the program, a method for realizing charging is implemented.

在一个优选实施例中,在充电器和服务器之间建立第一通讯连接包括:通过有线和/或无线的方式建立第一通讯连接;In a preferred embodiment, establishing the first communication connection between the charger and the server includes: establishing the first communication connection in a wired and/or wireless manner;

在终端和服务器之间建立第二通讯连接包括:通过有线和/或无线的方式建立第二通讯连接。Establishing the second communication connection between the terminal and the server includes: establishing the second communication connection in a wired and/or wireless manner.

在一个优选实施例中,在充电器和服务器之间建立第一通讯连接包括:In a preferred embodiment, establishing the first communication connection between the charger and the server includes:

当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在每一个所述充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging sub-unit in the charger, and the terminal is charged by the charging sub-unit, a first communication connection is established and maintained between each of the charging sub-units and the server.

在一个优选实施例中,通过第二通讯连接接收来自终端的电池电量消息包括:In a preferred embodiment, receiving the battery level message from the terminal through the second communication connection includes:

当终端周期性上报电量时选择:When the terminal periodically reports power, select:

由终端确定电量上报周期,并根据所述电量上报周期接收由终端上报的所述电池电量消息;The terminal determines the power reporting period, and receives the battery power message reported by the terminal according to the power reporting period;

或者,确定终端的电量上报周期并发送到终端,由终端根据服务器下发的所述电量上报周期周期性上报所述电池电量消息;Or, determine the power reporting period of the terminal and send it to the terminal, and the terminal periodically reports the battery power message according to the power reporting period sent by the server;

或者,周期性获取终端的电池电量消息。Or, periodically acquire the battery level information of the terminal.

在一个优选实施例中,通过第二通讯连接接收来自终端的电池电量消息包括:In a preferred embodiment, receiving the battery level message from the terminal through the second communication connection includes:

当终端非周期性上报电量时选择:When the terminal reports power aperiodically, select:

请求终端上报所述电池电量消息;requesting the terminal to report the battery level message;

或者,接收终端主动上报的所述电池电量消息。Or, receive the battery level message actively reported by the terminal.

在一个优选实施例中,根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令包括:In a preferred embodiment, according to the state of the charger and the battery level message, issuing a charging instruction or a power-off instruction to the charger includes:

当终端处于充电状态,且电池电量高于电量上限D1时,根据终端上报的电池电量消息以及充电器的状态决定进行断电操作,向所述充电器下发断电指令;When the terminal is in a charging state and the battery power is higher than the upper limit D1 of the power, the power-off operation is determined according to the battery power message reported by the terminal and the state of the charger, and a power-off command is sent to the charger;

当终端处于断电状态,且电池电量低于电量下限D2时,根据终端上报的电池电量消息以及充电器的状态决定进行充电操作,向所述充电器下发充电指令。When the terminal is in a power-off state and the battery power is lower than the power lower limit D2, the charging operation is determined according to the battery power message reported by the terminal and the state of the charger, and a charging instruction is sent to the charger.

在一个优选实施例中,处理器执行所述程序时还包括实现:进入强制断电模式:In a preferred embodiment, when the processor executes the program, it further includes implementing: entering a forced power-off mode:

收到来自终端的强制断电的请求,向终端下发强制断电指令,由终端根据所述强制断电指令进入强制断电模式;Receive a forced power-off request from the terminal, issue a forced power-off instruction to the terminal, and the terminal enters the forced power-off mode according to the forced power-off instruction;

服务器直接向充电器下发强制断电指令,由充电器停止向终端进行充电。The server directly sends a forced power-off command to the charger, and the charger stops charging the terminal.

在一个优选实施例中,还包括退出强制断电模式,包括:In a preferred embodiment, it also includes exiting the forced power-off mode, including:

收到来自终端的退出强制断电模式请求,指示终端退出强制断电模式;Receive a request from the terminal to exit the forced power-off mode, instructing the terminal to exit the forced-power-off mode;

或者,or,

当终端电量到达电量下限D2时,由终端自动退出强制断电模式。When the power of the terminal reaches the lower limit of power D2, the terminal automatically exits the forced power-off mode.

在一个优选实施例中,处理器执行所述程序时还包括实现:进入强制充电模式:In a preferred embodiment, when the processor executes the program, it further includes implementing: entering a forced charging mode:

收到来自终端的强制充电的请求,向终端下发强制充电指令,由终端根据所述强制充电指令进入强制充电模式;Receive a forced charging request from the terminal, issue a forced charging instruction to the terminal, and the terminal will enter the forced charging mode according to the forced charging instruction;

服务器直接向充电器下发强制充电指令,由充电器向终端进行强制充电。The server directly issues a forced charging instruction to the charger, and the charger performs forced charging to the terminal.

在一个优选实施例中,处理器执行所述程序时还包括:退出强制充电模式:In a preferred embodiment, when the processor executes the program, it further includes: exiting the forced charging mode:

收到来自终端的退出强制充电模式请求,指示终端退出强制充电模式;Receive a request from the terminal to exit the forced charging mode, instructing the terminal to exit the forced charging mode;

或者,or,

当终端电量到达电量上限D1时,由终端自动退出强制充电模式。When the terminal power reaches the power upper limit D1, the terminal automatically exits the forced charging mode.

本发明实施例提供了一种实现充电的方法,应用于充电器,方法包括:An embodiment of the present invention provides a method for implementing charging, which is applied to a charger, and the method includes:

在充电器和服务器之间建立第一通讯连接;establishing a first communication connection between the charger and the server;

根据来自服务器的充电指令或断电指令执行充电或者断电的操作,其中,所述充电指令或断电指令由服务器根据通过第一通讯连接获取充电器的状态,通过与终端的第二通讯连接接收来自终端的电池电量消息之后,根据所述充电器的状态和电池电量消息生成,并向所述充电器下发。The operation of charging or powering off is performed according to the charging instruction or the power-off instruction from the server, wherein the charging instruction or the power-off instruction is obtained by the server according to the state of the charger obtained through the first communication connection, and the second communication connection with the terminal is performed by the server. After receiving the battery level message from the terminal, it is generated according to the state of the charger and the battery level message, and sent to the charger.

在一个优选实施例中,在充电器和服务器之间建立第一通讯连接包括:In a preferred embodiment, establishing the first communication connection between the charger and the server includes:

通过有线和/或无线的方式建立第一通讯连接;establish a first communication connection by wired and/or wireless means;

当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在充电器的每一个充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging subunit in the charger, and the terminal is charged by the charging subunit, a first communication connection is established and maintained between each charging subunit of the charger and the server.

本发明实施例提供了一种实现充电的充电器,包括:An embodiment of the present invention provides a charger for realizing charging, including:

通讯连接单元,用于在充电器和服务器之间建立第一通讯连接;a communication connection unit for establishing a first communication connection between the charger and the server;

指令执行单元,用于根据来自服务器的充电指令或断电指令执行充电或者断电的操作;其中,所述充电指令或断电指令由服务器根据通过第一通讯连接获取充电器的状态,通过与终端的第二通讯连接接收来自终端的电池电量消息之后,根据所述充电器的状态和电池电量消息生成所述充电指令或断电指令,并向所述充电器下发。The instruction execution unit is used to perform the operation of charging or powering off according to the charging instruction or the power-off instruction from the server; wherein, the charging instruction or the power-off instruction is obtained by the server according to the state of the charger through the first communication connection, and the charging instruction or power-off instruction is obtained by the server. After receiving the battery level message from the terminal, the second communication connection of the terminal generates the charging instruction or the power-off instruction according to the state of the charger and the battery level message, and sends it to the charger.

在一个优选实施例中,通讯连接单元包括:In a preferred embodiment, the communication connection unit includes:

通讯方式选择模块,用于通过有线和/或无线的方式建立第一通讯连接;a communication mode selection module, used for establishing a first communication connection through wired and/or wireless modes;

子单元通讯模块,用于当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在充电器的每一个充电子单元与服务器之间建立并保持第一通讯连接。The subunit communication module is used to establish and maintain between each charging subunit of the charger and the server when the terminal is electrically connected to a charging subunit in the charger and the terminal is charged by the charging subunit The first communication connection.

本发明实施例提供了一种自动充电的系统,包括:至少一个终端,充电器,以及,实现充电的服务器。An embodiment of the present invention provides an automatic charging system, including: at least one terminal, a charger, and a server for implementing charging.

本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现应用于服务器的实现充电的方法中的步骤;An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, implements steps in a method for implementing charging applied to a server;

或者,该计算机程序被处理器执行时实现应用于充电器的实现充电的方法中的步骤。Alternatively, the computer program, when executed by the processor, implements the steps in the method for implementing charging applied to the charger.

应用本发明实施例提供的技术,服务器根据接收到的终端的电池电量消息,结合目前该终端所对应的充电器的状态判断当前终端是否需要进行充电或者断电的操作,从而对充电器下发充电或断电指令,节省能源,保护了终端电路。By applying the technology provided by the embodiment of the present invention, the server judges whether the current terminal needs to perform charging or power-off operation according to the received battery power information of the terminal and the current state of the charger corresponding to the terminal, so as to deliver the battery power to the charger. Charging or power-off command saves energy and protects the terminal circuit.

应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本发明的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。It is to be understood that reference throughout the specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic associated with the embodiment is included in at least one embodiment of the present invention. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments.

在本发明的各种实施例中,应理解,下述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。In various embodiments of the present invention, it should be understood that the size of the sequence numbers of the following processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, rather than the implementation of the present invention The implementation of the examples constitutes no limitation.

另外,本文中术语“系统”和“网络”在本文中常可互换使用。Additionally, the terms "system" and "network" are often used interchangeably herein.

应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" in this document is only an association relationship to describe associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, and A and B exist at the same time , there are three cases of B alone. In addition, the character "/" in this document generally indicates that the related objects are an "or" relationship.

在本申请所提供的实施例中,应理解,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。In the embodiments provided in this application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is only determined according to A, and B may also be determined according to A and/or other information.

以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. These improvements and modifications It should also be regarded as the protection scope of the present invention.

Claims (26)

1.一种实现充电的方法,其特征在于,应用于服务器,方法包括:1. A method for realizing charging, characterized in that, applied to a server, the method comprising: 在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;establishing a first communication connection between the charger and the server, and establishing a second communication connection between the terminal and the server; 通过第一通讯连接获取充电器的状态,通过第二通讯连接获取来自终端的电池电量消息;Obtain the status of the charger through the first communication connection, and obtain the battery power information from the terminal through the second communication connection; 根据所述充电器的状态和所述电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。According to the state of the charger and the battery power information, a charging instruction or a power-off instruction is issued to the charger, and the charger performs a charging or power-off operation according to the charging instruction or the power-off instruction. 2.如权利要求1所述的方法,其特征在于,2. The method of claim 1, wherein 在充电器和服务器之间建立第一通讯连接包括:通过有线和/或无线的方式建立第一通讯连接;Establishing the first communication connection between the charger and the server includes: establishing the first communication connection in a wired and/or wireless manner; 在终端和服务器之间建立第二通讯连接包括:通过有线和/或无线的方式建立第二通讯连接。Establishing the second communication connection between the terminal and the server includes: establishing the second communication connection in a wired and/or wireless manner. 3.如权利要求1所述的方法,其特征在于,在充电器和服务器之间建立第一通讯连接包括:3. The method of claim 1, wherein establishing the first communication connection between the charger and the server comprises: 当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在每一个所述充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging sub-unit in the charger, and the terminal is charged by the charging sub-unit, a first communication connection is established and maintained between each of the charging sub-units and the server. 4.如权利要求1所述的方法,其特征在于,通过第二通讯连接接收来自终端的电池电量消息包括:4. The method of claim 1, wherein receiving the battery level message from the terminal through the second communication connection comprises: 当终端周期性上报电量时选择:When the terminal periodically reports power, select: 由终端确定电量上报周期,并根据所述电量上报周期接收由终端上报的所述电池电量消息;The terminal determines the power reporting period, and receives the battery power message reported by the terminal according to the power reporting period; 或者,确定终端的电量上报周期并发送到终端,由终端根据服务器下发的所述电量上报周期周期性上报所述电池电量消息;Or, determine the power reporting period of the terminal and send it to the terminal, and the terminal periodically reports the battery power message according to the power reporting period sent by the server; 或者,周期性获取终端的电池电量消息。Or, periodically acquire the battery level information of the terminal. 5.如权利要求1所述的方法,其特征在于,通过第二通讯连接接收来自终端的电池电量消息包括:5. The method of claim 1, wherein receiving the battery level message from the terminal through the second communication connection comprises: 当终端非周期性上报电量时选择:When the terminal reports power aperiodically, select: 请求终端上报所述电池电量消息;requesting the terminal to report the battery level message; 或者,接收终端主动上报的所述电池电量消息。Or, receive the battery level message actively reported by the terminal. 6.如权利要求1所述的方法,其特征在于,根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令包括:6. The method of claim 1, wherein, according to the state of the charger and the battery level message, issuing a charging instruction or a power-off instruction to the charger comprises: 当终端处于充电状态,且电池电量高于电量上限D1时,根据终端上报的电池电量消息以及充电器的状态决定进行断电操作,向所述充电器下发断电指令;When the terminal is in a charging state and the battery power is higher than the upper limit D1 of the power, the power-off operation is determined according to the battery power message reported by the terminal and the state of the charger, and a power-off command is sent to the charger; 当终端处于断电状态,且电池电量低于电量下限D2时,根据终端上报的电池电量消息以及充电器的状态决定进行充电操作,向所述充电器下发充电指令。When the terminal is in a power-off state and the battery power is lower than the power lower limit D2, the charging operation is determined according to the battery power message reported by the terminal and the state of the charger, and a charging instruction is sent to the charger. 7.如权利要求1所述的方法,其特征在于,还包括进入强制断电模式,包括:7. The method of claim 1, further comprising entering a forced power-off mode, comprising: 收到来自终端的强制断电的请求,向终端下发强制断电指令,由终端根据所述强制断电指令进入强制断电模式;Receive a forced power-off request from the terminal, issue a forced power-off instruction to the terminal, and the terminal enters the forced power-off mode according to the forced power-off instruction; 服务器直接向充电器下发强制断电指令,由充电器停止向终端进行充电。The server directly sends a forced power-off command to the charger, and the charger stops charging the terminal. 8.如权利要求7所述的方法,其特征在于,还包括退出强制断电模式,包括:8. The method of claim 7, further comprising exiting the forced power-off mode, comprising: 收到来自终端的退出强制断电模式请求,指示终端退出强制断电模式;Receive a request from the terminal to exit the forced power-off mode, instructing the terminal to exit the forced-power-off mode; 或者,or, 当终端电量到达电量下限D2时,由终端自动退出强制断电模式。When the power of the terminal reaches the lower limit of power D2, the terminal automatically exits the forced power-off mode. 9.如权利要求1所述的方法,其特征在于,还包括进入强制充电模式,包括:9. The method of claim 1, further comprising entering a forced charging mode, comprising: 收到来自终端的强制充电的请求,向终端下发强制充电指令,由终端根据所述强制充电指令进入强制充电模式;Receive a forced charging request from the terminal, issue a forced charging instruction to the terminal, and the terminal will enter the forced charging mode according to the forced charging instruction; 服务器直接向充电器下发强制充电指令,由充电器向终端进行强制充电。The server directly issues a forced charging instruction to the charger, and the charger performs forced charging to the terminal. 10.如权利要求9所述的方法,其特征在于,还包括退出强制充电模式,包括:10. The method of claim 9, further comprising exiting the forced charging mode, comprising: 收到来自终端的退出强制充电模式请求,指示终端退出强制充电模式;Receive a request from the terminal to exit the forced charging mode, instructing the terminal to exit the forced charging mode; 或者,or, 当终端电量到达电量上限D1时,由终端自动退出强制充电模式。When the terminal power reaches the power upper limit D1, the terminal automatically exits the forced charging mode. 11.一种实现充电的服务器,其特征在于,包括:11. A server for realizing charging, comprising: 通讯连接单元,用于在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;a communication connection unit, used for establishing a first communication connection between the charger and the server, and establishing a second communication connection between the terminal and the server; 信息处理单元,用于通过第一通讯连接获取充电器的状态,通过第二通讯连接获取终端的电池电量消息;an information processing unit, configured to obtain the status of the charger through the first communication connection, and obtain the battery power information of the terminal through the second communication connection; 充断电指令单元,用于根据所述充电器的状态和所述电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。A charging and power-off command unit, configured to issue a charging command or a power-off command to the charger according to the state of the charger and the battery power message, and the charger will send a charging command or a power-off command according to the charging command or the power-off command Perform charging or power-off operations. 12.一种实现充电的服务器,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序;其特征在于,所述处理器执行所述程序时实现:12. A server for realizing charging, comprising a memory, a processor, and a computer program stored on the memory and running on the processor; characterized in that, when the processor executes the program, the processor realizes: 在充电器和服务器之间建立第一通讯连接,在终端和服务器之间建立第二通讯连接;establishing a first communication connection between the charger and the server, and establishing a second communication connection between the terminal and the server; 通过第一通讯连接获取充电器的状态,通过第二通讯连接获取来自终端的电池电量消息;Obtain the status of the charger through the first communication connection, and obtain the battery power information from the terminal through the second communication connection; 根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令,由所述充电器根据所述充电指令或断电指令执行充电或者断电的操作。According to the state of the charger and the battery level information, a charging instruction or a power-off instruction is issued to the charger, and the charger performs a charging or power-off operation according to the charging instruction or the power-off instruction. 13.如权利要求12所述的服务器,其特征在于,13. The server of claim 12, wherein 在充电器和服务器之间建立第一通讯连接包括:通过有线和/或无线的方式建立第一通讯连接;Establishing the first communication connection between the charger and the server includes: establishing the first communication connection in a wired and/or wireless manner; 在终端和服务器之间建立第二通讯连接包括:通过有线和/或无线的方式建立第二通讯连接。Establishing the second communication connection between the terminal and the server includes: establishing the second communication connection in a wired and/or wireless manner. 14.如权利要求12所述的服务器,其特征在于,在充电器和服务器之间建立第一通讯连接包括:14. The server of claim 12, wherein establishing the first communication connection between the charger and the server comprises: 当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在每一个所述充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging sub-unit in the charger, and the terminal is charged by the charging sub-unit, a first communication connection is established and maintained between each of the charging sub-units and the server. 15.如权利要求12所述的服务器,其特征在于,通过第二通讯连接接收来自终端的电池电量消息包括:15. The server of claim 12, wherein receiving the battery level message from the terminal through the second communication connection comprises: 当终端周期性上报电量时选择:When the terminal periodically reports power, select: 由终端确定电量上报周期,并根据所述电量上报周期接收由终端上报的所述电池电量消息;The terminal determines the power reporting period, and receives the battery power message reported by the terminal according to the power reporting period; 或者,确定终端的电量上报周期并发送到终端,由终端根据服务器下发的所述电量上报周期周期性上报所述电池电量消息;Or, determine the power reporting period of the terminal and send it to the terminal, and the terminal periodically reports the battery power message according to the power reporting period sent by the server; 或者,周期性获取终端的电池电量消息。Or, periodically acquire the battery level information of the terminal. 16.如权利要求12所述的服务器,其特征在于,通过第二通讯连接接收来自终端的电池电量消息包括:16. The server of claim 12, wherein receiving the battery level message from the terminal through the second communication connection comprises: 当终端非周期性上报电量时选择:When the terminal reports power aperiodically, select: 请求终端上报所述电池电量消息;requesting the terminal to report the battery level message; 或者,接收终端主动上报的所述电池电量消息。Or, receive the battery level message actively reported by the terminal. 17.如权利要求12所述的服务器,其特征在于,根据所述充电器的状态和电池电量消息,向所述充电器下发充电指令或断电指令包括:17. The server according to claim 12, wherein, according to the state of the charger and the battery level message, issuing a charging instruction or a power-off instruction to the charger comprises: 当终端处于充电状态,且电池电量高于电量上限D1时,根据终端上报的电池电量消息以及充电器的状态决定进行断电操作,向所述充电器下发断电指令;When the terminal is in a charging state and the battery power is higher than the upper limit D1 of the power, the power-off operation is determined according to the battery power message reported by the terminal and the state of the charger, and a power-off command is sent to the charger; 当终端处于断电状态,且电池电量低于电量下限D2时,根据终端上报的电池电量消息以及充电器的状态决定进行充电操作,向所述充电器下发充电指令。When the terminal is in a power-off state and the battery power is lower than the power lower limit D2, the charging operation is determined according to the battery power message reported by the terminal and the state of the charger, and a charging instruction is sent to the charger. 18.如权利要求12所述的服务器,其特征在于,处理器执行所述程序时还包括实现:进入强制断电模式:18. The server according to claim 12, wherein when the processor executes the program, it further comprises implementing: entering a forced power-off mode: 收到来自终端的强制断电的请求,向终端下发强制断电指令,由终端根据所述强制断电指令进入强制断电模式;Receive a forced power-off request from the terminal, issue a forced power-off instruction to the terminal, and the terminal enters the forced power-off mode according to the forced power-off instruction; 服务器直接向充电器下发强制断电指令,由充电器停止向终端进行充电。The server directly sends a forced power-off command to the charger, and the charger stops charging the terminal. 19.如权利要求18所述的服务器,其特征在于,还包括退出强制断电模式,包括:19. The server of claim 18, further comprising exiting the forced power-off mode, comprising: 收到来自终端的退出强制断电模式请求,指示终端退出强制断电模式;Receive a request from the terminal to exit the forced power-off mode, instructing the terminal to exit the forced-power-off mode; 或者,or, 当终端电量到达电量下限D2时,由终端自动退出强制断电模式。When the power of the terminal reaches the lower limit of power D2, the terminal automatically exits the forced power-off mode. 20.如权利要求12所述的服务器,其特征在于,处理器执行所述程序时还包括实现:进入强制充电模式:20. The server according to claim 12, wherein when the processor executes the program, it further comprises implementing: entering a forced charging mode: 收到来自终端的强制充电的请求,向终端下发强制充电指令,由终端根据所述强制充电指令进入强制充电模式;Receive a forced charging request from the terminal, issue a forced charging instruction to the terminal, and the terminal enters the forced charging mode according to the forced charging instruction; 服务器直接向充电器下发强制充电指令,由充电器向终端进行强制充电。The server directly issues a forced charging instruction to the charger, and the charger performs forced charging to the terminal. 21.如权利要求20所述的服务器,其特征在于,处理器执行所述程序时还包括:退出强制充电模式:21. The server according to claim 20, wherein when the processor executes the program, it further comprises: exiting the forced charging mode: 收到来自终端的退出强制充电模式请求,指示终端退出强制充电模式;Receive a request from the terminal to exit the forced charging mode, instructing the terminal to exit the forced charging mode; 或者,or, 当终端电量到达电量上限D1时,由终端自动退出强制充电模式。When the terminal power reaches the power upper limit D1, the terminal automatically exits the forced charging mode. 22.一种实现充电的方法,其特征在于,应用于充电器,方法包括:22. A method for realizing charging, characterized in that, applied to a charger, the method comprising: 在充电器和服务器之间建立第一通讯连接;establishing a first communication connection between the charger and the server; 根据来自服务器的充电指令或断电指令执行充电或者断电的操作,其中,所述充电指令或断电指令由服务器根据通过第一通讯连接获取充电器的状态,通过与终端的第二通讯连接接收来自终端的电池电量消息之后,根据所述充电器的状态和电池电量消息生成,并向所述充电器下发。The operation of charging or powering off is performed according to the charging instruction or the power-off instruction from the server, wherein the charging instruction or the power-off instruction is obtained by the server according to the state of the charger obtained through the first communication connection, and the second communication connection with the terminal is performed by the server. After receiving the battery level message from the terminal, it is generated according to the state of the charger and the battery level message, and sent to the charger. 23.如权利要求22所述的方法,其特征在于,在充电器和服务器之间建立第一通讯连接包括:23. The method of claim 22, wherein establishing the first communication connection between the charger and the server comprises: 通过有线和/或无线的方式建立第一通讯连接;establish a first communication connection by wired and/or wireless means; 当终端与充电器中的一个充电子单元进行电连接,由充电子单元对所述终端进行充电时,在充电器的每一个充电子单元与服务器之间建立并保持第一通讯连接。When the terminal is electrically connected to a charging subunit in the charger, and the terminal is charged by the charging subunit, a first communication connection is established and maintained between each charging subunit of the charger and the server. 24.一种实现充电的充电器,其特征在于,包括:24. A charger for realizing charging, comprising: 通讯连接单元,用于在充电器和服务器之间建立第一通讯连接;a communication connection unit for establishing a first communication connection between the charger and the server; 指令执行单元,用于根据来自服务器的充电指令或断电指令执行充电或者断电的操作;其中,所述充电指令或断电指令由服务器根据通过第一通讯连接获取充电器的状态,通过与终端的第二通讯连接接收来自终端的电池电量消息之后,根据所述充电器的状态和电池电量消息生成所述充电指令或断电指令,并向所述充电器下发。The instruction execution unit is used to perform the operation of charging or powering off according to the charging instruction or the power-off instruction from the server; wherein, the charging instruction or the power-off instruction is obtained by the server according to the state of the charger through the first communication connection, and the charging instruction or the power-off instruction is obtained by the server. After receiving the battery level message from the terminal, the second communication connection of the terminal generates the charging instruction or the power-off instruction according to the state of the charger and the battery level message, and sends it to the charger. 25.一种自动充电的系统,其特征在于,包括:至少一个终端,权利要求24中的充电器,以及,权利要求11中的实现充电的服务器。25. An automatic charging system, comprising: at least one terminal, the charger of claim 24, and the server of claim 11 for realizing charging. 26.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1-10任一项所述的实现充电的方法中的步骤;26. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps in the method for realizing charging according to any one of claims 1-10 are implemented; 或者,该计算机程序被处理器执行时实现如权利要求22-23任一项所述的实现充电的方法中的步骤。Alternatively, the computer program, when executed by the processor, implements the steps in the method for implementing charging according to any one of claims 22-23.
CN201710500790.3A 2017-06-27 2017-06-27 A kind of method, charger, server and system for realizing charging Pending CN109149673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710500790.3A CN109149673A (en) 2017-06-27 2017-06-27 A kind of method, charger, server and system for realizing charging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710500790.3A CN109149673A (en) 2017-06-27 2017-06-27 A kind of method, charger, server and system for realizing charging

Publications (1)

Publication Number Publication Date
CN109149673A true CN109149673A (en) 2019-01-04

Family

ID=64805275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710500790.3A Pending CN109149673A (en) 2017-06-27 2017-06-27 A kind of method, charger, server and system for realizing charging

Country Status (1)

Country Link
CN (1) CN109149673A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109768594A (en) * 2019-01-08 2019-05-17 深圳市网心科技有限公司 Charging method, terminal and charging assembly

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5355072A (en) * 1991-07-31 1994-10-11 Sanyo Electric Co., Ltd. Battery discharging apparatus
CN201937300U (en) * 2010-12-31 2011-08-17 崧顺电子(深圳)有限公司 Charger for realizing input zero power consumption after charge or in no-load standby
CN104333057A (en) * 2014-10-17 2015-02-04 福建天晴数码有限公司 Intelligent device, charging control device thereof, method thereof and system thereof
CN104362403A (en) * 2014-09-22 2015-02-18 广东欧珀移动通信有限公司 Battery charging control method and device
CN106786954A (en) * 2017-01-06 2017-05-31 深圳市新国都支付技术有限公司 A kind of charging adapter Automatic adjusument charging interval device, system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5355072A (en) * 1991-07-31 1994-10-11 Sanyo Electric Co., Ltd. Battery discharging apparatus
CN201937300U (en) * 2010-12-31 2011-08-17 崧顺电子(深圳)有限公司 Charger for realizing input zero power consumption after charge or in no-load standby
CN104362403A (en) * 2014-09-22 2015-02-18 广东欧珀移动通信有限公司 Battery charging control method and device
CN104333057A (en) * 2014-10-17 2015-02-04 福建天晴数码有限公司 Intelligent device, charging control device thereof, method thereof and system thereof
CN106786954A (en) * 2017-01-06 2017-05-31 深圳市新国都支付技术有限公司 A kind of charging adapter Automatic adjusument charging interval device, system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109768594A (en) * 2019-01-08 2019-05-17 深圳市网心科技有限公司 Charging method, terminal and charging assembly
CN109768594B (en) * 2019-01-08 2023-02-28 深圳市网心科技有限公司 Charging method, terminal and charging component

Similar Documents

Publication Publication Date Title
CN209488195U (en) mobile terminal
US8793518B2 (en) Systems and methods for providing supplemental power to battery powered information handling systems
EP3131171A1 (en) Power adaptor, terminal and charging system
WO2015027889A1 (en) Method and device for automatically stopping charging when mobile terminal is fully charged
TWI779255B (en) Monitoring system and power supplying control method
CN106063074B (en) Power supply adaptor and terminal
CN103887571A (en) Charging mode switching method and charging mode switching device
WO2018072443A1 (en) Charging method, apparatus, and data storage medium
CN110768332B (en) Charging cartridge, charging control method thereof, and readable storage medium
CN113386607B (en) Charging station charging and discharging automatic balancing method and device and charging station
CN102263423B (en) Universal serial bus charging system and charging method thereof
CN203813501U (en) Charger
CN102944734B (en) A kind of method of monitor terminal state, supervisory circuit and terminal
CN205092634U (en) Charging system for electric automobile
CN109149673A (en) A kind of method, charger, server and system for realizing charging
EP4099536A1 (en) Charging method, device and system
CN105471089B (en) The method of hybrid power supply device and hybrid power supply
CN118769970A (en) Multi-gun identification method, power distribution method and medium of multi-gun charging system
CN104578275B (en) Charging method and electronic equipment
EP3291404A1 (en) Method and device for implementing connection control
CN113746154A (en) Terminal, charging method of terminal, electronic device, and storage medium
CN209795211U (en) charger control system
CN108964156A (en) Charge control method, device and computer readable storage medium
CN109450096A (en) A kind of power supply unit and method for controlling power supply
CN210430949U (en) Charging device capable of transmitting data

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190104

RJ01 Rejection of invention patent application after publication