Shower adjusting method, shower, storage medium and electronic device

By acquiring echo signals and converting them into point cloud data, and using a BiLSTM model and backpropagation neural network to adjust the shower head parameters, the problem of the shower head not being able to adjust automatically is solved, improving the convenience and safety of user operation.

CN114332610BActive Publication Date: 2025-11-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111601520.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2025-11-18
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

Existing showerheads cannot automatically adjust their operating parameters according to user needs, resulting in inconvenience and safety hazards. In particular, it is difficult to accurately locate the water flow position when using shampoo or shower gel, which may lead to collision injuries.

Method used

By acquiring echo signals and converting them into point cloud data, the position and height of the target object are identified using point cloud frame images and a BiLSTM model. Combined with environmental parameters, the water temperature, water flow rate, and angle of the shower head are adjusted through a backpropagation neural network.

Benefits of technology

It achieves automatic adjustment of the shower head, improving user convenience and safety, and providing a more comfortable shower environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332610B_ABST
    Figure CN114332610B_ABST
Patent Text Reader

Abstract

The application discloses a kind of shower adjusting method and shower, storage medium, electronic equipment, belong to smart home technical field.Wherein, the method includes: obtaining the target echo signal collected;According to the echo signal, obtain point cloud data information;According to the point cloud data information, the position information of target object relative to shower is calculated, and the height information of target object is calculated according to the point cloud data information;According to the position information and the height information, the working parameter of the shower is adjusted.The present application solves the technical problem that the shower of prior art cannot automatically adjust the working parameter, avoids the fixed drawbacks of the shower without human operation, makes the user use more convenient, safer, makes the user feel more comfortable showering environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart home technology, and more specifically, to a method for adjusting a shower head, as well as the shower head, storage medium, and electronic device. Background Technology

[0002] In related technologies, bathroom showerheads in smart homes mainly take two forms: wall-mounted and ceiling-mounted. Both types of suspension are fixed in place without human intervention and cannot change direction according to the user's showering needs. Wall-mounted showerheads, once placed in their initial position, will not change their state without human intervention. Ceiling-mounted showerheads, after being suspended in their initial position, automatically rinse from top to bottom. With both types, when users use shampoo or shower gel, the foam can obstruct their eyes, making it difficult to accurately locate the showerhead's water flow. This can even lead to collisions with the wall or other parts of the showerhead during the search, potentially causing injury. These are all drawbacks of fixed showerheads that require no human intervention.

[0003] In related technologies, showerheads are not yet able to intelligently adjust their operating parameters based on the user's height, position, environmental factors, etc., to provide a comfortable user environment.

[0004] There are currently no effective solutions to the aforementioned problems in the relevant technologies. Summary of the Invention

[0005] To address the technical problem that existing showerheads cannot automatically adjust their operating parameters, this invention provides a showerhead adjustment method, a showerhead, a storage medium, and an electronic device.

[0006] According to one aspect of the embodiments of this application, a method for adjusting a shower head is provided, comprising: acquiring a collected target echo signal; acquiring point cloud data information based on the echo signal; calculating the position information of a target object relative to the shower head based on the point cloud data information, and calculating the height information of the target object based on the point cloud data information; and adjusting the operating parameters of the shower head based on the position information and the height information.

[0007] Furthermore, obtaining point cloud data information based on the echo signal includes: converting the echo signal into a digital signal using an analog-to-digital converter; and obtaining point cloud data information by processing the digital signal.

[0008] Further, calculating the position information of the target object relative to the shower head based on the point cloud data information includes: converting the point cloud data information into point cloud frame images; extracting several sets of image frames that meet preset conditions from the point cloud frame images; inputting the feature vector of each set of image frames into a classification model and outputting the corresponding type information respectively; if the type information is the type information of the target object, locating the center point of the point cloud region corresponding to the target object; and calculating the position information of the target object relative to the shower head based on the center point.

[0009] Further, extracting several sets of image boxes that meet preset conditions from the point cloud frame image includes: dividing the point cloud frame image into an S×S grid, where each grid corresponds to predicting B bounding boxes and C class probabilities Pr, and S×S is the number of grids; reverting each bounding box in the S×S grid to its own position and calculating the confidence value; calculating the network output using the following formula: S×S×(5×B+C); calculating the classification confidence score of each bounding box using the following formula: Pr×confidence, where confidence is the confidence score; filtering out bounding boxes with classification confidence scores lower than a threshold in the S×S grid to obtain image boxes that meet the preset conditions.

