Charging method, device, apparatus, and computer-readable storage medium

By calculating the total cost of the robot to each charging station and selecting the station with the minimum cost for charging, the problem of the mobile robot being unable to quickly select a charging station is solved, and the shortest charging time strategy is achieved.

CN114386709BActive Publication Date: 2025-10-21SAIC GM WULING AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210063497.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-19
Publication Date
2025-10-21
Estimated Expiration
2042-01-19

AI Technical Summary

Technical Problem

When there are multiple charging stations, the mobile robot cannot select the charging station with the shortest charging time for charging.

Method used

By obtaining the total cost of the target robot from its current position to each charging station, the minimum cost is calculated, and a charging station is selected for charging based on the minimum cost. The A* algorithm and particle swarm optimization algorithm are used for path planning and iterative updates.

Benefits of technology

It reduces the time required for mobile robots to charge, provides an optimal charging strategy, and improves search efficiency and the accuracy of charging station selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114386709B_ABST
    Figure CN114386709B_ABST
Patent Text Reader

Abstract

The application discloses a charging method, device and equipment and a computer readable storage medium. The charging method comprises the following steps: acquiring a first total cost of a target robot moving from a current position to a current charging station; acquiring a second total cost of the target robot moving from the current position to a next charging station; calculating a minimum cost according to the first total cost and the second total cost; and charging the target robot according to the charging station corresponding to the minimum cost. The application can reduce the time consumed by the mobile robot for charging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent charging technology, and in particular to a charging method, device, equipment and computer-readable storage medium. Background Art

[0002] As society becomes increasingly intelligent, more and more intelligent mobile robots are being used in logistics, manufacturing, smart homes, and other fields. Since intelligent mobile robots typically rely on electricity for power, and currently, when there are multiple charging stations, mobile robots cannot select the one with the shortest charging time. Therefore, reducing the time required for mobile robots to charge is a technical challenge that needs to be solved.

[0003] The above content is only used to assist in understanding the technical solution of the present invention and does not constitute an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of the present invention is to provide a charging method, device, equipment and computer-readable storage medium, aiming to solve the technical problem of how to reduce the time required for charging a mobile robot.

[0005] To achieve the above object, the present invention provides a charging method, which includes:

[0006] Obtain the first total cost of the target robot moving from the current position to the current charging station;

[0007] Obtain a second total cost for the target robot to move from its current position to the next charging station;

[0008] calculating a minimum cost based on the first total cost and the second total cost;

[0009] The target robot is charged according to the charging station corresponding to the minimum cost.

[0010] Optionally, before the step of obtaining a first total cost of the target robot moving from the current position to the current charging station, the step includes:

[0011] Calculate the power consumption of the target robot moving from its current location to the current charging station;

[0012] If the power consumption is less than the remaining power of the target robot, the step of obtaining a first total cost of the target robot moving from the current position to the current charging station is executed.

[0013] Optionally, the step of obtaining a first total cost of the target robot moving from a current position to a current charging station includes:

[0014] Obtain the first time cost and the first distance cost of the target robot moving from the current position to the current charging station;

[0015] The sum of the first time cost and the first distance cost is taken as the first total cost.

[0016] Optionally, the step of obtaining a first time cost of the target robot moving from a current position to a current charging station includes:

[0017] Get the shortest time for the target robot to move from its current position to the current charging station;

[0018] And obtain the waiting time corresponding to the current charging station;

[0019] The sum of the shortest time and the waiting time is taken as the first time cost.

[0020] Optionally, the step of obtaining a first time cost of the target robot moving from a current position to a current charging station includes:

[0021] Detecting whether the current charging station is reserved by another robot;

[0022] If the current charging station is reserved by another robot, receiving the scheduled charging time sent by the other robot;

[0023] The sum of the shortest time and the predetermined charging time is used as the first time cost.

[0024] Optionally, before the step of charging the target robot according to the charging station corresponding to the minimum cost, the step includes:

