Water dispenser control method and device, water dispenser and readable storage medium

By acquiring a target image in the water dispenser and recognizing the offset between the target container and the water outlet, the water dispensing function is activated only when the offset is less than a threshold, thus solving the risk of scalding during water dispenser use and achieving intelligent control that ensures safety and saves resources.

CN117837931BActive Publication Date: 2026-08-25GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311749900.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2026-08-25
Estimated Expiration
2043-12-18

AI Technical Summary

Technical Problem

Existing water dispensers pose a risk of scalding users during use, especially if the user accidentally touches the handle or the water outlet is not aligned with the water container.

Method used

After receiving a water dispensing command, the system acquires a target image within the target range of the water dispenser, identifies whether a target object is detected, and determines whether it contains a target container and its offset relative to the water outlet. The water dispensing function is only activated when the offset is less than a threshold.

Benefits of technology

This effectively avoids scalding caused by accidental contact or misalignment of the water outlet, improves user safety when using the water dispenser, and reduces water waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117837931B_ABST
    Figure CN117837931B_ABST
Patent Text Reader

Abstract

The application discloses a water dispenser control method and device, a water dispenser and a readable storage medium, and relates to the technical field of electrical equipment. The method comprises the following steps: in the case that a water outlet instruction is received, a target image in a target range corresponding to the water dispenser is acquired; whether a detected object exists in the target range is determined according to the target image; in the case that the detected object exists in the target range, whether the detected object contains a target container is determined; in the case that the detected object contains the target container, an offset of the target container relative to a water outlet of the water dispenser is determined; and in the case that the offset is less than or equal to a first threshold value, the water dispenser is controlled to start a water outlet function. The application can avoid the problem that a user is scalded by hot water in the case that the user mistakenly touches a water outlet switch of the water dispenser or the water outlet and the target container are misaligned due to various reasons when water is received, and the safety of the user during the use of the water dispenser is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electrical equipment technology, specifically relating to a water dispenser control method, device, water dispenser, and readable storage medium. Background Technology

[0002] Water dispensers are a common household appliance. As living standards continue to improve, water dispensers are becoming increasingly popular, and users have higher and higher requirements for their functions. In addition to providing hot water, water dispensers also need to ensure the safety of users during use.

[0003] Currently, most water dispenser switches use a structure where a spindle with a return spring is hinged to the control handle. By pressing down or lifting the handle, the spindle valve is moved to control the opening and closing of the water dispensing valve. This type of water dispenser switch has a simple principle and is easy to operate.

[0004] However, there is a risk of being scalded by hot water in many situations, such as when the user accidentally touches the handle or when the water outlet is not aligned with the water container. Summary of the Invention

[0005] The purpose of this application is to provide a water dispenser control method, device, water dispenser, and readable storage medium, which can solve the problem of users being scalded by hot water during the use of water dispensers in related technologies.

[0006] In a first aspect, embodiments of this application provide a water dispenser control method, the method comprising:

[0007] Upon receiving a water dispensing command, acquire the target image within the target range corresponding to the water dispenser;

[0008] Based on the target image, determine whether there is a detected object within the target area;

[0009] If the object to be detected exists within the target range, determine whether the object to be detected contains the target container;

[0010] If the target container is included in the object being detected, determine the offset of the target container relative to the water outlet of the water dispenser;

[0011] If the offset is less than or equal to the first threshold, the water dispenser is controlled to start the water dispensing function.

[0012] Optionally, determining the offset of the target container relative to the water outlet of the water dispenser includes:

[0013] Identify the opening of the target container and the first center position of the opening;

[0014] Determine the second center position of the water outlet of the water dispenser;

[0015] Determine a first offset distance between the first center position and the second center position, and define the first offset distance as the offset of the target container relative to the outlet.

[0016] Optionally, determining the first offset distance between the first center position and the second center position includes:

[0017] A two-dimensional plane coordinate system is established in the first plane where the water outlet is located, with the second center position as the origin;

[0018] Obtain the projection position of the first center position in the two-dimensional plane coordinate system;

[0019] The second offset distance of the projected position relative to the origin is determined as the first offset distance of the first center position relative to the second center position.

[0020] Optionally, the method further includes:

[0021] Identify the opening of the target container and the first center position and edge position of the opening;

[0022] Determine a first distance between the edge position of the container opening and the first center position;

[0023] Calculate the product of the first distance and the preset coefficient to obtain the first threshold; the preset coefficient is less than or equal to the second threshold.

[0024] Optionally, if the detected object exists within the target range, determining whether the detected object contains the target container includes:

[0025] Determine the number of objects to be detected;

[0026] If the number of detected objects is greater than the preset number, the operation of controlling the water dispenser to turn on the water dispensing function will not be executed;

[0027] If the number of objects being detected is equal to the preset number, determine whether the objects being detected contain the target container.

[0028] Optionally, when the target container is included in the object being detected, determining the offset of the target container relative to the water dispenser's outlet includes:

[0029] If the object being detected contains a target container, determine the number of times the target container shakes within a preset time period;

[0030] If the number of shaking events is less than or equal to a third threshold, the offset of the target container relative to the water outlet of the water dispenser is determined.

[0031] Optionally, after controlling the water dispenser to turn on the water dispensing function when the offset is less than or equal to the first threshold, the method further includes:

