Disclosure of Invention
In view of the foregoing, it is desirable to provide an intelligent charging method, apparatus, computer device and readable medium.
An intelligent charging method based on a device to be charged is characterized by comprising the following steps:
detecting whether the device to be charged is connected to a charging device through a charging interface contained in the device to be charged, and acquiring a battery state parameter of the device to be charged as a first target parameter when the charging device is detected, wherein the battery state parameter comprises: the battery type, the battery capacity, the battery residual capacity, the battery temperature and the total charging and discharging times corresponding to the battery;
determining a first charging mode matched with the equipment to be charged according to the first target parameter;
setting the equipment to be charged according to the first charging mode so that the charging equipment charges the equipment to be charged according to the first charging mode;
acquiring a charging state parameter of the equipment to be charged and a discharging state parameter of the charging equipment as second target parameters at intervals of preset time, and judging whether the equipment to be charged is matched with the first charging mode or not according to the second target parameters;
when the device to be charged is judged not to be matched with the first charging mode, determining a second charging mode according to the first target parameter and the second target parameter, and setting the device to be charged according to the second charging mode so that the charging device charges the device to be charged according to the second charging mode.
An intelligent charging device, the device comprising:
the first obtaining unit is used for detecting whether the device to be charged is connected to the charging device through a charging interface included in the device to be charged, and obtaining a battery state parameter of the device to be charged as a first target parameter when the charging device is detected, wherein the first target parameter comprises: the battery type, the battery capacity, the battery residual capacity, the battery temperature and the total charging and discharging times corresponding to the battery;
the first determining unit is used for determining a first charging mode matched with the equipment to be charged according to the first target parameter;
the first charging unit is used for setting the equipment to be charged according to the first charging mode so that the charging equipment charges the equipment to be charged according to the first charging mode;
the judging unit is used for acquiring the charging state parameter of the equipment to be charged and the discharging state parameter of the charging equipment as second target parameters at intervals of preset time, and judging whether the equipment to be charged is matched with the first charging mode or not according to the second target parameters;
and the second determining unit is used for determining a second charging mode according to the first target parameter and the second target parameter when the device to be charged is judged not to be matched with the first charging mode, and setting the device to be charged according to the second charging mode so that the charging device charges the device to be charged according to the second charging mode.
Wherein the second determination unit further includes:
the second acquisition unit is used for inputting the first target parameter and the second target parameter into a preset second machine learning model and acquiring charging mode information output by the second machine learning model when the device to be charged is judged not to be matched with the first charging mode;
a third determination unit configured to determine a charging mode corresponding to the charging mode information output by the second machine learning model as a second charging mode;
and the second charging unit is used for charging the equipment to be charged according to the second charging mode through the charging equipment.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
detecting whether the device to be charged is connected to a charging device through a charging interface contained in the device to be charged, and acquiring a battery state parameter of the device to be charged as a first target parameter when the charging device is detected, wherein the battery state parameter comprises: the battery type, the battery capacity, the battery residual capacity, the battery temperature and the total charging and discharging times corresponding to the battery;
determining a first charging mode matched with the equipment to be charged according to the first target parameter;
setting the equipment to be charged according to the first charging mode so that the charging equipment charges the equipment to be charged according to the first charging mode;
acquiring a charging state parameter of the equipment to be charged and a discharging state parameter of the charging equipment as second target parameters at intervals of preset time, and judging whether the equipment to be charged is matched with the first charging mode or not according to the second target parameters;
when the device to be charged is judged not to be matched with the first charging mode, determining a second charging mode according to the first target parameter and the second target parameter, and setting the device to be charged according to the second charging mode so that the charging device charges the device to be charged according to the second charging mode.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
detecting whether the device to be charged is connected to a charging device through a charging interface contained in the device to be charged, and acquiring a battery state parameter of the device to be charged as a first target parameter when the charging device is detected, wherein the battery state parameter comprises: the battery type, the battery capacity, the battery residual capacity, the battery temperature and the total charging and discharging times corresponding to the battery;
determining a first charging mode matched with the equipment to be charged according to the first target parameter;
setting the equipment to be charged according to the first charging mode so that the charging equipment charges the equipment to be charged according to the first charging mode;
acquiring a charging state parameter of the equipment to be charged and a discharging state parameter of the charging equipment as second target parameters at intervals of preset time, and judging whether the equipment to be charged is matched with the first charging mode or not according to the second target parameters;
when the device to be charged is judged not to be matched with the first charging mode, determining a second charging mode according to the first target parameter and the second target parameter, and setting the device to be charged according to the second charging mode so that the charging device charges the device to be charged according to the second charging mode.
In the embodiment of the invention, firstly, by acquiring the battery state parameters corresponding to the device type of the device to be charged and including the battery type, the battery capacity, the battery remaining capacity, the battery temperature and/or the total charging and discharging times of the battery corresponding to the battery as the first target parameters, thereby determining a first charging mode matching the type of the device to be charged so that the charging device can charge the device according to the first charging mode, furthermore, the invention also comprises the steps of acquiring the charging state parameter of the equipment to be charged and the discharging state parameter of the charging equipment again every preset time, a determination is made as to whether the current charging mode still matches the device to be charged based on these parameters which may reflect whether the actual state of charge is good, and under the condition of judging that the charging mode is not matched, determining a new matched charging mode according to the charging and discharging state parameters and the battery state parameters to charge the equipment to be charged.
Compared with the prior art that the charging mode can be matched only for the single specific type of equipment to be charged in the dynamic charging process, the embodiment of the invention fills the blank in the prior art of charging and improves the efficiency and the safety degree of the charging process.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a diagram of an application environment of the intelligent charging method in one embodiment.
Referring to fig. 1, the intelligent charging method may be implemented based on a device to be charged 1012, and the device to be charged 1012 may be connected to a charging device 1014 for charging. The specific connection mode may include: the data lines matched with various specifications connected with the charging device 1014 in advance are inserted into a preset peripheral interface of the device to be charged, or in the case that the device to be charged 1012 comprises a wireless charging module, the device to be charged 1012 can be connected and charged in a manner of approaching the charging device 1014, wherein the wireless charging can be realized by carrying out electric energy transmission based on the principles of electromagnetic induction, radio wave transmission and reception, magnetic field resonance and the like.
In a specific embodiment, the device to be charged 1012 may be a terminal device containing a rechargeable battery, such as a mobile phone, a tablet computer, a smart watch, and the like, and the charging device 1014 may be a device with electric energy storage and transmission capability, such as a common mobile power source, a wireless charging base, a storage battery, and the like.
In an embodiment of the method, the device to be charged 1012 may include an interface module, a processing module, and a battery module, where the interface module is configured to collect device data information of an external device to determine whether the external device can be used as a charging device for charging and obtain discharge state information of the charging device during charging, the processing module is configured to process the device data information and the discharge state information of the external device obtained through the interface module, and the battery module is configured to obtain state information of a battery included in the device to be charged and charge state information after the charging device is connected. The charging device 1014 in the method at least needs a battery device capable of converting and transmitting electric energy under the condition that the external connection condition meets a preset threshold value.
FIG. 2 is a flow diagram of an intelligent charging method in one embodiment.
Referring to fig. 2, an embodiment of the present invention provides an intelligent charging method. The method can be applied to the terminal of the equipment to be charged, and can also be applied to a system comprising the equipment to be charged and the charging equipment. In practical application scenarios, the variety of the types of devices that can be used as charging devices and the simple structural design of the charging devices due to their simple functions generally do not have a certain order of magnitude of computing and storage capabilities. On the contrary, because the function and use of the device to be charged usually include a calculation and storage module, which can be used to obtain and process the relevant parameters required by the method, and determine and adjust the parameters to a matched charging mode, the invention selects to apply the intelligent charging method to the device to be charged, and the intelligent charging method is realized through the processing module included in the device to be charged, which is more suitable for implementation cost and operation efficiency.
The present embodiment is explained from the viewpoint of a device to be charged as an implementing terminal. The intelligent charging method at least comprises steps S1022-S10210, which are described in detail as follows:
in step S1022, it is detected whether the device to be charged is connected to a charging device through a charging interface included in the device to be charged, and when the charging device is detected, a battery state parameter of the device to be charged is acquired as a first target parameter, where the battery state parameter includes: the battery type, the battery capacity, the battery residual capacity, the battery temperature and the total charging and discharging times corresponding to the battery.
Specifically, in an embodiment, the process of detecting whether the device to be charged is connected to the charging device through the charging interface included in the device to be charged at least includes steps S1032-S1036, which is specifically described with reference to fig. 3.
Fig. 3 shows a process of detecting whether the device to be charged is connected to the charging device through the charging interface included in the device to be charged in the method.
In step S1032, device type information corresponding to the external device connected to the device to be charged is acquired through the charging interface.
In a specific embodiment, the type of the charging interface included in the device to be charged may be a common universal interface type including USB type-C, lightning, Micro-USB, and the like, and is connected to the external device through a data transmission wire of a preset specification through the charging interface. Optionally, the preset charging interface may also be a sensing processing module for wireless charging included in the device to be charged, and is configured to sense and connect to an external device with a wireless charging capability, and acquire device type information corresponding to the external device. Specifically, the types of the external device may include: charging devices such as portable power sources, wireless charging apparatuses, output devices such as projectors, storage devices such as memory cards, input devices such as computers, and the like.
In step S1034, the device type information is matched with the device types in the preset power-suppliable device type library.
In practical applications, when a device to be charged is charged through a peripheral device, in order to ensure the safety of hardware and software of the device to be charged and not to damage the battery performance of the device to be charged, certain restrictions and permission verification need to be performed on the device which is allowed to be charged. The method is characterized in that a power supply device type library is preset for the device to be charged and used for storing various device types which can be used as charging devices for charging, specifically, the device types contained in the charging devices in the library can be a mobile power supply with a certain specification and an adaptive interface type, a power supply output device with output voltage and output current meeting a preset threshold range, a wireless charging device in a working state and the like. On the other hand, in consideration of the difference between the discharging mode and the power supply capacity of different charging devices, when charging is performed through the external device, the device information corresponding to the external device needs to be acquired to formulate a corresponding charging mode.
In step S1036, when the matching is successful, the external device is confirmed as the detected charging device.
In a specific embodiment, when the smart phone serving as the device to be charged is connected to a computer host through a USB data line, the device options of the smart phone that identify the currently connected computer host as the device to be charged may include only serving as a charging device, only performing data transmission, both serving as a charging device and performing data transmission, and the like, so that the computer host may charge the smart phone as the charging device having the device type of the power output apparatus. In one embodiment, when a turned-on mobile power supply is connected to the smartphone through a data line with an interface model adapted, the device type matched in the preset library of energizable device types is the mobile power supply.
After determining that the external device capable of serving as the charging device appears through the above steps, in order to charge the external device through the charging device in a manner suitable for the current state of the device to be charged, the method needs to acquire the battery state parameter of the device to be charged at this time, and specifically includes: the battery is at least one of a battery type, a battery capacity, a battery remaining capacity, a battery temperature and/or a total number of battery charging and discharging.
Therefore, the decisive parameters of the charging and discharging process and the efficiency difference caused by different equipment types of the equipment to be charged are determined.
Firstly, due to different types of devices of the device to be charged, the influence of the difference of the charging and discharging parameters on the charging process is determined by the property and the configuration of the device, specifically, for example, the function of different devices changes, the types of the battery carried by the device are various, for example, the corresponding battery types can include nickel-cadmium batteries, nickel-hydrogen batteries, lithium ion batteries, and the like, and since the charging and discharging principles corresponding to different types of batteries are different, the acquisition of the battery type information plays a critical role in determining a proper charging mode.
The battery capacity and the battery residual capacity can be used for calculating the time left by full charge by the processing module, and the total number of times of charging and discharging the battery can reflect the battery life of the equipment to be charged and the corresponding charge and discharge performance to a certain extent, so that the parameters are obtained as the battery state parameters, and the parameters play a decisive role in ensuring the safety and achieving the maximum energy conversion rate while not causing further damage to the battery performance for charging the equipment to be charged in which way.
In addition, in an alternative embodiment, considering that a great reason affecting safety and experience during charging is that energy conversion rate during power transmission is low due to limitation of hardware conditions and a chemical reaction principle, and part of power is converted into heat energy, so that battery life loss caused by battery heating and heat energy accumulation occurs, battery temperature needs to be obtained to judge whether a battery of a current device to be charged is in an abnormal state such as overheating or freezing, and optionally, the battery temperature can be obtained through a temperature sensing module included in the device to be charged in advance.
After the above key battery state parameters are acquired as the first target parameters, the process of determining the first charging mode, that is, step S1024, matched with the device to be charged according to the first target parameters at least includes steps S1042-S1044 as shown in fig. 4.
Fig. 4 is a flowchart illustrating a first charging mode matching the device to be charged according to the first target parameter in the intelligent charging method according to an embodiment.
In step S1042, the first target parameter is input into a preset first machine learning model, and charging mode information output by the first machine learning model is obtained, where the charging mode information includes: at least one of a rated output voltage, a rated output current, an over-current protection current threshold, a light-load protection current threshold, a short-circuit protection current threshold, and/or a charging time threshold.
The first machine learning model in the method is pre-trained to output corresponding charging mode information according to the preset type of input information, and the following examples illustrate the functions of various parameters in the charging mode information output by the first machine learning model: the rated output voltage and the rated output current refer to voltage and current which should be output by the charging equipment in a normal working state. The conversion rate of the electric energy in the normal working state meets a preset threshold value, and the phenomenon that the equipment to be charged is overheated due to the fact that a large amount of electric energy is converted into heat energy cannot be generated.
And the overcurrent protection current threshold is set to avoid the situation that the voltage output by the charging equipment is unstable under extreme environments or the instantaneous current is overlarge due to improper operation of the equipment to be charged, so that if continuous charging is carried out, the burden and damage to the equipment to be charged are inevitably caused.
In contrast, in the application scenario of the light-load protection current threshold, when the device to be charged is in the later charging stage and the battery electric quantity of the device to be charged is close to the preset full-charge threshold, the device enters the trickle charging mode, and the load on the charging device is weak, so that the charging current is limited below the light-load protection current threshold, and the battery of the device to be charged is maintained while the electric energy is saved.
The short-circuit protection current threshold is used for preventing further safety accidents such as combustion or explosion and the like by cutting off the connection between the equipment to be charged and the charging equipment when the equipment to be charged is detected to have short circuit due to various reasons (such as equipment water inlet, equipment mainboard circuit damage and the like).
The charging time threshold is determined according to the battery capacity and the battery remaining capacity in the battery state parameter acquired in the previous step, and is a longest time threshold for charging the device to be charged by the charging device, because charging for too long time occupies an external interface of the device to be charged on one hand, and on the other hand, potential safety hazards of intermediate products and energy indispensible release, which are accumulated due to continuous progress of an energy transmission reaction, also exist on the other hand.
In step S1044, a first charging mode is determined according to the charging mode information output by the first machine learning model.
Specifically, the mode of charging when the set series of corresponding parameter thresholds satisfy the preset numerical relationship is determined as the first charging mode.
Continuing with the description of fig. 2, in step S1026, the device to be charged is set according to the first charging mode, so that the charging device charges the device to be charged according to the first charging mode.
Specifically, charging mode information corresponding to the first charging mode determined by the processing module of the device to be charged is sent to the battery module of the device to be charged for storage and setting.
In consideration of the fact that in practical application, the device to be charged is usually used at the same time after being connected with the charging device and charged, so that the battery state and the charging current condition of the device to be charged are constantly changed, and similarly, the capability of the charging device for outputting electric energy is changed along with the change of the charging device in the continuous discharging process, so that various relevant parameters of the charging and discharging device need to be obtained again after the charging is carried out for a period of time to judge whether the charging is carried out in the first charging mode determined by the steps, and whether the maximum charging efficiency can be reached or not while the potential safety hazard exists. Specifically, at least step S1028 is performed.
In step S1028, the charging state parameter of the device to be charged and the discharging state parameter of the charging device are obtained as second target parameters every other preset time period, and it is determined whether the device to be charged matches the first charging mode according to the second target parameters.
In a specific embodiment, the preset time interval for adjusting the charging mode may be adjusted according to the type and the battery capacity of the device to be charged and the type and the usage mode of the device to be charged. If the device to be charged is a smartphone in an airplane mode, the preset time interval may be slightly longer than that when the smartphone in which multiple applications are running simultaneously is charged.
Specifically, the charging state parameters corresponding to the device to be charged include: at least one of charging mode information, battery temperature, charging current, charging voltage, and/or charged time. The function of the above parameters is explained as follows: the acquired relevant parameters included in the current charging mode information can be used for judging whether the parameter thresholds corresponding to the charging mode are still matched with the equipment to be charged or not, so that under the condition that mismatching is judged in the subsequent steps, the current charging mode is changed based on the current charging mode, and a new charging mode is adjusted.
Also, the battery temperature and the charged time are used to determine whether the device to be charged has reached a dangerous state requiring suspension of charging or replacement of the charging mode due to overheating or low temperature of the battery or long-term charging.
The charging current and the charging voltage are used as the electric energy data actually received by the device end to be charged and compared with the output current and the output voltage of the charging device so as to determine the energy transmission and the charge rate of the current charging process.
Correspondingly, the discharge state parameters corresponding to the charging device include: the charging device comprises at least one of an output voltage, an output current, a residual capacity and/or a charging device temperature corresponding to the charging device.
In the aspect of charging equipment, the purpose of acquiring the corresponding output voltage and output current is to compare the output voltage and output current with the charging voltage and charging current of the previous equipment to be charged and judge whether the consumption is caused by incomplete electric energy conversion exceeding a threshold value.
The residual capacity of the charging equipment can send a message that other charging equipment needs to be replaced through the charging equipment when the electric quantity of the charging equipment is not enough to continue charging the charging equipment on the one hand, and on the other hand, the output capacity of the charging equipment can be judged through the residual capacity of the charging equipment. And the temperature of the charging equipment is obtained to avoid uncomfortable experience and burning and explosion hidden dangers caused by overheating of the equipment.
After the charge-discharge state parameters are obtained, a specific process of judging whether the device to be charged is matched with the first mode according to the second target parameters is explained as follows.
And judging whether the equipment to be charged is matched with the first charging mode or not according to the second target parameter.
Specifically, when the second target parameter and each preset threshold corresponding to a first charging mode meet a preset numerical relationship, it is determined that the device to be charged is matched with the first charging mode, otherwise, it is determined that the device to be charged is not matched with the first charging mode.
Specifically, the specific process of determining the discharge state parameter in the second target parameter includes: under the condition that the temperature of the charging equipment is lower than a preset temperature threshold value, the difference value between the output voltage of the charging equipment and the charging voltage of the equipment to be charged is smaller than a preset voltage difference threshold value, meanwhile, the difference value between the output current of the charging equipment and the charging current of the equipment to be charged is smaller than a preset current difference threshold value, under the condition that the residual electric quantity of the charging equipment is larger than a preset electric quantity storage threshold value, the equipment to be charged is judged to be matched with a current first charging mode, and otherwise, the equipment to be charged is judged to be not matched with the first charging mode.
It should be noted that when any one of the discharge state parameters does not conform to the numerical relationship with the preset threshold, it is determined that the device to be charged is already in a state of not matching with the first charging mode, and it is not necessary that all values between all parameters and the preset threshold all satisfy the preset relationship, or that matching and determination of each parameter are performed one by one, so as to improve the efficiency of adjusting to the matching charging mode when the mismatch occurs.
In addition, when the charging state parameter in the second target parameter and each preset threshold corresponding to the first charging mode meet a preset numerical value relationship, the device to be charged is determined to be matched with the first charging mode, otherwise, the device to be charged is determined to be not matched with the first charging mode.
The specific process of judging the charge state parameter includes: under the condition that the battery temperature of the equipment to be charged is lower than a preset temperature threshold value, the difference value between the charging voltage of the equipment to be charged and the output voltage of the charging equipment is smaller than a preset voltage difference threshold value, meanwhile, the difference value between the charging current of the equipment to be charged and the output current of the equipment to be charged is smaller than a preset current difference threshold value, under the condition that the charged time of the equipment to be charged is smaller than a preset charging time threshold value, the equipment to be charged is judged to be matched with a current first charging mode, and otherwise, the equipment to be charged is judged to be not matched with the first charging mode.
It should be noted that when any one of the charging state parameters does not conform to the numerical relationship with the preset threshold, it is determined that the device to be charged is already in a state of not matching with the first charging mode, and it is not necessary that all values between all the parameters and the preset threshold all satisfy the preset relationship, or matching and determining of each parameter are performed one by one, so as to improve the efficiency of adjusting to the matching charging mode when the mismatch occurs.
When it is determined through the above steps that the device to be charged is not matched with the first charging mode, a second charging mode needs to be determined again according to the first target parameter and the second target parameter, and the device to be charged is set according to the second charging mode, so that the charging device charges the device to be charged according to the second charging mode. And determining the charging mode under the condition that the set corresponding parameter threshold values accord with the preset numerical value relationship as the second charging mode, and storing and configuring the parameter information corresponding to the second charging mode through the battery module and the charging interface module of the device to be charged respectively, namely performing step S10210.
Specifically, step S10210 may include at least steps S1062-S1064 shown in FIG. 5. Fig. 5 is a flowchart illustrating an operation performed after determining that the charging mode is not matched with the first charging mode in the intelligent charging method according to an embodiment of the present invention, which specifically includes steps S1062-S1064.
In step S1062, when it is determined that the device to be charged does not match the first charging mode, inputting the first target parameter and the second target parameter into a preset second machine learning model, and acquiring charging mode information output by the second machine learning model, where the charging mode information includes at least one of a rated output voltage, a rated output current, an overcurrent protection current threshold, a light-load protection current threshold, a short-circuit protection current threshold, and/or a charging time threshold.
In a specific embodiment, the second machine learning model is trained in advance, and the input of the second machine learning model further requires that the initial battery state parameter is based on a battery-related parameter of the charging device because the change of the charging/discharging state is based on the battery-related parameter of the charging device, and the battery state parameter of core information, i.e. a first target parameter, corresponding to the battery, the battery type, the battery capacity, the battery remaining capacity, the battery temperature and/or the total number of times of charging/discharging the battery is required to be based before determining any charging mode.
In step S1064, a charging mode corresponding to the charging mode information output by the second machine learning model is determined as a second charging mode, the device to be charged is set according to the second charging mode, and the device to be charged, which is set by the charging device, is charged.
The specific setting process on the device to be charged can be that the charging mode information output by the model is acquired by a processing module of the device to be charged and is sent to a battery module of the smart phone for storage and related setting, so that the mobile power supply charges the device to be charged according to the limitation of various parameters contained in the second charging mode.
The following describes a specific flow in an application scenario of "charging a smartphone with a mobile power supply" according to an exemplary embodiment of the present invention with reference to fig. 6.
In this application scenario, the smart phone is a mobile phone having an independent operating system, an independent core processor and an independent memory, capable of installing a certain number of application programs for expansion, and capable of implementing wireless network access through a mobile communication network. In addition, the smart phone as the device to be charged in the method should have necessary computing and processing capabilities, such as being unable to be in a shutdown state or being unable to start a module required for implementing the method due to insufficient memory, and the mobile power source as the charging device should have a certain electric energy storage and discharge capability, so that the device to be charged can detect its existence.
Specifically, the specific process under the application scenario in an embodiment of the present invention includes steps S1072 to S1078, which are described as follows:
in step S1072, after the smartphone detects that there is an external mobile power supply, a battery state parameter of the smartphone is obtained, and a first charging mode matched with the smartphone is determined according to the battery state parameter.
In a specific application scenario, a charging interface of the smart phone can be of a Micro-USB type, a USB data line connected with a mobile power supply in advance is inserted into the USB interface to establish communication with an interface module of the smart phone, the smart phone acquires device type information of the mobile power supply, namely a small energy storage power supply, through the interface module, and then searches whether the small energy storage power supply is matched with the type of the power supply device in a preset power supply device information base, and under the condition of searching, the smart phone identifies the mobile power supply as charging equipment.
After determining that the charging device is connected, a processing module of the smartphone obtains current state parameters of the battery stored in the battery module, and in this application scenario, the parameters may specifically be as follows: the battery type is a lithium battery, the battery capacity is 4000 milliampere hours, the battery residual capacity is 40 percent, the battery temperature is 24 ℃ and the total charging and discharging times of the battery are 80 times.
And then inputting the parameters into a pre-trained first machine learning model, acquiring charging mode information output by the model, and monitoring and limiting the states of the charging equipment and the charged smart phone in the charging process by setting the threshold parameters so as to determine the charging mode which best accords with the current battery state of the smart phone.
In this application scenario, the information of the first charging mode may specifically include: for the charging device: the rated output voltage is 5V, the rated output current is 2000 mA, the overcurrent protection current threshold value is 2200 mA, the light load protection current threshold value is 1200 mA, the short-circuit protection current threshold value is 2500 mA, and the charging time threshold value is 3 hours.
In step S1074, the smart phone is charged by the mobile power supply according to a first charging mode;
in the application scenario, each parameter corresponding to the determined first charging mode is specifically sent to a battery module of the smart phone for storage and configuration.
In step S1076, the charging state parameter of the smart phone and the discharging state parameter of the mobile power supply are obtained every preset time period, and it is determined whether the smart phone is still matched with the first charging mode.
In this application scenario, the charging state parameter of the smart phone and the discharging state parameter of the mobile power supply may be acquired every 30 minutes, wherein the discharging state parameter of the mobile power supply may be acquired through an interface module of the smart phone.
Specifically, the charging state information corresponding to the smart phone may include: the charging mode information is the first charging mode determined in step S1204, the battery temperature is 45 degrees celsius, the charging current is 1700 milliamps, the charging voltage is 4.8 volts, and the charged time is 3.2 hours.
And the charging state information corresponding to the mobile power supply may include: the output voltage is 4.8 volts, the output current is 1800 milliamperes, the residual capacity is 1200 milliamperes, and the temperature of the charging equipment is 40 ℃.
In this application scenario, after comparing the charge and discharge parameters with the preset corresponding thresholds, the following parameter items that do not conform to the preset numerical relationship can be obtained: if the battery temperature value is 48 ℃ higher than the preset threshold value of 35 ℃, and the charged time is 3.2 hours higher than the preset charging time threshold value of 3 hours, it is determined that the battery is not matched with the first charging mode, and a new matched charging mode needs to be adjusted.
It should be noted that, considering that there is a certain energy conversion rate and power loss in the actual charging and discharging operations, when the output current of the mobile power supply is 1800 milliamperes and the charging current of the smartphone is 1700 milliamperes, the energy conversion rate in the preset conversion rate fluctuation range can be regarded as a normal charging condition, so that the first charging mode is not determined to be matched due to the parameters.
In step S1078, when it is determined that the charging mode is not matched with the first charging mode, the second charging mode is re-matched according to the relevant parameters of the smartphone and the mobile power supply, and the smartphone set according to the second charging mode is charged by the mobile power supply.
In this application scenario, the process of determining the second charging mode includes: the battery state parameters and the charging state parameters of the smart phone and the discharging state parameters of the mobile power supply are obtained to serve as output data of a second machine learning model which is trained in advance, charging mode information output by the second machine learning model is obtained to serve as second charging mode information, and the mobile power supply can charge the smart phone according to various parameter limits contained in the second charging mode by storing and setting the charging mode information on a battery module of the smart phone.
Fig. 7 is a block diagram of an intelligent charging device according to an embodiment.
Referring to fig. 7, an intelligent charging device 1080 according to an embodiment of the present invention includes: a first acquisition unit 1082, a first determination unit 1084, a first charging unit 1086, a determination unit 1088, and a second determination unit 10810.
The first obtaining unit 1802 is configured to detect whether a device to be charged is connected to a charging device through a charging interface included in the device to be charged, and when the charging device is detected, obtain a battery state parameter of the device to be charged as a first target parameter, where the first target parameter includes: the battery type, the battery capacity, the battery residual capacity, the battery temperature and the total charging and discharging times corresponding to the battery.
A first determining unit 1804, configured to set the device to be charged according to the first charging mode, so that the charging device charges the device to be charged according to the first charging mode.
A first charging unit 1806, configured to set the device to be charged according to the first charging mode, so that the charging device charges the device to be charged according to the first charging mode.
A determining unit 1808, configured to obtain a charging state parameter of the device to be charged and a discharging state parameter of the charging device every preset time period, and determine whether the device to be charged matches the first charging mode according to the charging state parameter and the discharging state parameter.
A second determining unit 18010, configured to determine a second charging mode according to the first target parameter and the second target parameter when it is determined that the device to be charged is not matched with the first charging mode, and set the device to be charged according to the second charging mode, so that the charging device charges the device to be charged according to the second charging mode.
In an optional embodiment, the second unit 18010 may further include the following: the second acquiring unit, the third determining unit and the second charging unit are explained as follows:
the second acquisition unit is used for inputting the first target parameter and the second target parameter into a preset second machine learning model and acquiring charging mode information output by the second machine learning model when the device to be charged is judged not to be matched with the first charging mode;
a third determination unit configured to determine a charging mode corresponding to the charging mode information output by the second machine learning model as a second charging mode;
and the second charging unit is used for charging the equipment to be charged according to the second charging mode through the charging equipment.
FIG. 8 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a terminal, and may also be a server. As shown in fig. 8, the computer device includes a processor, a memory and a charging interface, a battery module, and a processing device connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program which, when executed by the processor, causes the processor to implement the present intelligent charging method. The internal memory may also store a computer program, and when the computer program is executed by the processor, the processor may execute the intelligent charging method. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is proposed, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
detecting whether the device to be charged is connected to a charging device through a charging interface contained in the device to be charged, and acquiring a battery state parameter of the device to be charged as a first target parameter when the charging device is detected, wherein the battery state parameter comprises: the battery type, the battery capacity, the battery residual capacity, the battery temperature and the total charging and discharging times corresponding to the battery;
determining a first charging mode matched with the equipment to be charged according to the first target parameter;
setting the equipment to be charged according to the first charging mode so that the charging equipment charges the equipment to be charged according to the first charging mode;
acquiring a charging state parameter of the equipment to be charged and a discharging state parameter of the charging equipment as second target parameters at intervals of preset time, and judging whether the equipment to be charged is matched with the first charging mode or not according to the second target parameters;
when the device to be charged is judged not to be matched with the first charging mode, determining a second charging mode according to the first target parameter and the second target parameter, and setting the device to be charged according to the second charging mode so that the charging device charges the device to be charged according to the second charging mode.
In one embodiment, a computer-readable storage medium is proposed, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the steps of:
detecting whether the device to be charged is connected to a charging device through a charging interface contained in the device to be charged, and acquiring a battery state parameter of the device to be charged as a first target parameter when the charging device is detected, wherein the battery state parameter comprises: the battery type, the battery capacity, the battery residual capacity, the battery temperature and the total charging and discharging times corresponding to the battery;
determining a first charging mode matched with the equipment to be charged according to the first target parameter;
setting the equipment to be charged according to the first charging mode so that the charging equipment charges the equipment to be charged according to the first charging mode;
acquiring a charging state parameter of the equipment to be charged and a discharging state parameter of the charging equipment as second target parameters at intervals of preset time, and judging whether the equipment to be charged is matched with the first charging mode or not according to the second target parameters;
when the device to be charged is judged not to be matched with the first charging mode, determining a second charging mode according to the first target parameter and the second target parameter, and setting the device to be charged according to the second charging mode so that the charging device charges the device to be charged according to the second charging mode.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.