[0025] Get the initial speed and initial position of the target robot, and get the speed and position of other robots;

[0026] Obtaining a historical optimal position and a global optimal position of the target robot according to the initial speed and initial position of the target robot and the speeds and positions of other robots;

[0027] A charging station corresponding to the minimum cost is determined according to the historical optimal position and the global optimal position.

[0028] Optionally, the step of determining a charging station corresponding to a minimum cost based on the historical optimal position and the global optimal position includes:

[0029] Iteratively updating the historical optimal position and the global optimal position;

[0030] When the number of iterations reaches a preset number of iterations, the global optimal position corresponding to the preset number of iterations is determined to be the charging station corresponding to the minimum cost.

[0031] In addition, to achieve the above-mentioned object, the present invention further provides a charging device, comprising:

[0032] A cost acquisition module, configured to acquire a first total cost of the target robot moving from a current position to a current charging station;

[0033] The cost acquisition module is further used to obtain a second total cost of the target robot moving from the current position to the next charging station;

[0034] The cost calculation module is used to calculate the minimum cost according to the first total cost and the second total cost.

[0035] A charging selection module is used to charge the target robot according to the charging station corresponding to the minimum cost.

[0036] In addition, to achieve the above-mentioned purpose, the present invention also provides a charging device, which includes a memory, a processor, and a charging program stored in the memory and executable on the processor. When the charging program is executed by the processor, the steps of the charging method described above are implemented.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a charging program is stored. When the charging program is executed by a processor, the steps of the charging method as described above are implemented.

[0038] The present invention provides a charging method, apparatus, equipment and computer-readable storage medium. The method obtains a first total cost of a target robot moving from a current position to a current charging station, obtains a second total cost of a target robot moving from a current position to a next charging station, calculates a minimum cost based on the first total cost and the second total cost, charges the target robot based on a charging station corresponding to the minimum cost, calculates the cost consumed between all charging stations and the target robot, and then selects a charging station corresponding to the minimum cost to charge the target robot, thereby providing an optimal charging strategy for the robot. In the case of multiple charging stations, a charging station with the shortest charging time is selected for charging the mobile robot, thereby reducing the time required for charging the mobile robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the structure of the equipment in the hardware operating environment involved in the embodiment of the present invention;

[0040] Figure 2 This is a flow chart of a first embodiment of a charging method according to the present invention;

[0041] Figure 3 This is a flow chart of a first application scenario involved in an embodiment of the present invention;

[0042] Figure 4 This is a flow chart of a second application scenario involved in an embodiment of the present invention;

[0043] Figure 5 This is a flow chart of a third application scenario involved in an embodiment of the present invention;

[0044] Figure 6 Schematic diagram of the charging device of the present invention.

[0045] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0047] It should be noted that the descriptions of "first", "second", etc. in the present invention are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the terminal / device structure of the hardware operating environment involved in the embodiment of the present invention.

[0050] The device in the embodiment of the present invention may be a terminal device such as a PC (personal computer), a portable computer, or a server.

[0051] like Figure 1As shown, the charging device may include: a processor 1001, such as a CPU (Central Processing Unit), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as wireless fidelity (WIreless-FIdelity, WI-FI). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0052] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation of the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0053] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and a charging program.

[0054] exist Figure 1 In the device shown, the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the screen projection control program stored in the memory 1005 and perform the following operations:

[0055] Obtain the first total cost of the target robot moving from the current position to the current charging station;

[0056] Obtain a second total cost for the target robot to move from its current position to the next charging station;

[0057] calculating a minimum cost based on the first total cost and the second total cost;

[0058] The target robot is charged according to the charging station corresponding to the minimum cost.

[0059] Based on the above hardware structure, various embodiments of the charging method of the present invention are proposed.

[0060] The embodiment of the present invention provides a charging method, referring to Figure 2 , Figure 2 Schematic diagram of the flow of the first embodiment of the charging method of the present invention.