[0032] Determine the second plane where the opening of the target container is located;

[0033] Obtain the second distance between the water surface in the target container and the second plane;

[0034] If the second distance is less than or equal to the fourth threshold, the water dispenser is controlled to turn off the water dispensing function.

[0035] Optionally, the method further includes:

[0036] Obtain the target capacity of the target container;

[0037] After controlling the water dispenser to turn on the water dispensing function when the offset is less than or equal to the first threshold, the method further includes:

[0038] When the water dispenser reaches the target capacity, the water dispenser is controlled to shut off its water dispensing function.

[0039] Secondly, the first acquisition module is used to acquire a target image within the target range corresponding to the water dispenser when a water dispensing command is received;

[0040] The first determining module is used to determine, based on the target image, whether there is a detected object within the target range;

[0041] The second determining module is used to determine whether the detected object contains a target container when the detected object exists within the target range.

[0042] The third determining module is used to determine the offset of the target container relative to the water outlet of the water dispenser when the target container is included in the detected object.

[0043] The first control module is used to control the water dispenser to turn on the water dispensing function when the offset is less than or equal to the first threshold.

[0044] Thirdly, embodiments of this application provide a water dispenser, including the water dispenser control device as described above, for implementing the water dispenser control method as described in any of the preceding claims.

[0045] Fourthly, embodiments of this application provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the water dispenser control method as described in any of the preceding claims.

[0046] In this embodiment of the application, a water dispenser control method is provided, comprising: upon receiving a water dispensing command, acquiring a target image within a target range corresponding to the water dispenser, and determining, based on the target image, whether a detected object exists within the target range; if a detected object exists within the target range, further determining whether the detected object contains a target container; if the detected object contains a target container, determining the offset of the target container relative to the water outlet of the water dispenser; and if the offset is less than or equal to a first threshold, controlling the water dispenser to start the water dispensing function. In this embodiment, after receiving a water dispensing command, before controlling the water dispenser to start the water dispensing function, the system first determines the offset between the target container and the water dispenser's outlet based on the target image within the target range corresponding to the water dispenser. If it is determined that there is a detected object within the target range and the detected object includes the target container, the system further determines the offset between the target container and the water dispenser's outlet. If the offset is less than a first threshold, the system then controls the water dispenser to start the water dispensing function. This avoids the problem of users being scalded by hot water due to accidentally touching the water dispenser's water dispensing switch or due to various reasons causing the water outlet to be misaligned with the target container when dispensing water. This realizes the intelligent control method of the water dispenser and improves the safety of users when using the water dispenser. Attached Figure Description

[0047] Figure 1 This is a flowchart illustrating the steps of a water dispenser control method provided in an embodiment of this application;

[0048] Figure 2 This is a schematic diagram illustrating the setting position of an image acquisition unit according to an embodiment of this application;

[0049] Figure 3 This is a flowchart of another water dispenser control method provided in an embodiment of this application;

[0050] Figure 4 This is a logic block diagram of a water dispenser control device provided in an embodiment of this application;

[0051] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0052] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0053] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0054] Method Implementation Examples

[0055] The water dispenser control method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0056] Reference Figure 1 The diagram illustrates a flowchart of a water dispenser control method according to an embodiment of this application. Figure 1 As shown, the method specifically includes steps S101 and S105:

[0057] Step S101: Upon receiving a water dispensing command, acquire the target image within the target range corresponding to the water dispenser.

[0058] In this embodiment, the water dispenser may include a detection component, a control component, and a water dispensing command acquisition component. Both the detection component and the water dispensing command acquisition component are communicatively connected to the control component. The water dispensing command acquisition component may include at least one of a function button and a voice recognition unit. The control component may receive a user-inputted water dispensing command using the function button or the voice recognition unit, and acquire a target image within the target range corresponding to the water dispenser through the detection component.

[0059] The detection component may include an image acquisition unit, which may be a camera, scanner or other functional unit with image acquisition capabilities; the control component may be any component with data processing and control capabilities.

[0060] It should be noted that the water dispensing command can be for different water temperatures. For example, the water dispensing command can be for room temperature water (around 20°C), for warm water (30°C to 40°C), or for hot water (70°C to 100°C).

[0061] As an example, a water dispenser may include at least two water outlets, each corresponding to a different water temperature. Specifically, room temperature water corresponds to the first water outlet, and hot water corresponds to the second water outlet. The water dispensing command acquisition component includes a first function button corresponding to the first water outlet and a second function button corresponding to the second water outlet. The control component can acquire the room temperature water dispensing command through the first function button and the hot water dispensing command through the second function button. Alternatively, the water dispensing command acquisition component may also include a voice recognition unit. The user can directly input the room temperature water dispensing command or the hot water dispensing command to the control component of the water dispenser through the voice recognition unit. When the control component receives the room temperature water dispensing command or the hot water dispensing command through the voice recognition unit, it can, in step S105, control the first water outlet of the water dispenser to dispense room temperature water based on the room temperature water dispensing command, or control the second water outlet of the water dispenser to dispense hot water based on the hot water dispensing command, provided that the offset is less than or equal to a first threshold.