[0010] Further, the feature vector of the image box is input into the classification model, and the type information of the corresponding target is output, including: configuring a bidirectional long short-term memory (BiLSTM) model, wherein the BiLSTM model is a classification model, including a forward LSTM and a backward LSTM; and outputting the type information L of the target object using the following formula:

[0011]

[0012] L = Softmax(O t );

[0013] in, This represents the sequence of eigenvectors from x1 to x2. T The output is fed forward to the LSTM. Represents the sequence of eigenvectors from x T When x1 is reached, the output is fed into the LSTM, where x is the feature vector, T is the number of feature vectors, and O is the number of feature vectors. t For intermediate values, α and β represent the importance factors of the forward LSTM and the backward LSTM, respectively, α+β=1, and L represents the output label after the Softmax classification layer.

[0014] Further, adjusting the operating parameters of the shower head according to the location information and the height information includes: obtaining the environmental parameters of the shower head, wherein the environmental parameters include: bathroom temperature and bathroom humidity; inputting the environmental parameters, the location information, and the height information as input variables into a backpropagation neural network (BP) model, and outputting the operating parameters of the shower head, wherein the operating parameters include at least one of the following: water temperature, water flow rate, and shower head angle.

[0015] Furthermore, before inputting the environmental parameters, location information, and height information as input variables into the backpropagation neural network (BP) model, the method further includes: configuring the network structure of the initial model, wherein the input layer of the network structure has n neurons, the hidden layer has p neurons, the output layer has q neurons, and the expected output is d. o , n, p, q are all positive integers; initialize and set the input layer and hidden layer weights, hidden layer and output layer weights, input layer and hidden layer neuron thresholds, hidden layer and output layer neuron thresholds, configure the error function, activation function, calculation precision value, and maximum number of learning iterations; repeatedly execute the following steps until the set conditions are met: randomly select the kth sample from the m sample set and set the corresponding expected output value; input the k samples into the initial model and calculate the input and output values ​​of each neuron in the hidden layer; calculate the partial derivatives of the error function with respect to each neuron in the output layer and hidden layer, and correct each connection weight value using backpropagation; calculate the global error value, wherein the set conditions include: the maximum number of learning iterations, and the current model's global error value being less than a preset value; determine whether the global error value meets the set conditions, and if it does, end the training of the initial model to obtain the BP model.

[0016] According to another aspect of the embodiments of this application, a shower head is also provided, comprising: a first acquisition module for acquiring a collected target echo signal; a second acquisition module for acquiring point cloud data information based on the echo signal; a calculation module for calculating the position information of a target object relative to the shower head based on the point cloud data information, and calculating the height information of the target object based on the point cloud data information; and an adjustment module for adjusting the operating parameters of the shower head based on the position information and the height information.

[0017] Furthermore, the second acquisition module includes: a first conversion unit, used to convert the echo signal into a digital signal through an analog-to-digital converter; and a first acquisition unit, used to acquire point cloud data information by processing the digital signal through digital signal processing.

[0018] Furthermore, the calculation module includes: a second conversion unit for converting the point cloud data information into point cloud frame images; an extraction unit for extracting several sets of image frames that meet preset conditions from the point cloud frame images; a first output unit for inputting the feature vector of each set of image frames into a classification model and outputting the corresponding type information respectively; a positioning unit for locating the center point of the point cloud region corresponding to the target object if the type information is the type information of the target object; and a calculation unit for calculating the position information of the target object relative to the shower head based on the center point.

[0019] Further, the extraction unit includes: a partitioning subunit, used to partition the point cloud frame image into an S×S grid, wherein each grid corresponds to predicting B bounding boxes and C class probabilities Pr, and S×S is the number of grids; a first calculation subunit, used to revert each bounding box in the S×S grid to its own position and calculate the confidence value; a second calculation subunit, used to calculate the network output using the following formula: S×S×(5×B+C); a third calculation subunit, used to calculate the classification confidence score of each bounding box using the following formula: Pr×confidence, where confidence is the confidence score; and a filtering subunit, used to filter bounding boxes in the S×S grid whose classification confidence scores are lower than a threshold to obtain image boxes under preset conditions.

[0020] Furthermore, the output unit includes: a first configuration subunit for configuring a bidirectional long short-term memory (BiLSTM) model, wherein the BiLSTM model is a classification model, including a forward LSTM and a backward LSTM; the output subunit outputs the type information L of the target object using the following formula:

[0021]

[0022] L = Softmax(O t );