[0061] In this embodiment, the charging method includes:

[0062] Step S10, obtaining a first total cost for the target robot to move from the current position to the current charging station;

[0063] In this embodiment, a first total cost of the target robot moving from the current position to the current charging station is obtained, wherein the robot can automatically search for surrounding charging stations around the robot, determine the current charging station among the surrounding charging stations, and then calculate the first total cost of the target robot moving from the current position to the current charging station. The first total cost includes a first time cost and a first distance cost. The first time cost and the first distance cost may affect the time required for the target robot to move to the current charging station for charging. In this embodiment, the A* algorithm can be used to first determine the direction of the surrounding charging stations in each search, and then search according to the determined direction. The A* algorithm is a heuristic path planning algorithm. Compared with the non-heuristic algorithm's random traversal method, it greatly improves the search efficiency.

[0064] Step S20, obtaining a second total cost for the target robot to move from the current position to the next charging station;

[0065] In this embodiment, the second total cost of the target robot moving from the current position to the next charging station is obtained. The next charging station is any other charging station in the surrounding charging stations except the current charging station. That is, after calculating the first total cost of the current charging station, the robot switches to the next charging station to calculate the total cost of the next charging station. If the current charging station is charging station i, the next charging station is charging station i+1. Figure 1 After calculating the time cost and distance cost from the current point to charging station i, i is assigned to i+1, and the power consumption from the current point to charging station i+1 is calculated. It should be noted that the calculation process of time cost and distance cost can be carried out at the same time. The current point is the current position of the robot.

[0066] In this embodiment, before the step of obtaining the second total cost of the target robot moving from the current position to the next charging station, it also includes: calculating the power consumption of the target robot moving from the current position to the next charging station. If the power consumption is less than the remaining power of the target robot, it indicates that the remaining power of the target robot is sufficient for the target robot to reach the next charging station. At this time, the next charging station is included in the alternative charging station, and the step of obtaining the second total cost of the target robot moving from the current position to the next charging station is executed.

[0067] Step S30, calculating a minimum cost based on the first total cost and the second total cost;

[0068] Step S40: charging the target robot according to the charging station corresponding to the minimum cost.

[0069] In this embodiment, the minimum cost is calculated based on the first and second total costs. The minimum cost can be the total cost with the smallest value between the first and second total costs. The target robot is then charged at the charging station corresponding to the minimum cost. For example, if the first total cost is 10 and the second total cost is 15, the minimum cost is the first total cost. The target robot is then charged at the current charging station corresponding to the first total cost to determine the charging station with the lowest cost for the target robot. In this embodiment, the charging station with the minimum cost is referred to as the global optimal solution.

[0070] Furthermore, before obtaining the first total cost of the target robot moving from the current position to the current charging station in step S10, the method further includes:

[0071] Step A, calculate the power consumption of the target robot moving from the current position to the current charging station;

[0072] Step B: If the power consumption is less than the remaining power of the target robot, then execute the step of obtaining a first total cost of the target robot moving from the current position to the current charging station.

