CN112073586A - Method and system for acquiring call recording data from android system - Google Patents

Method and system for acquiring call recording data from android system Download PDF

Info

Publication number
CN112073586A
CN112073586A CN202011001985.1A CN202011001985A CN112073586A CN 112073586 A CN112073586 A CN 112073586A CN 202011001985 A CN202011001985 A CN 202011001985A CN 112073586 A CN112073586 A CN 112073586A
Authority
CN
China
Prior art keywords
call
recording
audio data
state
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011001985.1A
Other languages
Chinese (zh)
Inventor
王乾坤
张占永
付树棣
胡学文
李永斌
胡金藏
罗海斌
王鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing tulayan Technology Co.,Ltd.
Original Assignee
Beijing Juli Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Juli Science and Technology Co Ltd filed Critical Beijing Juli Science and Technology Co Ltd
Priority to CN202011001985.1A priority Critical patent/CN112073586A/en
Publication of CN112073586A publication Critical patent/CN112073586A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a method and a system for acquiring call recording data from an android system. The method comprises the steps of obtaining call state information from an android kernel; recording audio data; a step of performing cache processing on the obtained audio data; converting and compressing the cached data and then packaging the data; and uploading the packaged audio data to a storage module. By utilizing the method and the system, the recording can be directly finished on the mobile phone without the help of a virtual operator, and meanwhile, the volume of the recording file is reduced, the recording uploading efficiency is improved, and the safety of the mobile phone is improved.

Description

