Disclosure of Invention
The invention aims to solve the defects of the prior art and provides a pet fighting prevention method based on machine learning.
It is a second object of the present invention to provide a wearable device for pets.
Another object of the present invention is to provide a client for issuing simulation commands.
The purpose of the invention can be achieved by adopting the following technical scheme:
a pet fighting prevention method based on machine learning is characterized by comprising the following steps:
the first wearable pet device detects whether a second wearable pet device exists within a preset distance.
The first pet wearable device is in communication connection with the second pet wearable device.
The first pet wearable device and the second pet wearable device start video recording and sound recording.
And acquiring the emotional state, the behavior intention and the physiological data of the first pet and the emotional state, the behavior intention and the physiological data of the second pet at preset intervals.
And executing the preset command by combining the preset rule.
The first pet wearable device and the second pet wearable device finish video recording and sound recording.
Preferably, the first wearable pet device detects whether a second wearable pet device exists within a preset distance, including:
within a preset distance, if the first wearable pet device can receive the identity information of the preset format returned by the second wearable pet device, judging that the second wearable pet device exists within the preset distance, and if the first wearable pet device cannot receive the identity information of the preset format returned by the second wearable pet device, judging that the second wearable pet device does not exist within the preset distance.
The identity information in the preset format at least comprises: a pet ID capable of identifying the identity of the pet.
Preferably, the first wearable pet device and the second wearable pet device establish a communication connection, including:
the first wearable pet equipment sends first identity information to the second wearable pet equipment, and the second wearable pet equipment sends second identity information to the first wearable pet equipment.
The first identity information is data stored by the wearable pet device, and specifically includes: pet ID, bacterial content, whether carrying virus, weight, sex, whether there is fighting record, age, character, amount of exercise in near time, sleep status in near time, force of biting, intelligence level, pet picture, sound of pet fear, and vibration frequency of pet feeling comfortable.
The second identity information is data stored in the second wearable pet device, and specifically includes: pet ID, bacterial content, whether carrying virus, weight, sex, whether there is fighting record, age, character, amount of exercise in near time, sleep status in near time, force of biting, intelligence level, pet picture, sound of pet fear, and vibration frequency of pet feeling comfortable.
The wearable equipment of first pet, according to the second pet image combines image recognition technology, detects the pet that contains in the second pet image with whether the pet that contains in the pet photo in the second identity information is same pet, if not, will pet ID, bacterial content in the second identity information, whether carry virus, weight, sex, have and fight record, age, personality, near period time amount of exercise, near period time sleep state, tear bite, intelligence level, pet photo, the sound of pet fear, the comfortable vibrations frequency of pet feeling sets up to unknown.
The wearable equipment of second pet, according to first pet image combines image recognition technology, detects the pet that contains in the first pet image with whether the pet that contains in the pet photo in the first identity information is same pet, if not, will pet ID, bacterial content in the first identity information, whether carry virus, weight, sex, have or not to fight record, age, personality, near period motion volume, near period sleep state, tear bite, intelligence level, pet photo, the sound of pet fear, the comfortable vibrations frequency of pet feeling sets up to unknown.
Preferably, the obtaining of the emotional state, the behavioral intention and the physiological data of the first pet at preset intervals, and the emotional state, the behavioral intention and the physiological data of the second pet include:
through wearable equipment of first pet acquires heart rate, blood pressure, body temperature, respiratory rate, the sound information of first pet.
And obtaining the emotional state of the first pet by combining a voice emotion recognition technology according to the voice information of the first pet.
And obtaining the behavior intention of the first pet by combining a voice behavior intention identification technology according to the voice information of the first pet.
Through wearable equipment of second pet acquires the rhythm of the heart, blood pressure, body temperature, respiratory rate, the sound information of second pet.
And obtaining the emotional state of the second pet by combining a voice emotion recognition technology according to the voice information of the second pet.
And obtaining the behavior intention of the second pet by combining a voice behavior intention identification technology according to the voice information of the second pet.
The emotional state includes: anger, joy, calmness, fear.
The behavioral intent includes: warning, attack, and sadness.
Preferably, the executing the preset command in combination with the preset rule includes:
taking the first identity information, the second identity information, the emotional state, the behavioral intention and the physiological data of the first pet, and the emotional state, the behavioral intention and the physiological data of the second pet as command judgment factor data, and executing a preset command by combining a preset rule, specifically comprising:
a) and judging whether the pet ID in the second identity information exists in a blacklist of the first pet wearable device, if so, executing the playing of the escape voice information, executing the connection master client, and requesting and executing a master remote command.
b) And when the emotional state of the first pet is anger, the sex in the first identity information is the same as that in the second identity information, a fighting record exists in the second identity information, and the second pet has an attacking behavioral intention, executing the playing of the voice information of 'escape'.
c) And when the emotional state of the first pet is happy, the emotional state of the second pet is happy, and the gender of the first identity information is different from that of the second identity information, executing the playing of the voice information of ' going to play with the other ' to the user '.
d) And when the emotional state of the first pet is anger, the emotional state of the second pet is anger, the first pet has an attacking behavioral intention, and the second pet has an attacking behavioral intention, executing the action blocking command to limit the action ability of the first pet. And listing the pet ID in the second identity information into a blacklist, and storing the blacklist into the first pet wearable device.
e) And when the behavior intention of the first pet is attack and the behavior intention of the second pet is sadness, executing the electric shock command.
f) When the heart rate of the first pet exceeds a first threshold value or the respiratory frequency of the first pet exceeds a second threshold value, obtaining vibration frequency which enables the first pet to feel comfortable through the first identity information, executing the vibration command according to the vibration frequency which enables the first pet to feel comfortable, and stopping the vibration command until the heart rate of the first pet is recovered to be lower than the first threshold value or the respiratory frequency of the first pet is recovered to be lower than the second threshold value.
g) And judging whether the pet in the second identity information carries virus information or not, if so, executing the playing of the escaping voice information, and simultaneously executing the connection master client to request and execute a master remote command.
h) And when the behavior intention of the first pet is warning, executing the voice frightening instruction for acquiring the frightening of the pet of the other party.
Preferably, the executing the preset command in combination with the preset rule further includes:
acquiring a command judgment factor data sample set and a corresponding simulation command sample set; training the pet order machine learning model based on an order judgment factor data sample set and a corresponding simulation order sample set; and inputting the command judgment factor data into a pet command machine learning model, determining an output command corresponding to the command judgment factor data, and executing the pet command machine learning model output command by the first pet wearable device.
Preferably, the acquiring command judgment factor data sample set and the corresponding simulation command sample set include:
the first master client plays video data and sound recording data of the first pet wearable device, displays the first identity information, the second identity information, emotional state, behavior intention and physiological data of the first pet at each time point, emotional state, behavior intention and physiological data of the second pet, receives simulation command operation of the master of the first pet wearable device, and obtains the command judgment factor data sample set and the corresponding simulation command sample set.
Preferably, the wearable equipment of first pet and the wearable equipment of second pet end video recording, audio recording, include:
detecting whether the distance between the first pet wearable device and the second pet wearable device exceeds the preset distance, and if so, finishing video recording and sound recording of the first pet wearable device and the second pet wearable device.
The second purpose of the invention can be achieved by adopting the following technical scheme:
a wearable device for pets, characterized in that the wearable device comprises:
and the wireless communication device is used for establishing wireless connection with other electronic equipment.
The parameter acquisition device is internally provided with a motion sensor and a pressure sensor and is mainly used for detecting the heart rate, the blood pressure, the body temperature and the respiratory rate of a pet wearing the wearable equipment.
And the video recording device is used for recording the image data in front of the pet wearing the wearable equipment.
And the recording device is used for recording the audio data around the pet wearing the wearable equipment.
And the processor is mainly used for executing image recognition operation, voice emotion recognition operation, voice behavior intention recognition operation and logic operation for issuing commands to the pets by combining preset rules.
The audio playing device is internally provided with a loudspeaker and is mainly used for playing audio information.
And the vibration device is internally provided with a vibrator and is mainly used for executing the vibration command, and the vibration frequency of the vibration device can be adjusted according to the parameters.
And the electric shock device is internally provided with an electric shock device and is mainly used for executing the electric shock command.
The action stopping device is internally provided with the knee joint inflatable sheath and is mainly used for limiting the action ability of the pet dog.
The other purpose of the invention can be achieved by adopting the following technical scheme:
a client for issuing simulation commands, the client comprising:
and the data display device is used for playing the video data and the sound recording data of the wearable pet equipment and displaying the first identity information, the second identity information, the emotional state, the behavior intention and the physiological data of the first pet at each time point and the emotional state, the behavior intention and the physiological data of the second pet.
And the simulation command device is used for receiving simulation command operation of the owner of the first pet wearable device and obtaining machine learning model training data.
A remote command device for sending a remote command to the first pet wearable device.
The technical scheme provided by the disclosure has the following beneficial effects:
according to the pet meeting judgment method, the communication connection is automatically established through the Bluetooth or wifi technology, the identity information is transmitted, the judgment of pet meeting is timely, and the interaction command is more accurate through the identity information; through the image recognition technology, the situation that identity information stored in the wearable device is not matched with a pet wearing the wearable device at present is avoided, and the error rate is reduced. Through the preset command, the pet is automatically given an instruction, so that the number of times of intervention on the owner is reduced, the time of the owner is saved, compared with the situation that the owner is directly contacted, the pet can be given the instruction more timely, and the occurrence of conflict is avoided; continuously enhancing the accuracy of the machine learning model through a simulation command; the automatic video recording is automatically disconnected, and the video recording is only carried out at key necessary moments, so that the power and the storage space of equipment are saved; through the blacklist mechanism, in time remind owner, give the pet and assign and avoid the order, reduce the conflict and take place to owner can oneself choose to remove the blacklist, give the pet more improve the chance of being in touch with, and is more nimble.
Detailed Description
Step S101: the wearable equipment of first pet combines bluetooth or wifi technique, detects whether there is the wearable equipment of second pet in predetermineeing the distance, if there is, the wearable equipment of first pet with the wearable equipment of second pet establishes communication connection, the wearable equipment of first pet to the wearable equipment of second pet sends first identity information, the wearable equipment of second pet to the wearable equipment of first pet sends second identity information, gets into step S201.
Whether there is the wearable equipment of second pet in the distance is predetermine in the detection, specifically include: within a preset distance, if the first wearable pet device can receive the identity information of the preset format returned by the second wearable pet device, judging that the second wearable pet device exists within the preset distance, and if the first wearable pet device cannot receive the identity information of the preset format returned by the second wearable pet device, judging that the second wearable pet device does not exist within the preset distance.
The identity information in the preset format at least comprises: a pet ID capable of identifying the identity of the pet.
The first identity information includes: the first pet wearable device stores pet data such as: pet ID, bacterial content, whether carrying virus, weight, sex, whether there is fighting record, age, character, amount of exercise in near time, sleep status in near time, biting power, intelligence level, pet picture, sound of pet fear, frequency of vibration for pet to feel comfortable, etc.
The second identity information includes: the second pet wearable device stores pet data such as: pet ID, bacterial content, whether carrying virus, weight, sex, whether there is fighting record, age, character, amount of exercise in near time, sleep status in near time, biting power, intelligence level, pet picture, sound of pet fear, frequency of vibration for pet to feel comfortable, etc.
Step S201: the first pet wearable device and the second pet wearable device start video recording and sound recording.
Step S301: the wearable equipment for the first pet detects whether the pet contained in the second pet image and the pet contained in the pet picture in the second identity information are the same pet or not according to the second pet image obtained in the step S201 by combining an image recognition technology, and sets the pet ID, the bacteria content, whether the pet carries viruses, the weight, the sex, whether fighting records exist, the age, the character, the motion amount in the near time, the sleep condition in the near time, the tearing force, the intelligence level, the pet picture, the sound of pet fear and the vibration frequency of the pet feeling comfortable to feel to be unknown if the pet contained in the second pet image and the pet picture in the second identity information are not the same pet.
The wearable equipment of the second pet detects whether the pet contained in the first pet image and the pet contained in the pet picture in the first identity information are the same pet or not according to the first pet image obtained in the step S201 by combining an image recognition technology, and if not, the wearable equipment of the second pet sets the pet ID, the bacteria content, whether the wearable equipment carries viruses, the weight, the sex, whether fighting records exist, the age, the character, the motion quantity in the near time, the sleep condition in the near time, the tearing force, the intelligence level, the pet picture, the sound of pet fear and the vibration frequency of the pet feeling comfortable to the pet in the first identity information to be unknown.
The first pet image is a picture obtained by the second pet wearable device according to the video in step S201, and the picture contains the picture of the first pet.
The second pet image is a picture obtained by the first pet wearable device according to the video in step S201, and contains a picture of the second pet.
Step S401: every preset time, acquire the emotional state, the action intention and the physiological data of first pet, the emotional state, the action intention and the physiological data of second pet, combine the rule execution preset order of predetermineeing, specifically include:
through wearable equipment of first pet acquires physiological data such as heart rate, blood pressure, body temperature, respiratory rate, sound information of first pet.
And obtaining the emotional state of the first pet by combining a voice emotion recognition technology according to the voice information of the first pet.
And obtaining the behavior intention of the first pet by combining a voice behavior intention identification technology according to the voice information of the first pet.
Through wearable equipment of second pet acquires the physiological data such as the rhythm of the heart, blood pressure, body temperature, respiratory rate, sound information of second pet.
And obtaining the emotional state of the second pet by combining a voice emotion recognition technology according to the voice information of the second pet.
And obtaining the behavior intention of the second pet by combining a voice behavior intention identification technology according to the voice information of the second pet.
The first pet is a pet wearing the first pet wearable device.
The second pet is a pet wearing the second pet wearable device.
The emotional state includes: anger, joy, calmness, fear, etc.
The behavioral intent includes: warning, attack, sadness, etc.
And taking the first identity information, the second identity information, the emotional state, the behavior intention and the physiological data of the first pet, and the emotional state, the behavior intention and the physiological data of the second pet as command judgment factor data, and executing a preset command by combining a preset rule.
The preset command specifically includes: the method comprises the steps of vibrating, obtaining sound frightened by a pet of the other party, playing escaping voice information, playing standing voice information, playing low-jeer voice information, stopping actions, electric shocking, playing voice information for playing with the other party, connecting a master client, and requesting and executing a master remote command.
The vibration specifically comprises: starting a vibration device of the wearable equipment for the first pet to enable the first pet to feel vibration, wherein the vibration frequency of the vibration device can be adjusted according to parameters.
The sound frightening the other side for obtaining the fear of the pet of the other side specifically comprises: acquiring the fear sound of the pet in the second pet identity information, starting the audio playing device of the wearable equipment of the first pet, and playing the fear sound of the pet in the second pet identity information.
The playing of the "run away" voice message specifically includes: and starting an audio playing device of the first pet wearable device to play escaping voice information.
The playing of the upright voice information specifically includes: and starting the audio playing device of the first pet wearable device to play upright voice information.
The playing of the voice information of the 'low jeer' specifically comprises the following steps: and starting an audio playing device of the first pet wearable device to play the voice information of 'low jeer'.
The action blocking specifically comprises: and starting a movement stopping device of the first pet wearable equipment to limit the movement capacity of the first pet.
The electric shock specifically comprises: the first pet wearable device obtains weather conditions of a current place at the current moment, if the weather conditions are rainy weather, the electric shock device of the first pet wearable device is not started, and if the weather conditions are not rainy weather, the electric shock device of the first pet wearable device is started, so that the first pet can feel electric shock. Through weather condition judgement, can avoid the rainwater to lead to the electric leakage accidental injury the condition of first pet.
The playing of the voice information of 'going to play with the other' specifically comprises the following steps: and starting the audio playing device of the first pet wearable device, and playing voice information of 'going to play with the other side'.
The method for connecting the master client to request and execute the master remote command specifically comprises the following steps: the first wearable pet device sends a request for the first identity information, the second identity information, the emotional state, behavior intention and physiological data of the first pet, the emotional state, behavior intention and physiological data of the second pet at each time point, and the video data and the sound recording data of the first wearable pet device obtained in the step S201 to a first master client; receiving and executing a remote command returned by the first host client, wherein the remote command comprises: vibration, getting the sound frightened by the pet of the other party, playing the voice information of escaping, playing the voice information of standing, playing the voice information of low jeer, stopping the action, electric shock and playing the voice information of going to play with the other party.
And executing a preset command by combining a preset rule, wherein the preset command comprises the following steps:
a) and judging whether the pet ID in the second identity information exists in a blacklist of the first pet wearable device, if so, executing the playing of the escape voice information, executing the connection master client, and requesting and executing a master remote command.
In the embodiment, the connection master client is executed while the voice message command for playing the escape is executed, the master remote command is requested and executed, and the master remote command is obtained, so that accidents caused by the pet not listening to the escape command are prevented, and the control degree of the master is increased.
b) And when the emotional state of the first pet is anger, the sex in the first identity information is the same as that in the second identity information, a fighting record exists in the second identity information, and the second pet has an attacking behavioral intention, executing the playing of the voice information of 'escape'.
In this embodiment, under the action intention condition that the second pet has an attack, the emotional state of the first pet is detected simultaneously, the first identity information and the gender in the second identity information, the fighting record of the second identity information can judge the danger at this time more accurately, and then it is necessary to issue an "escape" command.
c) And when the emotional state of the first pet is happy, the emotional state of the second pet is happy, and the gender of the first identity information is different from that of the second identity information, executing the playing of the voice information of ' going to play with the other ' to the user '.
In the embodiment, the emotional states and the sexes of the first pet and the second pet are combined, and the voice message of 'going to play with the other' is played under the appropriate condition, so that the possibility of making friends among pets is promoted.
d) And when the emotional state of the first pet is anger, the emotional state of the second pet is anger, the first pet has an attacking behavioral intention, and the second pet has an attacking behavioral intention, executing the action blocking command to limit the action ability of the first pet. And listing the pet ID in the second identity information into a blacklist, and storing the blacklist into the first pet wearable device.
In the embodiment, by detecting the emotional states and the behavioral intentions of the first pet and the second pet, when both pets are prone to attack and angry, the action ability is limited in time, and accidents are avoided.
e) And when the behavior intention of the first pet is attack and the behavior intention of the second pet is sadness, executing the electric shock command.
In this embodiment, an electric shock penalty is imposed on the attack tendency of the first pet by detecting the behavioral intentions of the first pet and the second pet.
f) When the heart rate of the first pet exceeds a first threshold value or the respiratory frequency of the first pet exceeds a second threshold value, obtaining vibration frequency which enables the first pet to feel comfortable through the first identity information, executing the vibration command according to the vibration frequency which enables the first pet to feel comfortable, and stopping the vibration command until the heart rate of the first pet is recovered to be lower than the first threshold value or the respiratory frequency of the first pet is recovered to be lower than the second threshold value.
In this embodiment, according to the physiological data of the first pet, when the physiological data of the first pet is abnormal, for example, the heart rate exceeds the first threshold value of 150 times/min, and the breathing frequency exceeds the second threshold value of 15 times/min, the vibration frequency of the vibration device is adjusted to the vibration frequency which makes the first pet feel comfortable and vibrates, so that the pet feels pleasant until the normal physiological state is recovered.
g) And judging whether the pet in the second identity information carries virus information, if the pet in the second identity information carries the virus information, executing the playing of the escaping voice information, and simultaneously executing the connection master client to request and execute a master remote command.
In this embodiment, when it is determined that the pet in the second identity information carries virus information, the voice information of "escaping" played by the first pet is timely connected to the owner client of the wearable device for the first pet, and an owner remote command is requested and executed, so that the probability that the first pet is infected by the virus carried by the second pet is reduced, the owner of the first pet can monitor the condition that the first pet is in contact with a virus source, and a basis is provided for the owner to determine and process the infected virus afterwards.
h) And when the behavior intention of the first pet is warning, executing the voice frightening instruction for acquiring the frightening of the pet of the other party.
Executing the preset command by combining the preset rule, and further comprising:
and inputting the command judgment factor data into a pet command machine learning model, determining an output command corresponding to the command judgment factor data, outputting the command according to the pet command machine learning model, and executing the output command.
Wherein the pet command machine learning model is formed by training in advance based on a command judgment factor data sample set and a corresponding simulation command sample set.
The training algorithm of the pet command machine learning model can be svm, deep learning, naive Bayes and the like, and the training process of the pet command machine learning model is a technique known by those skilled in the art and is not described herein again.
The pet command machine learning model outputs commands comprising: the method comprises the steps of vibrating, obtaining sound frightened by a pet of the other party, playing escaping voice information, playing standing voice information, playing low-jeer voice information, stopping actions, electric shocking, playing voice information for playing with the other party, connecting a master client, and requesting and executing a master remote command.
Step S501: detecting whether the distance between the first pet wearable device and the second pet wearable device exceeds the preset distance, and if so, finishing video recording and sound recording of the first pet wearable device and the second pet wearable device.
Step S601: obtaining pet order machine learning model training data, retraining the pet order machine learning model:
the pet command machine learning model training data acquisition process is as follows:
acquiring a plurality of training data, wherein each training data at least comprises a command judgment factor data sample set and a simulation command sample set corresponding to each command judgment factor data sample set.
When a plurality of pieces of training data are acquired, firstly, a command judgment factor data sample set is acquired, specifically, the manner of acquiring the command judgment factor data includes that the first identity information, the second identity information, the emotional state, the behavior intention and the physiological data of the first pet, the emotional state, the behavior intention and the physiological data of the second pet at each time point are taken as the command judgment factor data sample set. Further, acquiring a simulation command corresponding to each command judgment factor data sample to obtain a simulation command sample set corresponding to the command judgment factor data sample set; specifically, the video data and the audio data of the first pet wearable device obtained in step S201 are played at the first owner client, and the command judgment factor data is displayed. Meanwhile, the simulation command operation of the first owner client is received, so that the corresponding simulation command can be obtained while the command judgment factor data sample data is obtained, and further the simulation command sample set corresponding to the command judgment factor data sample set is obtained, wherein the simulation command comprises vibration, obtaining sound frightening the other side feared by the pet of the other side, playing escaping voice information, playing right voice information, playing low-jeer voice information, stopping action, electric shock, playing voice information of going to play with the other side, connecting the owner client and executing the remote command of the owner.
The first owner client is a client of an owner of the first pet wearable device and is mainly used for receiving and presenting data sent by the first pet wearable device, sending a remote command to the first pet wearable device, receiving a simulation command operation of the owner of the first pet wearable device, and obtaining machine learning model training data.
The first host client is further configured to: editing the blacklist stored by the first wearable pet device, specifically including: adding a pet ID into a blacklist stored in the first pet wearable device; and deleting the pet ID from the blacklist stored in the first pet wearable device.
The present disclosure also provides a wearable device of pet, including: the wireless communication device is mainly used for establishing communication connection with other electronic equipment and receiving or transmitting data; the processor is mainly used for executing image recognition operation, voice emotion recognition operation, voice behavior intention recognition operation and logic operation for issuing commands to the pets by combining preset rules; the recording device is internally provided with a recorder and is mainly used for recording audio information; the video device is internally provided with a camera and is mainly used for recording video information; the audio playing device is internally provided with a loudspeaker and is mainly used for playing audio information; the vibrator is internally provided with a vibrator and is mainly used for executing the vibration command, and the vibration frequency of the vibrator can be adjusted according to parameters; the electric shock device is internally provided with an electric shock device and is mainly used for executing the electric shock command; the action stopping device is internally provided with the knee joint inflatable sheath and is mainly used for limiting the action capacity of the pet dog; the parameter acquisition device is internally provided with a motion sensor and a pressure sensor and is mainly used for detecting physiological data of the pet, such as heart rate, blood pressure, body temperature, respiratory rate and the like.