[0073] In this embodiment, in order to avoid the situation where the robot cannot reach the charging station normally for charging due to exhaustion of power before moving to the charging station, the power consumption of the target robot when moving from the current position to the current charging station can be calculated before calculating the first total cost. If the power consumption is less than the current remaining power of the target robot, it indicates that the remaining power of the target robot itself is sufficient for moving from the current position to the current charging station, and the robot has enough power to move to the current charging station for charging. Therefore, the subsequent step of obtaining the first total cost can be executed, that is, the current charging station can be included in the alternative charging stations. Furthermore, if the power consumption is greater than or equal to the remaining power of the target robot, it indicates that the remaining power of the target robot is not enough to support the target robot to move to the current charging station for charging. At this time, the current charging station is discarded, that is, the current charging station is not included in the alternative charging stations, and the next charging station is screened. Figure 3As shown, the power consumption of the robot from the current point to charging station i is calculated, and it is determined whether the remaining power of the robot is greater than the power consumption. If the remaining power is greater than the power consumption, charging station i is selected as an alternative charging station. If the remaining power is less than or equal to the power consumption, charging station i is not included in the alternative charging stations, and the power consumption of charging station i+1 is calculated. Then, the time cost and distance cost from the current point to charging station i are calculated, and the particle swarm optimization algorithm is used to calculate the global optimal solution. In this way, the alternative charging stations that can be included in the alternative charging stations are obtained from all the surrounding charging stations. In this embodiment, all the alternative charging stations around the target robot are calculated, and the total cost between the target robot and each alternative charging station is obtained. The global optimal solution is calculated based on the total cost.

[0074] In this embodiment, the average power consumption per 100 kilometers and the total length of the path from the current position of the target robot to the current charging station can be obtained. The power consumption of the target robot moving from the current position to the current charging station can be calculated based on the average power consumption per 100 kilometers and the total length of the path. The formula can be constructed to Calculate the power consumption, where E is the power consumption of the target robot moving from the current position to the current charging station, Eave is the average power consumption per 100 kilometers, and Xj is the length of the jth segment in the path set. is the total path length.

[0075] Furthermore, in step S10, obtaining a first total cost of the target robot moving from the current position to the current charging station includes:

[0076] Step C, obtaining a first time cost and a first distance cost of the target robot moving from the current position to the current charging station;

[0077] Step D: taking the sum of the first time cost and the first distance cost as the first total cost.

[0078] In this embodiment, the first time cost is the time cost required for the target robot to move from the current position to the current charging station, and the first distance cost is the shortest path for the target robot to move from the current position to the current charging station. The first time cost and the first distance cost of the current charging station are obtained, and the sum of the first time cost and the first distance cost is taken as the first total cost. In this embodiment, the second total cost of the target robot moving from the current position to the next charging station is obtained. The next charging station can be all other charging stations in the surrounding charging stations except the current charging station, that is, the sum of the time cost and distance cost required for the target robot to move to all the surrounding alternative charging stations is obtained, and then according to the total costs corresponding to all the alternative charging stations, the charging station with the smallest total cost is obtained from all the surrounding charging stations.

[0079] Furthermore, the above step C, the step of obtaining the first time cost of the target robot moving from the current position to the current charging station, includes:

[0080] Step c1, obtaining the shortest time for the target robot to move from the current position to the current charging station;

[0081] Step c2, and obtain the waiting time corresponding to the current charging station;

[0082] Step c3: taking the sum of the shortest time and the waiting time as the first time cost.

[0083] In this embodiment, the first time cost of the target robot moving from the current position to the current charging station includes the shortest time for the target robot to move from the current point to the current charging station and the waiting time required at the current charging station to wait for the previous mobile robot to be fully charged. The waiting time is the time it takes for the mobile robot being charged at the current charging station to be fully charged. The waiting time can also be the scheduled charging time of the current charging station.

[0084] In this embodiment, the shortest time is recorded as t1, and the shortest time t1 is calculated according to the path length and the average speed, wherein the path length is divided into n segments, and the jth segment is one of the n segments. Specifically, it can be calculated by the formula Calculate the shortest time, where Xj is the path length of the jth segment in the path set, Vj is the average speed of the jth segment in the speed set, and n is the number of segments in the path length. The average speed Vj satisfies Vj = min(Vcur, Vroad, Vref), i.e., the average speed is the minimum of the speed limit of the road curvature, the speed limit of the road within the driving range, and the set speed of the mobile robot. Vcur is the speed limit of the road curvature, Vroad is the speed limit of the road within the driving range, and Vref is the set speed of the mobile robot. In this embodiment, the waiting time is recorded as t2, and the sum of the shortest time and the waiting time is used as the first time cost, i.e., the first time cost cost1 = t1 + t2. In this embodiment, the path length of the target robot from the current position to the current charging station is divided into multiple segments, which facilitates the calculation of the shortest path for the target robot from the current position to the current charging station based on the multiple path segments.