[0023] in, This represents the sequence of eigenvectors from x1 to x2. T The output is fed forward to the LSTM. Represents the sequence of eigenvectors from x T When x1 is reached, the output is fed into the LSTM, where x is the feature vector, T is the number of feature vectors, and O is the number of feature vectors. t For intermediate values, α and β represent the importance factors of the forward LSTM and the backward LSTM, respectively, α+β=1, and L represents the output label after the Softmax classification layer.

[0024] Furthermore, the adjustment module includes: a second acquisition unit for acquiring environmental parameters of the shower head, wherein the environmental parameters include: bathroom temperature and bathroom humidity; and a second output unit for inputting the environmental parameters, the position information, and the height information as input variables into a backpropagation neural network (BP) model and outputting the operating parameters of the shower head, wherein the operating parameters include at least one of the following: water temperature, water flow rate, and shower head angle.

[0025] Furthermore, the second output unit further includes: a second configuration subunit, used to configure the network structure of the initial model, wherein the network structure has n neurons in the input layer, p neurons in the hidden layer, q neurons in the output layer, and a desired output quantity of d. o , n, p, q are all positive integers; The setting subunit is used to initialize and set the input layer and hidden layer weights, the hidden layer and output layer weights, the input layer and hidden layer neuron thresholds, the hidden layer and output layer neuron thresholds, configure the error function, activation function, calculation precision value, and maximum number of learning iterations; The loop subunit is used to repeatedly execute the following steps until the set conditions are met: randomly select the kth sample from the m sample set and set the corresponding expected output value; input the k samples into the initial model and calculate the input and output values ​​of each neuron in the hidden layer; calculate the partial derivatives of the error function with respect to each neuron in the output layer and hidden layer, and correct each connection weight value using backpropagation; calculate the global error value, wherein the set conditions include: the maximum number of learning iterations, and the current model's global error value being less than a preset value; The discrimination subunit is used to determine whether the global error value meets the set conditions. If it does, the training of the initial model ends, and the BP model is obtained.

[0026] According to another aspect of the embodiments of this application, a storage medium is also provided, the storage medium including a stored program, wherein the program executes the above-described method steps when it runs.

[0027] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the above-described method steps by running the programs stored in the memory.

[0028] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the above-described method.

[0029] This invention acquires target echo signals; obtains point cloud data based on the echo signals; calculates the position and height of the target object relative to the shower head based on the point cloud data; and adjusts the shower head's operating parameters based on the position and height information. By acquiring echo signals and calculating the position and height of the target object, and finally automatically adjusting the shower head based on the target object's position and height, this invention provides an automatic shower head adjustment solution. This solves the technical problem of existing shower heads not being able to automatically adjust their operating parameters, avoids the drawbacks of fixed shower heads without human intervention, and makes it more convenient and safer for users, providing a more comfortable shower environment. Attached Figure Description

[0030] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0031] Figure 1 This is a hardware structure block diagram of a shower head according to an embodiment of the present invention;

[0032] Figure 2 This is a flowchart of a shower head adjustment method according to an embodiment of the present invention;

[0033] Figure 3 This is an overall flowchart of a smart shower head design and application according to an embodiment of the present invention;

[0034] Figure 4 This is a YOLO+BiLSTM implementation of personnel target classification and recognition image according to an embodiment of the present invention;

[0035] Figure 5 This is a flowchart of the intelligent shower head adjustment process using a deep learning algorithm according to an embodiment of the present invention;

[0036] Figure 6 This is a structural block diagram of a shower head according to an embodiment of the present invention. Detailed Implementation

[0037] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.

[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0039] Example 1

[0040] The method embodiment provided in Embodiment 1 of this application can be executed in smart home devices, servers, showerheads, or similar computing devices. Taking its operation on a showerhead as an example, Figure 1 This is a hardware structure block diagram of a shower head according to an embodiment of the present invention. Figure 1 As shown, a shower head may include one or more ( Figure 1 Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the shower head may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the shower head described above. For example, the shower head may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0041] The memory 104 can be used to store programs for operating the shower head, such as application software programs and modules, like the shower head adjustment program corresponding to a shower head adjustment method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the shower head adjustment program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the shower head via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0042] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the showerhead's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0043] This embodiment provides a method for adjusting a shower head. Figure 2 This is a flowchart of a shower head adjustment method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0044] Step S202: Acquire the target echo signal;

[0045] Step S204: Obtain point cloud data information based on the echo signal;

[0046] Optionally, the target echo signal is acquired by millimeter-wave radar, wherein point cloud data information is acquired by the target echo signal, and the point cloud data information includes information such as range, azimuth, Doppler velocity, signal-to-noise ratio, and elevation angle.

