A communication method, an electronic device, and a storage medium
By detecting terminal information in the intercom device to control voice collection and transmission, the accuracy and convenience issues of the voice control function are solved, and call maintenance without continuous button pressing is achieved.
Patent Information
- Application Number
- CN202210290070.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-03-23
AI Technical Summary
The voice control function of existing intercom equipment is easily interfered by environmental noise, resulting in poor accuracy of PTT key triggering and inconvenient operation.
When a call initiation event is detected, the device determines whether to turn on the voice collection device by obtaining terminal information such as tilt angle, flip status or key operation, collects and sends voice, and turns off the device when a call end event is detected to avoid false triggering.
The accuracy of voice collection and transmission is improved. Users no longer need to hold down the PTT button to maintain a call, which improves the convenience and accuracy of operation.
Smart Images

Figure CN116886815B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication method, electronic equipment, and storage medium. Background Art
[0002] The current method for maintaining a call on an intercom device is generally for a user to maintain a call by continuously pressing a PTT (PUSH TO TALK) button.
[0003] The above-mentioned communication method is inconvenient to operate. To solve this problem, the intercom device can enable a voice control function. When the intercom detects voice exceeding the threshold decibel value, it triggers the PTT button to maintain the call. However, the voice control function is easily interfered with by environmental noise, resulting in poor accuracy in triggering the PTT button.
[0004] Therefore, how to ensure the accuracy of triggering while ensuring the convenience of operation becomes a problem. Summary of the Invention
[0005] To solve the above technical problems, the embodiments of the present application provide a communication method, an electronic device, and a storage medium to achieve the purpose of improving the convenience and accuracy of operations. The technical solutions are as follows:
[0006] A communication method, comprising:
[0007] When a call initiation event is detected, obtaining first information of the terminal;
[0008] If it is determined based on the first information that a call initiation event is to be responded to, start a voice collection device to enable the voice collection device to collect voice, the call initiation event is used to trigger the terminal to initiate a call, and the call initiation event ends at least no later than the time when the voice collection device starts collecting voice;
[0009] Sending the voice using a voice transmitter;
[0010] When a call end event is detected, the voice collection device is turned off and the sending of the voice is stopped.
[0011] Optionally, the first information includes: a tilt angle or flip state of the terminal;
[0012] The method of starting a voice collection device in response to the call initiation event based on the first information includes:
[0013] When the tilt angle of the terminal is not less than a tilt angle threshold, determining to respond to the call initiation event and turning on the voice collection device;
[0014] Alternatively, when the flip state of the terminal indicates that the terminal has not flipped, it is determined to respond to the call initiation event and start the voice collection device.
[0015] Optionally, the call initiation event includes:
[0016] The number of times the preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in an inactive state;
[0017] Or, the terminal is shaken and the terminal is not in a call state;
[0018] Or, the custom combination key of the terminal is triggered, and the terminal is in a non-call state.
[0019] Optionally, the acquiring the first information of the terminal further includes:
[0020] During the timed interruption period, continuously obtaining physical status information of the keys of the terminal at each moment;
[0021] The determining to respond to the call initiation event includes:
[0022] If the physical state information at two or more adjacent moments is the same, it is determined that the key of the terminal is in a stable state, and then it is determined that in response to the call initiation event, the key of the terminal includes the preset key or the custom combination key.
[0023] Optionally, a method for detecting that the number of times a preset key of the terminal is continuously triggered reaches a set threshold includes:
[0024] Acquire physical state information of the preset key, and when the physical state information of the preset key indicates that the preset key is in a pressed state, record a first timestamp of the preset key being in the pressed state;
[0025] When it is detected that the physical state information of the preset key after the first timestamp indicates that the preset key is in a lifted state, recording a second timestamp indicating that the preset key is in a lifted state;
[0026] If it is determined that the difference between the second timestamp and the first timestamp is less than the long press time detection threshold, it is determined that the preset key is clicked;
[0027] If it is determined that the preset key has registered the continuous trigger function, returning to the step of obtaining the physical state information of the preset key, and recording a third timestamp for confirming that the preset key is clicked again;
[0028] If the difference between the third timestamp and the second timestamp is less than a set interval, determining that the preset key of the terminal is continuously triggered, and determining the number of times the preset key is clicked as the number of times it is continuously triggered;
[0029] Determine whether the number of consecutive triggers reaches the set threshold.
[0030] Optionally, when the call initiation event is that the number of times a preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in a non-call state, the voice collection device is activated, including:
[0031] Determine whether the interval between the time of the first triggering and the time of the last triggering of the preset key of the terminal is less than the first timing duration of the timer;
[0032] If so, the voice collection device is turned on.
[0033] Optionally, when the call initiation event is that the number of times a preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in an inactive state, detecting the call end event includes:
[0034] It is detected that the number of times the preset key of the terminal is continuously triggered reaches the set threshold, and the terminal is in a call state.
[0035] Optionally, when the call initiation event is detection of terminal shaking, and the terminal is in a non-call state, the detection of the call end event includes:
[0036] It is detected that the terminal is shaking and the terminal is in a call state.
[0037] Optionally, detecting a call end event includes:
[0038] It is detected that a second timing duration reaches a time threshold, where the second timing duration is a timing duration obtained from starting the voice collection device; or
[0039] Detecting a voice that matches a set ending voice feature from the voice; or,
[0040] An interrupt signaling is received, where the terminal receiving the voice sends a signaling to the terminal for ending the voice transmission when the terminal recognizes an interruption permission flag in the voice.
[0041] An electronic device, comprising:
[0042] memory and processor;
[0043] a memory for storing at least one set of instruction sets;
[0044] A processor, configured to execute each step of the communication method according to any one of claims 1 to 9.
[0045] A storage medium, characterized in that it stores a computer program for implementing any one of the communication methods described above, wherein the computer program is executed by a processor to implement each step of the communication method described above.
[0046] Compared with the prior art, the present invention has the following advantages:
[0047] In the present application, when a call initiation event is detected, first information of the terminal is obtained. Based on the first information, when it is determined that the call initiation event is to be responded to, the voice collection device is turned on to prevent the call initiation event from being triggered incorrectly and to ensure the accuracy of the voice collection device being turned on. On this basis, the voice collection device is enabled to collect voice and the voice is sent using a voice transmitting device. When a call ending event is detected, the voice collection device is turned off and the sending of the voice is stopped, so that the terminal supports the user to automatically maintain the call by executing the operation of triggering the terminal to initiate a call, so that the user does not need to continuously press and hold the PTT button to maintain the call, thereby improving the convenience and accuracy of the operation of maintaining the call. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0049] Figure 1 This is a flow chart of a communication method embodiment 1 provided by the present application;
[0050] Figure 2 This is a flow chart of a communication method embodiment 2 provided by the present application;
[0051] Figure 3 This is a flow chart of a communication method embodiment 3 provided by the present application;
[0052] Figure 4 This is a flowchart of a communication method embodiment 4 provided by the present application;
[0053] Figure 5 This is a flowchart of a communication method embodiment 5 provided by the present application;
[0054] Figure 6 This is a flowchart of Example 6 of a communication method provided by this application;
[0055] Figure 7 This is a flowchart of a communication method embodiment 7 provided by the present application;
[0056] Figure 8 This is a schematic diagram of the logical structure of a communication device provided by this application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0058] Next, the communication method provided by this application is introduced. Figure 1 The flowchart shown is a communication method embodiment 1 provided by the present application, which may include the following steps:
[0059] Step S11: When a call initiation event is detected, first information of the terminal is obtained.
[0060] In this embodiment, the first information of the terminal may include but is not limited to: a tilt angle or a flip state of the terminal.
[0061] In this embodiment, the terminal can detect its motion state in real time to determine its tilt angle or flip state. The tilt angle can be understood as the angle between the terminal body and a line perpendicular to the horizontal plane. The flip state can indicate whether the terminal has flipped. Specifically, the flip state of the terminal can be determined by detecting the flip angle or the number of flips. A flip angle of 180 degrees corresponds to one flip.
[0062] Step S12: When it is determined based on the first information that a call initiation event is to be responded to, the voice collection device is turned on so that the voice collection device collects voice, the call initiation event is used to trigger the terminal to initiate a call, and the call initiation event ends at least no later than the time when the voice collection device starts collecting voice.
[0063] Corresponding to the implementation manner in which the first information includes: the tilt angle of the terminal, the determining, based on the first information, to respond to the call initiation event and start the voice collection device may include:
[0064] S121: When the tilt angle of the terminal is not less than a tilt angle threshold, determine to respond to the call initiation event and start a voice collection device.
[0065] The tilt angle threshold can be set as needed and is not limited in this application.
[0066] Corresponding to the implementation manner of the first information including: the flip state of the terminal, the starting of the voice collection device in response to the call initiation event based on the first information may include:
[0067] S122: When the flip state of the terminal indicates that the terminal has not flipped, determine to respond to the call initiation event and start a voice collection device.
[0068] In this embodiment, the call initiation event may include but is not limited to:
[0069] The number of times the preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in an inactive state;
[0070] Or, the terminal is shaken and the terminal is not in a call state;
[0071] Or, the custom combination key of the terminal is triggered, and the terminal is in a non-call state.
[0072] In this embodiment, the detection method of whether the number of times the preset key of the terminal is continuously triggered reaches the set threshold may include but is not limited to:
[0073] S123: Acquire physical state information of the preset key, and when the physical state information of the preset key indicates that the preset key is in a pressed state, record a first timestamp indicating that the preset key is in the pressed state.
[0074] S124: When it is detected that the physical state information of the preset key after the first timestamp indicates that the preset key is in a lifted state, record a second timestamp indicating that the preset key is in a lifted state.
[0075] S125: If it is determined that the difference between the second timestamp and the first timestamp is less than the long press time detection threshold, determine that the preset key is single-clicked.
[0076] In this embodiment, the long press time detection threshold can be set as needed and is not limited in this application.
[0077] S126: If it is determined that the preset key has registered the continuous trigger function, return to the step of obtaining the physical state information of the preset key, and record a third timestamp that confirms that the preset key is clicked again.
[0078] S127: If the difference between the third timestamp and the second timestamp is less than a set interval, determine that the preset key of the terminal is continuously triggered, and determine the number of times the preset key is clicked as the number of continuous triggering times.
[0079] S128: Determine whether the number of consecutive triggering times reaches a set threshold.
[0080] The threshold value can be set as needed and is not limited in this application.
[0081] The preset key of the terminal may include but is not limited to: a PTT key of the terminal.
[0082] After detecting the call initiation event, the first information of the terminal is obtained to determine whether the call initiation event is caused by an accidental touch of the terminal, such as an accidental touch caused by the terminal falling, etc. Step S13: Send the voice using the voice transmitter.
[0083] Transmitting the voice using the voice transmitting device can be understood as: sending the voice collected by the voice collecting device to the voice transmitting device, and the voice transmitting device transmitting the voice.
[0084] Step S14: When a call end event is detected, the voice collection device is turned off and the voice transmission is stopped.
[0085] Corresponding to detecting that the number of times the PTT key of the terminal is continuously triggered reaches a set threshold and the terminal is in a non-call state, detecting a call end event can be: detecting that the number of times the PTT key of the terminal is continuously triggered reaches the set threshold and the terminal is in a call state.
[0086] The detecting that the terminal is shaken and the terminal is in a non-call state and detecting the call end event may be: detecting that the terminal is shaken and the terminal is in a call state.
[0087] Corresponding to detecting that the custom combination key of the terminal is triggered and the terminal is in a non-call state, detecting the call end event may be: detecting that the custom combination key of the terminal is triggered and the terminal is in a call state.
[0088] In this embodiment, when a call initiation event is detected, first information of the terminal is obtained. Based on the first information, when it is determined that the call initiation event is to be responded to, the voice collection device is turned on to prevent the call initiation event from being triggered incorrectly, thereby ensuring the accuracy of the voice collection device being turned on. On this basis, the voice collection device is enabled to collect voice, and the voice is sent using a voice transmission device. When a call end event is detected, the voice collection device is turned off, and the sending of the voice is stopped, so that the terminal supports the user to automatically maintain the call by executing the operation of triggering the terminal to initiate a call, so that the user does not need to continuously press and hold the PTT button to maintain the call, thereby improving the convenience and accuracy of the operation of maintaining the call.
[0089] In another embodiment 2 of the present application, the communication method described in the above embodiment 1 is mainly refined, such as Figure 2 As shown, the method may include but is not limited to the following steps:
[0090] Step S21: When a call initiation event is detected, the tilt angle of the terminal is obtained, and the physical state information of the keys of the terminal is continuously obtained at each moment during a timer interruption period.
[0091] In this embodiment, obtaining the tilt angle of the terminal and continuously obtaining the physical status information of the keys of the terminal at each moment during the timer interruption period is a specific implementation method of obtaining the first information of the terminal in step S11 in embodiment 1.
[0092] The timer interrupt period can be set as needed and is not limited in this application.
[0093] The physical state information of the terminal's keys may include: pressing state information or releasing state information of the terminal's keys.
[0094] Step S22: When the tilt angle of the terminal is not less than the tilt angle threshold, if the physical state information at two or more adjacent moments is the same, it is determined that the key of the terminal is in a stable state, then it is determined to respond to the call initiation event and turn on the voice collection device to enable the voice collection device to collect voice.
[0095] In this embodiment, the buttons of the terminal may include but are not limited to the preset buttons or the custom combination buttons.
[0096] If the physical status information at two or more adjacent moments is inconsistent, it can be determined that the terminal's buttons are in a jittering state. In the jittering state, the terminal will not respond to the call initiation event, thereby preventing false triggering of the call initiation event caused by hardware circuit jitter.
[0097] It should be noted that, based on the physical state information of the terminal key, it is possible to monitor whether the physical state information changes, and when the same change is monitored N times in a row, it can be determined as a valid key press. N is an integer greater than 1.
[0098] In this step, if the physical state information at two or more adjacent moments is the same, it is determined that the key of the terminal is in a stable state, and then it is determined that the voice collection device is turned on in response to the call initiation event. This is a specific implementation method of determining that the voice collection device is turned on in response to the call initiation event in step S121 in Example 1.
[0099] The call initiation event is used to trigger the terminal to initiate a call, and the end time of the call initiation event is at least not later than the time when the voice collection device starts to collect voice.
[0100] Step S23: Send the voice using a voice transmitter.
[0101] Step S24: When a call end event is detected, the voice collection device is turned off and the voice transmission is stopped.
[0102] The detailed process of steps S23-S24 can be found in the relevant introduction of steps S13-S14 in Example 1, and will not be repeated here.
[0103] In this embodiment, when a call initiation event is detected, the tilt angle of the terminal is obtained, and the physical status information of the terminal buttons is continuously obtained at each moment within a timed interruption period. In combination with the tilt angle of the terminal and the physical status information of the terminal buttons, it is determined that in response to the call initiation event, the voice collection device is turned on, thereby improving the accuracy of preventing false triggering of the call initiation event and further improving the accuracy of turning on the voice collection device. On this basis, the voice collection device is enabled to collect voice and the voice is sent using a voice transmission device. When a call end event is detected, the voice collection device is turned off and the sending of the voice is stopped, thereby enabling the terminal to support the user by executing the operation of triggering the terminal to initiate a call and automatically maintain the call, so that the user does not need to continuously press and hold the PTT button to maintain the call, thereby improving the convenience and accuracy of the operation of maintaining the call.
[0104] In another embodiment 3 of the present application, the communication method described in the above embodiment 1 is mainly refined, such as Figure 3 As shown, the method may include but is not limited to the following steps:
[0105] Step S31: When a call initiation event is detected, the flip state of the terminal is obtained, and the physical state information of the keys of the terminal is continuously obtained at each moment during a timer interruption period.
[0106] In this embodiment, obtaining the flip state of the terminal and continuously obtaining the physical state information of the keys of the terminal at each moment during the timer interruption period is a specific implementation method of obtaining the first information of the terminal in step S11 in embodiment 1.
[0107] The timer interrupt period can be set as needed and is not limited in this application.
[0108] The physical state information of the terminal's keys may include: pressing state information or releasing state information of the terminal's keys.
[0109] Step S32: When the flip state of the terminal indicates that the terminal has not flipped, if the physical state information at two or more adjacent moments is the same, it is determined that the key of the terminal is in a stable state, then it is determined to respond to the call initiation event and turn on the voice collection device so that the voice collection device collects voice.
[0110] In this embodiment, the buttons of the terminal may include but are not limited to the preset buttons or the custom combination buttons.
[0111] If the physical status information at two or more adjacent moments is inconsistent, it can be determined that the terminal's buttons are in a jittering state. In the jittering state, the terminal will not respond to the call initiation event, thereby preventing false triggering of the call initiation event caused by hardware circuit jitter.
[0112] It should be noted that, based on the physical state information of the terminal key, it is possible to monitor whether the physical state information changes, and when the same change is monitored N times in a row, it can be determined as a valid key press. N is an integer greater than 1.
[0113] In this step, if the physical state information at two or more adjacent moments is the same, it is determined that the key of the terminal is in a stable state, and then it is determined that the voice collection device is turned on in response to the call initiation event. This is a specific implementation method of determining that the voice collection device is turned on in response to the call initiation event in step S121 in Example 1.
[0114] The call initiation event is used to trigger the terminal to initiate a call, and the end time of the call initiation event is at least not later than the time when the voice collection device starts to collect voice.
[0115] Step S33: Send the voice using a voice transmitter.
[0116] Step S34: When a call end event is detected, the voice collection device is turned off and the voice transmission is stopped.
[0117] The detailed process of steps S23-S24 can be found in the relevant introduction of steps S13-S14 in Example 1, and will not be repeated here.
[0118] In this embodiment, when a call initiation event is detected, the flip state of the terminal is obtained, and the physical state information of the terminal buttons is continuously obtained at each moment within a timed interruption period. In combination with the flip state of the terminal and the physical state information of the terminal buttons, it is determined that in response to the call initiation event, the voice collection device is turned on, thereby improving the accuracy of preventing false triggering of the call initiation event and further improving the accuracy of turning on the voice collection device. On this basis, the voice collection device is enabled to collect voice and the voice is sent using a voice transmission device. When a call end event is detected, the voice collection device is turned off and the sending of the voice is stopped, thereby enabling the terminal to support the user by executing the operation of triggering the terminal to initiate a call and automatically maintain the call, so that the user does not need to continuously press and hold the PTT button to maintain the call, thereby improving the convenience and accuracy of the operation of maintaining the call.
[0119] In another embodiment 4 of the present application, the communication method described in the above embodiment 1 is mainly refined, such as Figure 4 As shown, the method may include but is not limited to the following steps:
[0120] Step S41: When it is detected that the number of times a preset key of a terminal is continuously triggered reaches a set threshold and the terminal is in a non-call state, first information of the terminal is obtained.
[0121] Step S41 is a specific implementation of step S11 in Example 1.
[0122] Step S42: When determining to respond to the call initiation event based on the first information, determine whether the interval between the first triggering time and the last triggering time of the preset key of the terminal being continuously triggered is less than the first timing duration of the timer.
[0123] The first timing duration can be set as needed and is not limited in this application.
[0124] If yes, execute step S43.
[0125] Step S44: Turn on the voice collection device to enable the voice collection device to collect voice.
[0126] Steps S42-S43 are a specific implementation of step S12 in Example 1.
[0127] Step S45: Send the voice using a voice transmitter.
[0128] Step S46: When it is detected that the number of times the preset key of the terminal is continuously triggered reaches the set threshold and the terminal is in a call state, the voice collection device is turned off and the sending of the voice is stopped.
[0129] Step S46 is a specific implementation of step S14 in Example 1.
[0130] In this embodiment, when a call initiation event is detected, first information of the terminal is obtained. Based on the first information, it is determined that a response to the call initiation event is required. By judging whether the interval between the first triggering time and the last triggering time of the preset key of the terminal when the key is continuously triggered is less than the first timing duration of the timer, and if the interval is less than the first timing duration of the timer, the voice collection device is turned on. Turning on the voice collection device can prevent false triggering of the call initiation event and ensure the accuracy of turning on the voice collection device, and further avoid erroneous operation. The voice collection device collects voice and transmits the voice using the voice transmission device. When a call end event is detected, the voice collection device is turned off and the transmission of the voice is stopped. This enables the terminal to support the user to automatically maintain the call by executing the operation of triggering the terminal to initiate a call, so that the user does not need to continuously hold down the PTT button to maintain the call, thereby improving the convenience and accuracy of the operation of maintaining the call.
[0131] In another embodiment 5 of the present application, the communication method described in the above embodiment 1 is mainly refined, such as Figure 5 As shown, the method may include but is not limited to the following steps:
[0132] Step S51: When a call initiation event is detected, first information of the terminal is obtained.
[0133] Step S52: When it is determined based on the first information that a call initiation event is to be responded to, the voice collection device is turned on so that the voice collection device collects voice, the call initiation event is used to trigger the terminal to initiate a call, and the call initiation event ends at least no later than the time when the voice collection device starts collecting voice.
[0134] Step S53: Send the voice using a voice transmitter.
[0135] The detailed process of steps S51-S53 can be found in the relevant introduction of steps S11-S13 in Example 1, and will not be repeated here.
[0136] Step S54: When it is detected that the second timing duration reaches a time threshold, the voice collection device is turned off and the voice transmission is stopped. The second timing duration is the timing duration obtained from the start of turning on the voice collection device.
[0137] Step S54 is a specific implementation of step S14 in Example 1.
[0138] In this embodiment, when it is detected that the number of times a preset key of the terminal is continuously triggered reaches a set threshold and the terminal is in an off-call state; or, it is detected that the terminal is shaking and the terminal is in an off-call state; or, it is detected that a custom combination key of the terminal is triggered and the terminal is in an off-call state, the call can be automatically ended by turning off the voice collection device and stopping sending the voice when it is detected that the second timing duration reaches the time threshold.
[0139] In another embodiment 6 of the present application, the communication method described in the above embodiment 1 is mainly refined, such as Figure 6 As shown, the method may include but is not limited to the following steps:
[0140] Step S61: When a call initiation event is detected, first information of the terminal is obtained.
[0141] Step S62: When it is determined based on the first information that the call initiation event is to be responded, the voice collection device is turned on to enable the voice collection device to collect voice.
[0142] The call initiation event is used to trigger the terminal to initiate a call, and the end time of the call initiation event is at least not later than the time when the voice collection device starts to collect voice.
[0143] Step S63: Send the voice using a voice transmitter.
[0144] The detailed process of steps S61-S63 can be found in the relevant introduction of steps S11-S13 in Example 1, and will not be repeated here.
[0145] Step S64: When a voice matching the set end voice feature is detected from the voice, the voice collection device is turned off and the sending of the voice is stopped.
[0146] In this embodiment, the ending voice feature can be set as needed and is not limited in this application.
[0147] The user can input a voice that matches the set end voice feature to trigger the terminal to end the call. Accordingly, the terminal can detect whether there is a voice matching the set end voice feature in the voice collected by the voice collection device. If so, the voice collection device is turned off and the voice transmission is stopped to end the call.
[0148] In this embodiment, in the case that the number of times of continuous triggering of the preset key of the terminal reaches the set threshold, and the terminal is in the non-talking state; or, in the case that the terminal is detected to shake, and the terminal is in the non-talking state; or, in the case that the custom combination key of the terminal is detected to be triggered, and the terminal is in the non-talking state, the voice collection device is closed and the voice is stopped from being sent in the case that the voice matching the set ending voice feature is detected from the voice, so as to realize automatic ending of the call.
[0149] In another embodiment 7 of the present application, mainly a refinement of the communication method described in the above embodiment 1, as shown in the following table, the method can include but is not limited to the following steps: Figure 7
[0150] Step S71, in the case that a call initiation event is detected, first information of the terminal is acquired.
[0151] Step S72, in the case that the call initiation event is determined to be responded based on the first information, a voice collection device is started to collect voice.
[0152] The call initiation event is used to trigger the terminal to initiate a call, and the time of ending of the call initiation event is at least not later than the time of starting the voice collection device to collect voice.
[0153] Step S73, the voice is sent by using a voice transmission device.
[0154] The detailed process of steps S71-S73 can be referred to the related introduction of steps S11-S13 in embodiment 1, which will not be described herein again.
[0155] Step S74, in the case that the voice collection device is closed and the voice is stopped from being sent in the case that the interrupt signaling sent by the terminal receiving the voice is received, the interrupt signaling is the signaling sent by the terminal receiving the voice to the terminal to end the terminal transmission voice in the case that the interrupt permission identifier is identified from the voice.
[0156] In this embodiment, the user can input the voice containing the interrupt permission identifier to inform the terminal to end the call, accordingly, the terminal sends the voice containing the interrupt permission identifier, and the terminal receiving the voice sends the interrupt signaling (i.e., the signaling to end the terminal transmission voice) to the terminal sending the voice after the interrupt permission identifier is identified from the voice. The terminal closes the voice collection device and stops sending the voice in the case that the interrupt signaling is received.
[0157] In this embodiment, the terminal transmits a voice message containing an interruption permission flag, so that the terminal receiving the voice message interrupts the speech of the terminal transmitting the voice message by calling back, thereby ending the call.
[0158] Next, the communication device provided in the present application is introduced. The communication device introduced below and the communication method introduced above can be referenced to each other.
[0159] See Figure 8 The communication device includes: an acquisition module 100, an opening module 200, a sending module 300 and an ending module 400.
[0160] The acquisition module 100 is configured to acquire first information of a terminal when a call initiation event is detected.
[0161] The starting module 200 is used to start the voice collection device in response to the call initiation event based on the first information, so that the voice collection device collects voice, the call initiation event is used to trigger the terminal to initiate a call, and the call initiation event ends at least not later than the time when the voice collection device starts collecting voice.
[0162] The sending module 300 is used to send the voice using a voice transmitting device.
[0163] The ending module 400 is used to shut down the voice collection device and stop sending the voice when a call ending event is detected.
[0164] In this embodiment, the first information may include: a tilt angle or flip state of the terminal;
[0165] Accordingly, the activation module 200 can be specifically used to:
[0166] When the tilt angle of the terminal is not less than a tilt angle threshold, determining to respond to the call initiation event and turning on the voice collection device;
[0167] Alternatively, when the flip state of the terminal indicates that the terminal has not flipped, it is determined to respond to the call initiation event and start the voice collection device.
[0168] In this embodiment, the call initiation event may include:
[0169] The number of times the preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in an inactive state;
[0170] Or, the terminal is shaken and the terminal is not in a call state;
[0171] Or, the custom combination key of the terminal is triggered, and the terminal is in a non-call state.
[0172] In this embodiment, the acquisition module 100 may also be used to:
[0173] During the timed interruption period, continuously obtaining physical status information of the keys of the terminal at each moment;
[0174] The determining a response to the call initiation event may include:
[0175] If the physical state information at two or more adjacent moments is the same, it is determined that the key of the terminal is in a stable state, and then it is determined that in response to the call initiation event, the key of the terminal includes the preset key or the custom combination key.
[0176] In this embodiment, the communication device may further include:
[0177] Detection module for:
[0178] Acquire physical state information of the preset key, and when the physical state information of the preset key indicates that the preset key is in a pressed state, record a first timestamp of the preset key being in the pressed state;
[0179] When it is detected that the physical state information of the preset key after the first timestamp indicates that the preset key is in a lifted state, recording a second timestamp indicating that the preset key is in a lifted state;
[0180] If it is determined that the difference between the second timestamp and the first timestamp is less than the long press time detection threshold, it is determined that the preset key is clicked;
[0181] If it is determined that the preset key has registered the continuous trigger function, returning to the step of obtaining the physical state information of the preset key, and recording a third timestamp for confirming that the preset key is clicked again;
[0182] If the difference between the third timestamp and the second timestamp is less than a set interval, determining that the preset key of the terminal is continuously triggered, and determining the number of times the preset key is clicked as the number of times it is continuously triggered;
[0183] Determine whether the number of consecutive triggers reaches the set threshold.
[0184] In this embodiment, when the call initiation event is that the number of times a preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in a non-call state, module 200 is started to determine whether the interval between the first triggering time and the last triggering time of the preset key of the terminal being continuously triggered is less than the first timing length of the timer;
[0185] If so, the voice collection device is turned on.
[0186] In this embodiment, when the call initiation event is that the number of times the preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in a non-call state, the end module 400 can be specifically used to detect that the number of times the preset key of the terminal is continuously triggered reaches the set threshold, and the terminal is in a call state.
[0187] In this embodiment, when the call initiation event is detection of terminal shaking and the terminal is in a non-call state, the ending module 400 may be specifically configured to:
[0188] It is detected that the terminal is shaking and the terminal is in a call state.
[0189] In this embodiment, the ending module 400 may be specifically configured to:
[0190] It is detected that a second timing duration reaches a time threshold, where the second timing duration is a timing duration obtained from starting the voice collection device; or
[0191] Detecting a voice that matches a set ending voice feature from the voice; or,
[0192] An interrupt signaling is received, where the terminal receiving the voice sends a signaling to the terminal for ending the voice transmission when the terminal recognizes an interruption permission flag in the voice.
[0193] In another embodiment of the present application, an electronic device is provided, including:
[0194] memory and processor;
[0195] a memory for storing at least one set of instruction sets;
[0196] A processor, configured to execute the communication method described in any one of embodiments 1-7.
[0197] In another embodiment of the present application, a storage medium is provided, which stores a computer program for implementing the communication method as described in the above embodiments. The computer program is executed by a processor to implement the steps of the communication method as described in any one of the above embodiments.
[0198] It should be noted that each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to in detail. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0199] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0200] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0201] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0202] The above is a detailed introduction to a communication method, electronic device and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A communication method, characterized in that: include: When a call initiation event is detected, obtaining first information of the terminal; If it is determined based on the first information that a call initiation event is to be responded to, start a voice collection device to enable the voice collection device to collect voice, the call initiation event is used to trigger the terminal to initiate a call, and the call initiation event ends at least no later than the time when the voice collection device starts collecting voice; Sending the voice using a voice transmitter; When a call end event is detected, turning off the voice collection device and stopping sending the voice; The first information includes: the tilt angle or flip state of the terminal; The method of starting a voice collection device in response to the call initiation event based on the first information includes: When the tilt angle of the terminal is not less than a tilt angle threshold, determining to respond to the call initiation event and turning on the voice collection device; Alternatively, when the flip state of the terminal indicates that the terminal has not flipped, it is determined to respond to the call initiation event and start the voice collection device.
2. The method according to claim 1, characterized in that The call initiation event includes: The number of times the preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in an inactive state; Or, the terminal is shaken and the terminal is not in a call state; Or, the custom combination key of the terminal is triggered, and the terminal is in a non-call state.
3. The method according to claim 2, characterized in that The acquiring of the first information of the terminal further includes: During the timed interruption period, continuously obtaining physical status information of the keys of the terminal at each moment; The determining to respond to the call initiation event includes: If the physical state information at two or more adjacent moments is the same, it is determined that the key of the terminal is in a stable state, and then it is determined that in response to the call initiation event, the key of the terminal includes the preset key or the custom combination key.
4. The method according to claim 2, characterized in that The detection method of whether the number of times the preset key of the terminal is continuously triggered reaches a set threshold includes: Acquire physical state information of the preset key, and when the physical state information of the preset key indicates that the preset key is in a pressed state, record a first timestamp of the preset key being in the pressed state; When it is detected that the physical state information of the preset key after the first timestamp indicates that the preset key is in a lifted state, recording a second timestamp indicating that the preset key is in a lifted state; If it is determined that the difference between the second timestamp and the first timestamp is less than the long press time detection threshold, it is determined that the preset key is clicked; If it is determined that the preset key has registered the continuous trigger function, returning to the step of obtaining the physical state information of the preset key, and recording a third timestamp for confirming that the preset key is clicked again; If the difference between the third timestamp and the second timestamp is less than a set interval, determining that the preset key of the terminal is continuously triggered, and determining the number of times the preset key is clicked as the number of times it is continuously triggered; Determine whether the number of consecutive triggers reaches the set threshold.
5. The method according to claim 2, characterized in that When the call initiation event is that the number of times a preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in a non-call state, the voice collection device is started, including: Determine whether the interval between the time of the first triggering and the time of the last triggering of the preset key of the terminal is less than the first timing duration of the timer; If so, the voice collection device is turned on.
6. The method according to claim 2, characterized in that When the call initiation event is that the number of times a preset key of the terminal is continuously triggered reaches a set threshold, and the terminal is in an inactive state, the call end event is detected, including: It is detected that the number of times the preset key of the terminal is continuously triggered reaches the set threshold, and the terminal is in a call state.
7. The method according to claim 2, characterized in that When the call initiation event is detection of terminal shaking, and the terminal is in a non-call state, the detection of the call end event includes: It is detected that the terminal is shaking and the terminal is in a call state.
8. The method according to claim 1, characterized in that The detecting of the call end event includes: It is detected that a second timing duration reaches a time threshold, where the second timing duration is a timing duration obtained from starting the voice collection device; or Detecting a voice that matches a set ending voice feature from the voice; or, An interrupt signaling is received, where the terminal receiving the voice sends a signaling to the terminal for ending the voice transmission when the terminal recognizes an interruption permission flag in the voice.
9. An electronic device, characterized in that: include: memory and processor; a memory for storing at least one set of instruction sets; A processor, configured to execute each step of the communication method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: A computer program for implementing the communication method according to any one of claims 1 to 8 is stored, and the computer program is executed by a processor to implement each step of the communication method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Voice sending method and device
CN111314554A