[0062] As an example, the water dispenser may include only one water outlet. The function buttons in the water dispensing command acquisition component include a water temperature control area and a water dispensing control area. The control component can obtain the water temperature input by the user through the water temperature control area and obtain the water dispensing command corresponding to the water temperature input by the user through the water dispensing control area. Based on the water temperature and the water dispensing command corresponding to the water temperature, the water dispensing command in step S101 is obtained. In step S105, if the offset is less than or equal to the first threshold, the water dispenser is controlled to start the water dispensing function according to the water dispensing command. At this time, the water temperature of the water dispenser is equal to the water temperature input by the user. Of course, the water dispensing command acquisition component may also include a voice recognition unit. Users can directly input a normal temperature water dispensing command or a hot water dispensing command to the control component of the water dispenser through the voice recognition unit. When the control component receives a normal temperature water dispensing command or a hot water dispensing command through the voice recognition unit, it can control the water dispenser to dispense normal temperature water based on the normal temperature water dispensing command or hot water based on the hot water dispensing command, provided that the offset is less than or equal to the first threshold in step S105.

[0063] The target area can be below the water outlet of the water dispenser, and includes the area of ​​the water outlet. In this embodiment, to avoid accidental water discharge from the water outlet, the image acquisition unit can be placed near the water outlet of the water dispenser, and the image within the target area near the water outlet acquired by the image acquisition unit is the target image.

[0064] It should be noted that the target image is a real-time image within the target range acquired by the image acquisition unit after the control component receives the water dispensing command. Specifically, after receiving the water dispensing command and before controlling the water dispenser to turn off the water dispensing function, the control component can continuously acquire the target image within the target range according to a preset cycle, and perform the operations corresponding to steps S102 to S105 based on the target image.

[0065] As an example, refer to Figure 2 This illustration shows a schematic diagram of the image acquisition unit's location according to an embodiment of this application. The water dispenser 10 includes a first water outlet 12-1 and a second water outlet 12-2. The image acquisition unit 11 in the water dispensing command acquisition component is located between the first water outlet 12-1 and the second water outlet 12-2, and is used to acquire a target image within a target range corresponding to the water dispenser. The target range includes a first range corresponding to the first water outlet 12-1 and a second range corresponding to the second water outlet 12-2.

[0066] Step S102: Based on the target image, determine whether there is a detected object within the target range.

[0067] The object to be detected can be any object other than the background that the image acquisition unit can acquire. The background includes, but is not limited to, the water dispenser itself, the tabletop, and the ground. Specifically, if there are no other objects in the target image besides the background, the control component can determine that there is no object to be detected in the target area; if there are other objects in the target image besides the background, the control component can determine that there is an object to be detected in the target area.

[0068] Before step S102, an image database can be established in advance. This image database may include, but is not limited to, background images, target container images, human body part images (e.g., an adult's hand, an adult's arm, a child's hand, a child's arm, etc.), and various pet images that can be acquired by the image acquisition unit.

[0069] In the process of determining whether a detected object exists within the target area based on the target image, the control component can match each object in the target image with images in the image database. If an object in the target image only matches a background image in the image database, it can be determined that no detected object exists within the target area. If an object in the target image matches an image other than a background image in the image database, it can be determined that a detected object exists within the target area.

[0070] In this embodiment of the application, if the control component determines that there is a detected object within the target range, it executes step S103; if it determines that there is no detected object within the target range, it does not execute the operation of controlling the water dispenser to turn on the water dispensing function.

[0071] Step S103: If the object to be detected exists within the target range, determine whether the object to be detected contains the target container.

[0072] Specifically, if the detection object is determined to exist within the target range through step S102, the control component can further match each object in the detection object with the image in the image database in turn; if any object in the detection object matches the target container image in the image database, the control component can determine that the detection object contains the target container; if none of the objects in the detection object match the target container image in the image database, the control component can determine that the detection object does not contain the target container.

[0073] The target container can be any water container, such as a water cup, kettle, or water bottle.

[0074] In this embodiment, if the control component determines that the detected object contains the target container, it executes step S104; if it determines that the detected object does not contain the target container, it does not execute the operation of controlling the water dispenser to start dispensing water. For example, in scenarios where a child touches the water function button out of curiosity, a pet accidentally touches the function button, or the voice recognition unit misinterprets the water dispensing command, if the control component determines in step S103 that the detected object does not contain the target container, it will not execute the operation of controlling the water dispenser to start dispensing water. This can effectively avoid the risk of children or pets being scalded, and can also avoid problems such as water waste caused by the water dispenser accidentally dispensing water.

[0075] Step S104: If the target container is included in the object being detected, determine the offset of the target container relative to the water outlet of the water dispenser.

[0076] In this embodiment of the application, when the object being detected includes a target container, the control component can further determine the offset of the target container relative to the water outlet of the water dispenser, and continue to execute step S105 based on the offset.