[0085] In another embodiment, if the target robot has determined the charging station for charging, that is, the target robot has calculated the global optimal solution, and there is no robot charging at the current charging station, then the time for the target robot to move from the current point to the current charging station and the time for the target robot to be fully charged at the current charging station are obtained, and the sum of the time for the target robot to move from the current point to the current charging station and the time for the target robot to be fully charged at the current charging station is sent to other robots, so that other robots can calculate the global optimal solution of other robots based on the sum of the time.

[0086] In this embodiment, the first distance cost is recorded as cost2. The first distance cost of the target robot moving from the current position to the current charging station includes the shortest path between the target robot moving from the current point to the current charging station. In this embodiment, the A* algorithm is used for global path planning to obtain the shortest path from the current point to the current charging station. The Manhattan distance d(i,j) is calculated according to the Manhattan distance calculation formula d(i,j)=|xi-xj|+|yi-yj|. The Manhattan distance is used as the estimated cost h(n) of the optimal path from the target robot to the target node. The estimated cost h(n) is added to the actual cost g(n) to obtain the evaluation function f(n) of the target robot from the current position to the target point, that is, f(n)=g(n)+h(n). The shortest path is obtained according to the evaluation function, where xi is the horizontal coordinate of the current position of the target robot, xj is the horizontal coordinate of the position of the target path, yi is the vertical coordinate of the current position of the target robot, and yj is the vertical coordinate of the position of the target path.

[0087] In this embodiment, the above step C, the step of obtaining the first time cost of the target robot moving from the current position to the current charging station, further includes:

[0088] Step c4, detecting whether the current charging station is reserved by other robots;

[0089] Step c5: If the current charging station is reserved by another robot, receiving the scheduled charging time sent by the other robot;

[0090] Step c6: taking the sum of the shortest time and the predetermined charging time as the first time cost.

[0091] In this embodiment, if there are multiple mobile robots and multiple charging stations, and multiple mobile robots calculate the global optimal solution at the same time, the result of each mobile robot calculating the global optimal solution will be affected by the global optimal solutions of other robots. Therefore, in this embodiment, it is possible to detect whether the current charging station is reserved by other robots, that is, to determine whether the current charging station is the global optimal solution determined by other robots. If the current charging station is reserved by other robots, it is necessary to consider the time for other robots to arrive at the current charging station and be fully charged, that is, to receive the scheduled charging time sent by other robots. The scheduled charging time is the time for other robots to move to the current charging station plus the time for other robots to be fully charged at the current charging station. The sum of the shortest time and the scheduled charging time is taken as the first time cost. The target robot and other robots each arrive at each alternative charging station for a certain time. The total cost of the charging station is stored, and when the target robot determines the global optimal solution, the global optimal solution is sent to other robots. The target robot can also accept the global optimal solutions corresponding to other robots sent by other robots, and calculate the global optimal solution of the target robot according to the global optimal solutions corresponding to other robots. For example, when robot No. 1 is calculating the global optimal solution, robot No. 2 has already calculated the global optimal solution of robot No. 2, that is, robot No. 2 has selected one of the charging stations as the final charging station to be reached. Robot No. 2 sends the scheduled charging time to the target robot. The target robot uses the sum of the shortest time and the scheduled charging time as the first time cost, and then calculates the first total cost from the target robot to the current charging station and the second total cost from the target robot to the second charging station to calculate the global optimal solution of the target robot.