[0047] In one embodiment of this invention, after acquiring the echo signal collected by the millimeter-wave radar, the echo signal is processed to obtain point cloud data information, and the point cloud data information is clustered, correlated, and subjected to an extended Kalman algorithm to achieve target tracking and positioning.

[0048] Step S206: Calculate the position information of the target object relative to the shower head based on the point cloud data information, and calculate the height information of the target object based on the point cloud data information;

[0049] In one embodiment of this example, the position information of the target object relative to the shower head is calculated based on the point cloud data information. The calculation method is to achieve personnel classification and recognition through YOLO feature extraction and BiLSTM (Bi-directional Long Short-Term Memory) model, and to calculate the height information of the target object based on the point cloud data information. Since the point cloud data includes distance, azimuth, Doppler velocity, signal-to-noise ratio and elevation angle information, the user's height information can be calculated based on the point cloud data.

[0050] Step S208: Adjust the operating parameters of the shower head according to the location information and the height information.

[0051] In one embodiment of this invention, the operating parameters of the shower head are adjusted according to the location information and the height information, which also include environmental parameters, such as the temperature and humidity of the user's bathroom. The operating parameters of the shower head are adjusted by a trained BP (BackPropagation) neural network model.

[0052] Through the above steps, the target echo signal is acquired; point cloud data information is obtained based on the echo signal; the position information of the target object relative to the shower head is calculated based on the point cloud data information, and the height information of the target object is calculated based on the point cloud data information; the operating parameters of the shower head are adjusted based on the position information and the height information. By acquiring the echo signal and calculating the position, height, and other information of the target object, and finally automatically adjusting the shower head based on the position, height, and other information of the target object, an automatic shower head adjustment solution is achieved. This solves the technical problem that existing shower heads cannot automatically adjust their operating parameters, avoids the drawbacks of fixed shower heads without human operation, makes it more convenient and safer for users, and provides users with a more comfortable shower environment.

[0053] In this embodiment, obtaining point cloud data information based on the echo signal includes: converting the echo signal into a digital signal using an analog-to-digital converter; and obtaining point cloud data information by processing the digital signal.

[0054] In the above steps, the echo signal acquired by the millimeter-wave radar is used to convert the analog signal into a digital signal through an ADC (Analog-to-Digital Converter), and then the point cloud data information is obtained through DSP (Digital Signal Processing).

[0055] In this embodiment, calculating the position information of the target object relative to the shower head based on the point cloud data information includes:

[0056] S11, convert the point cloud data information into a point cloud frame image; S12, extract several sets of image frames that meet preset conditions from the point cloud frame image.

[0057] The above steps involve processing the point cloud data information, converting it into point cloud frame images, and using YOLO feature extraction to output the location and category of the personnel, that is, extracting several sets of image frames that meet preset conditions from the point cloud frame images.

[0058] S13, input the feature vector of each group of image boxes into the classification model, and output the corresponding type information respectively;

[0059] The above steps implement the classification process using a BiLSTM model, which inputs the feature vector of each image box into the classification model and outputs the type information of the corresponding target.

[0060] S14, if the type information is the type information of the target object, locate the center point of the point cloud region corresponding to the target object; S15, calculate the position information of the target object relative to the shower head based on the center point.

[0061] The above steps involve YOLO feature extraction and a BiLSTM model to classify and identify people. The obtained type information is used as the target object, and the position of the target object relative to the showerhead is calculated by locating the center point of the corresponding point cloud region. When a user is showering, there may be other small objects around them, and the point cloud data also includes the positions of other items besides the user. Therefore, classification and identification are necessary. Alternatively, actions such as washing hair or getting shower gel may cause positional movement. In these cases, the point cloud data needs to be updated in a timely manner to determine the appropriate showerhead adjustment method.

[0062] In this embodiment, extracting several sets of image boxes that meet preset conditions from the point cloud frame image includes: dividing the point cloud frame image into an S×S grid, where each grid corresponds to predicting B bounding boxes and C class probabilities Pr, and S×S is the number of grids; reverting each bounding box in the S×S grid to its own position and calculating the confidence value; calculating the network output using the following formula: S×S×(5×B+C); calculating the classification confidence score of each bounding box using the following formula: Pr×confidence, where confidence is the confidence score; filtering out bounding boxes with classification confidence scores lower than a threshold in the S×S grid to obtain image boxes that meet the preset conditions.