[0077] Specifically, the first position of the image acquisition unit in the water dispenser, the second position of the water outlet, and the first positional relationship between the image acquisition unit and the water outlet can be predetermined. When the control component determines the target container within the target range from the target image, it can further determine the second positional relationship between the container opening of the target container and the first position based on the first position of the image acquisition unit. With the first position fixed, the control component can further calculate the third positional relationship between the container opening of the target container and the water outlet based on the first and second positional relationships. If the third positional relationship indicates that the container opening of the target container is directly below the first water outlet, the control component can determine that the offset of the target container relative to the water outlet of the water dispenser is 0. If the third positional relationship indicates that the container opening of the target container is not directly below the first water outlet, the control component can determine that the offset of the target container relative to the water outlet of the water dispenser is 1. Here, 0 indicates that the container opening of the target container and the water outlet are aligned; 1 indicates that the container opening of the target container and the water outlet are not aligned.

[0078] Step S105: If the offset is less than or equal to the first threshold, control the water dispenser to turn on the water dispensing function.

[0079] In this embodiment, the first threshold can be set to 0, or any value between 0 and 1. If the offset of the target container relative to the water outlet of the water dispenser is 0, it indicates that the container opening and the water outlet of the target container are aligned, and the control component controls the water dispenser to turn on the water dispensing function based on the water dispensing command received in step S101; if the offset of the target container relative to the water outlet of the water dispenser is 1, it indicates that the container opening and the water outlet of the target container are not aligned, and the control component does not perform the operation of controlling the water dispenser to turn on the water dispensing function, so as to avoid the problem of scalding or water waste caused by turning on the water dispensing function when the container opening and the water outlet are not aligned.

[0080] In addition, the water dispenser may also include a voice prompt component. If, in step S103, it is determined that the target container is not included among the detected objects, the control component, while not performing the operation of controlling the water dispenser to start dispensing water, can also prompt the user via the voice prompt component to remove the detected object within the target range. If, in step S105, it is determined that the offset is greater than a first threshold, the control component, while not performing the operation of controlling the water dispenser to start dispensing water, can also prompt the user via the voice prompt component to align the target container with the water outlet.

[0081] In related technologies, most water dispenser switches use a structure where a spindle with a return spring is directly hinged to the control handle. By pressing down or lifting the handle, the core valve moves to control the opening and closing of the water valve. However, if the user accidentally touches the handle, the water dispenser will dispense water directly, which can easily cause injury. For example, if a child touches the switch out of curiosity, or a pet accidentally touches the switch, or if the user's container opening is not aligned with the water dispenser's outlet, the dispenser will directly control the water dispenser to dispense water based on the received water dispensing command, posing a risk of scalding the user and also causing unnecessary waste of water resources. In this embodiment, after receiving a water dispensing command, before controlling the water dispenser to start the water dispensing function, the system first determines the offset between the target container and the water dispenser's outlet based on the target image within the target range corresponding to the water dispenser. If it is determined that there is a detected object within the target range and the detected object includes the target container, the system further determines the offset between the target container and the water dispenser's outlet. If the offset is less than a first threshold, the system then controls the water dispenser to start the water dispensing function. This avoids the problem of users being scalded by hot water due to accidentally touching the water dispenser's water dispensing switch or due to various reasons causing the water outlet to be misaligned with the target container when dispensing water. This realizes the intelligent control method of the water dispenser, which not only avoids unnecessary water waste but also improves the safety of users when using the water dispenser.

[0082] Reference Figure 3 The flowchart illustrates another water dispenser control method provided in an embodiment of this application, as shown below. Figure 3 As shown, the method specifically includes steps S201 and S219:

[0083] Step S201: Upon receiving a water dispensing command, acquire the target image within the target range corresponding to the water dispenser.

[0084] This step can be referred to in the detailed description of step S101, and will not be repeated here.

[0085] Step S202: Based on the target image, determine whether there is a detected object within the target range.

[0086] This step can be referred to in the detailed description of step S102, and will not be repeated here.

[0087] If the control component determines that there is a target object within the target range, it executes step S204; if it determines that there is no target object within the target range, it executes step S203.

[0088] Step S203: Do not perform the operation of controlling the water dispenser to turn on the water dispensing function.

[0089] Specifically, if the control component determines in step S202 that there is no object to be detected within the target range, it will not execute the operation of controlling the water dispenser to start the water dispensing function based on the received water dispensing command, so as to avoid the water dispenser dispensing water when there is no object to be detected within the target range, thus avoiding waste of water resources.

[0090] Step S204: Determine the number of objects to be detected.

[0091] Specifically, the control component can determine the number of objects to be detected based on the differences in features such as color and shape among the objects to be detected in the target image.

[0092] Step S205: If the number of detected objects is greater than the preset number, the operation of controlling the water dispenser to turn on the water dispensing function will not be executed.

[0093] Step S206: When the number of detected objects is equal to the preset number, determine whether the detected objects contain the target container.

[0094] In this embodiment of the application, when the control component determines whether the detected object contains the target container when there is a detected object within the target range, it can first determine the number of detected objects based on the target image; then, if the number of detected objects is greater than a preset number, step S205 is executed, and if the number of detected objects is equal to the preset number, step S206 is executed.

[0095] The preset quantities include 1 and 2. Specifically, the case where the number of detected objects is equal to 1 corresponds to a normal user water-collecting scenario, such as a user placing the target container under a water outlet to collect water. Therefore, the control component can match the detected object with the image database to confirm whether the detected object is the target container. If the detected object is the target container, then it is determined that the detected object contains the target container. The case where the number of detected objects is equal to 2 also corresponds to a normal user water-collecting scenario, such as a user holding the target container under a water outlet to collect water. The control component can match each of the 2 detected objects with the image database. If either of the 2 detected objects matches the target container image in the image database, then it is determined that the detected object contains the target container.