Method and system for acquiring call recording data from android system
Technical Field
The invention relates to the field of communication systems, in particular to a method and a system for acquiring call record data from an android system.
Background
At present, the android system launched by google is widely used by terminal devices such as mobile phones. Moreover, google provides the programmer of the android system with a software development kit for implementing different functions, such as acquiring voice data. With the rapid development of the internet, the acquisition of data and the improvement of human efficiency are more and more important.
For enterprises with sales business, the call records and call records of sales personnel during work can be completely and accurately collected, standard operation processes can be quickly analyzed, verified and adjusted, and the improvement of human efficiency and the guarantee of work quality are facilitated. The smart phone is the most common portable device for the salesperson and has the most abundant daily use information, and the key is to acquire the data carried by the smart phone.
In the prior art, a virtual operator acquires call records and recording data, or starts recording permission through a ROOT mobile phone to acquire recording data. The mobile phone ROOT is usually a pointer for the mobile phone with the Android system, and enables a user to obtain the super user permission of the Android operating system. ROOT is generally used to help users cross the limitations of the handset manufacturer so that users can uninstall some applications pre-installed in handsets by handset manufacturers, operators, third party channels, and run some applications that require super-user privileges. But using a virtual operator or ROOT handset has the following disadvantages:
1. the virtual operator has poor call quality. Because the technical principle of the virtual operator is to realize data acquisition through one-layer switching, the communication quality is inevitably reduced by adding one more layer switching. And a double fee is paid: the SIM card belongs to the communication cost of an operator and the communication cost of a virtual operator.
2. Recording data acquisition is limited. The prior technical scheme can only obtain the recording data after connection and can not obtain the data waiting before connection.
And 3, after the ROOT mobile phone, the safety of the mobile phone is greatly reduced.
Disclosure of Invention
In order to solve the above problem, the present invention provides a method for acquiring call recording data from an android system, which is characterized by comprising the following procedures:
the method comprises the following steps: acquiring call state information from an android kernel; when the call is connected, performing the step two;
step two: recording audio data;
step three: triggering the hanging up of the call, judging whether the number of the current remaining calls is 0 or not, if not, recording the information of the hanging up of the call without finishing the recording, otherwise, finishing the recording, recording the information of the hanging up of the call, and caching the obtained audio data;
step four: converting and compressing the cached data and then packaging the data;
step five: and uploading the packaged audio data to a storage module.
Further, the call state information includes call state change original information, a call connection state, and a call termination action.
Further, the first step includes a process of obtaining the original information changed by the call state, and a process of obtaining the call connection state and the call ending action.
Further, the implementation mode of acquiring the original information of the change of the call state is to inherit an InCallService class in an open source code of the android system;
the method for acquiring the call connection state and the call ending action is realized by registering call state monitoring through register callback in a call start callback method oncalladd of an open source code of an android system, acquiring the call connection state by monitoring the change of the call state through internal localState, and acquiring the call ending action through onCallRemoved.
And the second step is acquisition by using the AudioRecord.
Further, the third step is specifically as follows: the entered original PCM raw audio data is converted to WAV format and then transcoded using FFmpeg, compressed and packaged into M4P format.
Further, in the second step, it is also necessary to determine whether there is an ongoing call, if so, the three-party call shares the recording file of the existing call, otherwise, the three-party call is used as a single call to start recording.
Further, the method also comprises the step of recording and uploading the call time information and the number information.
A system for acquiring call recording data from an android system comprises a client and a cloud server; the client comprises a call state acquisition module, a call recording module, a recording transcoding module and a recording uploading module;
the pass state acquisition module is used for acquiring original information of the change of the call state of the android mobile terminal, and acquiring the call connection state and the call ending action of the android mobile terminal;
the call recording module is used for automatically starting recording during call to acquire audio data;
the data buffer module is used for caching the acquired audio data;
the conversation recording transcoding module is used for converting and compressing the obtained audio data and then packaging the audio data in an M4P format;
and the recording uploading module is used for uploading the encapsulated audio data to a cloud server side.
Furthermore, the call recording module also records call time information and number information.
The invention has the beneficial effects that:
1. the recording is directly finished on the mobile phone without the help of a virtual operator. The call quality can be improved, and the cost for purchasing the virtual operator service is reduced. Meanwhile, the volume of the recording file is reduced, and the recording uploading efficiency is improved.
2. And monitoring the complete connection state in the smart phone in real time, acquiring the detailed state from the beginning to the end of the call, and starting call recording in waiting.
3. The ROOT mobile phone is not used, and the safety of the mobile phone is improved.
Detailed Description
The present invention is described in further detail below. However, it should not be understood that the scope of the above-described subject matter of the present invention is limited to the following examples, and any technique that can be implemented based on the disclosure of the present invention falls within the scope of the present invention.
The method for acquiring the call recording data from the android system comprises the following processes:
the method comprises the following steps: acquiring call state information from an android kernel; when the call is connected, performing the step two; specifically, the call state information includes original call state change information, a call connection state, and a call termination action.
Specifically, the process of acquiring the call state information from the android kernel includes a process of acquiring original information of a change of the call state, and a process of acquiring a call connection state and a call termination action;
the method for acquiring the original information of the change of the call state is realized by adopting an open source code relay of an android system to bear an InCallService class; the method specifically comprises the following steps: after the incalserviceimpl is used for relaying incalservice, when a new call is generated, the oncalladd method in the inheritance class incalserviceimpl is called back. Some data initialization records are made inside the method. The code may be written as:
Figure BDA0002694655220000051
the implementation manner of acquiring the call connection state and the call ending action is that in a call start callback method onCallAdded of an android system open source code, call state monitoring is registered through a register Callback, the call connection state is acquired by monitoring internal localState to acquire the change of the call state, and the call ending action is acquired through onCallRemoved. The method specifically comprises the following steps: in the oncalladd method, by monitoring the call object, the states of the call state change, such as call connection, call disconnection, etc., can be accessed. From these states, it is possible to determine whether or not the call is connected or terminated. The code can be written as:
Figure BDA0002694655220000052
Figure BDA0002694655220000061
step two: recording audio data;
this step is obtained using AudioRecord.
Specifically, the audio data passes through a bottom-layer audio support library (the part is written by google), and the audio data passes through a hardware abstraction layer (the part is maintained by a mobile phone hardware manufacturer) and an audio framework service AudioRecord (an android audio framework, the part is written by google and is used by a platform scheme manufacturer configuration parameter) in sequence.
And in the second step, whether the call in progress exists needs to be judged, if yes, the three-party call shares the recording file of the existing call, otherwise, the three-party call is used as a single call to start recording.
In the step, in order to obtain high-quality stereo call recording, an Android underlying recording library AudioRecord is adopted for obtaining, and recording is automatically started during call. AudioRecord is used to control MIC recordings. And the AudioRecord records the audio data acquired by the audio input equipment. The SAMPLING RATE SAMPLING _ RATE may be set to 8000, 11025, 16000, 44100, 48000, etc., the channel channelConfig is set to STEREO audio format.
Step three: triggering the hanging up of the call, if the number of the current remaining calls is 0, if not, recording the information of the hanging up of the call without ending the recording, otherwise, ending the recording, recording the information of the hanging up of the call, and caching the obtained audio data;
specifically, the audio data is cached to deal with asynchronous calls from an upper layer.
The caching technique may employ existing sophisticated asynchronous waiting techniques.
In order to quickly upload call records, the transcoding action is performed asynchronously. And simultaneously, executing the call ending action and uploading the record. And after the recording transcoding is completed and the recording is uploaded, the recording process is ended.
Step four: carrying out AAC coding compression on the audio data subjected to the cache processing, and then packaging the audio data into an M4P format;
converting the recorded original PCM audio data into WAV format, then performing AAC coding compression by using FFmpeg, and packaging into M4P format.
FFmpeg is a set of open source computer programs that can be used to record, convert digital audio, video, and convert them into streams.
Step five: and uploading the audio data after recording and packaging the call information to a storage module.
Specifically, the storage module may be a cloud server or other modules having a storage function.
Correspondingly, this application still discloses a system for obtaining conversation recording data from android system, this system includes:
the cloud server end is used for storing the uploaded audio data and the call records;
and (4) a client. The client comprises a call state acquisition module, a call recording module, a record transcoding module and a record uploading module;
the pass state acquisition module is used for acquiring original information of the change of the call state of the android mobile terminal, and acquiring the call connection state and the call ending action of the android mobile terminal;
the call recording module is used for automatically starting recording during call to acquire audio data;
the data buffer module is used for caching the acquired audio data;
the conversation recording transcoding module is used for converting and compressing the obtained audio data into AAC codes and then packaging the AAC codes into an M4P format;
and the recording uploading module is used for uploading the encapsulated audio data to a cloud server side.
It should be noted that the audio data obtained by the call recording module is derived from an android kernel, and a binaural or monaural recording mode may be selected as required to obtain the audio data.
The call recording module is also used for recording call time, telephone numbers and the like. AudioRecord is used to control call recording.