[0092] In this embodiment, the first total cost of the target robot moving from the current position to the current charging station is obtained, and the second total cost of the target robot moving from the current position to the next charging station is obtained. The minimum cost is calculated based on the first total cost and the second total cost. The target robot is charged according to the charging station corresponding to the minimum cost. By calculating the cost consumed between all charging stations and the target robot, the charging station corresponding to the minimum cost is selected to charge the target robot, and an optimal charging strategy is provided to the robot. In the case of multiple charging stations, a charging station with the shortest charging time is selected for the mobile robot to charge, thereby reducing the time required for charging the mobile robot. In this embodiment, the optimal charging strategy is selected by comprehensively considering both time cost and distance cost.

[0093] Furthermore, based on the above-mentioned first embodiment, a second embodiment of the charging method of the present invention is proposed. In this embodiment, before the step S40 of charging the target robot according to the charging station corresponding to the minimum cost, the method includes:

[0094] Step E, obtaining the initial velocity and initial position of the target robot, and obtaining the velocity and position of other robots;

[0095] Step F, obtaining the historical optimal position and the global optimal position of the target robot based on the initial speed and initial position of the target robot and the speeds and positions of other robots;

[0096] Step G: Determine the charging station corresponding to the minimum cost based on the historical optimal position and the global optimal position.

[0097] In this embodiment, before charging the target robot at the charging station corresponding to the minimum cost, the charging station corresponding to the minimum cost is determined. The robot's calculation of the charging station corresponding to the minimum cost is an iterative process, and the global optimal solution changes with the robot's position and velocity during the iteration. In this embodiment, the speed and position of the target robot and other robots are randomly initialized, and the initial speed and initial position of the target robot and the speed and position of the other robots are obtained. Based on the initial speed and initial position of the target robot and the speed and position of the other robots, the target robot's historical optimal position and the global optimal position are calculated. The historical optimal position is the current optimal solution, and the global optimal solution is the global optimal solution during the iteration. The other robots are robots other than the target robot. The charging station corresponding to the minimum cost is updated based on the historical optimal position and the global optimal position. The initial speed is the target robot's moving speed, and the initial position is the target robot's moving direction. In this embodiment, the global optimal solution is calculated using a particle swarm optimization algorithm. Each robot independently searches for the historical optimal position in the search space and sends this historical optimal position to other robots in the swarm to calculate the global optimal position. All robots adjust their speed and position based on their own historical optimal position and global optimal position, updating the charging station corresponding to the minimum cost in real time.

[0098] Furthermore, the above step G, the step of determining the charging station corresponding to the minimum cost based on the historical optimal position and the global optimal position, includes:

[0099] Step g1, iteratively updating the historical optimal position and the global optimal position;

[0100] Step g2: When the number of iterations reaches a preset number of iterations, the global optimal position with the minimum cost is determined as the charging station corresponding to the minimum cost.

[0101] In this embodiment, the historical optimal position and the global optimal position are iteratively updated. When the number of iterations reaches a preset number of iterations, the global optimal position corresponding to the preset number of iterations is determined as the charging station corresponding to the minimum cost. In each iteration, the historical optimal position and the global optimal position are updated according to the speed and position of the target robot. The speed function of the target robot in each iteration is calculated as: v i =ω·v i +c1·rand()·(pbest i -x i )+c2·rand()·(gbest i -x i ), where vi is the speed of the target robot, rand() is a random number between (0, 1), c1 and c2 are learning factors. In this embodiment, c1=c2=2, pbesti is the historical optimal position of the target robot, gbesti is the global optimal position of the target robot, and w is the inertia factor. The value of the inertia factor is positively correlated with the global optimization ability, and negatively correlated with the local optimization ability. That is, the larger the value of the inertia factor, the stronger the global optimization ability and the weaker the local optimization ability. The inertia factor can be calculated according to the period. The inertia factor function is: Where k is the number of iterations, T is the period, and the position function x of the target robot is calculated at each iteration. i =x i +v i , where xi is the current position of the target robot and vi is the speed of the target robot, as Figure 4 As shown, the speed and position of each robot are randomly initialized, the fitness function value is calculated, the historical optimal position of the robot and the global optimal position of the group are obtained, the speed and position of each robot are updated according to the historical optimal position of the robot and then the global optimal position, and the historical optimal position and the global optimal position of the robot are updated according to the fitness function value of the robot. It is judged whether the number of iterations is exceeded. If the number of iterations is exceeded, the global optimal result, that is, the global optimal solution, is output. If the number of iterations is not exceeded, the speed and position of each robot are continued to be updated and adjusted according to the historical optimal position and the global optimal position of the robot.

