Interphone with recording function and recording method thereof
By introducing control modules, recording modules, buffers and FLASH into the intercom, long-term recording file storage and fast query functions are realized, and the existing intercom recording function is solved, which is short storage time and difficult to query. It is suitable for equipment in the official department.
Patent Information
- Application Number
- CN202111483469.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-12-07
AI Technical Summary
The recording function of existing walkie-talkies is short in storage time and cannot quickly query specific recording files, which cannot meet the needs of the official department.
By introducing control module, recording module, buffer and FLASH into the intercom, long-term recording file storage and quick query functions are realized. When the recording module is busy, the FLASH is stored and the index is set after recording is finished. The index contains feature data. Used to quickly filter recording files and delete files by index time when FLASH space is full.
It realizes recording files that are stored for longer time and fast and accurate inquiry, saves FLASH space, avoids invalid recording and inquiries, and is suitable for special equipment for official departments.
Smart Images

Figure CN114172996B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an interphone with recording function and a recording method thereof. Background Art
[0002] With the progress of society and the development of science and technology, walkie-talkies, as a professional means of communication, have been widely used in all walks of life, and the recording function, as a special storage method, has been increasingly used in walkie-talkies. However, the recording function of existing walkie-talkies is not practical enough, and there are defects such as too short recording time and inability to query specific recording files. Such walkie-talkies cannot meet the requirements of public departments such as railways and public security, and therefore cannot be used as dedicated walkie-talkie equipment in these departments. Summary of the invention
[0003] The present invention provides an interphone with a recording function and a recording method thereof, which can store recording files of longer duration and can also quickly and accurately query recording files that meet specific requirements, so that the interphone can be used as a special device in public departments.
[0004] The present invention is achieved through the following technical solutions:
[0005] A recording method for an intercom, the intercom comprising a control module, a recording module, a buffer and a FLASH, comprising the following steps:
[0006] A. When the recording module is busy, the control module sends the recording command to the buffer. When the recording module is idle, it reads the data at the top of the buffer and sends it to the recording module.
[0007] B. After the recording module receives the recording instruction, the control module records the current time of the RTC clock inside the intercom, and controls the recording module to start the recording function, create a recording file, and start recording;
[0008] C. During the recording process, if there is a received call or a transmitted call, the control module records the start time of the current received call or transmitted call, and after the call ends, records the call duration and proceeds to step D; if there is no received call or transmitted call, proceeds to step E;
[0009] D. After the recording is finished, the control module stores the recording file in FLASH and sets an index corresponding to the recording file, which is also stored in FLASH. The index includes several characteristic data of the recording file, and then enters step G;
[0010] E. The control module detects the current RTC clock time and compares it with the RTC clock time in step B. When the difference exceeds the threshold, the control module controls the recording module to stop recording and enter step F, otherwise, enter step C;
[0011] F. The control module determines whether there is a valid recording in the recording file. If not, a recording file is re-created with the same file name, and recording is started, and the process goes to step C. If there is, a recording file is created with a new file name, and recording is started, and the process goes to step C.
[0012] G. Determine whether the FLASH space is about to be exhausted. If so, the control module deletes some indexes according to the order of index storage time, and deletes the recording files corresponding to these indexes; otherwise, no processing is performed;
[0013] H. The intercom is connected to the host computer for communication. The host computer filters the recording files in the FLASH by setting the numerical range of some or all of the characteristic data contained in the index.
[0014] Furthermore, in step A, after the control module reads the top data of the buffer and sends it to the recording module, it waits for the response data of the recording module to determine whether the data is sent successfully. If the response data is received, the top data of the buffer is popped up and the buffer is returned to the waiting state. If the response data is not received, it is sent again and it is determined whether the number of retransmissions exceeds the set value. If it exceeds the set value, the top data of the buffer is popped up and the buffer is returned to the waiting state.
[0015] Furthermore, in step D, the characteristic data contained in the index includes one or more of the following: file name, intercom ID, recording start time, call type and call duration.
[0016] Furthermore, in step F, the effective recording refers to receiving a call or transmitting a call during the recording process.
[0017] Furthermore, when the intercom is turned off, the control module sends a command to stop recording to the recording module to end the recording normally.
[0018] Furthermore, in the step B, the control module names the recording file according to the serial number to create the recording file.
[0019] Furthermore, in step E, the threshold is 20 min-40 min.
[0020] Furthermore, before performing step A, the control module initializes the buffer and the recording module.
[0021] Furthermore, the control module is an MCU.
[0022] The present invention is also achieved through the following technical solutions:
[0023] A walkie-talkie with a recording function comprises a control module, a recording module, a buffer and FLASH. The control module is connected to the recording module, the buffer and the FLASH respectively. When the recording module is busy, the control module temporarily stores a recording instruction in the buffer. When the recording module is idle, the control module sends the recording instruction temporarily stored in the buffer to the recording module. After the recording module receives the recording instruction, the control module creates a recording file and controls the recording module to start recording. After the recording is finished, the control module stores the recording file in the FLASH and sets an index corresponding to the recording file. The index is also stored in the FLASH, and the index includes several characteristic data of the recording file. The control module is also used to judge whether the FLASH space is about to be exhausted. If so, the control module deletes part of the indexes according to the storage time of the indexes, and deletes the recording files corresponding to these indexes at the same time.
[0024] The present invention has the following beneficial effects:
[0025] 1. The recording file and its index of the present invention are stored in FLASH. FLASH has a large capacity, so it can store longer recording files. The index contains several characteristic data of the recording file. The upper computer can screen the recording files in FLASH by setting the numerical range of some or all characteristic data contained in the index, so that the recording files that meet specific requirements can be quickly and accurately queried, so that it can be used as a special device in public departments; when the recording module is busy, the recording instruction is temporarily stored in the buffer, and when the recording module is idle, the top data of the buffer is read and sent to the recording module, so that unnecessary delay waiting can be avoided; during the recording process, if there is no receiving call or transmitting call, and the recording time has exceeded the threshold, the recording ends, and it is determined whether there is a valid recording in the recording section. If not, the recording file is recreated with the same file name as the recording file name for recording, so that invalid recordings can be avoided from being stored, which can save FLASH space and avoid querying too many invalid files; when the FLASH space is about to be exhausted, some indexes are deleted according to the order of index storage time, and the recording files corresponding to these indexes are deleted at the same time, so that FLASH can continuously support the storage of new indexes. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present invention is further described in detail below with reference to the accompanying drawings.
[0027] Figure 1 Flow chart of the recording method of the present invention. DETAILED DESCRIPTION
[0028] like Figure 1As shown, the intercom with recording function includes a control module, a recording module, a buffer and a large-capacity FLASH, and the control module is connected to the recording module, the buffer and the FLASH respectively. The recording method includes the following steps:
[0029] A. The control module initializes the buffer parameters and the recording module. When the control module is idle, it polls the status of the recording module. When the recording module is busy, the control module sends the recording instruction to the buffer. When the recording module is idle, it reads the top data of the buffer and sends it to the recording module. After sending the data to the recording module, it waits for the response data of the recording module to determine whether the data is sent successfully. If the response data is received, the top data of the buffer is popped up and the buffer returns to the waiting state. If the response data is not received, it is sent again and it is determined whether the number of retransmissions exceeds the set value. If it exceeds the set value, the top data of the buffer is popped up and the buffer returns to the waiting state.
[0030] B. After the recording module receives the recording instruction, the control module records the current time of the RTC clock inside the intercom, and controls the recording module to start the recording function, create a recording file, and start recording; when creating a recording file, the recording file is named according to the sequence number formed by a natural number;
[0031] C. During the recording process, if there is a received call or a transmitted call, the control module records the current received call or transmitted call time. After the call ends, the call duration is recorded and the process proceeds to step D. If there is no received call or transmitted call, the process proceeds to step E.
[0032] D. After the recording module receives the end recording instruction, the control module controls the recording module to end recording. After the recording is finished, the control module stores the recording file in FLASH and sets an index corresponding to the recording file. The index is also stored in FLASH. The index includes several characteristic data of the recording file, and enters step G. In this embodiment, the characteristic data included in the index includes the file name, intercom ID, recording start time, call type and call duration;
[0033] When the intercom is turned off, the control module sends a stop recording instruction to the recording module to end the recording normally;
[0034] E. The control module detects the current RTC clock time and compares it with the RTC clock time in step B. When the difference exceeds the threshold, the control module controls the recording module to stop recording and enter step F, otherwise, enter step C; in this embodiment, the threshold is 30 minutes;
[0035] F. The control module determines whether there is a valid recording in the recording file. If not, a recording file is re-created with the same file name, and recording is started, and the process goes to step C. If there is, a recording file is created with a new file name, and recording is started, and the process goes to step C. The valid recording refers to a call being received or a call being transmitted during the recording process.
[0036] G. Determine whether the FLASH space is about to be exhausted. If so, the control module deletes some indexes according to the order of index storage time, and deletes the recording files corresponding to these indexes; otherwise, no processing is performed; the process of determining whether the FLASH space is about to be exhausted is a prior art;
[0037] In this embodiment, the specific process of deleting the index is as follows: the index is stored in blocks in the FLASH, each block stores 4000 indexes, and the FLASH of this embodiment supports the storage of 160000 indexes in total. An index head pointer is stored inside the intercom, and the head pointer points to the index with the earliest storage time. When the FLASH is about to be full, all indexes in the block where the index with the earliest storage time is located are deleted, and the index head pointer points to the index with the earliest storage time among the indexes saved by the FLASH;
[0038] H. The intercom is connected to the host computer for communication, and the host computer selects the recording files in the FLASH by setting the numerical range of some or all of the characteristic data contained in the index. The process of the intercom being connected to the host computer for communication so that the host computer can select the recording files is a prior art.
[0039] In this embodiment, the control module is an MCU, and the model of the MCU main control chip is GD32F303.
[0040] The above description is only a preferred embodiment of the present invention, and therefore cannot be used to limit the scope of implementation of the present invention. That is, equivalent changes and modifications made according to the scope of the patent application of the present invention and the contents of the specification should still fall within the scope covered by the patent of the present invention.
Claims
1. A recording method for an intercom, characterized in that: The intercom includes a control module, a recording module, a buffer and FLASH, including the following steps: A. When the recording module is busy, the control module sends the recording command to the buffer. When the recording module is idle, it reads the data at the top of the buffer and sends it to the recording module. B. After the recording module receives the recording instruction, the control module records the current time of the RTC clock inside the intercom, and controls the recording module to start the recording function, create a recording file, and start recording; C. During the recording process, when there is a received call or a transmitted call, the control module records the current received call or transmitted call time. After the call ends, the call duration is recorded and the process goes to step D; If there is no incoming call or outgoing call, proceed to step E; D. After the recording is finished, the control module stores the recording file in FLASH and sets an index corresponding to the recording file, which is also stored in FLASH. The index includes several characteristic data of the recording file, and then enters step G; E. The control module detects the current RTC clock time and compares it with the RTC clock time in step B. When the difference exceeds the threshold, the control module controls the recording module to stop recording and enter step F, otherwise, enter step C; F. The control module determines whether there is a valid recording in the recording file. If not, a recording file is re-created with the same file name, and recording is started, and the process goes to step C. If there is, a recording file is created with a new file name, and recording is started, and the process goes to step C. G. Determine whether the FLASH space is about to be exhausted. If so, the control module deletes some indexes according to the order of index storage time, and deletes the recording files corresponding to these indexes; otherwise, no processing is performed; H. The intercom is connected to the host computer, and the host computer selects the recording files in the FLASH by setting the value range of some or all of the characteristic data contained in the index; In the step F, the effective recording means that there is a received call or a transmitted call during the recording process.
2. The recording method of an intercom according to claim 1, characterized in that: In step A, after the control module reads the data at the top of the buffer and sends it to the recording module, it waits for the response data from the recording module to determine whether the data is sent successfully. If the response data is received, the data at the top of the buffer is popped up and the buffer returns to the waiting state. If the response data is not received, it is sent again and it is determined whether the number of retransmissions exceeds the set value. If it exceeds the set value, the data at the top of the buffer is popped up and the buffer returns to the waiting state.
3. The recording method of an intercom according to claim 1, characterized in that: In step D, the feature data included in the index includes one or more of the following: file name, intercom ID, recording start time, call type and call duration.
4. A recording method for an intercom according to claim 1, 2 or 3, characterized in that: When the intercom is turned off, the control module sends a command to stop recording to the recording module to end the recording normally.
5. A recording method for an intercom according to claim 1, 2 or 3, characterized in that: In the step B, the control module names the recording file according to the serial number to create the recording file.
6. A recording method for an intercom according to claim 1, 2 or 3, characterized in that: In the step E, the threshold is 20 min-40 min.
7. A recording method for an intercom according to claim 1, 2 or 3, characterized in that: Before performing step A, the control module initializes the buffer and the recording module.
8. A recording method for an intercom according to claim 1, 2 or 3, characterized in that: The control module is MCU.
9. An intercom with recording function based on the recording method according to any one of claims 1 to 8, characterized in that: The invention comprises a control module, a recording module, a buffer and FLASH. The control module is connected with the recording module, the buffer and the FLASH respectively. When the recording module is busy, the control module temporarily stores the recording instruction in the buffer. When the recording module is idle, the control module sends the recording instruction temporarily stored in the buffer to the recording module. After the recording module receives the recording instruction, the control module creates a recording file and controls the recording module to start recording. After the recording is finished, the control module stores the recording file in the FLASH and sets an index corresponding to the recording file. The index is also stored in the FLASH and the index includes several characteristic data of the recording file. The control module is also used to judge whether the FLASH space is about to be exhausted. If so, the control module deletes some indexes according to the storage time of the indexes and deletes the recording files corresponding to these indexes at the same time.