[0096] If the control component determines in step S206 that the detected object contains the target container, then it executes step S208; if it determines that the detected object does not contain the target container, then it executes step S207.

[0097] The water dispenser control method provided in this application, when determining that there are detected objects within the target range, first determines the number of detected objects. If the number of detected objects is greater than a preset number, for example, three or more detected objects, it indicates that the situation does not meet the normal water dispensing scenario. In this case, the operation of controlling the water dispenser to start the water dispensing function is not executed, preventing scalding caused by hot water from the water dispenser. This also reduces the operation of the control component matching multiple detected objects with the image database, reducing unnecessary operating overhead of the control component. If the number of detected objects is equal to the preset number, for example, when the user places the target container under the water outlet to dispense water, or when the user holds the target container under the water outlet to dispense water, it indicates that the situation meets the normal water dispensing scenario. The control component can further determine whether the detected objects include the target container. Thus, while ensuring the safety of the user during the use of the water dispenser, unnecessary image database matching operations are reduced, improving the data processing efficiency of the control component in the water dispenser.

[0098] Step S207: Do not perform the operation of controlling the water dispenser to turn on the water dispensing function.

[0099] In this embodiment of the application, when the number of objects to be detected is equal to the preset number, but the target container is not included among the objects to be detected, the control component may not perform the operation of controlling the water dispenser to turn on the water dispensing function, so as to avoid the occurrence of problems such as accidental water dispensing and scalding.

[0100] Step S208: Identify the container opening of the target container and the first center position of the container opening.

[0101] Step S209: Determine the second center position of the water outlet of the water dispenser.

[0102] Step S210: Determine the first offset distance of the first center position relative to the second center position, and determine the first offset distance as the offset of the target container relative to the outlet.

[0103] In this embodiment of the application, the control component can determine the offset of the target container relative to the outlet by determining the first offset distance of the first center position of the container opening of the target container relative to the second center position of the outlet.

[0104] Specifically, the control component can acquire an image of the container opening of the target container from the target image, and determine the first center position of the container opening from the container opening image. The first center position is the location of the center point of the container opening. With the second position of the outlet fixed, the second center position of the outlet's center point can be determined based on the outlet's diameter.

[0105] In determining the first offset distance between the first center position and the second center position, the control component can first project the line connecting the first position and the first center position of the image acquisition unit onto the reference plane to obtain a first projection line segment, and then project the line connecting the first position and the second center position onto the reference plane to obtain a second projection line segment. It is understood that the first projection line segment and the second projection line segment intersect at least one endpoint, and the intersecting endpoint is the first projection point corresponding to the first position. Then, the offset distance between the second projection point other than the first projection point in the first projection line segment and the third projection point other than the first projection point in the second projection line segment is determined as the first offset distance.

[0106] In the case where the first projection line segment and the second projection line segment overlap, the control component can determine the absolute value of the length difference between the first projection line segment and the second projection line segment as the first offset distance; in the case where the first projection line segment and the second projection line segment do not overlap, the control component can project the first projection line segment onto the straight line where the second projection line segment is located to obtain the third projection line segment, and determine the absolute value of the length difference between the third projection line segment and the second projection line segment as the first offset distance; the control component can also determine the distance from the second projection point to the straight line where the second projection line segment is located as the first offset distance, but this embodiment does not specifically limit this.

[0107] It should be noted that the reference plane can be the first plane where the water outlet is located, the third plane where the image acquisition unit is located, or any other plane other than the first and second planes. The first plane where the water outlet is located is a plane parallel to the diameter of the water outlet and perpendicular to the water outlet direction; the third plane where the image acquisition unit is located is a plane parallel to the first plane.

[0108] Optionally, step S210, determining the first offset distance between the first center position and the second center position, includes steps B11 to B13:

[0109] Step B11: Establish a two-dimensional plane coordinate system in the first plane where the water outlet is located, with the second center position as the origin.

[0110] Step B12: Obtain the projection position of the first center position in the two-dimensional plane coordinate system.

[0111] Step B13: Determine the second offset distance of the projected position relative to the origin as the first offset distance of the first center position relative to the second center position.

[0112] In this embodiment, the control component can also determine the first offset distance through steps B11 to B13. Specifically, a two-dimensional plane coordinate system is established in the first plane where the outlet is located, with the second center position as the origin, including mutually perpendicular X-axis and Y-axis. In this embodiment, the positive directions of the X-axis and Y-axis are not limited.

[0113] In the process of determining the first offset distance based on the two-dimensional plane coordinate system established in step B11, the control component can obtain the projection position of the first center position in the two-dimensional plane coordinate system, and determine the second offset distance of the calculated projection position relative to the origin as the first offset distance of the first center position relative to the second center position.

[0114] Specifically, the control component can determine the second offset distance as a first offset sub-distance in the X-axis direction relative to the origin and a second offset sub-distance in the Y-axis direction relative to the origin. The control component also calculates the distance between the projected position and the origin based on the coordinates of the projected position in the two-dimensional plane coordinate system, and determines this distance as the second offset distance.

