Voice change method, intelligent door lock and computer-readable storage
Technical field
The present invention relates to smart lock technical field, more particularly to a kind of voice change method, intelligent door lock and computer can
Read storage medium.
Background technology
As the improvement of people's living standards, intelligent door lock is gradually applied by people.
There is friend's arrival in the case of nobody at home, intelligent door lock can carry by prerecording greeting voice and door lock
Show voice to friend, so that friend opens the door according to prompt tone, while feel warmer when entering, avoid conventional door lock and refuse people
In embarrassment thousands of miles away.
At present, the voice in intelligent door lock is pre-set, if, it is necessary to by intelligent door lock when user needs to change voice
Producer is delivered to carry out the change of voice so that the voice change flow of intelligent door lock is cumbersome.
The content of the invention
It is a primary object of the present invention to provide a kind of voice change method, intelligent door lock and computer-readable storage medium
Matter, it is intended to solve the problems, such as that the voice change flow of intelligent door lock is cumbersome.
To achieve the above object, a kind of voice change method provided by the invention, the voice change method are applied to intelligence
Energy door lock, the voice change method comprise the following steps:
When receiving speech data change directive, judge whether user corresponding to the speech data change directive has
Voice changes authority;
The user have voice change authority when, according to the speech data change directive intelligent door lock connect outside
Put and speech data to be stored is obtained in memory, and the speech data to be stored is determined according to the speech data change directive
In the storage region of the intelligent door lock;
The speech data to be stored is stored in the storage region.
Preferably, described obtained according to the speech data change directive in the external memory that intelligent door lock connects is treated
The step of voice data, includes:
Determine that voice changes type according to the speech data change directive;
Type is changed according to the voice speech data to be stored is obtained in the external memory.
Preferably, it is described to determine the speech data to be stored in the intelligent door according to the speech data change directive
After the step of storage region of lock, in addition to:
Determine whether the storage region has voice data;
When the storage region contains voice data, voice data, and described in execution described in deletion
The step of speech data to be stored is stored in the storage region.
Preferably, after whether the determination storage region has the step of voice data, in addition to:
When the storage region contains voice data, voice data described in backup;
By voice data is stored to the external memory, and perform and deposited described in the deletion described in backup
The step of storing up speech data.
Preferably, it is described to judge whether user corresponding to the speech data change directive has the step of voice change authority
Suddenly include:
When receiving the speech data change directive of input, display checking interface, so that the user tests according to described
Demonstrate,prove interface validation information;
Checking information is obtained according to the checking interface, and judges whether the checking information matches default checking information,
Wherein, when the checking information matches default checking information, judge that the user has voice to change authority.
Preferably, it is described to judge whether user corresponding to the speech data change directive has the step of voice change authority
After rapid, in addition to:
When the user has voice to change authority, detect whether to connect the external memory;
When detecting the not connected external memory, the prompt message of not connected external memory is exported;
Detect connect the external memory when, perform it is described according to the speech data change directive in intelligent door
Lock the step of speech data to be stored is obtained in the external memory of connection.
Preferably, it is described to judge whether user corresponding to the speech data change directive has the step of voice change authority
After rapid, in addition to:
When the user is without voice change authority, the prompt message of insufficient permission is exported.
Preferably, the voice change method, in addition to:
Detecting whether output changes the prompt message of voice when connecting the external memory.
To achieve the above object, the present invention also provides a kind of intelligent door lock, and the intelligent door lock includes processor, memory
And the voice change program that is stored in the memory and can run on the processor, the voice change program are located
Reason device realizes the step of voice change method as described above when performing.
To achieve the above object, the present invention also provides a kind of computer-readable recording medium, the computer-readable storage
Media storage has voice to change program, and the voice change program realizes voice change side as described above when being executed by processor
The step of method.
Voice provided by the invention is changed method, intelligent door lock and computer-readable recording medium, intelligent door lock and received
During to speech data change directive, judge whether user corresponding to speech data change directive possesses voice change authority, working as
When user has voice change authority, speech data to be stored is obtained in external memory according to speech data change directive, and
The storage region with voice data is determined in built-in storage, speech data to be stored is stored to storage region, from
And complete the change of speech data in intelligent door lock;Because intelligent door lock can out of external memory lookup speech data to complete
The change of speech data, so that user is when changing the voice of intelligent door lock, it is not necessary to intelligent door lock is delivered into producer and entered
Row change, simplifies the change flow of the voice of intelligent door lock, improves the experience of user.
Brief description of the drawings
Fig. 1 is the hardware architecture diagram of intelligent door lock of the present invention;
Fig. 2 is the schematic flow sheet of voice method for burn-recording first embodiment of the present invention;
Fig. 3 is Fig. 2 steps S10 refinement schematic flow sheet;
Fig. 4 is the external memory connected in Fig. 2 in step S20 according to the speech data change directive in intelligent door lock
The interior refinement schematic flow sheet for obtaining speech data to be stored;
Fig. 5 is the schematic flow sheet of voice method for burn-recording second embodiment of the present invention.
The object of the invention is realized, functional characteristics and advantage will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:When receiving speech data change directive, the voice is judged
Whether user corresponding to data change instruction has voice change authority;When the user has voice to change authority, according to institute
The instruction of predicate sound data change obtains speech data to be stored in the external memory of intelligent door lock connection, and according to institute's predicate
The instruction of sound data change determines storage region of the speech data to be stored in the intelligent door lock;By the voice to be stored
Data storage is in the storage region.
In the prior art, the voice in intelligent door lock is pre-set, if, it is necessary to by intelligence when user needs to change voice
Energy door lock delivers to producer to carry out the change of voice so that the voice change flow of intelligent door lock is cumbersome.
The present invention provides a solution:Because intelligent door lock can out of external memory lookup speech data to complete
The change of speech data, so that user is when changing the voice of intelligent door lock, it is not necessary to intelligent door lock is delivered into producer and entered
Row change, simplifies the change flow of the voice of intelligent door lock, improves the experience of user.
As a kind of implementation, the hardware architecture diagram of above-mentioned intelligent door lock can be as shown in Figure 1.
Reference picture 1, intelligent door lock can include:Processor 1001, such as CPU, memory 1002, communication bus 1003,
Intelligent door lock also has USB interface, can be with external external memory.Wherein, communication bus 1003 is used to realize the frequency conversion air-cooled
Connection communication in refrigerator between each building block.Memory 1002 can be high-speed RAM memory or stable deposit
Reservoir (non-volatile memory), such as magnetic disk storage.Memory 1002 optionally can also be independently of foregoing place
Manage the storage device of device 1001.As shown in figure 1, as voice can be included in a kind of memory 1002 of computer-readable storage medium
Change program.
Processor 1001 can be used for calling and be deposited in memory 1002 in the hardware involved by the intelligent door lock shown in Fig. 1
The voice change program of storage, and perform following operate:
When receiving speech data change directive, judge whether user corresponding to the speech data change directive has
Voice changes authority;
The user have voice change authority when, according to the speech data change directive intelligent door lock connect outside
Put and speech data to be stored is obtained in memory, and the speech data to be stored is determined according to the speech data change directive
In the storage region of the intelligent door lock;
The speech data to be stored is stored in the storage region.
Further, in one embodiment, processor 1001 can be used for calling the voice stored in memory 1002
Program is changed, and performs following operate:
Determine that voice changes type according to the speech data change directive;
Type is changed according to the voice speech data to be stored is obtained in the external memory.
Further, in one embodiment, processor 1001 can be used for calling the voice stored in memory 1002
Program is changed, and performs following operate:
Determine whether the storage region has voice data;
When the storage region contains voice data, voice data, and described in execution described in deletion
The step of speech data to be stored is stored in the storage region.
Further, in one embodiment, processor 1001 can be used for calling the voice stored in memory 1002
Program is changed, and performs following operate:
When the storage region contains voice data, voice data described in backup;
By voice data is stored to the external memory, and perform and deposited described in the deletion described in backup
The step of storing up speech data.
Further, in one embodiment, processor 1001 can be used for calling the voice stored in memory 1002
Program is changed, and performs following operate:
When receiving the speech data change directive of input, display checking interface, so that the user tests according to described
Demonstrate,prove interface validation information;
Checking information is obtained according to the checking interface, and judges whether the checking information matches default checking information,
Wherein, when the checking information matches default checking information, judge that the user has voice to change authority.
Further, in one embodiment, processor 1001 can be used for calling the voice stored in memory 1002
Program is changed, and performs following operate:
When the user has voice to change authority, detect whether to connect the external memory;
When detecting the not connected external memory, the prompt message of not connected external memory is exported;
Detect connect the external memory when, perform it is described according to the speech data change directive in intelligent door
Lock the step of speech data to be stored is obtained in the external memory of connection.
Further, in one embodiment, processor 1001 can be used for calling the voice stored in memory 1002
Program is changed, and performs following operate:
When the user is without voice change authority, the prompt message of insufficient permission is exported.
Further, in one embodiment, processor 1001 can be used for calling the voice stored in memory 1002
Program is changed, and performs following operate:
Detecting whether output changes the prompt message of voice when connecting the external memory.
The present embodiment judges speech data according to such scheme, intelligent door lock when receiving speech data change directive
User corresponding to change directive whether possess voice change authority, when user have voice change authority when, according to speech data
Change directive obtains speech data to be stored in external memory, and depositing with voice data is determined in built-in storage
Storage area domain, speech data to be stored is stored to storage region, so as to complete the change of speech data in intelligent door lock;Because of intelligence
Energy door lock can lookup speech data be to complete the change of speech data out of external memory, so that user is in change intelligence
During the voice of energy door lock, it is not necessary to intelligent door lock is delivered into producer and is modified, simplifies the change stream of the voice of intelligent door lock
Journey, improve the experience of user.
Based on above-mentioned hardware architecture, propose that voice of the present invention changes the embodiment of method.
Reference picture 2, Fig. 2 are the first embodiment that voice of the present invention changes method, and the voice change method includes following
Step:
Step S10, when receiving speech data change directive, judge user corresponding to the speech data change directive
Whether there is voice change authority;
In the present embodiment, voice change method is applied to intelligent door lock, and intelligent door lock is provided with USB interface, can be with external
External memory, contains internal memory in intelligent door lock, and internal memory can be flash storage, in internal memory
It is stored with the speech data (speech data is prompt tone, greets sound and operate sound) set when dispatching from the factory, the appearance of flash storage
Amount is smaller, can only load the speech data of minority, it is necessary to which explanation, the speech data of flash storage memory storage have in advance
If naming rule, naming rule is sound-type+voice content, for example, " prompt tone+password is correct ", " greet sound+thanks and
Visit " " greeting sound+welcome to come to visit " etc., each sound-type has fixed storage region in flash storage.
Intelligent door lock (trigger action can be the protection cap for pulling intelligent door lock), display screen when detecting trigger action
It can light, now display screen meeting operation display interface, there is each function of intelligent door lock in operation interface, also there is language certainly
Sound changes function, when detecting user and selecting voice change function, it is necessary to be verified to user, specifically, Fig. 3 is refer to,
That is step S10 includes:
Step S11, when receiving the speech data change directive of input, display checking interface, so that user's root
According to the checking interface validation information;
Step S12, checking information is obtained according to the checking interface, and judge whether the checking information matches default test
Information is demonstrate,proved, wherein, when the checking information matches default checking information, judge that the user has voice to change authority;
Voice change function is selected on a display screen in user, and the intelligent door lock of intelligent door lock receives voice burning please
Ask, now, intelligent door lock transfers checking interface to verify that the voice of user changes authority, that is, verifies whether user has change intelligence
The authority of the parameter of energy door lock, user can be in checking interface validation informations, and checking information can be user's sets itself
Checking password, checking password can be numeral, letter or word, can also be digital, alphabetical and literary combinatorics on words.
After user confirms validation information, intelligent door lock obtains checking information, and transfers default checking information, in checking information
During with the checking information to prestore (when checking password is consistent with the checking password that prestores, the default checking information of checking information matching), when
So, user can set multiple checking informations, and each checking information has corresponding default checking information, such as, in user
When selection is using checking password authentification, intelligent door lock transfers the checking password that prestores, when user selects validation problem, intelligent door lock
The Validation Answer Key that prestores is transferred, based on this, intelligent door lock can set Permission Levels, such as, checking password corresponds to one-level authority, tests
Card problem corresponds to two level authority, and checking password+validation problem corresponds to the (operation of intelligent door lock corresponding to one-level authority of three-level authority
Authority is minimum), the authority of each rank is corresponding with the operating right of different range.
Further, intelligent door lock is to judge whether user there is voice to change authority by checking information, i.e., only needs
User has correct checking information, you can carries out voice change to intelligent door lock, for such case, intelligent door lock can be set
Voice change authority uses duration, and when current speech change authority reaches using duration, user needs to verify its language again
Sound changes authority, so that the change speech data that intelligent door lock can be more intelligent.Certainly, voice is completed more as user
When changing, it is necessary to when carrying out voice change again, it is also desirable to verify again.
When checking information mismatches default checking information, intelligent door lock exports the prompt message of insufficient permission, to carry
Show authority of the user without change speech data.
Step S20, when the user has voice to change authority, according to the speech data change directive in intelligent door lock
Speech data to be stored is obtained in the external memory of connection, and is determined according to the speech data change directive described to be stored
Storage region of the speech data in the intelligent door lock;
External memory internal memory contains substantial amounts of speech data, what these speech datas can voluntarily be recorded with user, also may be used
To be to download and obtain from network, when user records or downloads speech data, it is necessary to which these speech datas are renamed, make
It is consistent with the naming rule of the speech data in internal memory to obtain these speech datas, so that intelligent door lock can identify
These speech datas.
When judging that user has voice to change authority, intelligent door lock needs to obtain band storaged voice number out of external memory
According to specifically, refer to Fig. 4, i.e. external being deposited what intelligent door lock connected according to the speech data change directive in step S20
Speech data to be stored is obtained in reservoir to be included:
Step S21, determine that voice changes type according to the speech data change directive;
Step S22, type is changed according to the voice speech data to be stored is obtained in the external memory;
User can select the sound-type of change, i.e. speech data more in the speech data of selection change intelligent door lock
Change the type of the speech data containing change in need in instruction, intelligent door lock can transfer the voice of the type in external memory
Data are selected, specifically, for example, user needs to change prompt tone, and intelligent door lock can be carried external memory look-up is all
Show the speech data of sound, and the voice content of these speech datas is shown on a display screen, for selection by the user, work as user
When selecting and determine (speech data to be stored) during the speech data that needs are changed, intelligent door lock transfers the voice number to be stored
According to.
It should be noted that when intelligent door lock judge user possess voice change authority when, it is necessary to detect whether to connect
There is external memory, when intelligent door lock is not connected with external memory, then export not connected external memory in display screen
Prompt message, the interface that voice message user inserts external memory intelligent door lock can also be played, certainly, in intelligent door lock
Detect when being connected with external memory, directly perform step S20.
Further, when intelligent door lock detects and is connected with external memory, and the voice number in the external memory
According to title with the title with speech data in flash storage with identical naming rule when, can be defeated on a display screen
Go out the prompt message for whether changing speech data, to improve the experience of user.
Step S30, the speech data to be stored is stored in the storage region.
After speech data to be stored is determined in the storage region of built-in storage region when intelligent door lock, by voice to be stored
Data storage is to the storage region, so as to complete the change of the voice of intelligent door lock.
When connecting external memory, intelligent door lock can call in internal memory intelligent door lock according to application scenarios
Speech data plays, and the speech data in external memory can also be called to play out, specifically, for example, existing as user
During the checking code error of input, intelligent door lock can transfer " prompt tone+password mistake in internal memory and external memory
Speech data by mistake ", because this kind of speech data is more, intelligent door lock be able to will be broadcast according to the number of the broadcasting of speech data
The most speech data of number is put to play out.In addition, when intelligent door lock needs the big speech data of broadcasting capacity, such as,
User prestores the voice of recording to external storage, and when visitor passes through checking, intelligent door lock plays the setting
Recorded speech, improve the experience of user.
The technical scheme that the present embodiment provides, intelligent door lock judge voice number when receiving speech data change directive
According to user corresponding to change directive whether possess voice change authority, when user have voice change authority when, according to voice number
Speech data to be stored is obtained in external memory according to change directive, and is determined in built-in storage with voice data
Storage region, speech data to be stored is stored to storage region, so as to complete the change of speech data in intelligent door lock;Cause
Intelligent door lock can lookup speech data be to complete the change of speech data out of external memory, so that user is changing
During the voice of intelligent door lock, it is not necessary to intelligent door lock is delivered into producer and is modified, simplifies the change of the voice of intelligent door lock
Flow, improve the experience of user.
Reference picture 5, Fig. 5 is the schematic flow sheet for the second embodiment that voice of the present invention changes method, based on above-mentioned implementation
, after the step S20, in addition to:
Step S40, determines whether the storage region has voice data;
Step S50, when the storage region contains voice data, voice data described in backup;
Step S60, by voice data is stored to the external memory described in backup;
Step S70, delete described in voice data, and perform and described the speech data to be stored be stored in institute
The step of stating storage region;
In this embodiment, there are multiple storage regions in internal memory, can be conventional by some before intelligent door lock dispatches from the factory
Voice is arranged at storage region, but user can be deleted the default voice of each storage region, allow for each memory block
Domain not necessarily has speech data, and each storage region has certain capacity, and the capacity of the speech data of user's change has
Have greatly small, change speech data for convenience, it is necessary to ensure the capacity of storage region, it can be stored in speech data to be stored
It is preceding, it is necessary to which the speech data of the storage region is deleted.Specifically, intelligent door lock determines speech data to be stored in built-in storage
The storage region of device, whether the storage region can be first judged containing voice data, if so, then deleting the storaged voice
Data, then speech data to be stored is stored to the storage region, further, intelligent door lock can back up storaged voice number
According to, and standby voice data is stored to external memory, for selection by the user.
In the technical scheme that this implementation provides, intelligent door lock is it is determined that speech data to be stored depositing in internal memory
Behind storage area domain, further, determine whether storage region has voice data, if so, backup voice data to deposit
Store up to external memory, then, then delete voice data, so that storage region can keep its memory capacity,
Facilitate the change of the speech data of user next time, improve the experience of user.
The present invention also provides a kind of intelligent door lock, and the intelligent door lock includes memory, processor and is stored in described deposit
Reservoir and the voice that can be run on the processor change program, and the voice change program is realized such as when being executed by processor
Each step of voice change method described in upper embodiment.
The present invention also provides a kind of computer-readable recording medium, and the computer-readable recording medium storage has voice more
Change program, the voice change program realizes each step that the voice change method described in example is performed as described above when being executed by processor
Suddenly.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row
His property includes, so that process, method, article or device including a series of elements not only include those key elements, and
And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently
Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this
Other identical element also be present in the process of key element, method, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words
Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone,
Computer, server, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair
The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.