Claims (10)

1. A method for acquiring call recording data from an android system is characterized by comprising the following procedures:
the method comprises the following steps: acquiring call state information from an android kernel; when the call is connected, performing the step two;
step two: recording audio data;
step three: triggering the hanging up of the call, judging whether the number of the current remaining calls is 0 or not, if not, recording the information of the hanging up of the call without finishing the recording, otherwise, finishing the recording, recording the information of the hanging up of the call, and caching the obtained audio data;
step four: converting and compressing the cached data and then packaging the data;
step five: and uploading the packaged audio data to a storage module.
2. The method of claim 1, wherein the call state information comprises call state change original information, call on state, call off action.
3. The method according to claim 1, wherein the first step comprises a procedure of acquiring original information of the change of the call state, a procedure of acquiring the call connection state and a call ending action.
4. The method of claim 3, wherein obtaining the original information of the call state change is achieved by inheriting an InCallService class in an android system open source code;
the implementation manner of acquiring the call connection state and the call ending action is to register call state monitoring through a register callback in a call start callback method onCallAdded of an android system open source code, acquire the call connection state through monitoring the change of the call state acquired by an internal localState, and acquire the call ending action through an onCallRemoved.
5. The method of claim 1, wherein step two is obtained using an AudioRecord.
6. The method according to claim 1, wherein step three is specifically: the entered original PCM original audio data is converted to WAV format and then transcoded, compressed and packaged into M4P format using FFmpeg.
7. The method as claimed in claim 1, wherein in step two, it is further determined whether there is an ongoing call, if so, the three-party call shares the recording file of the existing call, otherwise, recording is started as a single call.
8. The method of claim 1, further comprising the step of recording and uploading call time information, number information.
9. A system for acquiring call recording data from an android system is characterized by comprising a client and a cloud server; the client comprises a call state acquisition module, a call recording module, a recording transcoding module and a recording uploading module;
the pass state acquisition module is used for acquiring original information of the change of the call state of the android mobile terminal, and acquiring the call connection state and the call ending action of the android mobile terminal;
the call recording module is used for automatically starting recording during call to acquire audio data;
the data buffer module is used for caching the acquired audio data;
the conversation recording transcoding module is used for converting and compressing the obtained audio data and then packaging the audio data in an M4P format;
and the recording uploading module is used for uploading the encapsulated audio data to a cloud server side.
10. The system of claim 9, wherein the call logging module further logs call time information, number information.
CN202011001985.1A 2020-09-22 2020-09-22 Method and system for acquiring call recording data from android system Pending CN112073586A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011001985.1A CN112073586A (en) 2020-09-22 2020-09-22 Method and system for acquiring call recording data from android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011001985.1A CN112073586A (en) 2020-09-22 2020-09-22 Method and system for acquiring call recording data from android system

Publications (1)

Publication Number Publication Date
CN112073586A true CN112073586A (en) 2020-12-11

Family

ID=73682239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011001985.1A Pending CN112073586A (en) 2020-09-22 2020-09-22 Method and system for acquiring call recording data from android system

Country Status (1)