[0063] In the above steps, YOLO feature extraction completes the process from inputting the original image to outputting object positions and categories. YOLO treats object detection as a regression problem, and after one inference step, it can obtain the positions of all objects in the image, their categories, and corresponding confidence probabilities. Specifically, the point cloud frame image is divided into an S×S grid, where each grid corresponds to predicting B bounding boxes and C category probabilities Pr, and S×S is the number of grids. Each bounding box in the S×S grid is regressed to its own position, and its confidence value is calculated. The network output is calculated using the following formula: S×S×(5×B+C), meaning each cell needs to predict (5×B+C) values. The final predicted value is a tensor of size S×S×(5×B+C).

[0064] The classification confidence score of each bounding box is calculated using the following formula: Pr × confidence. Bounding boxes with classification confidence scores below a threshold are filtered out in the S×S grid to obtain image boxes with preset conditions. Classification confidence represents the probability that the target in the bounding box belongs to each category and the quality of the bounding box matching the target. The predicted boxes of the network are filtered according to the classification confidence.

[0065] In this embodiment, the feature vector of the image box is input into the classification model, and the type information of the corresponding target is output, including: configuring a bidirectional long short-term memory (BiLSTM) model, wherein the BiLSTM model is a classification model, including a forward LSTM and a backward LSTM; and outputting the type information L of the target object using the following formula:

[0066]

[0067] L = Softmax(O t );

[0068] in, This represents the sequence of eigenvectors from x1 to x2. T The output is fed forward to the LSTM. Represents the sequence of eigenvectors from x T When x1 is reached, the output is fed into the LSTM, where x is the feature vector, T is the number of feature vectors, and O is the number of feature vectors. t For intermediate values, α and β represent the importance factors of the forward LSTM and the backward LSTM, respectively, α+β=1, and L represents the output label after the Softmax classification layer.

[0069] The above steps implement the classification process through the BiLSTM model. In the acquisition of millimeter-wave radar signal frames, the current frame is not only affected by the previous frame, but the next frame is also related to the current frame. Therefore, we consider using a bidirectional long short-term memory neural network (BiLSTM) to strengthen the bidirectional relationship so that the next frame is also considered when processing the current frame.

[0070] In this embodiment, adjusting the operating parameters of the shower head according to the location information and the height information includes: obtaining the environmental parameters of the shower head, wherein the environmental parameters include: bathroom temperature and bathroom humidity; inputting the environmental parameters, the location information, and the height information as input variables into a backpropagation neural network (BP) model, and outputting the operating parameters of the shower head, wherein the operating parameters include at least one of the following: water temperature, water flow rate, and shower head angle.

[0071] The environmental parameters mentioned above include the user's bathroom temperature, humidity, and the on / off status of smart devices in the environment. The user's water temperature is set to an initial threshold, and the shower head adjustment interval is set accordingly. The bathroom temperature and humidity are acquired via a temperature and humidity sensor, and the frequency and number of acquisitions can be set to allow for timely data adjustments based on actual conditions. The water temperature and shower head angle adjustment intervals were set based on extensive subsequent product testing; for example, adjustments are made every 10 seconds when the user frequently changes relative position. The acquired environmental parameters—specifically, the previously calculated user location and height information—are used as input vectors to a backpropagation neural network (BP) model to adjust the shower head's operating parameters: water temperature, water flow rate, and shower head angle.

[0072] In this embodiment, before inputting the environmental parameters, the location information, and the height information as input variables into the backpropagation neural network (BP) model, the method further includes:

[0073] Configure the initial network structure of the model, wherein the input layer has n neurons, the hidden layer has p neurons, the output layer has q neurons, and the desired output is d. o n, p, q are all positive integers;

[0074] In the steps above, the network structure is defined, with input vector x, and hidden layer input and output vectors h, respectively. i h o The input vector and output vector of the output layer are y and y respectively. i and y o .

[0075] Initialize and set the input layer and hidden layer weights, the hidden layer and output layer weights, the neuron thresholds of the input layer and hidden layer, and the neuron thresholds of the hidden layer and output layer; configure the error function, activation function, computational precision, and maximum number of learning iterations.

[0076] In the above steps, the connection weights w (input layer and hidden layer weights w) are set. ih Hidden layer and output layer weights w ho Threshold b for each neuron (input layer and hidden layer thresholds b) ih Hidden layer and output layer threshold b ho Error function E, activation function F, calculation precision value ε, and maximum number of learning iterations M.

[0077] The following steps are executed repeatedly until the set conditions are met: randomly select the kth sample from the m sample set and set the corresponding expected output value; input the k samples into the initial model and calculate the input and output values ​​of each neuron in the hidden layer; calculate the partial derivatives of the error function with respect to each neuron in the output layer and hidden layer, and correct each connection weight value using backpropagation; calculate the global error value, wherein the set conditions include: the maximum number of learning iterations, and the global error value of the current model being less than a preset value;