[0115] Step S211: Identify the container opening of the target container and the first center position and edge position of the container opening.

[0116] Step S212: Determine the first distance between the edge position of the container opening and the first center position.

[0117] Step S213: Calculate the product of the first distance and the preset coefficient to obtain the first threshold; the preset coefficient is less than or equal to the second threshold.

[0118] In this embodiment of the application, before determining whether the offset of the target container relative to the outlet is greater than the first threshold, the control component may also determine the first threshold through steps S211 to S213.

[0119] Specifically, the control component can identify the container opening of the target container in the target image, the first center position and the edge position of the container opening, and the first distance between the edge position and the first center position based on the target image. Wherein, if the shape of the container opening edge is a perfect circle, the first distance is the radius of the circle; if the shape of the container opening edge is an ellipse or a polygon, the first distance is the shortest distance from the edge of the ellipse or polygon to the first center position.

[0120] It should be noted that, when the thickness of the container opening is not negligible, the edge position is the inner wall edge of the container opening, and the first distance is the distance between the inner wall of the container opening and the first center position.

[0121] The second threshold can be any value greater than 0 and less than 1. For example, the second threshold can be any value among 1 / 2, 2 / 3, and 3 / 5. It is understood that, under the premise of ensuring that the water flowing from the outlet smoothly flows into the container opening, the preset coefficient can be taken as large as possible to reduce the difficulty for users to align the target container and the outlet during the water filling process.

[0122] Step S214: Determine whether the offset is less than or equal to the first threshold.

[0123] Specifically, if the offset is greater than or equal to the first threshold, it indicates that the water flowing from the outlet can smoothly flow into the target container. If the control component determines that the offset is less than or equal to the first threshold, it can execute step S216 to control the water dispenser to turn on the water dispensing function. If the offset is greater than the first threshold, it indicates that the water flowing from the outlet may flow outside the target container. If the control component determines that the offset is greater than the first threshold, it can execute step S215 and not execute the operation of controlling the water dispenser to turn on the water dispensing function.

[0124] Step S215: Do not perform the operation of controlling the water dispenser to turn on the water dispensing function.

[0125] Specifically, if the offset exceeds the first threshold, to prevent water from flowing out of the outlet and scalding the user due to misalignment between the outlet and the target container, the control component may not execute the operation to turn on the water dispenser's water dispensing function.

[0126] Step S216: If the offset is less than or equal to the first threshold, control the water dispenser to turn on the water dispensing function.

[0127] This step can be referred to in the detailed description of step S105, and will not be repeated here.

[0128] Step S217: Determine the second plane where the container opening of the target container is located.

[0129] Step S218: Obtain the second distance between the water surface in the target container and the second plane.

[0130] Step S219: If the second distance is less than or equal to the fourth threshold, control the water dispenser to turn off the water dispensing function.

[0131] In this embodiment, the detection component may further include an ultrasonic scanner for detecting the distance between the water surface in the target container and the container opening.

[0132] Specifically, after the control component controls the water dispenser to turn on the water dispensing function, it can use an ultrasonic scanner to obtain the second distance between the water surface in the target container and the second plane where the container opening is located in real time. If the second distance is less than or equal to the fourth threshold, the control component controls the water dispenser to turn off the water dispensing function, which can prevent the water in the target container from overflowing or splashing out of the target container and causing scalding.

[0133] The second plane is a plane parallel to the diameter direction of the container opening; the fourth threshold can be set to 1cm, 2cm, 3cm, etc., and this application embodiment does not limit this.

[0134] Optionally, the method further includes step C11:

[0135] Step C11: Obtain the target capacity of the target container.

[0136] After controlling the water dispenser to turn on the water dispensing function when the offset is less than or equal to the first threshold as described in step S105, the method further includes:

[0137] Step C12: When the water dispenser reaches the target capacity, control the water dispenser to turn off the water dispensing function.

[0138] In this embodiment, the detection component may further include an ultrasonic scanner for detecting the capacity of the target container.

[0139] Specifically, the control component can use an ultrasonic scanner to detect the maximum capacity of the target container and determine the target capacity of the target container based on the maximum capacity. For example, the target capacity can be 90%, 80%, or 70% of the maximum capacity, etc.

[0140] After the control component obtains the target capacity through step C11, it can control the water dispenser to turn off the water dispensing function after the water volume reaches the target capacity, thus preventing water from overflowing or splashing out of the target container and causing scalding, thereby improving the safety of users when using the water dispenser.

[0141] Optionally, in step S104, if the target container is included in the object being detected, determining the offset of the target container relative to the water dispenser's outlet includes steps A11 to A12:

[0142] Step A11: If the object being detected contains a target container, determine the number of times the target container shakes within a preset time period.

[0143] Step A12: If the number of shaking events is less than or equal to the third threshold, determine the offset of the target container relative to the water outlet of the water dispenser.

[0144] In this embodiment, considering that young children, elderly people, and other users who are unable to care for themselves may experience shaking when using the target container to collect water, potentially leading to scalding. The water dispenser control method provided in this embodiment, when the detected object includes the target container, determines the offset of the target container relative to the water dispenser's outlet by first determining the number of times the target container shakes within a preset time period. If the number of shaking events exceeds a third threshold, the operation to control the water dispenser to start dispensing water is not executed; if the number of shaking events is less than or equal to the third threshold, step A12 is executed to determine the offset of the target container relative to the water dispenser's outlet.