[0102] In this embodiment, the sum of time cost and distance cost is used as the objective function f, and the fitness function value corresponding to the objective function is used to determine whether the objective function is the global optimal position. The fitness function value f′=a k f+b k , a is the calibration coefficient, k is the number of iterations, b k =-f min +ξ k , fmin is the kth minimum fitness function value, ξ k The value of ξ0 =M,ξ k =ξ k-1 r, r∈[0.9, 0.999], by adjusting the values ​​of M and r, we can adjust ξ k , M and r are calibration quantities. In this embodiment, the speed and position of the target robot are periodically adjusted according to the historical optimal solution and the global optimal solution. For example, the preset number of iterations is 3. The historical optimal solution 1 and the global optimal solution 1 corresponding to the first iteration, the historical optimal solution 2 and the global optimal solution 2 corresponding to the second iteration, and the historical optimal solution 3 and the global optimal solution 3 corresponding to the third iteration are calculated. At this time, when the preset number of iterations is reached, the global optimal position with the lowest cost in the first, second and third iterations is determined as the charging station corresponding to the minimum cost. Figure 5 As shown, there are three charging stations, A, B, and C, on the map. The distance costs for the target robot to move from its current point to A, B, and C are 5, 5, and 3, respectively, and the time costs are 5, 10, and 2, respectively, resulting in total costs of 10, 15, and 5, respectively. However, since other mobile robots are charging at charging station C, and the time it takes for these other robots to fully charge is 20, the total cost for charging station C is 25. Therefore, the global optimal solution for the target robot is charging station A, which has the lowest cost, and the target robot chooses to charge at charging station A. This embodiment uses a dynamically calibrated objective function as the fitness function, adjusting the selection pressure—that is, the deviation in the probability of selecting good and bad individuals—to ensure that the wide-area search maintains population diversity while the local search maintains convergence. Using a variable inertia factor, the inertia factor changes slowly in the early stages, maintaining global search capability, and changes more rapidly in the later stages, improving the algorithm's local optimization capability.

[0103] In this embodiment, the optimal charging strategy for a single mobile robot is planned through communication between mobile robots and between mobile robots and charging stations, and the allocation of the optimal charging strategy under the conditions of multiple charging stations and multiple mobile robots can be achieved.

[0104] The present invention also provides a charging device, such as Figure 6 The charging device shown includes: a cost acquisition module A10 for acquiring a first total cost for moving the target robot from its current location to its current charging station; a cost acquisition module A10 for acquiring a second total cost for moving the target robot from its current location to its next charging station; a cost calculation module A20 for calculating a minimum cost based on the first and second total costs; and a charging selection module A30 for charging the target robot at the charging station corresponding to the minimum cost. The specific embodiments of the charging device of the present invention are substantially the same as the aforementioned embodiments of the charging method and are not further described here.

[0105] The present invention further provides a charging device, characterized in that the charging device includes a memory, a processor, and a charging program stored in the memory and executable on the processor. When executed by the processor, the charging program implements the steps of the charging method described in any of the above embodiments. The specific embodiments of the charging device of the present invention are substantially the same as the above embodiments of the charging method and are not further described here.

[0106] The present invention further provides a computer-readable storage medium storing a charging program. When executed by a processor, the charging program implements the steps of the charging method described in any of the above embodiments. The specific embodiments of the computer-readable storage medium of the present invention are substantially the same as the above embodiments of the charging method and are not further described here.

