Detergent control method and device based on deep learning, washing machine and medium
By building feature vectors through deep learning models and combining optical character recognition and image recognition technologies, accurate and automatic detergent dispensing in washing machines can be achieved, solving the problems of insufficient flexibility and precision in existing technologies and improving washing effects and resource utilization efficiency.
Patent Information
- Application Number
- CN202411916188.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The automatic detergent dispensing technology of existing washing machines lacks flexibility and control accuracy, and cannot accurately dispense detergent according to the specific conditions of the clothes, resulting in poor washing results and detergent waste.
A detergent control method based on deep learning is adopted. The feature vector is constructed through a pre-trained deep reinforcement learning model. The characteristics of detergent and laundry are combined to determine the optimal detergent delivery strategy. Optical character recognition and image recognition technology are used to obtain detergent and clothing status information to achieve automatic and precise delivery.
It improves the flexibility and accuracy of detergent addition, ensures that clothes are fully clean, reduces detergent and water waste, improves the intelligence level of washing machines, and meets consumers' needs for convenience and comfort.
Smart Images

Figure CN119736772B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of household appliance control technology, and in particular to a detergent control method, device, washing machine, and medium based on deep learning. Background Art
[0002] Washing machines have become an indispensable household appliance in modern families. With technological advancements, consumers are increasingly demanding smarter, more automated washing machines. Traditional washing machines require users to manually add detergent, which is not only cumbersome but also difficult to precisely adjust based on the specific conditions of the laundry, resulting in wasted detergent or poor washing results, for example, depending on the weight, soiling, or fabric quality of the laundry.
[0003] Although some washing machines have begun to adopt automatic dispensing technology in the existing technology, these technologies mostly rely on simple sensors and preset programs, which can only achieve quantitative detergent dispensing. They lack flexibility and adaptability, and cannot achieve precise detergent dispensing under diverse washing needs. Therefore, the existing technology still suffers from the problems of poor flexibility and low control accuracy in the automatic dispensing of detergent. Summary of the Invention
[0004] The present application provides a detergent control method, device, washing machine and medium based on deep learning to solve the technical problems of poor flexibility and low control accuracy in the automatic dispensing of detergent in the above-mentioned prior art.
[0005] According to one aspect of an embodiment of the present application, the present application provides a detergent control method based on deep learning, the method comprising: obtaining washing characteristics of the detergent and obtaining state characteristics of the laundry; constructing a feature vector based on the washing characteristics of the detergent and the state characteristics of the laundry through a pre-trained deep reinforcement learning model; performing feature analysis based on the feature vector through the pre-trained deep reinforcement learning model to determine a target vector, wherein each element in the target vector corresponds to a target estimated value of a detergent delivery strategy; based on the target estimated value of the detergent delivery strategy in each element of the target vector, selecting the detergent delivery strategy corresponding to the maximum target estimated value as the optimal washing machine delivery strategy to control the washing machine delivery amount.
[0006] Optionally, obtaining the washing characteristics of the detergent includes: collecting an image of the detergent, preprocessing the image of the detergent through an optical character recognition model to obtain a preprocessed image; performing text recognition and conversion on the preprocessed image to obtain detergent character information; and performing text parsing and information extraction based on the detergent character information to obtain the washing characteristics of the detergent.
[0007] Optionally, the state feature includes a stain feature, and the obtaining the state feature of the laundry includes: collecting laundry images of the laundry in multiple dimensions; performing feature recognition on the laundry images in each dimension by using a pre-trained image recognition model to extract a laundry feature; and extracting the stain feature of the laundry according to the laundry feature.
[0008] Optionally, the state feature further includes a laundry weight feature, a dirtiness degree feature, and a fabric quality feature, and the obtaining the state feature of the laundry further includes: when the laundry is placed in the washing machine, collecting the laundry weight feature, the dirtiness degree parameter, and the fabric quality parameter of the laundry based on different sensors respectively; performing data preprocessing on the dirtiness degree parameter and the fabric quality parameter, and performing primary feature extraction based on the preprocessed data; performing advanced feature extraction on the features obtained by the primary feature extraction to obtain advanced features of the dirtiness degree and the fabric quality; and performing feature selection and dimension reduction processing on the features obtained by the advanced feature extraction to obtain the dirtiness degree feature and the fabric quality feature respectively.
[0009] Optionally, the performing feature analysis on the feature vector by using the pre-trained deep reinforcement learning model to determine a target vector includes: receiving the feature vector by using an input layer of the pre-trained deep reinforcement learning model, wherein the number of neurons of the input layer is consistent with the dimension of the feature vector; performing non-linear transformation on the feature vector based on a hidden layer of the pre-trained deep reinforcement learning model and outputting the feature vector to an output layer, and outputting the target vector based on the output layer.
[0010] Optionally, after the non-linear transformation on the feature vector based on the hidden layer of the pre-trained deep reinforcement learning model and the outputting of the target vector based on the output layer, the method further includes: predicting an estimated value of a current state according to a current state and a detergent dispensing strategy based on an online network in the pre-trained deep reinforcement learning model, and predicting a target estimated value of a next state based on a target network in the pre-trained deep reinforcement learning model; calculating a loss based on the estimated value of the current state and the target estimated value; and updating network weights in the pre-trained deep reinforcement learning model by using back propagation based on the loss.
[0011] Optionally, the method further includes: obtaining execution result data of the control of the detergent input based on the optimal detergent dispensing strategy; and constructing a new feature vector based on the execution result data, the washing features of the detergent, and the state features of the laundry to optimize the pre-trained deep reinforcement learning model.
[0012] According to another aspect of the embodiments of the present application, the present application provides a detergent control device based on deep learning, comprising: a data acquisition module, configured to acquire washing characteristics of a detergent and acquire state characteristics of a washing object; a vector construction module, configured to construct a feature vector based on the washing characteristics of the detergent and the state characteristics of the washing object through a pre-trained deep reinforcement learning model; a feature extraction module, configured to perform feature analysis according to the feature vector through the pre-trained deep reinforcement learning model, and determine a target vector, each element in the target vector corresponding to a target estimated value of a detergent dispensing strategy; and a control module, configured to select a detergent dispensing strategy corresponding to a maximum target estimated value as an optimal washing machine dispensing strategy based on the target estimated value of the detergent dispensing strategy in each element of the target vector, and perform washing machine dispensing amount control.
[0013] According to another aspect of the embodiments of the present application, the present application provides a washing machine, which controls automatic addition of a detergent according to the above-mentioned detergent control method based on deep learning.
[0014] According to another aspect of the embodiments of the present application, the present application provides a computer readable medium having a non-volatile program code executable by a processor, which causes the processor to perform the steps of the above-mentioned detergent control method based on deep learning.
[0015] The above-mentioned technical solutions provided by the embodiments of the present application have the following advantages compared with related art:
[0016] The present application provides a detergent control method based on deep learning, which is suitable for a washing machine and similar washing equipment to control the dispensing of a detergent. By acquiring washing characteristics of a detergent and state characteristics of a washing object to construct a feature vector, the accuracy and dimension of data parameters of a pre-trained deep reinforcement learning model can be improved, which is more conducive to the pre-trained deep reinforcement learning model to perform more accurate feature extraction and identification through continuous trial and error and feedback learning in a complex environment, so as to select an optimal detergent dispensing strategy, and based on the optimal detergent dispensing strategy, to achieve more flexible and accurate automatic dispensing control of the detergent, to ensure that the washing object is fully cleaned, while avoiding waste of the detergent, and to be conducive to reducing pollution to the environment and reducing waste of water resources, and to improve the intelligent level of the washing machine, to meet the needs of consumers for convenience and comfort. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or related art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor.
[0019] Figure 1 A hardware environment schematic diagram of an optional deep learning-based detergent control method according to an embodiment of the present application is provided.
[0020] Figure 2 A flowchart of an optional deep learning-based detergent control method according to an embodiment of the present application is provided.
[0021] Figure 3 A flowchart of an optional step S202 according to an embodiment of the present application is provided.
[0022] Figure 4 A flowchart of another optional deep learning-based detergent control method according to an embodiment of the present application is provided.
[0023] Figure 5 A structural schematic diagram of an optional deep learning-based detergent control device according to an embodiment of the present application is provided.
[0024] Figure 6 A structural schematic diagram of an optional computer device according to an embodiment of the present application is provided. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0026] In order to solve the problems mentioned in the background art, according to an aspect of an embodiment of the present application, an embodiment of a deep learning-based detergent control method is provided.
[0027] As shown in Figure 1 , the deep learning-based detergent control method is applicable to Figure 1 the hardware system environment shown in the hardware system environment, the system architecture of the hardware system environment includes a terminal device 101, a server 103 and a washing machine 105, the terminal device 101 includes a client, and the client includes an intelligent home system APP.
[0028] The smart home system can be controlled on the terminal device 101, and the server and the network are used to control the washing machine. The server 103 is connected with the terminal device 101 and the washing machine 105 through the network, and can be used to provide services for the terminal or the client installed on the terminal and the washing machine 105, including processing data requests and instructions from the terminal device 101 and the washing machine 105 through the server 103, realizing communication and data exchange between the two. The database 107 can be set on the server or independently of the server, and is used to provide data storage services for the server 103. The network can include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The washing machine can include a washing machine and a cleaning device similar to the washing machine, such as a shoe washing machine, etc.
[0029] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers and desktop computers, etc. The server 103 can be a server providing various services, such as a background server supporting the page displayed on the terminal device 101.
[0030] The smart home system uses comprehensive wiring technology, network communication technology, security and prevention technology, automatic control technology, audio and video technology to integrate facilities related to home life, and builds an efficient residential facility and home affairs management system. Through the smart home system, the user can remotely control the start, pause and shutdown of the washing machine, etc. In addition, the system can automatically adjust the washing mode, water temperature and speed according to the user's settings and the actual situation of the clothes, and realize a more intelligent washing process. The smart home system can monitor the running state of the washing machine in real time, including the washing progress, the remaining time, etc. These information can be fed back to the user in real time through the terminal device 101, so that the user can always know the use of the washing machine.
[0031] Furthermore, linkage rules can be set up in the smart home system. For example, after the user has loaded the clothes, the user's mobile phone can start the washing mode of the washing machine by operating the smart home system. When the washing machine completes the wash cycle, the smart home system sends a notification to the user's mobile phone. At the same time, the user interface module of the washing machine connected to the user terminal device can display information such as the current status of the washing machine and the amount of detergent added, and provide a user operation interface through which the user can set the washing mode and view the washing progress.
[0032] It should be noted that the detergent control method based on deep learning provided in the embodiment of the present application is generally executed by a server and / or a terminal device. Accordingly, the detergent control device based on deep learning is generally set in the server / terminal device. And it should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0033] like Figure 2 As shown, Figure 2 A flowchart of a detergent control method based on deep learning provided by an embodiment of the present invention. Taking the detergent control method based on deep learning executed by a server as an example, the detergent control method based on deep learning includes the following steps:
[0034] Step S202: Acquire the washing characteristics of the detergent and the state characteristics of the laundry.
[0035] In this embodiment, the washing characteristics of a detergent can be obtained using a device such as a camera or scanner. The detergent may be laundry powder, laundry liquid, or laundry beads. The camera or scanner can be installed on a washing machine. In the following embodiments, the camera or scanner is described using a washing machine as an example. For example, the camera or scanner can be installed in a preset position on the washing machine. The washing machine is a smart washing machine. The washing characteristics may include, but are not limited to, brand name, product type, main ingredients, concentration of each ingredient, and a recommended dosage table.
[0036] In this embodiment, the status characteristics of laundry can be collected using cameras and sensors. In this embodiment, clothes are used as an example. These status characteristics may include stains, weight, degree of contamination, and fabric quality. For example, the camera can collect information about stains, the weight of the clothes using a weight sensor, the degree of contamination using a turbidity sensor, and the fabric quality using a material recognition sensor.
[0037] Step S204: constructing a feature vector based on the washing characteristics of the detergent and the state characteristics of the laundry using a pre-trained deep reinforcement learning model.
[0038] Deep reinforcement learning (DRL) is an artificial intelligence technology that integrates deep learning and reinforcement learning. It can combine the representational capabilities of deep learning with the decision-making capabilities of reinforcement learning to achieve higher performance. Features of deep reinforcement learning include: optimizing decision-making strategies through automatic exploration and learning, without the need for predefined rules or guidance, and finding the optimal decision-making strategy through continuous interaction with the environment through trial and error; handling high-dimensional and complex environmental states; extracting high-level features from large amounts of input data, thereby making more accurate decisions; possessing adaptive learning capabilities, eliminating the need for manually designed features or rules; and automatically learning the most relevant feature combinations, reducing the workload of manual feature selection; an end-to-end perception and control system with strong versatility, enabling direct control from raw input to output without the intervention of intermediate processes, and more directly reflecting the relationship between environmental states and actions, thereby improving learning efficiency and accuracy; and enabling transfer learning across different tasks and environments, thereby improving learning efficiency.
[0039] Furthermore, in deep reinforcement learning, deep neural networks are used to learn state representations, while reinforcement learning methods are used to learn strategies. The learning process can be described as follows: at each moment, the agent interacts with the environment to obtain a high-dimensional observation, and uses deep learning methods to perceive the observation to obtain a specific state feature representation. The value function of each action is evaluated based on the expected return, and the current state is mapped to the corresponding action through a certain strategy. The environment responds to this action and obtains the next observation. By continuously looping the above process, the optimal strategy for achieving the goal can be obtained. In this embodiment, the above-mentioned agent may refer to a washing machine control system.
[0040] Furthermore, the core algorithms of deep reinforcement learning mainly include Deep Q-Network (DQN), Double DQN, Dueling DQN, Policy Gradient, etc. The Deep Q-Network is a model that combines deep learning and Q learning. It uses a deep neural network to learn Q-values to help intelligent agents make better decisions. In DQN, two neural networks with the same structure but different parameters are usually used, one with the latest parameters for predicting Q-value estimates, and the other with old parameters for predicting Q-value realities. This setting helps to disrupt correlations and improve the stability of learning. In this embodiment, the pre-trained deep reinforcement learning model is constructed using the DQN network for illustration.
[0041] In some examples, model training is required before feature analysis using a trained model. This can be achieved by constructing a model training dataset to train a deep reinforcement learning model, resulting in the pre-trained deep reinforcement learning model. The model training dataset can be an offline and / or online dataset, and can include washing parameters for various detergent brands, status parameters for various types of clothing, washing effect data, user feedback data, and the like. Data collection can be achieved through multiple data sources, such as different detergent supplier systems, online surveys, and offline data collection. For DQN network training, the washing parameters of various detergents and status parameters of various types of clothing in the model training dataset are used as input vectors, and the detergent dosage is used as output. The training process includes: The input layer receives the detergent washing parameters and clothing status parameters, such as the type and concentration of detergent, the degree of staining, material, and color of the clothing, and converts these parameters into numerical form or vector representation. The hidden layer, composed of multiple neurons, is used to extract features from the input vector and learn the complex relationship between the detergent dosage and the input parameters. The output layer outputs the Q value of the detergent dosage.
[0042] In this embodiment, after a pre-trained deep reinforcement learning model is obtained based on model training, in actual predictive use, after obtaining the washing characteristics of the detergent and the state characteristics of the clothes, the intelligent agent in the model can construct a feature vector based on the two. The feature vector includes various feature parameters of the detergent and various feature parameters of the clothes. Combining the parameters of the detergent and the parameters of the clothes to construct a vector is conducive to the model combining the two for specific analysis, so as to obtain a more accurate amount of detergent.
[0043] In some optional examples, water quality characteristics of the water used can also be obtained, which may include pH value, hardness, dissolved oxygen content, heavy metal content, etc. If water quality characteristics are obtained, a feature vector can be constructed based on the washing characteristics of the detergent, the state characteristics of the laundry, and the water quality characteristics based on the intelligent agent in the pre-trained deep reinforcement learning model. This more comprehensively incorporates factors from multiple dimensions that affect the washing effect into the analysis, facilitating more accurate expression of the analysis results.
[0044] Step S206: Perform feature analysis based on the feature vector using the pre-trained deep reinforcement learning model to determine a target vector, where each element in the target vector corresponds to a target estimated value of a detergent dispensing strategy.
[0045] In this embodiment, the intelligent agent can input the constructed feature vector into the DQN network in the pre-trained deep reinforcement learning model for model training, feature recognition, etc., and a target vector (Q value vector) will be output through the DQN network. The Q value vector includes multiple elements, each element corresponds to a target estimated value of a detergent delivery strategy or action, that is, a Q value estimate, and each Q value estimate corresponds to a different detergent delivery amount.
[0046] Step S208 : Based on the target estimated value of the detergent dispensing strategy in each element of the target vector, the detergent dispensing strategy corresponding to the maximum target estimated value is selected as the optimal detergent dispensing strategy for controlling the detergent dispensing amount of the washing machine.
[0047] In some examples, based on the Q-value estimates in the output Q-value vector, for the discretized action space, the agent can select the action with the largest Q-value estimate as the optimal washing machine delivery strategy. The discretized action space means that the number of actions that the agent can perform is limited, and each action is selected from a predefined, discrete set. In this set, the agent cannot select actions outside the set and can only select an action from the set to execute. For example, the amount of detergent added is discretized into 5 levels, namely small amount, medium amount, standard amount, large amount, and excessive amount. The action space of the agent is a discrete set containing these 5 levels. When making decisions, the agent will select an action with the largest Q value (detergent addition level) from the Q-value vector as the optimal strategy to execute.
[0048] In other examples, based on the Q-value estimates in the output Q-value vector, for a continuous action space, the agent can use a greedy strategy or a near-optimal strategy to select the amount of detergent to be added. A continuous action space means that the agent can perform an infinite number of actions, and the actions can be any value within the real number range. In this case, the agent cannot simply select an action from a discrete set, but needs to make a decision within the entire real number range. For example, the amount of detergent to be added is continuously adjustable from 0 to 100, and the agent's action space corresponds to a continuous real number range. When making decisions, the agent can use a greedy strategy or a near-optimal strategy to select the amount of detergent to be added. A greedy strategy means that the agent chooses the action that maximizes the Q-value in the current state. This determines the amount of detergent to be added, while when choosing a near-optimal strategy, more factors may be considered, such as the possible future washing effect, the cost of the strategy, etc., to select the amount of detergent to be added to the washing machine.
[0049] In other examples, washing machine deployment control is achieved by executing the optimal washing machine deployment strategy, and the execution results, such as washing effect and energy consumption, can be observed. These execution results can be used as feedback for subsequent training and optimization of the DQN network.
[0050] In the embodiment, by obtaining the washing characteristics of the detergent and the state characteristics of the washing object to construct the feature vector, the accuracy and dimension of the data parameters of the pre-trained deep reinforcement learning model can be improved, which is more conducive to the pre-trained deep reinforcement learning model to learn more accurately through continuous trial and error and feedback in a complex environment, so as to select the optimal detergent dispensing strategy, and based on the optimal detergent dispensing strategy, to realize more flexible and accurate automatic dispensing control of the detergent, to ensure that the washing object is fully cleaned while avoiding waste of the detergent, and to reduce pollution to the environment and waste of water resources, and to improve the intelligent level of the washing machine to meet the needs of consumers for convenience and comfort.
[0051] In some optional embodiments, in combination with Figure 2 As shown in the above step S202, the washing characteristics of the detergent are obtained, including:
[0052] S2021, an image of the detergent is collected, and an optical character recognition model is used to pre-process the image of the detergent to obtain a pre-processed image;
[0053] S2022, text recognition and conversion are performed on the pre-processed image to obtain detergent character information;
[0054] S2023, text analysis and information extraction are performed based on the detergent character information to obtain the washing characteristics of the detergent.
[0055] In the embodiment, the pre-trained optical character recognition model (OCR) can be used to extract the washing characteristics. OCR is a technology that converts text on paper documents into a digital text format that can be edited and processed by a computer through scanning and recognition. It includes several steps such as image preprocessing, text region detection, character segmentation, and feature extraction and character recognition.
[0056] In some examples, the image of the detergent package or label can be obtained by using a camera or a scanner, and the collected image is pre-processed to obtain a pre-processed image. The image preprocessing includes but is not limited to grayscale, binarization, denoising, etc. to improve the accuracy of OCR recognition.
[0057] Further, the pre-processed image can be used to locate and segment the text region in the pre-processed image using a trained OCR model. Specifically, image processing techniques such as edge detection, contour analysis, etc. can be used to find the region in the image that may contain text. Further, the detected text region can be segmented into individual characters based on the spacing between characters, connectivity, etc. features, and the character image can be converted into computer-readable detergent character information.
[0058] Further, after obtaining the detergent character information, the desired useful information needs to be extracted from the detergent character information to obtain the washing characteristics of the detergent. Specifically, first, the OCR model outputs the recognized detergent character information in the form of a text string, which contains all the text content in the image. According to the pre-set rules or algorithms, the text can be split into individual words, phrases or sentences, and the keywords and context relationships therein can be identified. Natural language processing (NLP) tokenization, part-of-speech tagging, named entity recognition, etc. can be used.
[0059] Further, after the text is split, based on the parsed text, specific requirements such as extracting the component and concentration of the detergent or washing powder, etc. parameter information, regular expressions, pattern matching or semantic understanding, etc. methods can be used to extract the desired washing characteristics from the text, which can be stored in the form of key-value pairs, lists or structured data formats. In addition, the extracted washing characteristics can be checked and cleaned to ensure their accuracy and consistency, for example, checking whether the numerical value is within a reasonable range, removing duplicate or invalid information, etc. The washing characteristics include but are not limited to component name, content or concentration of each component, usage instructions, precautions, production date and expiration date, etc.
[0060] In the present embodiment, by using OCR technology to recognize and obtain the washing characteristics of the detergent, important input parameters can be provided for subsequent dosing; and OCR recognition can quickly and accurately convert documents into digital text, greatly improving work efficiency. In addition, through the OCR technology, various parameter information of the detergent can be quickly recognized, which is more conducive to the pre-trained reinforcement learning model to predict the stain removal ability, so as to more accurately control the dosing amount of the detergent.
[0061] In some optional embodiments, in combination with Figure 3 As shown in FIG. 2, in step S202, the state characteristics of the washing object are obtained, including:
[0062] Collecting washing object images of the washing object in multiple dimensions;
[0063] Extracting washing object features by pre-training an image recognition model to recognize features of the washing object images in each dimension.
[0064] The stain features of the laundry are extracted according to the laundry features.
[0065] In this embodiment, the status features include stain features, including but not limited to oil stains, blood stains, mud stains, ink stains, and food residues. Before the user puts the clothes into the washing machine, the camera installed on the washing machine can capture images of the laundry from multiple positions, such as the front and side of the user's clothes. The camera automatically adjusts the focus and lighting to ensure image clarity and accuracy.
[0066] Furthermore, the camera can transmit the captured laundry images to a pre-trained image recognition model for processing and analysis. The pre-trained image recognition model can utilize image recognition algorithms, such as convolutional neural networks (CNNs) and image segmentation algorithms, to compare and analyze pixel values, texture, and color information in the image, quickly and accurately identifying the size, color, and depth information of laundry features. Based on the size, color, and depth information of the identified laundry features, the model can then select the stain features included therein. The laundry features can include the color and depth information of the clothing itself, as well as the size, color, and depth information of the stains. The stain features are then input into a subsequent pre-trained reinforcement learning model and analyzed in combination with the acquired detergent characteristics to determine the optimal detergent dosage strategy.
[0067] In this embodiment, by collecting images of the laundry before the laundry is put in, extracting stain features from the collected laundry images, and combining the washing characteristics of the stains and detergents for feature analysis, the pre-trained deep learning model can accurately match the most suitable detergent and amount to be put in according to information such as the type, area, and severity of the stains, making the washing effect more significant and being able to more effectively remove stains on clothes.
[0068] In some optional embodiments, in step S202, the step of obtaining the status characteristics of the laundry further includes:
[0069] When laundry is placed in the washing machine, the laundry weight characteristics, soiling parameters, and fabric quality parameters of the laundry are collected based on different sensors;
[0070] Performing data preprocessing on the soiling degree parameter and the fabric quality parameter, and performing primary feature extraction based on the preprocessed data;
[0071] Perform advanced feature extraction on the features obtained from the primary feature extraction to obtain advanced features of the degree of dirtiness and advanced features of the fabric quality;
[0072] Feature selection and dimensionality reduction are performed on the features obtained by high-level feature extraction to obtain the dirtiness feature and the fabric quality feature respectively.
[0073] In some examples, combined Figure 4 As shown, before detecting the weight characteristics, soiling parameters, and fabric quality parameters of the laundry, the terminal device can be controlled to be linked with the washing machine, and the washing mode of the washing machine can be started by controlling the terminal. The terminal device can be a smart electronic device such as a mobile phone.
[0074] In this embodiment, status features also include laundry weight, soiling, and fabric quality. Different sensor modules can be used to collect real-time data on laundry weight, soiling, and fabric quality. These sensors can include weight sensors, turbidity sensors, and material recognition sensors. The sensors send the collected data to a data preprocessing module for data preprocessing. This module preprocesses and extracts features from the sensor data, and then feeds the processed data into a pretrained deep reinforcement learning model.
[0075] It's important to note that sensors and cameras complement each other in functionality, each responsible for collecting different types of data. Sensors primarily focus on the physical properties of clothing, while cameras prioritize appearance. Furthermore, while the camera captures stain characteristics above, the turbidity sensor here detects varying levels of turbidity, such as the varying concentrations of different gasoline grades. Therefore, the turbidity parameters collected here differ from the stain characteristics previously collected.
[0076] Specifically, when the clothes are placed in the detergent, the weight sensor can directly collect the weight characteristics of the laundry. The collected weight characteristics of the laundry are specific weight data values, and no data preprocessing is required. However, the collected soil level parameters and fabric quality parameters need to be specifically analyzed to be known, so they can be subjected to data preprocessing operations, which can specifically include data cleaning, normalization and standardization. Among them, data cleaning: For obvious outliers in the soil level parameters and fabric quality parameters, methods such as deletion, replacement or smoothing can be used to process them; for missing data, methods such as interpolation, mean filling, median filling or model-based prediction can be used to fill them. Normalization and standardization: Data of different dimensions in the soil level parameters and fabric quality parameters can be converted to the same scale for subsequent processing. For example, the fabric quality parameters and soil level parameters can be converted into values between 0 and 1, and the data can be converted into the form of a standard normal distribution by calculating the mean and standard deviation of the values.
[0077] Furthermore, the preprocessed data can be subjected to primary feature extraction, advanced feature extraction, feature selection, and dimensionality reduction to extract soil level and fabric quality features. For primary feature extraction, based on the preprocessed soil level parameters collected by the turbidity sensor, features representing the soil level can be extracted, including but not limited to the absolute value of the soil level and the distribution of the soil level. Based on the preprocessed fabric parameters collected by the material identification sensor, features representing the fabric quality can be extracted, including fabric type, thickness, and elasticity. These types, thickness, and elasticity can all be converted into corresponding numerical values. For advanced feature extraction, by calculating statistics of the extracted soil level and primary fabric features, such as mean, variance, skewness, and kurtosis, if the primary soil level features exhibit periodicity or periodic variation, frequency domain features can be extracted using methods such as Fourier transform. For advanced fabric feature recognition, texture features can be extracted, including gray-level co-occurrence matrices and local binary patterns corresponding to the fabric. For feature selection and dimensionality reduction, methods such as correlation analysis, mutual information, and recursive feature elimination can be used to select features that are more useful for the subsequent deep reinforcement learning module from the extracted high-level features of soiling and fabric quality. If the feature dimensionality is too high, methods such as principal component analysis (PCA) and linear discriminant analysis (LDA) can be used for feature dimensionality reduction. After feature selection and dimensionality reduction, the final output is soiling and fabric quality features.
[0078] In this embodiment, by collecting multiple dimensions of laundry status data, including laundry weight, soiling level, and fabric quality, to participate in detergent input control, and combining the detergent's washing characteristics to construct a feature vector as input to a pre-trained deep reinforcement learning model, the model is able to perform feature recognition and analysis based on the specific conditions of the detergent and laundry. It accurately matches the most suitable detergent and dosage based on information such as laundry weight, soiling level, and fabric quality, resulting in a more significant washing effect and more effective stain removal. Furthermore, through data preprocessing, primary feature extraction, advanced feature extraction, feature selection, and dimensionality reduction, the accuracy of features can be improved, facilitating accurate model recognition.
[0079] In some optional embodiments, the above step S206 includes:
[0080] Receiving the feature vector through an input layer of the pre-trained deep reinforcement learning model, wherein the number of neurons in the input layer is consistent with the dimension of the feature vector;
[0081] The feature vector is nonlinearly transformed based on the hidden layer of the pre-trained deep reinforcement learning model and then output to the output layer, and the target vector is output based on the output layer.
[0082] In this embodiment, the pre-trained deep reinforcement learning model uses a DQN network as the policy network and value network, comprising an input layer, hidden layers, and an output layer, where the hidden layers consist of at least one layer. Strategy updates and value assessments are performed by continuously receiving acquired data and feedback on washing results. The input layer receives feature vectors from the state space; the hidden layers extract deep features from the state space; and the output layer outputs Q-value estimates for each action.
[0083] In some examples, an experience replay buffer can be used in the DQN network to store the agent's experience interacting with the environment. During training, a batch of experiences is randomly sampled from the experience replay buffer for parameter updates to improve training stability and convergence. Simultaneously, a target network with the same structure as the main network but fixed parameters is introduced to calculate the target Q value. The parameters of the target network are regularly updated with those of the main network to reduce target value fluctuations caused by parameter updates. Furthermore, the parameters of the DQN network need to be initialized, including the initial learning rate, discount factor, experience replay size, and network architecture. In each training round, the agent selects an action based on the current state and policy. After executing the action, it observes the environment feedback (i.e., the next state and reward). The current state, action, reward, and next state are stored in the experience replay buffer. A batch of experiences is randomly sampled from the experience replay buffer to train the DQN network. The target Q value is calculated using the target network, and the DQN network parameters are optimized using the backpropagation algorithm. This process of initialization and backpropagation optimization of network parameters is repeated until the DQN network converges or reaches a preset number of training rounds.
[0084] In this embodiment, the feature vector may include features such as the detergent type code, the area percentage of the oil stain, the weight category of the clothing, the fabric type code, the degree of oil stain, the water hardness level, and the pH value. When input into the DQN network, it is received through the input layer, where the number of neurons in the input layer matches the dimensionality of the feature vector. For example, if a feature vector contains five features, the input layer will have five neurons. The feature vector then passes through the network's forward propagation process, undergoing nonlinear transformations in the hidden layer, and ultimately reaches the output layer, which outputs a target vector containing Q-value estimates for each possible action. The output Q-value estimates correspond to the detergent dosing strategy, which includes but is not limited to the amount of detergent to be dispensed, the amount of water to be dispensed, the wash cycle selection, the wash time, and the number of rinses. For example, when the washing machine detects that the laundry is heavy and highly soiled, the deep reinforcement learning module will output a larger amount of detergent to be dispensed; when the laundry is light and less soiled, it will output a smaller amount of detergent to be dispensed.
[0085] In this embodiment, the DQN network has strong learning ability and adaptability. It can learn and adjust according to the characteristics of different detergents and laundry, and can accurately and dynamically adjust the amount of detergent added, ultimately achieving intelligent laundry under the optimal detergent addition strategy, providing users with a better experience. It can not only ensure that the clothes are fully cleaned, but also ensure that the best washing effect can be obtained under various circumstances. In addition, by accurately controlling the amount of detergent added, detergent waste can be avoided. The application of the DQN network makes the control of the amount of detergent added more intelligent. Users do not need to manually adjust the amount of detergent. They only need to put the clothes into the washing machine and select the appropriate washing program. The system can automatically calculate and add the amount of detergent added, which is more flexible.
[0086] In some optional embodiments, after the hidden layer based on the pre-trained deep reinforcement learning model performs a nonlinear transformation on the feature vector and outputs the transformed feature vector to the output layer, and after the target vector is output based on the output layer, the method further includes:
[0087] Based on the online network in the pre-trained deep reinforcement learning model, predicting an estimated value of the current state according to the current state and the detergent dispensing strategy, and based on the target network in the pre-trained deep reinforcement learning model, predicting a target estimated value of the next state;
[0088] Calculating a loss based on an estimated value of the current state and the estimated value of the target;
[0089] Based on the loss, the network weights in the pre-trained deep reinforcement learning model are updated through back propagation.
[0090] During training, the DQN network calculates loss based on the output Q-value estimate and the actual reward value, and updates the network weights using the backpropagation algorithm. The DQN network's training goal is to bring the network's output target estimate closer to the estimated value of the current state. To minimize the error between the two, DQN uses a loss function. This loss function can include mean squared error or other error metrics.
[0091] In some examples, the DQN network described above can use two neural networks: an online network (EvalNet) for selecting actions and predicting Q values (estimates of the current state); and a target network (Target Net) for calculating target Q values (target estimates). The weights of the target network are periodically copied from the weights of the online network to increase learning stability. The target Q value is calculated as follows:
[0092] Use the online network to predict the Q value of the current state S(t) and select an action A according to the ε-greedy strategy. Execute this action and observe the next state S(t+1) and the reward R obtained. Use the target network to calculate the maximum predicted Q value of the next state S(t+1), that is, max Q(S(t+1), a'), where a' is all possible actions under the next state S(t+1). Combined with the reward R of the current state to calculate the target Q value, that is, target Q value y=R+γ*max Q(S(t+1), a'), where γ is the discount factor, indicating the degree of discount for future rewards. Then, calculate the error (loss) between the Q value Q(S(t), A) predicted by the online network and the target Q value y, that is, L=(Q(S(t), A)-y) 2 .
[0093] After obtaining the loss value, the DQN network uses the backpropagation algorithm to update the online network's weights to minimize the error L. This process is repeated until the network converges to a stable strategy, thereby achieving model optimization and facilitating more accurate feature training and recognition. Methods for updating network weights include, but are not limited to, calculating the gradient of the loss function with respect to the network output; using the chain rule to calculate the gradient of the loss function with respect to the network weights; and using the gradient descent algorithm to update the network weights.
[0094] In this embodiment, by calculating the error between the estimated outputs of the two networks in the DQN network and updating the model's network weights through backpropagation based on the error, the neural network's weight parameters can be optimized for more accurate predictions. This helps the agent make more informed decisions when selecting actions and select the optimal strategy for placing the washing machine. Furthermore, in the DQN network, the target network's weights are regularly replicated from the online network's weights, which helps increase learning stability. When backpropagation is used to update the online network's weights, since the target network remains unchanged, training instability caused by frequent changes in network weights can be avoided.
[0095] In some optional embodiments, after step S208, the method further includes:
[0096] Acquiring execution result data of detergent injection control based on the optimal detergent injection strategy;
[0097] A new feature vector is constructed based on the execution result data, the washing characteristics of the detergent, and the state characteristics of the laundry to optimize the pre-trained deep reinforcement learning model.
[0098] In this embodiment, combined with Figure 4 As shown in the figure, after each wash cycle using the optimal detergent dosing strategy, execution data (i.e., results) is fed back, including cleanliness, energy consumption, and detergent consumption. This execution data, along with the detergent's washing characteristics and the laundry's state characteristics, is then combined to construct a new feature vector. This vector is then re-inputted into the pre-trained deep reinforcement learning model for optimization, helping to better meet user needs and enhance the user experience.
[0099] In some embodiments, the reward function can be adjusted based on actual application requirements to guide the agent to learn a more desirable detergent dispensing strategy. A reward function is used to evaluate the reward or penalty an agent receives for selecting an action in a given state. For example, it evaluates the result of dispensing 100ml of detergent in the current state. Actual application requirements may include washing results, detergent consumption, energy consumption, washing time, and user satisfaction.
[0100] Furthermore, regarding washing results: If the application requirements emphasize washing results, reward items directly related to washing results can be added to the reward function. For example, when the cleanliness of washed clothes reaches a certain threshold, a higher reward is given; otherwise, a lower reward or penalty is given. Regarding detergent consumption: If the application requirements focus on detergent consumption, reward items related to detergent consumption can be added to the reward function. For example, when detergent consumption is below a certain threshold, a reward is given; otherwise, a penalty is given. Regarding energy consumption: For energy-saving washing machines, energy consumption factors can be considered in the reward function. For example, when energy consumption during the washing process is low, a reward is given; otherwise, a penalty is given. Regarding washing time: If the application requirements have requirements for washing time, reward items related to washing time can be added to the reward function. For example, when the washing time is short and the washing results are good, a reward is given. Regarding user satisfaction: In some user interaction scenarios, user satisfaction can be considered as part of the reward function. For example, washing results can be evaluated through user feedback or ratings, and rewards or penalties can be given based on the evaluation results.
[0101] In other examples, a multi-objective reward function can be introduced to balance multiple performance indicators, such as washing quality and detergent consumption. These multi-objectives primarily include two or more of the aforementioned objectives, and not just those required by the actual application. For example, if a smart washing machine needs to select a detergent dosing strategy based on the degree and type of soiling on clothing, the ultimate goal is to ensure good washing results while minimizing detergent consumption.
[0102] To address this issue, a multi-objective reward function is introduced to balance multiple performance indicators, such as washing performance and detergent consumption. The process involves defining a multi-objective reward function, which includes a washing performance reward (assessed based on the cleanliness of the clothes after washing, with higher cleanliness resulting in higher rewards) and a detergent consumption penalty. The washing performance reward is assessed based on the cleanliness of the clothes after washing, with higher rewards associated with higher cleanliness, and the detergent consumption penalty is assessed based on the amount of detergent consumed, with higher penalties associated with higher consumption. Furthermore, the process involves assigning appropriate weights to the washing performance reward and detergent consumption penalty based on actual needs. For example, if washing performance is more important, a higher weight can be assigned to the washing performance reward; if detergent consumption is more important, a higher weight can be assigned to the detergent consumption penalty. Furthermore, the total reward is calculated: Based on the detergent dosing strategy selected by the agent, the values of the washing performance reward and detergent consumption penalty are calculated, and the total reward is calculated based on the weights assigned. Finally, the optimal detergent dosing strategy is selected: The agent selects the optimal detergent dosing strategy based on the total reward. The strategy with the highest total reward is the optimal detergent dosing strategy.
[0103] According to another aspect of the embodiment of the present application, Figure 5 As shown, corresponding to the detergent control method based on deep learning in the above embodiment, this embodiment provides a detergent control device based on deep learning, and the device includes:
[0104] The data acquisition module 501 is used to acquire the washing characteristics of the detergent and the state characteristics of the laundry;
[0105] A vector construction module 503 is configured to construct a feature vector based on the washing characteristics of the detergent and the state characteristics of the laundry using a pre-trained deep reinforcement learning model;
[0106] A feature extraction module 505 is configured to perform feature analysis based on the feature vector using the pre-trained deep reinforcement learning model to determine a target vector, wherein each element in the target vector corresponds to a target estimated value of a detergent dispensing strategy;
[0107] The control module 507 is configured to select the detergent dispensing strategy corresponding to the maximum target estimated value as the optimal detergent dispensing strategy for controlling the detergent dispensing amount of the washing machine based on the target estimated value of the detergent dispensing strategy in each element of the target vector.
[0108] It should be noted that, in this embodiment, the data acquisition module 501 can be used to execute step S202 in the embodiment of the present application, the vector construction module 503 in this embodiment can be used to execute step S204 in the embodiment of the present application, the feature extraction module 505 in this embodiment can be used to execute step S206 in the embodiment of the present application, and the control module 507 in this embodiment can be used to execute step S208 in the embodiment of the present application.
[0109] Optionally, the data acquisition module 501 includes: a first image acquisition submodule, used to acquire an image of the detergent, and preprocess the image of the detergent through an optical character recognition model to obtain a preprocessed image; a graphic and text recognition submodule, used to perform text recognition and conversion on the preprocessed image to obtain detergent character information; and an information extraction submodule, used to perform text parsing and information extraction based on the detergent character information to obtain the washing characteristics of the detergent.
[0110] Optionally, the state feature includes a stain feature, and the data acquisition module 501 further includes: a second image acquisition submodule, used to acquire laundry images in multiple dimensions; a feature recognition submodule, used to perform feature recognition on the laundry images in each dimension through a pre-trained image recognition model to extract laundry features; and a first feature extraction submodule, used to extract the stain features of the laundry based on the laundry features.
[0111] Optionally, the state features further include a laundry weight feature, a dirtiness level feature, and a fabric quality feature, and the data acquisition module 501 further includes: a detection data collection sub-module, configured to collect the laundry weight feature, the dirtiness level parameter, and the fabric quality parameter of the laundry based on different sensors when the laundry is placed in the washing machine; a second feature extraction sub-module, configured to perform data preprocessing on the dirtiness level parameter and the fabric quality parameter, and perform primary feature extraction based on the preprocessed data; a third feature extraction sub-module, configured to perform advanced feature extraction on the features obtained through the primary feature extraction, to obtain advanced features of the dirtiness level and the fabric quality; and a feature selection and dimension reduction sub-module, configured to perform feature selection and dimension reduction processing on the features obtained through the advanced feature extraction, to obtain the dirtiness level feature and the fabric quality feature respectively.
[0112] Optionally, the feature extraction module 505 includes: a feature receiving sub-module, configured to receive the feature vector through an input layer of the pre-trained deep reinforcement learning model, wherein the number of neurons of the input layer is consistent with the dimension of the feature vector; and a feature transformation sub-module, configured to perform nonlinear transformation on the feature vector based on a hidden layer of the pre-trained deep reinforcement learning model, and output the target vector based on an output layer.
[0113] Optionally, the apparatus further includes: a first calculation module, configured to predict an estimated value of a current state based on an online network in the pre-trained deep reinforcement learning model and a detergent dispensing strategy, and predict a target estimated value of a next state based on a target network in the pre-trained deep reinforcement learning model; a second calculation module, configured to calculate a loss based on the estimated value of the current state and the target estimated value; and a model updating module, configured to update network weights in the pre-trained deep reinforcement learning model through back propagation based on the loss.
[0114] Optionally, the apparatus further includes: an execution result acquisition module, configured to acquire execution result data of detergent input control based on the optimal detergent dispensing strategy; and a model optimization module, configured to optimize the pre-trained deep reinforcement learning model based on a new feature vector constructed based on the execution result data, the washing features of the detergent, and the state features of the laundry.
[0115] It should be noted that the above modules and corresponding steps achieve the same examples and application scenarios as the above embodiments, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the apparatus can run in the hardware environment as shown in Figure 1 illustrated, and can be implemented by software or hardware.
[0116] It should be noted here that the suffixes such as module, component, unit, sub-module, and sub-unit used to represent elements described in the above device are only for the convenience of description of this application and have no specific meaning in themselves. Therefore, they can be used in combination.
[0117] According to another aspect of the embodiments of the present application, the present application provides a washing machine, which controls the automatic addition of detergent according to the above-mentioned deep learning-based detergent control method. The washing machine is an intelligent washing machine and can implement the various embodiments of the deep learning-based detergent control method and achieve corresponding technical effects, which will not be repeated here.
[0118] According to another aspect of the embodiment of the present application, the present application provides a computer device, such as Figure 6 As shown, it includes a memory 601, a processor 603, a communication interface 605 and a communication bus 607. The memory 601 stores a computer program that can be run on the processor 603. The memory 601 and the processor 603 communicate through the communication interface 605 and the communication bus 607. When the processor 803 executes the computer program, the steps of the above-mentioned detergent control method based on deep learning are implemented.
[0119] The memory and processor in the above-mentioned computer device communicate via a communication bus and a communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0120] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0121] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0122] According to another aspect of the embodiments of the present application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the deep learning based detergent control method in any of the above described embodiments.
[0123] Optionally, in the embodiments of the present application, a computer readable medium is configured to store program codes for the processor to execute the steps of the deep learning based detergent control method described in the above described embodiments.
[0124] Optionally, the specific examples in the embodiments of the present application can refer to the examples described in the above described embodiments, and the embodiments of the present application will not be described here again. When the embodiments of the present application are implemented, the above described embodiments can be referred to, and have corresponding technical effects.
[0125] It can be understood that the embodiments described herein can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware realization, the processing unit can be realized in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, micro-controllers, microprocessors, other electronic units for executing the functions described in the present application, or a combination thereof.
[0126] For software implementation, the techniques described herein can be implemented with a combination of hardware and software. The software code can be stored in a memory and executed by a processor.
[0127] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0128] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0129] In the embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the above-described device embodiments are merely schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0130] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment. In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit.
[0131] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various program code storage media.
[0132] It should be noted that, in this document, relational terms such as first and second and the like can only be used to distinguish one entity or action from another entity or action, and do not necessarily require or imply that there is any such actual relationship or order between these entities or actions. Moreover, the terms include, include or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus including a series of elements includes not only those elements, but also other elements not explicitly listed or inherent to such a process, method, article or apparatus. Without more limitations, the element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method, article or apparatus including the element.
[0133] The above description is only a specific implementation of the present application, which enables those skilled in the art to understand or implement the present application. Various modifications of these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A detergent control method based on deep learning, characterized in that: The method comprises: Acquiring washing characteristics of the detergent and acquiring state characteristics of the laundry; Constructing a feature vector based on the washing characteristics of the detergent and the state characteristics of the laundry through a pre-trained deep reinforcement learning model; Performing feature analysis based on the feature vector using the pre-trained deep reinforcement learning model to determine a target vector, wherein each element in the target vector corresponds to a target estimated value of a detergent dispensing strategy; Based on the target estimated value of the detergent dispensing strategy in each element of the target vector, the detergent dispensing strategy corresponding to the maximum target estimated value is selected as the optimal detergent dispensing strategy to control the detergent dispensing amount; The method of performing feature analysis on the feature vector using the pre-trained deep reinforcement learning model to determine the target vector includes: receiving the feature vector through an input layer of the pre-trained deep reinforcement learning model, wherein the number of neurons in the input layer is consistent with the dimension of the feature vector; performing a nonlinear transformation on the feature vector based on a hidden layer of the pre-trained deep reinforcement learning model and outputting the transformed feature vector to an output layer, and outputting the target vector based on the output layer; After the hidden layer of the pre-trained deep reinforcement learning model performs a nonlinear transformation on the feature vector and outputs it to the output layer, and after the target vector is output based on the output layer, the method further includes: predicting an estimated value of the current state based on the current state and the detergent addition strategy based on the online network in the pre-trained deep reinforcement learning model, and predicting a target estimated value of the next state based on the target network in the pre-trained deep reinforcement learning model; calculating a loss based on the estimated value of the current state and the target estimated value; and updating the network weights in the pre-trained deep reinforcement learning model through back propagation based on the loss.
2. The detergent control method based on deep learning according to claim 1, characterized in that: The obtaining of the washing characteristics of the detergent comprises: Collecting an image of the detergent, and preprocessing the image of the detergent using an optical character recognition model to obtain a preprocessed image; Performing text recognition and conversion on the pre-processed image to obtain detergent character information; Text parsing and information extraction are performed based on the detergent character information to obtain the washing characteristics of the detergent.
3. The detergent control method based on deep learning according to claim 1, characterized in that: The state characteristics include stain characteristics, and obtaining the state characteristics of the laundry includes: collecting laundry images in multiple dimensions; Performing feature recognition on the laundry images of each dimension using a pre-trained image recognition model to extract laundry features; The stain features of the laundry are extracted according to the laundry features.
4. The detergent control method based on deep learning according to claim 3, characterized in that: The state characteristics also include laundry weight characteristics, dirtiness characteristics, and fabric quality characteristics. The step of obtaining the laundry state characteristics also includes: When laundry is placed in the washing machine, the laundry weight characteristics, soiling parameters, and fabric quality parameters of the laundry are collected based on different sensors; Performing data preprocessing on the soiling degree parameter and the fabric quality parameter, and performing primary feature extraction based on the preprocessed data; Perform advanced feature extraction on the features obtained from the primary feature extraction to obtain advanced features of the degree of dirtiness and advanced features of the fabric quality; Feature selection and dimensionality reduction are performed on the features obtained by high-level feature extraction to obtain the dirtiness feature and the fabric quality feature respectively.
5. The detergent control method based on deep learning according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquiring execution result data of detergent injection control based on the optimal detergent injection strategy; A new feature vector is constructed based on the execution result data, the washing characteristics of the detergent, and the state characteristics of the laundry to optimize the pre-trained deep reinforcement learning model.
6. A detergent control device based on deep learning, used to implement the detergent control method based on deep learning according to any one of claims 1 to 5, characterized in that: The device comprises: A data acquisition module, used to acquire the washing characteristics of the detergent and the state characteristics of the laundry; A vector construction module, configured to construct a feature vector based on the washing characteristics of the detergent and the state characteristics of the laundry using a pre-trained deep reinforcement learning model; a feature extraction module, configured to perform feature analysis based on the feature vector using the pre-trained deep reinforcement learning model to determine a target vector, wherein each element in the target vector corresponds to a target estimated value of a detergent dispensing strategy; A control module is configured to select, based on the target estimated value of the detergent dispensing strategy in each element of the target vector, the detergent dispensing strategy corresponding to the maximum target estimated value as the optimal detergent dispensing strategy to control the detergent dispensing amount.
7. A washing machine, characterized in that: The washing machine controls automatic addition of detergent according to the detergent control method based on deep learning according to any one of claims 1 to 5 above.
8. A computer-readable medium having a non-volatile program code executable by a processor, characterized in that The program code enables the processor to execute the steps of the detergent control method based on deep learning as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Washing machine control method, washing machine and storage medium
CN112391793A
Automatic detergent putting control method and device, storage medium and washing machine
CN117822253A