[0145] Specifically, during the execution of step S104, the control component can continuously acquire a first image within the target range using the image acquisition unit, and record the number of times the target container shakes in the first image within a preset time period. Here, shaking of the target container refers to the situation where the target container partially or completely leaves the target range; within the preset time period, a single instance of the target container partially or completely leaving the target range is recorded as one shake; a situation where the target container shakes once, returns to the target range, and then partially or completely leaves the target range again within the preset time period is recorded as two shakes. Thus, the number of times the target container shakes within the preset time period can be obtained.

[0146] The preset time period and the third threshold can be determined according to user needs. For example, the preset time period can be 2s, 5s, 10s, 15s, etc., and the third threshold can be 1, 3, 4, etc. The embodiments of this application do not specifically limit these values.

[0147] If the number of vibrations is less than or equal to the third threshold, the control component can determine the offset of the target container relative to the water outlet of the water dispenser according to the operation corresponding to step S104 or steps S208 to S210. The embodiments of this application will not be described in detail here.

[0148] Device Examples

[0149] like Figure 4 As shown, Figure 4 This paper illustrates a logic block diagram of a water dispenser control device according to an embodiment of the present application. The device includes:

[0150] The first acquisition module 401 is used to acquire a target image within the target range corresponding to the water dispenser when a water dispensing command is received.

[0151] The first determining module 402 is used to determine whether a detected object exists within the target range based on the target image;

[0152] The second determining module 403 is used to determine whether the detected object contains a target container when the detected object exists within the target range.

[0153] The third determining module 404 is used to determine the offset of the target container relative to the water outlet of the water dispenser when the target container is included in the detected object.

[0154] The first control module 405 is used to control the water dispenser to turn on the water dispensing function when the offset is less than or equal to the first threshold.

[0155] Optionally, the third determining module includes:

[0156] The identification submodule is used to identify the container opening of the target container and the first center position of the container opening;

[0157] The first determining submodule is used to determine the second center position of the water outlet of the water dispenser;

[0158] The second determining submodule is used to determine a first offset distance between the first center position and the second center position, and to determine the first offset distance as the offset of the target container relative to the outlet.

[0159] Optionally, the second determining submodule includes:

[0160] The coordinate system establishment unit is used to establish a two-dimensional plane coordinate system in the first plane where the water outlet is located, with the second center position as the origin.

[0161] The acquisition unit is used to acquire the projection position of the first center position in the two-dimensional plane coordinate system;

[0162] The determining unit is configured to determine the second offset distance of the projected position relative to the origin as the first offset distance of the first center position relative to the second center position.

[0163] Optionally, the device further includes:

[0164] The identification module is used to identify the container opening of the target container and the first center position and edge position of the container opening;

[0165] The fourth determining module is used to determine a first distance between the edge position of the container opening and the first center position;

[0166] The calculation module is used to calculate the product of the first distance and the preset coefficient to obtain a first threshold; the preset coefficient is less than or equal to a second threshold.

[0167] Optionally, the second determining module includes:

[0168] The third determining submodule is used to determine the number of the detected objects;

[0169] The control submodule is used to prevent the water dispenser from turning on its water dispensing function when the number of detected objects is greater than a preset number.

[0170] The fourth determination submodule is used to determine whether the detected objects contain a target container when the number of detected objects is equal to the preset number.

[0171] Optionally, the third determining module includes:

[0172] The fifth determining submodule is used to determine the number of times the target container shakes within a preset time period when the detected object contains the target container;

[0173] The sixth determining submodule is used to determine the offset of the target container relative to the water outlet of the water dispenser when the number of shaking is less than or equal to the third threshold.

[0174] Optionally, the device further includes:

[0175] The fifth determining module is used to determine the second plane where the container opening of the target container is located;

[0176] The second acquisition module is used to acquire a second distance between the water surface in the target container and the second plane;

[0177] The second control module is used to control the water dispenser to turn off the water dispensing function when the second distance is less than or equal to the fourth threshold.

[0178] Optionally, the device further includes:

[0179] The third acquisition module is used to acquire the target capacity of the target container;

[0180] The third control module is used to control the water dispenser to shut off its water dispensing function when the water volume of the water dispenser reaches the target capacity.

[0181] In summary, the water dispenser control device provided in this application, upon receiving a water dispensing command and before controlling the water dispenser to start the water dispensing function, first determines the offset between the target container and the water outlet of the water dispenser based on the target image within the target range corresponding to the water dispenser. If it is determined that there is a detected object within the target range and the detected object includes the target container, then the offset between the target container and the water outlet of the water dispenser is further determined. If the offset is less than a first threshold, then the water dispenser is controlled to start the water dispensing function. This can avoid the problem of users being scalded by hot water due to accidentally touching the water dispenser's water dispensing switch or due to various reasons causing the water outlet to be misaligned with the target container when dispensing water. This realizes the intelligent control method of the water dispenser and improves the safety of users when using the water dispenser.

[0182] The water dispenser control device in this application embodiment can be an electronic device or a component of an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a GPU BOX, mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0183] The water dispenser control device in this application embodiment can be a device with an operating system. This operating system can be Android, Linux, Windows, or other possible operating systems; this application embodiment does not specifically limit it.