[0078] In the above steps, the k-th input sample (out of m samples) and its corresponding expected output value are randomly selected:

[0079] x(k)=(x1(k),x2(k),Λ,x n (k))

[0080] d o (k)=(d1(k),d2(k),Λ,d n (k))

[0081] Calculate the input and output values ​​of each neuron in the hidden layer:

[0082]

[0083] h o (k)=F(h i (k))

[0084]

[0085] y o (k)=F(y i (k))

[0086] Determine whether the global error value meets the set conditions. If it does, end the training of the initial model and obtain the BP model.

[0087] In the above steps, the shower head is adjusted by training a backpropagation neural network (BP) model. The user's location and height information, along with environmental parameters, are used as input vectors, while the shower head's water temperature, water flow rate, and shower head angle are used as output vectors. Each training round uses all records in the dataset, and there are two types of stopping conditions: either setting a maximum number of iterations (maximum learning count) or calculating the prediction accuracy of the training set on the network and stopping training when a certain threshold is reached (i.e., when the global error value reaches a preset value).

[0088] Figure 3This is a flowchart illustrating the overall design and application of a smart showerhead according to an embodiment of the present invention. The process includes: a front-end millimeter-wave radar acquiring echo signals; converting these signals into digital signals via an analog-to-digital converter; obtaining point cloud data through digital signal processing; implementing target tracking and positioning based on the point cloud data through clustering, association, and an extended Kalman algorithm; calculating the user's height data using the point cloud data; and classifying and identifying the user using YOLO and BiLSTM classification models to calculate the user's position relative to the showerhead. Real-time bathroom temperature and humidity, along with the aforementioned information, are then input into a BP neural network to obtain recommended optimal showerhead adjustment angle, water flow rate, and temperature.

[0089] Figure 4 This invention relates to a YOLO+BiLSTM implementation for personnel target classification and recognition. Specifically, point cloud frame images are used as input vectors x1 to xT. After YOLO feature extraction, image boxes that do not meet the threshold are filtered out and used as an intermediate feature vector as the input vector of the BiLSTM model to achieve personnel classification and recognition. The BiLSTM model includes forward LSTM and backward LSTM.

[0090] Figure 5 This is a flowchart of the intelligent shower head adjustment process using a deep learning algorithm according to an embodiment of the present invention. The temperature and humidity of the bathroom, the user's height, the user's position relative to the shower head, the adjustment time interval, and the initial optimal water temperature are used as input vectors of a BP neural network. The data are processed through a hidden layer to obtain the optimal angle, water temperature, and water flow rate of the shower head.

[0091] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general mechanical equipment, and 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 the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of software controlling mechanical equipment. This software is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a mechanical device (smart home device, etc.) to execute the methods described in the various embodiments of the present invention.

[0092] Example 2

[0093] This embodiment also provides a shower head for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0094] Figure 6 This is a structural block diagram of a shower head according to an embodiment of the present invention, such as... Figure 6 As shown, the device includes: a first acquisition module 60, a second acquisition module 62, a calculation module 64, and an adjustment module 66, wherein...

[0095] The first acquisition module 60 is used to acquire the target echo signal.

[0096] The second acquisition module 62 is used to acquire point cloud data information based on the echo signal;

[0097] The calculation module 64 is used to calculate the position information of the target object relative to the shower head based on the point cloud data information, and to calculate the height information of the target object based on the point cloud data information.

[0098] The adjustment module 66 is used to adjust the operating parameters of the shower head according to the position information and the height information.

[0099] Optionally, the second acquisition module includes: a first conversion unit, used to convert the echo signal into a digital signal through an analog-to-digital converter; and a first acquisition unit, used to acquire point cloud data information by processing the digital signal through digital signal processing.

[0100] Optionally, the calculation module includes: a second conversion unit for converting the point cloud data information into point cloud frame images; an extraction unit for extracting several sets of image frames that meet preset conditions from the point cloud frame images; a first output unit for inputting the feature vector of each set of image frames into a classification model and outputting the corresponding type information respectively; a positioning unit for locating the center point of the point cloud region corresponding to the target object if the type information is the type information of the target object; and a calculation unit for calculating the position information of the target object relative to the shower head based on the center point.