Country Link
CN (1) CN112073586A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542502A (en) * 2021-06-25 2021-10-22 毕圣和 Mobile phone performance upgrading method based on voice call disturbance-free technology
CN115550507A (en) * 2022-09-30 2022-12-30 深圳市六度人和科技有限公司 Call record query method and device and terminal equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885872A (en) * 2005-06-20 2006-12-27 孙文华 Automatic recording type mobile phone capable of recording for telephone
CN103781014A (en) * 2014-02-14 2014-05-07 山东共达电声股份有限公司 Method and system for obtaining stereophonic data from Android system
CN107992282A (en) * 2017-11-29 2018-05-04 珠海市魅族科技有限公司 Audio data processing method and device, computer installation and readable storage devices
CN108052312A (en) * 2017-12-06 2018-05-18 晶晨半导体(上海)股份有限公司 A kind of method and audio system that multitrack recording is realized based on Android system
CN109378017A (en) * 2018-09-26 2019-02-22 科大讯飞股份有限公司 A kind of way of recording, device, audio system, sound pick-up outfit and storage medium
KR20200053774A (en) * 2018-11-09 2020-05-19 한밭대학교 산학협력단 Method for preventing eavesdropping for Android smartphone
CN111324576A (en) * 2018-12-14 2020-06-23 深圳市优必选科技有限公司 Recording data storage method and device, storage medium and terminal equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885872A (en) * 2005-06-20 2006-12-27 孙文华 Automatic recording type mobile phone capable of recording for telephone
CN103781014A (en) * 2014-02-14 2014-05-07 山东共达电声股份有限公司 Method and system for obtaining stereophonic data from Android system
CN107992282A (en) * 2017-11-29 2018-05-04 珠海市魅族科技有限公司 Audio data processing method and device, computer installation and readable storage devices
CN108052312A (en) * 2017-12-06 2018-05-18 晶晨半导体(上海)股份有限公司 A kind of method and audio system that multitrack recording is realized based on Android system
CN109378017A (en) * 2018-09-26 2019-02-22 科大讯飞股份有限公司 A kind of way of recording, device, audio system, sound pick-up outfit and storage medium
KR20200053774A (en) * 2018-11-09 2020-05-19 한밭대학교 산학협력단 Method for preventing eavesdropping for Android smartphone
CN111324576A (en) * 2018-12-14 2020-06-23 深圳市优必选科技有限公司 Recording data storage method and device, storage medium and terminal equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542502A (en) * 2021-06-25 2021-10-22 毕圣和 Mobile phone performance upgrading method based on voice call disturbance-free technology
CN115550507A (en) * 2022-09-30 2022-12-30 深圳市六度人和科技有限公司 Call record query method and device and terminal equipment

Similar Documents

Publication Publication Date Title
US9438852B2 (en) Video share model-based video fixing
EP3852348B1 (en) Translation method and terminal
CN112073586A (en) Method and system for acquiring call recording data from android system
CN110648665A (en) Session process recording system and method
CN102045441A (en) Data communication method and system using mobile terminal
CN109637534A (en) Voice remote control method, system, controlled device and computer readable storage medium
CN112786070B (en) Audio data processing method and device, storage medium and electronic equipment
US11302308B2 (en) Synthetic narrowband data generation for narrowband automatic speech recognition systems
CN110035167B (en) Recording method and related device
CN107959720A (en) The method and system of calling record cloud storage
TW201442484A (en) Communication device with self-on-demand module and the method of the same
CN108538313B (en) Voice quality testing method and device, calling terminal and corpus playing device
CN113192526B (en) Audio processing method and audio processing device
CN116264598A (en) Multi-screen collaborative communication method, system, terminal and storage medium
CN111556406A (en) Audio processing method, audio processing device and earphone
CN115022442B (en) Audio fault time positioning method, electronic equipment and storage medium
CN111899764B (en) Audio monitoring method and device, computer equipment and storage medium
WO2017000146A1 (en) Data transmission apparatus, router, and data transmission method
CN118018716B (en) Cross-platform building intercom audio and video test method, device and medium
KR102125447B1 (en) Data Generating Method And Apparatus for Improving Speech Recognition Performance
CN115250371B (en) Video-on-demand method, terminal and network equipment
KR100501169B1 (en) Mobile Communication Terminal for Processing Multimedia Contents and Method of Processing Multimedia Contents in The Same
JP2002199097A (en) System and method for recording call contents
CN114827112A (en) Method and system for realizing call making of cloud mobile phone
CN114827356A (en) Method and system for realizing call records of cloud mobile phone

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210830

Address after: 100000 1025, floor 1, No. 1, Kaifa Road, Shangdi Information Industry base, Haidian District, Beijing

Applicant after: Beijing tulayan Technology Co.,Ltd.

Address before: 100089 2 / F commercial-01, block C, building 3, 8 guangqumenwai street, Chaoyang District, Beijing

Applicant before: Beijing Juli Technology Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20201211

RJ01 Rejection of invention patent application after publication