[0107] It should be understood that, in the description of this specification, reference to terms such as "one embodiment," "another embodiment," "other embodiments," or "first to Nth embodiments" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples.

[0108] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0109] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0110] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0111] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A charging method, characterized in that: The charging method comprises the steps of: Obtain the first total cost of the target robot moving from the current position to the current charging station; Obtain a second total cost for the target robot to move from its current position to the next charging station; calculating a minimum cost based on the first total cost and the second total cost; Charging the target robot according to the charging station corresponding to the minimum cost; Before the step of charging the target robot according to the charging station corresponding to the minimum cost, the method of determining the charging station corresponding to the minimum cost further includes: Get the initial speed and initial position of the target robot, and get the speed and position of other robots; Obtaining a historical optimal position and a global optimal position of the target robot according to the initial speed and initial position of the target robot and the speeds and positions of other robots; Iteratively updating the historical optimal position and the global optimal position by using a particle swarm optimization algorithm, wherein the objective function of the particle swarm optimization algorithm is the sum of time cost and distance cost; When the number of iterations reaches a preset number of iterations, the global optimal position corresponding to the preset number of iterations is determined to be the charging station corresponding to the minimum cost.

2. The charging method according to claim 1, wherein: Before the step of obtaining the first total cost of the target robot moving from the current position to the current charging station, the following steps are included: Calculate the power consumption of the target robot moving from its current location to the current charging station; If the power consumption is less than the remaining power of the target robot, the step of obtaining a first total cost of the target robot moving from the current position to the current charging station is executed.

3. The charging method according to claim 1, wherein: The step of obtaining a first total cost of the target robot moving from the current position to the current charging station includes: Obtain the first time cost and the first distance cost of the target robot moving from the current position to the current charging station; The sum of the first time cost and the first distance cost is taken as the first total cost.

4. The charging method according to claim 3, wherein: The step of obtaining the first time cost of the target robot moving from the current position to the current charging station includes: Get the shortest time for the target robot to move from its current position to the current charging station; And obtain the waiting time corresponding to the current charging station; The sum of the shortest time and the waiting time is taken as the first time cost.

5. The charging method according to claim 4, wherein: The step of obtaining the first time cost of the target robot moving from the current position to the current charging station includes: Detecting whether the current charging station is reserved by another robot; If the current charging station is reserved by another robot, receiving the scheduled charging time sent by the other robot; The sum of the shortest time and the predetermined charging time is used as the first time cost.

6. A charging device, characterized in that: The charging device comprises: A cost acquisition module, configured to acquire a first total cost of the target robot moving from a current position to a current charging station; The cost acquisition module is further used to obtain a second total cost of the target robot moving from the current position to the next charging station; a cost calculation module, configured to calculate a minimum cost based on the first total cost and the second total cost; The charging selection module is used to obtain the initial speed and initial position of the target robot and the speed and position of other robots; Obtaining a historical optimal position and a global optimal position of the target robot according to the initial speed and initial position of the target robot and the speeds and positions of other robots; Iteratively updating the historical optimal position and the global optimal position by using a particle swarm optimization algorithm, wherein the objective function of the particle swarm optimization algorithm is the sum of time cost and distance cost; When the number of iterations reaches a preset number of iterations, determining that the global optimal position corresponding to the preset number of iterations is the charging station corresponding to the minimum cost; The charging selection module is further configured to charge the target robot according to the charging station corresponding to the minimum cost.

7. A charging device, characterized in that: The charging device includes a memory, a processor, and a charging program stored in the memory and executable on the processor, wherein the charging program is configured to implement the steps of the charging method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a charging program, which, when executed by a processor, implements the steps of the charging method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Vehicle optimal charging method, device and computer-readable storage medium

    CN108891286A

  • Solving method based on distributed multi-robot charging station distribution problem

    CN112636345A