[0101] Optionally, the extraction unit includes: a partitioning subunit, used to partition the point cloud frame image into an S×S grid, wherein each grid corresponds to predicting B bounding boxes and C class probabilities Pr, and S×S is the number of grids; a first calculation subunit, used to revert each bounding box in the S×S grid to its own position and calculate the confidence value; a second calculation subunit, used to calculate the network output using the following formula: S×S×(5×B+C); a third calculation subunit, used to calculate the classification confidence score of each bounding box using the following formula: Pr×confidence, where confidence is the confidence score; and a filtering subunit, used to filter bounding boxes in the S×S grid whose classification confidence scores are lower than a threshold to obtain image boxes with preset conditions.

[0102] Optionally, the output unit includes: a first configuration subunit for configuring a bidirectional long short-term memory (BiLSTM) model, wherein the BiLSTM model is a classification model, including a forward LSTM and a backward LSTM; the output subunit outputs the type information L of the target object using the following formula:

[0103]

[0104] L = Softmax(O t );

[0105] in, This represents the sequence of eigenvectors from x1 to x2. T The output is fed forward to the LSTM. Represents the sequence of eigenvectors from x T When x1 is reached, the output is fed into the LSTM, where x is the feature vector, T is the number of feature vectors, and O is the number of feature vectors. t For intermediate values, α and β represent the importance factors of the forward LSTM and the backward LSTM, respectively, α+β=1, and L represents the output label after the Softmax classification layer.

[0106] Optionally, the adjustment module includes: a second acquisition unit for acquiring environmental parameters of the shower head, wherein the environmental parameters include: bathroom temperature and bathroom humidity; and a second output unit for inputting the environmental parameters, the position information, and the height information as input variables into a backpropagation neural network (BP) model and outputting the operating parameters of the shower head, wherein the operating parameters include at least one of the following: water temperature, water flow rate, and shower head angle.

[0107] Optionally, the second output unit further includes: a second configuration subunit, used to configure the network structure of the initial model, wherein the network structure has n neurons in the input layer, p neurons in the hidden layer, q neurons in the output layer, and a desired output quantity of d. o, n, p, q are all positive integers; The setting subunit is used to initialize and set the input layer and hidden layer weights, the hidden layer and output layer weights, the input layer and hidden layer neuron thresholds, the hidden layer and output layer neuron thresholds, configure the error function, activation function, calculation precision value, and maximum number of learning iterations; The loop subunit is used to repeatedly execute the following steps until the set conditions are met: randomly select the kth sample from the m sample set and set the corresponding expected output value; input the k samples into the initial model and calculate the input and output values ​​of each neuron in the hidden layer; calculate the partial derivatives of the error function with respect to each neuron in the output layer and hidden layer, and correct each connection weight value using backpropagation; calculate the global error value, wherein the set conditions include: the maximum number of learning iterations, and the current model's global error value being less than a preset value; The discrimination subunit is used to determine whether the global error value meets the set conditions. If it does, the training of the initial model ends, and the BP model is obtained.

[0108] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0109] Example 3

[0110] Embodiments of the present invention also provide a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0111] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0112] S1, acquire the target echo signal;

[0113] S2, Obtain point cloud data information based on the echo signal;

[0114] S3, calculate the position information of the target object relative to the shower head based on the point cloud data information, and calculate the height information of the target object based on the point cloud data information;

[0115] S4, adjust the operating parameters of the shower head according to the position information and the height information.

[0116] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0117] Embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0118] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0119] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0120] S1, acquire the target echo signal;

[0121] S2, Obtain point cloud data information based on the echo signal;

[0122] S3, calculate the position information of the target object relative to the shower head based on the point cloud data information, and calculate the height information of the target object based on the point cloud data information;

[0123] S4, adjust the operating parameters of the shower head according to the position information and the height information.

[0124] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0125] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0126] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0127] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0128] The units described as separate components may or may not be physically separate. 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0129] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0130] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0131] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for adjusting a shower head, characterized in that, include: Acquire the target echo signal; Point cloud data information is obtained based on the echo signal; The position information of the target object relative to the shower head is calculated based on the point cloud data information, and the height information of the target object is calculated based on the point cloud data information. The operating parameters of the shower head are adjusted according to the location information and the height information; The step of calculating the position information of the target object relative to the shower head based on the point cloud data information includes: converting the point cloud data information into point cloud frame images; extracting several sets of image frames that meet preset conditions from the point cloud frame images; inputting the feature vector of each set of image frames into a classification model and outputting the corresponding type information; if the type information is the type information of the target object, locating the center point of the point cloud region corresponding to the target object; and calculating the position information of the target object relative to the shower head based on the center point.