[0184] The water dispenser control device provided in this application embodiment can achieve... Figures 1 to 3 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0185] Optionally, such as Figure 5As shown, this application embodiment also provides an electronic device 500, including a processor 501 and a memory 502. The memory 502 stores a program or instructions that can run on the processor 501. When the program or instructions are executed by the processor 501, they implement the various steps of the above-described water dispenser control method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0186] In embodiments of this application, the memory 502 can be used to store software programs and various data. The memory 502 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, applications or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 502 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 502 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0187] Processor 501 may include one or more processing units; optionally, processor 501 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 501.

[0188] This application also provides a water dispenser, including the water dispenser control device described above, to implement the various processes of the above-described water dispenser control method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0189] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described water dispenser control method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0190] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0191] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described water dispenser control method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0192] It should be understood that the chip involved in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0193] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the water dispenser control method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0194] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0195] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0196] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A water dispenser control method, characterized in that, The method includes: Upon receiving a water dispensing command, a target image within the target range corresponding to the water dispenser is acquired, wherein the water dispenser includes at least two water outlets; Based on the target image, determine whether there is a detected object within the target area; If the object to be detected exists within the target range, determine the number of the object to be detected; If the number of detected objects is greater than the preset number, the operation of controlling the water dispenser to turn on the water dispensing function will not be executed; If the number of objects being detected is equal to the preset number, determine whether the objects being detected contain the target container; If the target container is included in the object being detected, determine the offset of the target container relative to the water outlet of the water dispenser; If the offset is less than or equal to the first threshold, control the water dispenser to turn on the water dispensing function; The method further includes: Identify the opening of the target container and the first center position and edge position of the opening; Determine a first distance between the edge position of the container opening and the first center position; Calculate the product of the first distance and the preset coefficient to obtain the first threshold; the preset coefficient is less than or equal to the second threshold.

2. The method according to claim 1, characterized in that, Determining the offset of the target container relative to the water outlet of the water dispenser includes: Identify the opening of the target container and the first center position of the opening; Determine the second center position of the water outlet of the water dispenser; Determine a first offset distance between the first center position and the second center position, and define the first offset distance as the offset of the target container relative to the outlet.

3. The method according to claim 2, characterized in that, Determining the first offset distance between the first center position and the second center position includes: A two-dimensional plane coordinate system is established in the first plane where the water outlet is located, with the second center position as the origin; Obtain the projection position of the first center position in the two-dimensional plane coordinate system; The second offset distance of the projected position relative to the origin is determined as the first offset distance of the first center position relative to the second center position.

4. The method according to claim 1, characterized in that, When the target container is included in the object being detected, determining the offset of the target container relative to the water dispenser's outlet includes: If the object being detected contains a target container, determine the number of times the target container shakes within a preset time period; If the number of shaking events is less than or equal to a third threshold, the offset of the target container relative to the water outlet of the water dispenser is determined.

5. The method according to claim 1, characterized in that, After controlling the water dispenser to turn on the water dispensing function when the offset is less than or equal to the first threshold, the method further includes: Determine the second plane where the opening of the target container is located; Obtain the second distance between the water surface in the target container and the second plane; If the second distance is less than or equal to the fourth threshold, the water dispenser is controlled to turn off the water dispensing function.

6. The method according to claim 1, characterized in that, The method further includes: Obtain the target capacity of the target container; After controlling the water dispenser to turn on the water dispensing function when the offset is less than or equal to the first threshold, the method further includes: When the water dispenser reaches the target capacity, the water dispenser is controlled to shut off its water dispensing function.

7. A water dispenser control device, characterized in that, The device includes: The first acquisition module is used to acquire a target image within a target range corresponding to the water dispenser when a water dispensing command is received. The water dispenser includes at least two water outlets. The first determining module is used to determine, based on the target image, whether there is a detected object within the target range; The second determining module is used to determine whether the detected object contains a target container when the detected object exists within the target range. The third determining module is used to determine the offset of the target container relative to the water outlet of the water dispenser when the target container is included in the detected object. The first control module is used to control the water dispenser to turn on the water dispensing function when the offset is less than or equal to the first threshold. The device further includes: The identification module is used to identify the container opening of the target container and the first center position and edge position of the container opening; The fourth determining module is used to determine a first distance between the edge position of the container opening and the first center position; The calculation module is used to calculate the product of the first distance and the preset coefficient to obtain a first threshold; the preset coefficient is less than or equal to a second threshold. The second determining module includes: The third determining submodule is used to determine the number of the detected objects; The control submodule is used to prevent the water dispenser from turning on its water dispensing function when the number of detected objects is greater than a preset number. The fourth determination submodule is used to determine whether the detected objects contain a target container when the number of detected objects is equal to the preset number.

8. A water dispenser, characterized in that, The water dispenser control device as described in claim 7 is used to implement the water dispenser control method as described in any one of claims 1 to 6.

9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the water dispenser control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Water dispenser control method, water dispenser and computer readable storage medium

    CN111568210A

  • Water dispenser control method, water dispenser and computer readable storage medium

    CN111568225A

  • Go out water intellectual detection system module and water dispenser based on visual detection

    CN208573457U