Electronic fish, electronic fish control method and related device
The environment perception module detects obstacles, the control module adjusts the trajectory, and the driving module controls the electronic fish to bypass obstacles, solving the problem of insufficient intelligence of electronic fish and realizing intelligent obstacle avoidance and flexible movement.
Patent Information
- Application Number
- CN202510551186.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-12
AI Technical Summary
The existing electronic fish are not intelligent enough to effectively avoid obstacles in the water, resulting in inflexible movement.
The environment perception module is used to detect obstacles, the control module estimates the shortest distance and adjusts the trajectory, and the driving module controls the fish body to bypass obstacles through the water tank and the servo to achieve intelligent obstacle avoidance.
It improves the intelligence of electronic fish, allowing it to avoid obstacles independently in the water, and enhances the flexibility and intelligence of movement.
Smart Images

Figure CN120459648A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to an electronic fish, an electronic fish control method and related devices. Background Art
[0002] With the rapid development of electronic technology and the increasing diversification of electronic products, electronic fish have gradually become part of people's lives. As a kind of "bionic fish", electronic fish bring more fun to people's lives. However, electronic fish are not intelligent enough at present, so how to improve their intelligence is an urgent problem to be solved. Summary of the Invention
[0003] The embodiments of the present application provide an electronic fish, an electronic fish control method, and related devices, which can improve the intelligence of the electronic fish.
[0004] In a first aspect, an embodiment of the present application provides an electronic fish, comprising: a fish body, a driving module, an environment sensing module, and a control module, wherein the driving module comprises: a water tank and a servo, and the electronic fish is applied to a water scene; wherein,
[0005] The environment sensing module is configured to detect whether there is an obstacle within a preset range of the fish body when the electronic fish moves along a first preset trajectory; the preset range is a range with a preset radius centered on the fish body; and when an obstacle is within the preset range, determine a first position of the obstacle;
[0006] The control module is configured to estimate the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, determine a first area range of the obstacle and the current position of the fish; adjust the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; and determine a first driving parameter of the driving module according to the second preset trajectory;
[0007] The driving module is used to control the fish body to move along the second preset trajectory through the water tank and the steering gear according to the first driving parameters, so as to avoid the obstacle.
[0008] In a second aspect, an embodiment of the present application provides an electronic fish control method, which is applied to an electronic fish. The electronic fish includes: a fish body, a drive module, an environment perception module, and a control module. The drive module includes: a water tank and a servo. The electronic fish is applied to a water scene. The method includes:
[0009] When the electronic fish moves along a first preset trajectory, the environment sensing module detects whether there is an obstacle within a preset range of the fish body; the preset range is a range with a preset radius centered on the fish body; if there is an obstacle within the preset range, a first position of the obstacle is determined;
[0010] The control module estimates the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, determines a first area range of the obstacle and the current position of the fish; adjusts the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; and determines a first driving parameter of the driving module according to the second preset trajectory;
[0011] The driving module controls the fish body to move along the second preset trajectory through the water tank and the steering gear according to the first driving parameters to avoid the obstacle.
[0012] In a third aspect, an embodiment of the present application provides an electronic fish, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the second aspect of the embodiment of the present application.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute some or all of the steps described in the second aspect of the embodiment of the present application.
[0014] In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute some or all of the steps described in the second aspect of the embodiments of the present application. The computer program product may be a software installation package.
[0015] The implementation of the embodiments of this application has the following beneficial effects:
[0016] It can be seen that the electronic fish, electronic fish control method and related devices described in the embodiments of the present application include: a fish body, a driving module, an environment perception module and a control module, the driving module includes: a water tank and a servo, and the electronic fish is applied to a water scene; when the electronic fish moves along a first preset trajectory, the environment perception module detects whether there is an obstacle within a preset range of the fish body; the preset range is a range with a preset radius centered on the fish body; when an obstacle exists within the preset range, the first position of the obstacle is determined, and the control module estimates the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, the obstacle is determined. The electronic fish is controlled by a first area and a current position of the fish; the first preset trajectory is adjusted according to the current position and the first area to obtain a second preset trajectory; the first driving parameter of the driving module is determined according to the second preset trajectory, and the driving module controls the fish body to move along the second preset trajectory through the water tank and the servo according to the first driving parameter to avoid obstacles. In this way, the environmental perception module can be used to detect obstacles. When there is an obstacle, the trajectory can be adjusted based on the current position and the area of the obstacle. Then, the corresponding driving parameters are dynamically adjusted based on the adjusted trajectory to drive the electronic fish to avoid the obstacle, thereby improving the intelligence of the electronic fish. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 This is a schematic diagram of the structure of an electronic fish provided in an embodiment of the present application;
[0019] Figure 2 This is a schematic diagram of a scene demonstration of an electronic fish provided in an embodiment of the present application;
[0020] Figure 3 This is a schematic diagram of a scene demonstration of an electronic fish provided in an embodiment of the present application;
[0021] Figure 4 This is a schematic structural diagram of an intelligent bionic fish system provided in an embodiment of the present application;
[0022] Figure 5 This is a schematic diagram of a scene demonstration of an electronic fish provided in an embodiment of the present application;
[0023] Figure 6 This is a schematic diagram of a scene demonstration of an electronic fish provided in an embodiment of the present application;
[0024] Figure 7 This is a schematic diagram of a scene demonstration of an electronic fish provided in an embodiment of the present application;
[0025] Figure 8 This is a schematic diagram of the structure of an electronic fish provided in an embodiment of the present application;
[0026] Figure 9 This is a flow chart of an electronic fish control method provided in an embodiment of the present application;
[0027] Figure 10 This is a schematic diagram of the structure of an electronic fish provided in an embodiment of the present application;
[0028] Figure 11 This is a block diagram of the functional units of an electronic fish control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the present invention, 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0031] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0032] In the embodiments of the present application, electronic devices may include smartphones (such as Android phones, iOS phones, Windows Phone phones, Hongmeng phones, etc.), wearable devices, vehicle-mounted devices, tablet computers, PDAs, driving recorders, laptop computers, mobile Internet devices (MIDs) or wearable devices (such as smart watches, Bluetooth headsets), etc. The above are only examples and not exhaustive, including but not limited to the above electronic devices. Electronic devices may also include servers (such as cloud servers, edge servers, etc.).
[0033] The following is a detailed introduction to the embodiments of the present application.
[0034] See also Figure 1 , Figure 1 This is a structural diagram of an electronic fish provided by an embodiment of the present application. The electronic fish includes: a fish body, a driving module, an environment sensing module and a control module. The driving module includes: a water tank and a steering gear. The electronic fish is applied to a water scene.
[0035] The environment sensing module is configured to detect whether there is an obstacle within a preset range of the fish body when the electronic fish moves along a first preset trajectory; the preset range is a range with a preset radius centered on the fish body; and when an obstacle is within the preset range, determine a first position of the obstacle;
[0036] The control module is configured to estimate the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, determine a first area range of the obstacle and the current position of the fish; adjust the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; and determine a first driving parameter of the driving module according to the second preset trajectory;
[0037] The driving module is used to control the fish body to move along the second preset trajectory through the water tank and the steering gear according to the first driving parameters, so as to avoid the obstacle.
[0038] Among them, such as Figure 1 As shown, the drive module and control module are located inside the fish, while the environmental perception module can be located inside or on the surface of the fish. The environmental perception module can be used to implement environmental perception functions and can include at least one of the following: a camera, a distance sensor, an ultrasonic sensor, a radar sensor, a pressure sensor, a temperature sensor, a positioning sensor, a water quality detection sensor, etc., without limitation. The camera can include an infrared camera and / or a visible light camera.
[0039] Among them, the driving module includes: a water tank and a steering gear, which realize the movement of the electronic fish and the sinking or rising of the electronic fish through the water tank and the steering gear. Specifically, the water tank can also include: a micro water pump, which controls the water supply and drainage of the water tank inside the fish body. The electronic fish can be applied to water scenes, for example, the water scene can be a freshwater scene or a seawater scene. Specifically, the water scene can include a swimming pool, a pond, a stream, etc., which are not limited here. For another example, the electronic fish can be used in home viewing, aquarium display and underwater detection scenes, etc. For example, the fish body can include a tail (tail fin), a fish head, a fish body, a fish fin, etc., and the driving module can drive the tail fin to swing.
[0040] In a specific implementation, the water tank may include a water inlet pipe and a drain pipe. The water tank is arranged inside the fish body and is connected to the outside through the water inlet pipe and the drain pipe.
[0041] Among them, the driving module can also use a water pump and a solenoid valve to regulate the water volume in the water tank to achieve floating and sinking.
[0042] In a specific implementation, the servo can include a first servo and a second servo. Specifically, for tail fin drive, the first servo drives the tail fin to swing left and right (frequency is adjustable) through a connecting rod mechanism. In addition, for side fin drive, the second servo controls the rotation of the side fin to assist steering.
[0043] In specific implementation, the electronic fish head can realize obstacle avoidance and path planning. Specifically, it can fuse data through ultrasonic sensors (distance detection) and cameras (visual recognition), combine with AI algorithms to dynamically plan paths, and give priority to open areas.
[0044] The first preset trajectory movement may be pre-set or a system default. The first preset trajectory movement may be pre-planned, and the electronic fish may move according to the first preset trajectory movement.
[0045] The preset range can be preset or set by system default. The preset range is a range with a preset radius centered on the fish body. Specifically, the preset radius can be set by the fish body's geometric center as the center. The preset radius can be preset or set by system default.
[0046] Among them, the obstacles can be pre-set or system default, and the obstacles can be at least one specified obstacle or at least one type of obstacle. For example, the obstacles can include at least one of the following: water plants, rockery, stones, fish, turtles, etc., which are not limited here.
[0047] In an embodiment of the present application, the electronic device can be connected to the electronic fish for communication, and an electronic fish control APP can be installed on the electronic device, and the electronic fish can be fed based on the APP.
[0048] In an embodiment of the present application, the electronic fish can realize color changes of the fish body based on different depths. For example, the environmental perception module includes a pressure sensor, and the fish body includes an RGB LED. That is, the pressure sensor can be combined with the RGB LED to realize the color change of the fish body. Of course, it can also be fed through the APP. Different feeding actions will result in different actions of the electronic fish. In addition, different color combinations will appear at different depths. In a specific implementation, the bottom and side LED matrices of the fish tank display screen support preset backgrounds (such as coral reefs, deep sea, etc.) or user-defined skins. In addition, color adaptation: the water depth is detected by the pressure sensor, and the RGB LED is controlled to change the color combination according to the gradient. In this way, the color change of the water depth and the background of the display screen enhance the viewing experience.
[0049] For example, in a home viewing scenario, the electronic fish recognizes the user's face and moves its tail fin at a frequency of 0.5Hz. It can also automatically charge in "night mode" set via the app. Another example is in the aquarium app, where the fish tank display switches to "Aurora Theme," with the electronic fish displaying a blue-purple gradient at a depth of 1.5 meters.
[0050] In a specific implementation, when the electronic fish moves along the first preset trajectory, the environment perception module detects whether there are obstacles within the preset range of the fish body. For example, the environment perception module can be a camera, which uses the camera to identify whether there are obstacles within the preset range of the fish body, or the environment perception module can be an ultrasonic sensor, which can use the ultrasonic sensor to identify whether there are obstacles within the preset range of the fish body.
[0051] Next, when there is an obstacle within the preset range, the first position of the obstacle can be determined. Of course, the specific type of obstacle (what the obstacle is), the volume of the obstacle, whether the obstacle is a static obstacle or a dynamic obstacle, the location coordinates of the obstacle, the area range where the obstacle is located, etc. can also be determined, which are not limited here.
[0052] Among them, the preset distance can be pre-set or system default. The preset distance can be related to the movement rate of the electronic fish. The greater the movement rate, the greater the preset distance, and vice versa. The first area range of the obstacle can be understood as the surface area of the obstacle. The first area range of the obstacle can also include the surface area of the obstacle, that is, the first area range of the obstacle completely covers the surface area of the obstacle. In actual circumstances, if the first preset trajectory and the obstacle have an intersection, it means that the electronic fish and the obstacle will definitely collide. If the first preset trajectory and the obstacle do not have an intersection, considering that the electronic fish has a certain volume, even if the first preset trajectory does not directly contact the obstacle, a collision may occur between the electronic fish and the obstacle. Then the first area range of the obstacle can be determined based on the range of the surface area of the obstacle and the movement amplitude of the electronic fish. For example, a mapping relationship between the preset movement amplitude of the electronic fish and the adjustment coefficient is pre-stored, and the first adjustment coefficient corresponding to the actual movement amplitude of the electronic fish is determined based on the mapping relationship. The range of the surface area of the obstacle is adjusted based on the first adjustment coefficient to obtain the first area range of the obstacle. Specifically, the first area range of the obstacle = (1 + first adjustment coefficient) * the range of the surface area of the obstacle. The value of the first adjustment coefficient is greater than 0. The first area range of the obstacle coincides with the center and center of gravity of the range of the surface area of the obstacle. The volume of the first area range of the obstacle is greater than the volume of the range of the surface area of the obstacle. For example, Figure 2 As shown, the first area of the obstacle coincides with the center and center of gravity of the area where the surface area of the obstacle is located. The first area of the obstacle can be understood as a virtual area, and the area where the surface area of the obstacle is located can be understood as the actual surface area of the obstacle.
[0053] Among them, the first driving parameter may include at least one of the following: driving current, driving voltage, driving power, driving speed, driving direction, etc., which are not limited here. Of course, since the driving module includes a water tank and a servo, the first driving parameter may also include the control parameters of the water tank and the servo respectively, for example, the control parameters of the water tank and the control parameters of the servo. The control parameters of the water tank may include at least one of the following: the water intake of the water tank, the water discharge volume of the water tank, the water intake speed of the water tank, the water discharge speed of the water tank, the water intake time of the water tank, the water discharge time of the water tank, etc., which are not limited here. The control parameters of the servo may include at least one of the following: the rotation direction of the servo, the rotation angle of the servo, the rotation amplitude of the servo, etc., which are not limited here.
[0054] Furthermore, the control module can estimate the shortest distance between the first preset trajectory and the first position. When the shortest distance is less than or equal to the preset distance, it means that the electronic fish is very likely to collide with an obstacle. Then, the first area range of the obstacle and the current position of the fish body can be determined, and the first preset trajectory is adjusted according to the current position and the first area range to obtain a second preset trajectory. Then, the first driving parameter of the driving module is determined according to the second preset trajectory. The driving module controls the fish body to move along the second preset trajectory through the water tank and the servo according to the first driving parameter to avoid the obstacle. For example, the electronic fish can automatically avoid obstacles and automatically turn and swim towards a wide area.
[0055] For example, Figure 3 As shown, since the first preset trajectory and the obstacle are known, corresponding space modeling can be performed, and then the shortest distance can be determined based on the first preset trajectory and the obstacle, which is the shortest distance between the first preset trajectory and the obstacle.
[0056] In the embodiment of the present application, the electronic fish can be applied to an intelligent bionic electronic fish system, such as Figure 4 As shown, the intelligent bionic electronic fish system includes an electronic fish and a fish tank display. Specifically, the bottom and sides of the fish tank are equipped with display screens that can change different backgrounds and skins. In a specific implementation, the electronic fish can include: a fish body, a drive module, an environmental perception module, a human-computer interaction module, and a fish tank display screen. The drive module uses a water tank and a servo to achieve buoyancy and motion control. The environmental perception module integrates ultrasonic and visual data to achieve obstacle avoidance. The human-computer interaction module triggers differentiated behaviors based on facial recognition. The fish tank display supports dynamic background switching. The human-computer interaction module can be installed in the electronic device or the electronic fish's control module.
[0057] Optionally, the control module is further configured to:
[0058] When the shortest distance is greater than a preset distance, the electronic fish is controlled to continue moving along the first preset trajectory.
[0059] In the embodiment of the present application, when the shortest distance is greater than the preset distance, it means that the electronic fish will not collide with an obstacle, and the electronic fish can be controlled to continue moving along the first preset trajectory, that is, the electronic fish can continue to run along the original trajectory.
[0060] Optionally, in the aspect of adjusting the first preset trajectory according to the current position and the first area range to obtain the second preset trajectory, the control module is specifically configured to:
[0061] Determine an intersection point between the first preset trajectory and the first area range to obtain a first intersection point and a second intersection point;
[0062] A first position point and a second position point are determined based on the first intersection point and the second intersection point; a distance between the first position point and the first intersection point is equal to a first threshold, and a distance between the second position point and the second intersection point is equal to the first threshold; the first position point is farther away from the obstacle than the first intersection point; and the second position point is farther away from the obstacle than the second intersection point;
[0063] determining a shortest curve between the first intersection point and the second intersection point, wherein the shortest curve is located in an underwater area within the first area;
[0064] determining an obstacle avoidance curve according to the first position point, the second position point, and the shortest curve;
[0065] The second preset trajectory is determined according to the obstacle avoidance curve and the first preset trajectory.
[0066] The first threshold may be preset or set by system default.
[0067] In an embodiment of the present application, the intersection of the first preset trajectory and the first area range can be determined to obtain the first intersection and the second intersection, and then the first position point and the second position point are determined based on the first intersection and the second intersection, the distance between the first position point and the first intersection is equal to the first threshold, the distance between the second position point and the second intersection is equal to the first threshold, the first position point is farther away from the obstacle than the first intersection; the second position point is farther away from the obstacle than the second intersection, then, the shortest curve between the first intersection and the second intersection can be determined, the shortest curve is located in the underwater area of the first area range, and then the obstacle avoidance curve is determined based on the first position point, the second position point and the shortest curve, finally, the second preset trajectory can be determined based on the obstacle avoidance curve and the first preset trajectory, in this way, the trajectory adjustment can be realized based on the current position and the area of the obstacle, and then the corresponding driving parameters are dynamically adjusted based on the adjusted trajectory to drive the electronic fish to avoid the obstacle, thereby improving the intelligence of the electronic fish.
[0068] For example, Figure 5 As shown, the first intersection A1, the second intersection A2, the first position point B1, and the second position point B2, the shortest curve is the shortest curve between the first intersection A1 and the second intersection A2, the first intersection A1, the second intersection A2, the first position point B1, and the second position point B2 are all located on the first preset trajectory. The first intersection A1 and the second intersection A2 are both located in the first area of the obstacle.
[0069] Optionally, in determining the obstacle avoidance curve according to the first position point, the second position point, and the shortest curve, the control module is specifically configured to:
[0070] The obstacle avoidance curve is determined according to the first position point and the second position point; the obstacle avoidance curve is parallel to the shortest curve.
[0071] In an embodiment of the present application, the obstacle avoidance curve can be determined based on the first position point and the second position point; the obstacle avoidance curve is parallel to the shortest curve. In this way, the trajectory can be adjusted based on the current position and the area of the obstacle, and then the corresponding driving parameters are dynamically adjusted based on the adjusted trajectory to drive the electronic fish to avoid the obstacle, thereby improving the intelligence of the electronic fish.
[0072] For example, Figure 6 As shown, the first intersection point A1, the second intersection point A2, the first position point B1, and the second position point B2 are located. The shortest curve is the shortest curve between the first intersection point A1 and the second intersection point A2. The first intersection point A1, the second intersection point A2, the first position point B1, and the second position point B2 are all located on the first preset trajectory. The first intersection point A1 and the second intersection point A2 are both located in the first area of the obstacle. The obstacle avoidance curve includes the first position point B1 and the second position point B2, and the obstacle avoidance curve is parallel to the shortest curve.
[0073] Optionally, in determining the second preset trajectory according to the obstacle avoidance curve and the first preset trajectory, the control module is specifically configured to:
[0074] intercepting a portion of the first preset trajectory according to the current position and the first position point to obtain a first segment of the trajectory;
[0075] intercepting a portion of the first preset trajectory according to the second position point to obtain a second segment of the trajectory; the second segment of the trajectory is away from the direction of the obstacle;
[0076] The first trajectory, the obstacle avoidance curve, and the second trajectory are spliced together to obtain the second preset trajectory.
[0077] In a specific implementation, a portion of the first preset trajectory can be intercepted based on the current position (the starting point of the second preset trajectory) and the first position point to obtain a first segment of the trajectory, and then a portion of the first preset trajectory can be intercepted based on the second position point to obtain a second segment of the trajectory, which is away from the obstacle. Finally, the first segment of the trajectory, the obstacle avoidance curve, and the second segment of the trajectory can be spliced together to obtain the second preset trajectory. In this way, the trajectory can be adjusted based on the current position and the area of the obstacle, and then the corresponding driving parameters can be dynamically adjusted based on the adjusted trajectory to drive the electronic fish to avoid the obstacle, thereby improving the intelligence of the electronic fish.
[0078] For example, Figure 7As shown, the current position C and a position D of the second preset trajectory (for example, the end point) are intercepted. Part of the first preset trajectory, specifically, a section of the trajectory between the current position C and the first position point B1, that is, the first section of the trajectory; a part of the first preset trajectory, that is, an estimated section between the second position point B2 and position D is intercepted to obtain the second section of the trajectory. The first section of the trajectory, the obstacle avoidance curve and the second section of the trajectory are spliced to obtain the second preset trajectory.
[0079] Optionally, the electronic fish further includes a power supply module; wherein,
[0080] The power module is used to detect the remaining power of the electronic fish;
[0081] The control module is configured to obtain a second position of the charging module when the remaining power is lower than a first preset power; generate a navigation route between the electronic fish and the second position; and determine a second driving parameter corresponding to the navigation route;
[0082] The driving module is further used to control the fish body to move along the navigation route through the water tank and the steering gear according to the second driving parameter, so as to complete charging at the second position.
[0083] Among them, the second driving parameter may include at least one of the following: driving current, driving voltage, driving power, driving speed, driving direction, etc., which are not limited here. Of course, since the driving module includes a water tank and a servo, the second driving parameter may also include the control parameters of the water tank and the servo respectively, for example, the control parameters of the water tank and the control parameters of the servo. The control parameters of the water tank may include at least one of the following: the water intake of the water tank, the water discharge volume of the water tank, the water intake speed of the water tank, the water discharge speed of the water tank, the water intake time of the water tank, the water discharge time of the water tank, etc., which are not limited here. The control parameters of the servo may include at least one of the following: the rotation direction of the servo, the rotation angle of the servo, the rotation amplitude of the servo, etc., which are not limited here.
[0084] Among them, such as Figure 8 As shown, the electronic fish may also include a power module, which provides electrical energy to the electronic fish to drive the electronic fish to move and realize the environmental perception function. The power module is also in communication with the control module, the environmental perception module, and the driving module.
[0085] The first preset power level may be preset or set by system default.
[0086] In a specific implementation, when the remaining power of the control module is lower than the first preset power, it means that the power of the electronic fish is insufficient and needs to be charged. The second position of the charging module can be obtained, a navigation route between the electronic fish and the second position is generated, and a second driving parameter corresponding to the navigation route is determined. The driving module controls the fish body to move along the navigation route through the water tank and the servo according to the second driving parameter to complete charging at the second position. For example, wireless charging can be performed, and the fish can be set to automatically go to the charging area for charging when no one is watching or late at night.
[0087] In this embodiment, the wireless charging and triggering logic are as follows: 1. Charging zone location: An RFID tag is embedded in the fish tank, and the electronic fish uses a magnetic induction coil to identify the charging location. 2. Charging strategy: A light sensor triggers the return flight at night, or the camera detects an unoccupied state. This intelligent charging strategy reduces manual intervention and ensures the intelligence of the electronic fish.
[0088] Optionally, the following functions can also be implemented:
[0089] The environment perception module is further configured to detect a first distance between the target object and the fish body; and when the first distance is less than a second preset distance, acquire a first facial image of the target object;
[0090] The control module is further configured to match the first facial image with facial targets in a preset facial template library; when the first facial image fails to match any facial template in the preset facial template library, determine a first underwater depth of the fish; and determine a third driving parameter based on the first underwater depth;
[0091] The driving module is further used to control the fish body to sink through the water tank and the steering gear according to the third driving parameter.
[0092] The second preset distance may be preset or set by the system by default.
[0093] Among them, the third driving parameter may include at least one of the following: driving current, driving voltage, driving power, driving speed, driving direction, etc., which are not limited here. Of course, since the driving module includes a water tank and a servo, the third driving parameter may also include the control parameters of the water tank and the servo respectively, for example, the control parameters of the water tank and the control parameters of the servo. The control parameters of the water tank may include at least one of the following: the water intake of the water tank, the water discharge volume of the water tank, the water intake speed of the water tank, the water discharge speed of the water tank, the water intake time of the water tank, the water discharge time of the water tank, etc., which are not limited here. The control parameters of the servo may include at least one of the following: the rotation direction of the servo, the rotation angle of the servo, the rotation amplitude of the servo, etc., which are not limited here.
[0094] The preset face template library may store at least one face template in advance, and the face templates in the preset face template library may be pre-registered. The registered face templates can be understood as objects that the electronic fish is "familiar" with, that is, not strangers.
[0095] In the embodiment of the present application, the environment perception module detects a first distance between the target object and the fish body; when the first distance is less than a second preset distance, it means that someone is approaching the electronic fish, and a first face image of the target object can be obtained, and the control module matches the first face image with a face target in a preset face template library. When the first face image fails to match any face template in the preset face template library, it means that the person approaching the electronic fish is a stranger, and a first underwater depth of the fish body can be determined, and a third driving parameter is determined according to the first underwater depth. The driving module is further used to drive the fish through the water according to the third driving parameter. The tank and the servo control the fish body to perform a sinking operation, for example, sinking to a specified depth (for example, sinking to 10 cm), or sinking to a specified depth (for example, sinking to a 0.5 m position). In this way, it can be achieved that when seeing an unfamiliar face, it will quickly avoid and sink. Conversely, when the first face image successfully matches any face template in the preset face template library, the fourth driving parameter is determined, and the fish body is controlled to move through the water tank and the servo. In this way, it can be achieved that when seeing a familiar face, it will automatically move forward and shake its head and tail. In this way, the intelligence and fun of the electronic fish are improved, and the user experience is enhanced through face recognition and dynamic behavior. The fourth driving parameter is used to control the electronic fish to complete a specified action (such as moving forward and shaking its head and tail).
[0096] Among them, the fourth driving parameter may include at least one of the following: driving current, driving voltage, driving power, driving speed, driving direction, etc., which are not limited here. Of course, since the driving module includes a water tank and a servo, the fourth driving parameter may also include the control parameters of the water tank and the servo respectively, for example, the control parameters of the water tank and the control parameters of the servo. The control parameters of the water tank may include at least one of the following: the water intake of the water tank, the water discharge volume of the water tank, the water intake speed of the water tank, the water discharge speed of the water tank, the water intake time of the water tank, the water discharge time of the water tank, etc., which are not limited here. The control parameters of the servo may include at least one of the following: the rotation direction of the servo, the rotation angle of the servo, the rotation amplitude of the servo, etc., which are not limited here.
[0097] In a specific implementation, the fish body may include a fish head with a built-in infrared camera, which can recognize familiar faces through a convolutional neural network (CNN) and trigger the servo to swing (such as a head shaking angle of ±30°).
[0098] It can be seen that the electronic fish described in the embodiment of the present application includes: a fish body, a driving module, an environment perception module and a control module. The driving module includes: a water tank and a servo. The electronic fish is applied to a water scene. When the electronic fish moves along a first preset trajectory, the environment perception module detects whether there is an obstacle within a preset range of the fish body. The preset range is a range with a preset radius centered on the fish body. When an obstacle exists within the preset range, the first position of the obstacle is determined, and the control module estimates the shortest distance between the first preset trajectory and the first position. When the shortest distance is less than or equal to the preset distance, the first area range and the control module of the obstacle are determined. The electronic fish is controlled by a first preset trajectory, which is adjusted according to the current position and the range of the first area to obtain a second preset trajectory; a first driving parameter of a driving module is determined according to the second preset trajectory, and the driving module controls the fish to move along the second preset trajectory through a water tank and a servo according to the first driving parameter to avoid obstacles. In this way, the environmental perception module can be used to detect obstacles. When an obstacle exists, the trajectory can be adjusted based on the current position and the area of the obstacle. Then, the corresponding driving parameters are dynamically adjusted based on the adjusted trajectory to drive the electronic fish to avoid the obstacle, thereby improving the intelligence of the electronic fish.
[0099] See also Figure 9 , Figure 9 This is a flow chart of an electronic fish control method provided by an embodiment of the present application. As shown in the figure, it is applied to an electronic fish. The electronic fish includes: a fish body, a drive module, an environment perception module and a control module. The drive module includes: a water tank and a steering gear. The electronic fish is applied to a water scene. The electronic fish control method includes:
[0100] 901. When the electronic fish moves along a first preset trajectory, the environment perception module detects whether there is an obstacle within a preset range of the fish body; the preset range is a range with a preset radius centered on the fish body; when an obstacle exists within the preset range, a first position of the obstacle is determined.
[0101] 902. Estimate the shortest distance between the first preset trajectory and the first position through the control module; when the shortest distance is less than or equal to the preset distance, determine the first area range of the obstacle and the current position of the fish body; adjust the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; determine the first driving parameter of the driving module according to the second preset trajectory.
[0102] 903. Control the fish body to move along the second preset trajectory through the water tank and the servo according to the first driving parameter by the driving module to avoid the obstacle.
[0103] The detailed description of steps 901 to 903 is given in the above. Figure 1 The relevant functional description of the electronic fish will not be repeated here.
[0104] It can be seen that the electronic fish control method described in the embodiment of the present application is applied to the electronic fish, which includes: a fish body, a driving module, an environment perception module and a control module, the driving module includes: a water tank and a servo, and the electronic fish is applied to a water scene; when the electronic fish moves along a first preset trajectory, the environment perception module detects whether there is an obstacle within a preset range of the fish body; the preset range is a range with a preset radius centered on the fish body; when there is an obstacle within the preset range, the first position of the obstacle is determined, and the control module estimates the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, the first position of the obstacle is determined. an area range and the current position of the fish body; adjusting the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; determining the first driving parameter of the driving module according to the second preset trajectory, and the driving module controlling the fish body to move along the second preset trajectory through the water tank and the servo according to the first driving parameter to bypass the obstacle. In this way, the environment perception module can be used to detect obstacles. When there is an obstacle, the trajectory can be adjusted based on the current position and the area of the obstacle, and then the corresponding driving parameters can be dynamically adjusted based on the adjusted trajectory to drive the electronic fish to bypass the obstacle, thereby improving the intelligence of the electronic fish.
[0105] See also Figure 10 , Figure 10 This is a schematic diagram of the structure of another electronic fish provided in an embodiment of the present application. The electronic fish includes a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and are configured to be executed by the processor. The electronic fish includes: a fish body, a drive module, an environment perception module, and a control module. The drive module includes: a water tank and a servo. The electronic fish is applied to a water scene. In the embodiment of the present application, the program includes instructions for executing the following steps:
[0106] When the electronic fish moves along a first preset trajectory, the environment sensing module detects whether there is an obstacle within a preset range of the fish body; the preset range is a range with a preset radius centered on the fish body; if there is an obstacle within the preset range, a first position of the obstacle is determined;
[0107] The control module estimates the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, determines a first area range of the obstacle and the current position of the fish; adjusts the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; and determines a first driving parameter of the driving module according to the second preset trajectory;
[0108] The driving module controls the fish body to move along the second preset trajectory through the water tank and the steering gear according to the first driving parameters to avoid the obstacle.
[0109] It can be seen that the electronic fish described in the embodiment of the present application includes: a fish body, a driving module, an environment perception module and a control module. The driving module includes: a water tank and a servo. The electronic fish is applied to a water scene. When the electronic fish moves along a first preset trajectory, the environment perception module detects whether there is an obstacle within a preset range of the fish body. The preset range is a range with a preset radius centered on the fish body. When an obstacle exists within the preset range, the first position of the obstacle is determined, and the control module estimates the shortest distance between the first preset trajectory and the first position. When the shortest distance is less than or equal to the preset distance, the first area range and the control module of the obstacle are determined. The electronic fish is controlled by a first preset trajectory, which is adjusted according to the current position and the range of the first area to obtain a second preset trajectory; a first driving parameter of a driving module is determined according to the second preset trajectory, and the driving module controls the fish to move along the second preset trajectory through a water tank and a servo according to the first driving parameter to avoid obstacles. In this way, the environmental perception module can be used to detect obstacles. When an obstacle exists, the trajectory can be adjusted based on the current position and the area of the obstacle. Then, the corresponding driving parameters are dynamically adjusted based on the adjusted trajectory to drive the electronic fish to avoid the obstacle, thereby improving the intelligence of the electronic fish.
[0110] Figure 11 This is a functional unit block diagram of an electronic fish control device 1100 involved in an embodiment of the present application. The electronic fish control device 1100 is applied to an electronic fish, and the electronic fish includes: a fish body, a driving module, an environment sensing module and a control module. The driving module includes: a water tank and a servo. The electronic fish is applied to a water scene; the electronic fish control device 1100 includes: a detection unit 1101, a control unit 1102 and a driving unit 1103, wherein:
[0111] The detection unit 1101 is configured to detect, through the environment perception module, whether there is an obstacle within a preset range of the electronic fish when the electronic fish moves along a first preset trajectory; the preset range is a range with a preset radius centered on the fish; and when an obstacle is within the preset range, determine a first position of the obstacle;
[0112] The control unit 1102 is configured to estimate, through the control module, the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, determine a first area range of the obstacle and the current position of the fish; adjust the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; and determine a first driving parameter of the driving module according to the second preset trajectory;
[0113] The driving unit 1103 is configured to control the fish body to move along the second preset trajectory through the water tank and the servo according to the first driving parameters through the driving module, so as to avoid the obstacle.
[0114] It can be seen that the electronic fish control method and device described in the embodiment of the present application is applied to the electronic fish, which includes: a fish body, a driving module, an environment perception module and a control module. The driving module includes: a water tank and a servo. The electronic fish is applied to a water scene. When the electronic fish moves along a first preset trajectory, the environment perception module detects whether there is an obstacle within a preset range of the fish body. The preset range is a range with a preset radius centered on the fish body. When an obstacle exists within the preset range, the first position of the obstacle is determined, and the control module estimates the shortest distance between the first preset trajectory and the first position. When the shortest distance is less than or equal to the preset distance, the obstacle is determined. The electronic fish is controlled by a first area and a current position of the fish; the first preset trajectory is adjusted according to the current position and the first area to obtain a second preset trajectory; the first driving parameter of the driving module is determined according to the second preset trajectory, and the driving module controls the fish body to move along the second preset trajectory through the water tank and the servo according to the first driving parameter to avoid obstacles. In this way, the environmental perception module can be used to detect obstacles. When there is an obstacle, the trajectory can be adjusted based on the current position and the area of the obstacle. Then, the corresponding driving parameters are dynamically adjusted based on the adjusted trajectory to drive the electronic fish to avoid the obstacle, thereby improving the intelligence of the electronic fish.
[0115] It can be understood that the functions of each program module of the electronic fish control device of this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment and will not be repeated here.
[0116] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments.
[0117] The present application also provides a computer program product comprising a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package.
[0118] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0119] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0120] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0121] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0123] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0124] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0125] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An electronic fish, characterized in that: The electronic fish includes: a fish body, a driving module, an environment sensing module and a control module. The driving module includes: a water tank and a steering gear. The electronic fish is applied to a water scene. The environment sensing module is configured to detect whether there is an obstacle within a preset range of the fish body when the electronic fish moves along a first preset trajectory; the preset range is a range with a preset radius centered on the fish body; and when an obstacle is within the preset range, determine a first position of the obstacle; The control module is configured to estimate the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, determine a first area range of the obstacle and the current position of the fish; adjust the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; and determine a first driving parameter of the driving module according to the second preset trajectory; The driving module is used to control the fish body to move along the second preset trajectory through the water tank and the steering gear according to the first driving parameters, so as to avoid the obstacle.
2. The electronic fish according to claim 1, characterized in that In the aspect of adjusting the first preset trajectory according to the current position and the first area range to obtain the second preset trajectory, the control module is specifically configured to: Determine an intersection point between the first preset trajectory and the first area range to obtain a first intersection point and a second intersection point; determining a first position point and a second position point based on the first intersection point and the second intersection point; The distance between the first position point and the first intersection point is equal to a first threshold, and the distance between the second position point and the second intersection point is equal to the first threshold; the first position point is farther away from the obstacle than the first intersection point; and the second position point is farther away from the obstacle than the second intersection point; determining a shortest curve between the first intersection point and the second intersection point, wherein the shortest curve is located in an underwater area within the first area; determining an obstacle avoidance curve according to the first position point, the second position point, and the shortest curve; The second preset trajectory is determined according to the obstacle avoidance curve and the first preset trajectory.
3. The electronic fish according to claim 2, characterized in that In determining the obstacle avoidance curve according to the first position point, the second position point, and the shortest curve, the control module is specifically configured to: The obstacle avoidance curve is determined according to the first position point and the second position point; the obstacle avoidance curve is parallel to the shortest curve.
4. The electronic fish according to claim 3, characterized in that In determining the second preset trajectory according to the obstacle avoidance curve and the first preset trajectory, the control module is specifically configured to: intercepting a portion of the first preset trajectory according to the current position and the first position point to obtain a first segment of the trajectory; intercepting a portion of the first preset trajectory according to the second position point to obtain a second segment of the trajectory; The second trajectory is away from the direction of the obstacle; The first trajectory, the obstacle avoidance curve, and the second trajectory are spliced together to obtain the second preset trajectory.
5. The electronic fish according to any one of claims 1 to 4, characterized in that: The electronic fish also includes a power supply module; wherein, The power module is used to detect the remaining power of the electronic fish; The control module is configured to obtain a second position of the charging module when the remaining power is lower than a first preset power; generate a navigation route between the electronic fish and the second position; and determine a second driving parameter corresponding to the navigation route; The driving module is further used to control the fish body to move along the navigation route through the water tank and the steering gear according to the second driving parameter, so as to complete charging at the second position.
6. The electronic fish according to any one of claims 1 to 4, characterized in that: The environment perception module is further configured to detect a first distance between the target object and the fish body; and when the first distance is less than a second preset distance, acquire a first facial image of the target object; The control module is further configured to match the first facial image with facial targets in a preset facial template library; when the first facial image fails to match any facial template in the preset facial template library, determine a first underwater depth of the fish; and determine a third driving parameter based on the first underwater depth; The driving module is further used to control the fish body to sink through the water tank and the steering gear according to the third driving parameter.
7. The electronic fish according to any one of claims 1 to 4, characterized in that: The control module is further specifically configured to: when the shortest distance is greater than the preset distance, control the electronic fish to continue moving along the first preset trajectory.
8. An electronic fish control method, characterized in that: Applied to electronic fish, the electronic fish includes: a fish body, a driving module, an environment perception module and a control module, the driving module includes: a water tank and a steering gear, and the electronic fish is applied to a water scene; the method includes: When the electronic fish moves along a first preset trajectory, the environment sensing module detects whether there is an obstacle within a preset range of the fish body; the preset range is a range with a preset radius centered on the fish body; if there is an obstacle within the preset range, a first position of the obstacle is determined; The control module estimates the shortest distance between the first preset trajectory and the first position; when the shortest distance is less than or equal to the preset distance, determines a first area range of the obstacle and the current position of the fish; adjusts the first preset trajectory according to the current position and the first area range to obtain a second preset trajectory; and determines a first driving parameter of the driving module according to the second preset trajectory; The driving module controls the fish body to move along the second preset trajectory through the water tank and the steering gear according to the first driving parameters to avoid the obstacle.
9. An electronic fish, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the programs include instructions for executing the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.