2. The method as described in claim 1, characterized in that, The point cloud data information obtained from the echo signal includes: The echo signal is converted into a digital signal using an analog-to-digital converter; The digital signal is processed to obtain point cloud data information.

3. The method as described in claim 1, characterized in that, Extracting several sets of image frames that meet preset conditions from the point cloud frame image includes: The point cloud frame image is divided into an S×S grid, where each grid corresponds to the prediction of B bounding boxes and C class probabilities Pr, and S×S is the number of grids. Each bounding box in the S×S grid is reverted to its own position, and a confidence value is calculated. The network output is calculated using the following formula: S × S × (5 × B + C); The classification confidence score of each bounding box is calculated using the following formula: Pr × confidence, where confidence is the confidence score; In the S×S grid, bounding boxes with classification confidence scores below a threshold are filtered out to obtain image boxes with preset conditions.

4. The method as described in claim 1, characterized in that, The feature vector of the image box is input into the classification model, and the corresponding target type information is output, including: Configure a bidirectional long short-term memory (BiLSTM) model, wherein the BiLSTM model is a classification model, including forward LSTM and backward LSTM; The type information L of the target object is output using the following formula: O t = αO t f + βO t b L =Softmax( O t ); in, O t f Indicates the sequence of feature vectors from x 1 to x T Output to LSTM before time advances. O t b Indicates the sequence of feature vectors from x T arrive x Output to LSTM after 1 hour. x Let T be the number of eigenvectors. O t As an intermediate quantity, α and β These represent the importance factors of the forward LSTM and the backward LSTM, respectively. α + β =1, where L represents the output label after the Softmax classification layer.

5. The method as described in claim 1, characterized in that, Adjusting the operating parameters of the shower head based on the location information and the height information includes: Obtain the environmental parameters of the shower head, wherein the environmental parameters include: bathroom temperature and bathroom humidity; The environmental parameters, location information, and height information are input as input variables into the backpropagation neural network (BP) model, which outputs the operating parameters of the shower head. The operating parameters include at least one of the following: water temperature, water flow rate, and shower head angle.

6. The method as described in claim 5, characterized in that, Before inputting the environmental parameters, the location information, and the height information as input variables into the backpropagation neural network (BP) model, the method further includes: Configure the initial network structure of the model, wherein the input layer has n neurons, the hidden layer has p neurons, the output layer has q neurons, and the desired output is d. o n, p, q are all positive integers; Initialize and set the input layer and hidden layer weights, the hidden layer and output layer weights, the neuron thresholds of the input layer and hidden layer, and the neuron thresholds of the hidden layer and output layer; configure the error function, activation function, computational precision, and maximum number of learning iterations. The following steps are executed repeatedly until the set conditions are met: randomly select the kth sample from the m sample set and set the corresponding expected output value; input the k samples into the initial model and calculate the input and output values ​​of each neuron in the hidden layer; calculate the partial derivatives of the error function with respect to each neuron in the output layer and hidden layer, and correct each connection weight value using backpropagation; calculate the global error value, wherein the set conditions include: the maximum number of learning iterations, and the global error value of the current model being less than a preset value; Determine whether the global error value meets the set conditions. If it does, end the training of the initial model and obtain the BP model.

7. A shower head, characterized in that, include: The first acquisition module is used to acquire the target echo signal. The second acquisition module is used to acquire point cloud data information based on the echo signal; The calculation module is used to calculate the position information of the target object relative to the shower head based on the point cloud data information, and to calculate the height information of the target object based on the point cloud data information; The adjustment module is used to adjust the operating parameters of the shower head according to the position information and the height information; The calculation module includes: a second conversion unit for converting the point cloud data information into point cloud frame images; an extraction unit for extracting several sets of image frames that meet preset conditions from the point cloud frame images; a first output unit for inputting the feature vector of each set of image frames into a classification model and outputting the corresponding type information; a positioning unit for locating the center point of the point cloud region corresponding to the target object if the type information is the type information of the target object; and a calculation unit for calculating the position information of the target object relative to the shower head based on the center point.

8. A storage medium, characterized in that, The storage medium includes a stored program, wherein the program, when executed, performs the method steps of any one of claims 1 to 6.

9. An electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein, The processor, communication interface, and memory communicate with each other via a communication bus; among which: Memory, used to store computer programs; A processor for executing the method steps of any one of claims 1 to 6 by running a program stored in memory.

Citation Information

Patent Citations

  • Method and device for controlling water yield of shower head and shower head

    CN110639725A

  • Shower head control method and system, terminal equipment and readable storage medium

    CN111451032A

  • Toilet fall detection method based on millimeter wave radar

    CN112782664A