CN110781014B - Recording data multi-process distribution method and system based on Android device - Google Patents

Recording data multi-process distribution method and system based on Android device Download PDF

Info

Publication number
CN110781014B
CN110781014B CN201911030758.9A CN201911030758A CN110781014B CN 110781014 B CN110781014 B CN 110781014B CN 201911030758 A CN201911030758 A CN 201911030758A CN 110781014 B CN110781014 B CN 110781014B
Authority
CN
China
Prior art keywords
application
data source
recording data
data
recording
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.)
Active
Application number
CN201911030758.9A
Other languages
Chinese (zh)
Other versions
CN110781014A (en
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.)
Sipic Technology Co Ltd
Original Assignee
Sipic 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 Sipic Technology Co Ltd filed Critical Sipic Technology Co Ltd
Priority to CN201911030758.9A priority Critical patent/CN110781014B/en
Publication of CN110781014A publication Critical patent/CN110781014A/en
Application granted granted Critical
Publication of CN110781014B publication Critical patent/CN110781014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Abstract

The invention discloses a multiprocess distribution method based on recording data of Android equipment, which comprises the following steps: before the current application end obtains the recording data, determining a data source based on the response condition of a specified communication message sent by the current application end, wherein the data source is an Android system or other application ends serving as a server end; and the current application end acquires the recording data according to the determined data source. The method and the system can improve the distribution efficiency of the recording data between applications and among processes, reduce the packaging difficulty of the upper layer of the application, save the equipment performance and the memory occupancy rate and meet various service requirements.

Description

Recording data multi-process distribution method and system based on Android device
Technical Field
The invention relates to the technical field of data distribution, in particular to a method and a system for multi-process distribution of recording data based on Android equipment.
Background
Due to strict management of Google (Google) corporation on recording permission, an Android system (Android system) defaults to a single recording form, and does not support simultaneous acquisition of recording data by multiple applications and multiple processes, but a vehicle-mounted service has a requirement of sharing the recording data among the multiple applications or the multiple processes.
At present, the mainstream mobile phone Android operating system takes a millet mobile phone (MIUI) and an EMUI mobile phone (EMUI) as examples, and records data are shared among multiple applications or multiple processes by rewriting Android underlying recording source codes and managing through recording priorities. But the requirement on the bottom layer modifier is high, and other problems are easy to occur due to the need of relating to the Android bottom layer related source codes. Furthermore, since the modification scheme is not generic, but needs to be adapted for different codecs, it is also easy to create compatibility problems, and partial source code adjustments still need to be made at different devices. However, the current vehicle-mounted systems are not relatively compatible, most of the systems are divided into time slices, and only one process is allowed to record in the same time slice, and recording data cannot be shared among multiple applications or multiple processes. Therefore, the problem of sharing the recording data among multiple applications or multiple processes of the vehicle-mounted system is an urgent need in the industry.
Disclosure of Invention
One of the objectives of the present invention is to provide a solution for an application layer, so as to solve the defect that the recording data of the android system cannot be distributed to multiple applications or processes simultaneously from the application layer, and achieve the effect of avoiding modifying the underlying code.
Another objective of the present invention is to provide a transmission policy selection scheme, which is implemented by determining the current device operating mode and communication relationship, and intelligently selecting a specific transmission mode, so that only recording parameters are transmitted in the application layer, and corresponding recording data can be obtained, thereby avoiding a complex implementation mode of multi-process recording, significantly improving the distribution efficiency of inter-application and inter-process recording data, reducing the encapsulation difficulty of the upper layer of the application, saving device performance and memory occupancy rate, and meeting various service requirements.
Therefore, according to one aspect of the invention, a multiprocess distribution method based on recording data of Android equipment is provided, which comprises the following steps: before the current application terminal obtains the recording data, determining a data source based on the response condition of a designated communication message sent by the current application terminal, wherein the data source is an Android system or other application terminals serving as a server terminal; and the current application end acquires the recording data according to the determined data source. Firstly, a data source of the recording data is released from dependence on an Android system, so that an application end can also be used as the data source, and the problem of distribution of the recording data among multiple processes and multiple applications can be solved from an application layer. Then, the inventor also conceives that the data source is determined by the application terminal in a message interactive response mode before the recording data is obtained, so that the current application terminal can obtain the recording data from the system and other application terminals serving as the server terminal, thereby realizing the distribution of the recording data of the application layer, avoiding various defects of realizing the distribution of the recording data among multiple applications and multiple processes by modifying bottom codes, avoiding excessive operation on the application layer and avoiding the complex realization of the multi-process recording.
In some embodiments, the determining of the data source based on the response of the specified communication message sent by the current application before the recorded sound data is obtained by the current application comprises
The current application terminal is configured to respond to the starting instruction, acquire all application terminals on the Android equipment and send specified communication messages to all the application terminals;
the current application terminal determines a data source based on the received response message to the specified communication message, and the data source is realized as follows: and when the response message is received, determining the sender of the response message as a data source, or when no response message is received, taking the Android system as the data source, setting the Android system as a server and configuring the Android system as a server to return the response message when specified communication messages of other application terminals serving as clients are received. When a current application end needing to use the recording data is started, communication message interaction is carried out on all the application ends to determine whether the known application uses the recording data, when the existing application end is determined to use the recording data, the application end is used as a server end providing a data source according to response information to obtain the recording data from the server end, and when only the recording data is determined to be used by the application end, a mode of obtaining the recording data from an android system is adopted, the recording data is effectively shared among multiple processes and multiple applications, the whole implementation process does not make framework change on a system bottom layer, and the implementation mode is simple.
In some embodiments, when the current application terminal acquires the recording data according to the determined data source and the data source is an Android system, the recording data is directly acquired from the Android system; and when the data source is other application terminals serving as the server terminal, creating a transmission channel according to the instance information of the other application terminals, and acquiring the recording data through the created transmission channel. For the condition that the data source is an Android system, the recording data are directly obtained in an original mode, and for the condition that the data source is other application ends, the data can be directly transmitted through the created transmission channel, so that the distribution efficiency of the recording data between applications and processes is remarkably improved, and the application upper layer packaging difficulty is reduced. And the data source can be determined based on the instance information of other application terminals, namely the working mode and communication relation of the current equipment, and a specific transmission mode can be intelligently selected, so that all recording modes can be effectively compatible and the transmission efficiency can be improved.
In some embodiments, the instance information includes an application name, an application ID, a process number of the application end, a packet name of the application end and an application end communication port, and creating the transmission channel according to the instance information of the other application ends includes determining a selected transmission mode according to the process number of the application end or the application end communication port; and establishing communication connection with the application end communication port through the instance information according to the selected transmission mode. The specific information of the current transmission object can be positioned according to the specific content of the example information, so that a proper transmission strategy can be determined, namely a proper transmission mode is selected, and the transmission of the recorded data is directly carried out through the set transmission channel and the set transmission mode, so that the transmission mode can be selected intelligently, the distribution transmission efficiency is improved, and the compatibility is improved.
In some embodiments, the determination of the selected transmission mode according to the process number of the application end or the communication port of the application end is realized by judging according to the process number of the application end, when other application ends and the application end are judged to be in the same process, AIDL is selected as the transmission mode, otherwise, socket is selected as the transmission mode; or judging according to the communication port of the application end, when judging that other application ends and the application end are positioned in the same network segment, selecting AIDL as a transmission mode, and otherwise selecting Socket as the transmission mode. Therefore, by adopting the mode of combining AIDL and Socket in the transmission layer, the working mode and the communication relation of the current equipment can be judged, the specific transmission mode is intelligently selected, and the complex realization of multi-process recording is avoided. For data interaction between the same processes, real-time synchronous transmission of the recorded data can be realized only by using one transmission medium, and for data interaction between different processes or different devices, AIDL is selected as an internal transmission mode, and Socket is selected as a transmission mode between the processes or the devices, so that the application upper-layer encapsulation difficulty can be effectively reduced, and the distribution efficiency is improved.
In some embodiments, the current application further performs the following processing before determining the data source: in response to a starting instruction, before all application terminals on the Android device are acquired, an Android recording interface is started to initialize recording configuration; when the recording data is obtained according to the determined data source, the current application end also transmits the configured initialization information to the data source so as to obtain the recording data. Therefore, the application end only needs to set the required recording parameters according to the requirements, the required recording data can be obtained by introducing the recording parameters, and the complex realization of multi-process recording can be effectively avoided.
According to another aspect of the invention, a multi-process distribution system of recording data based on an Android device is provided, which comprises: the data source determining module is used for determining a data source based on the response condition of a specified communication message sent by the recording data before the recording data is obtained, wherein the data source is an Android system or other application terminals serving as a server terminal; and the data acquisition module is used for acquiring the recording data according to the determined data source. Therefore, the data source type can be accurately positioned through the data source determining module to determine that the recording data is acquired from the Android system or other application terminals serving as the server side, and then the recording data is acquired from the corresponding data source based on the data acquiring module, so that the problems that the recording data is easily generated when all applications or processes can simultaneously acquire the recording data from the system by modifying the bottom layer codes of the system are avoided, the recording data sharing among multiple applications and multiple processes can be realized only by performing simple operation from the application layer, and the complicated realization of multi-process recording is avoided because excessive operation is not required at the application layer.
In some embodiments, the data source determination module comprises: the message distribution unit is used for acquiring all application terminals on the Android equipment and sending specified communication messages to all the application terminals; the response processing unit is used for determining a sender of the response message as a data source when the response message is received, or taking the Android system as the data source when no response message is received; and the server side configuration unit is used for setting the current application side as the server side and configuring to return a response message when receiving the specified communication message when the determined data source is the Android system. The data source is determined by the message distribution unit and the message response unit, the transmission object can be further refined, so that the recording data can be directly acquired at the application layer, the application end which uses the recording data of the system for the first time is configured into the server end which distributes the subsequent recording data by the server end configuration unit, and other application ends can also be used as the data source, so that the aim of distributing the recording data among multiple processes and multiple applications at the application layer is fulfilled, excessive operation is not needed by the method, and the complex realization of multi-process recording is avoided.
In some embodiments, the data acquisition module comprises: the first obtaining unit is used for directly obtaining the recording data from the Android system when the determined data source is the Android system; and the second acquisition unit is used for creating a transmission channel according to the instance information of other application terminals when the determined data source is other application terminals serving as the server terminal, and acquiring the recording data through the created transmission channel. Therefore, specific transmission modes can be intelligently selected according to the states of the application layer and the equipment, and data can be directly transmitted through the established proper transmission channel, so that the distribution efficiency of the recording data between applications and processes is remarkably improved, and the packaging difficulty of the upper layer of the application is reduced.
According to another aspect of the present invention, there is provided an electronic apparatus including: the computer-readable medium includes at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the above-described method.
According to another aspect of the invention, a storage medium is provided, on which a computer program is stored, characterized in that the program realizes the steps of the above-mentioned method when executed by a processor.
Drawings
Fig. 1 is a flowchart of a recording data multi-process distribution method based on an Android device according to an embodiment of the present invention;
fig. 2 is a block diagram of a multi-process distribution system for recording data based on an Android device according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
As used in this application, the terms "module," "apparatus," "system," and the like are intended to refer to a computer-related entity, either hardware, a combination of hardware and software, or software in execution. In particular, for example, an element may be, but is not limited to being, a process running on a processor, an object, an executable, a thread of execution, a program, and/or a computer. Also, an application or script running on a server, or a server, may be an element. One or more elements may be in a process and/or thread of execution and an element may be localized on one computer and/or distributed between two or more computers and may be operated by various computer-readable media. The elements may also communicate by way of local and/or remote processes based on a signal having one or more data packets, e.g., from a data packet interacting with another element in a local system, distributed system, and/or across a network in the internet with other systems by way of the signal.
Finally, it should also be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising 8230; \8230;" comprises 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The method for multi-process distribution of the recording data based on the Android device can be applied to terminal devices which need to perform multi-process and share the recording data among multiple applications, such as a car machine, a computer, a smart phone, a tablet computer, a smart home and other terminal devices which have recording functions and voice interaction requirements, and the method is not limited to this. The scheme of the invention can realize the sharing of the recording data in the application layer, so the bottom layer code does not need to be modified, and the sharing of the recording data among multiple applications and multiple processes can be quickly, simply and efficiently realized on the equipment applying the Andriod system.
Fig. 1 schematically shows a flowchart of a recording data multi-process distribution method based on an Android device according to an embodiment of the present invention, and as shown in fig. 1, this embodiment includes the following steps:
step S101: and the application terminal determines the data source before acquiring the recording data. The data source in this embodiment is an Android system or another application terminal serving as a server terminal. Taking an Android vehicle-mounted system as an example, in practical application, a situation that a plurality of applications or different processes need to use recording data at the same time may exist, for example, when a bluetooth call is made, a user may want to start voice navigation at the same time, and at this time, a situation that different applications need to use recording data at the same time is generated; for another example, in a vehicle-mounted system loaded with a voice assistant, there may be a situation where the recognition module and the wake-up module need to obtain the recorded data at the same time, and in a general situation, the recognition module and the wake-up module are independent and parallel, and at this time, a situation where the recorded data needs to be used at the same time between different processes occurs. In the embodiment of the present invention, the current application end is, for example, an identification module, a wake-up module, a bluetooth application, a navigation application, or a music application, which is currently started and needs to use the recorded data. When a user starts a current application end, according to the technical implementation of the embodiment of the invention, the current application end firstly acquires all application ends on the Android device and sends specified communication messages to all the application ends to determine data sources, and then the current application end determines the data sources based on the received response messages to the specified communication messages. The sent specified communication message is a broadcast message encapsulated according to a custom protocol and used for determining whether other application terminals are already using the recorded data, when the other application terminals receive the message, the specified communication message is parsed according to the custom protocol, and a response is made according to the self condition, specifically, if the other application terminals are already using the recorded data and are configured as a service terminal, the other application terminals serving as the service terminal respond to the specified communication message, namely, feedback response messages, according to the custom protocol. In this way, the current application terminal may determine the data source according to the response to the specified communication message received by the current application terminal, specifically, when receiving the response message, the current application terminal determines the sender of the response message as the data source, and if not receiving any response message, the current application terminal uses the Android system as the data source. Preferably, when the determined data source is the Android system, the current application end sets itself as the server end, and configures the application end to return a response message when receiving the specified communication message, so that if one application end is an application using the recording data for the first time, the application end is used as a data source for distributing the recording data, so that other applications can not obtain the recording data from the system any more, but can obtain the recording data from the application end, and thus, the recording data distribution and sharing of the application layer are realized. The specific implementation manner of setting the self as the server is to create the server first, then set the communication port, issue server information to the outside (other applications), and store the communication port information, illustratively, the server can be created on the self through aid id l, and the server information is distributed and stored, so that other applications can access and acquire data as clients.
Step S102: and the application end acquires the recording data according to the determined data source. After the data source is determined, when the data source is an Android system, the recording data is directly obtained from the Android system, and the obtaining mode is realized by directly obtaining the recording data from a recording inlet of the Android system, and the recording data can be obtained by adopting an original recording data obtaining mode. And when the data source is other application terminals serving as the server terminal, creating a transmission channel according to the instance information of the other application terminals, and acquiring the recording data through the created transmission channel. In a specific implementation, when a current application end sends a specified communication message, other application ends making a response can obtain the self-instance information through the corresponding interfaces of the Android system and package the self-instance information into a response message according to a custom protocol so as to send the response message to the current application end making a request, so that the current application end can create a transmission channel according to the instance information of the other application ends, specifically, the transmission channel can be implemented by determining a selected transmission mode according to the process number of the application end or the communication port of the application end, exemplarily, the judgment can be carried out according to the process number of the application end, when the other application ends and the application end are judged to be in the same process, AIDL is selected as the transmission mode, otherwise, socket is selected as the transmission mode; or judging according to the communication port of the application end, when judging that other application ends and the application end are positioned in the same network segment, selecting AIDL as a transmission mode, and otherwise, selecting Socket as the transmission mode. And establishing communication connection with the application end communication port through the instance information according to the selected transmission mode. Through the combination of the socket and the AIDL, the distribution efficiency of the recording data between applications and processes is obviously improved, and the difficulty in upper-layer packaging of the applications is reduced.
For example, in a voice application of a vehicle system, the recognition module (ASR) and the wake up module (WAKEUP) are generally independent and parallel. After the method based on the embodiment is adopted, when the identification module is taken as a main process, the main process defaults to start recording, sets the main process as a server and prepares to distribute data outwards, at the moment, if the process of the wake-up module is started, the existing main process data, namely the recorded data used by the identification module, is detected by sending a specified communication message and acquiring a response message, then the recorded data can be acquired only through a distribution channel, namely the establishment transmission mode, and the strategies such as data congestion and data caching do not need to be additionally processed, so that the code reusability is improved, and the coupling relation between modules is reduced.
Taking the bluetooth application of the vehicle-mounted system as an example, when a bluetooth call is made, a common method is to stop other recordings and use the bluetooth application exclusively, but at this time, if there is a vehicle-mounted navigation request, and the user is handling the driving scene, it is not convenient to operate with hands. After the method is based on the embodiment, after a Bluetooth call is received, the communication is carried out with all applications on the vehicle owner device to determine a data source, if no other application end uses recording data, the Bluetooth call acquires the recording data from the vehicle-mounted system, meanwhile, the application of the Bluetooth call is set as a server, at this time, if a vehicle-mounted navigation request is started, the application end of the Bluetooth call is determined to be the data source by sending a specified communication message and an acquisition response message, so that the communication is established with the application end, when the communication is established, a data channel is confirmed to be a cross-process through instance information in the response message, the recording data is acquired in a corresponding transmission mode, exclusive processing is not needed, and cross-process sharing of the recording data is achieved.
In a preferred embodiment, the current application further performs the following processing before determining the data source: firstly, responding to a starting instruction of the whole distribution method, starting an Andriod recording interface, and initializing recording configuration, wherein the initialization comprises setting parameters such as recording sampling rate, bit data, buffer area preparation and the like. When the recording data are obtained according to the determined data source, the current application end also transmits the configured initialization information to the data source so as to obtain the recording data. Therefore, the current application end can acquire the required recording data from other application ends or systems only by setting the required recording parameters without performing other processing, and the complex realization of multi-process recording data distribution is avoided.
According to the method provided by the embodiment, the recording data can be intelligently selected to be shared and distributed in a specific transmission mode under the condition of multi-process operation, excessive operation is not required to be performed in an application layer, and the complex realization of multi-process recording is avoided.
Fig. 2 schematically shows a block diagram of a multi-process distribution system based on recording data of an Android device according to an embodiment of the present invention,
the multiprocess distribution system based on the recording data of the Android equipment comprises: the data source determining module 1 is used for determining a data source based on a response condition of a specified communication message sent by the recording data before the recording data is obtained, wherein the data source is an Android system or other application terminals serving as a server terminal; the data obtaining module 2 is configured to obtain the recorded data according to the determined data source, where the sent specified communication message is a broadcast message encapsulated according to a custom protocol for determining whether other applications are already using the recorded data, and when the other applications receive the message, the specified communication message is parsed according to the custom protocol, and a response is made according to the situation of the other applications, specifically, if the other applications are already using the recorded data and are configured as a server, the other applications as the server respond to the specified communication message, that is, feed back a response message, according to the custom protocol. In this way, the current application terminal may determine the data source according to the response to the specified communication message received by the current application terminal, specifically, when receiving the response message, the current application terminal determines the sender of the response message as the data source, and if not receiving any response message, the current application terminal uses the Android system as the data source.
Wherein, the data source determining module 1 comprises: the Android device comprises a message distribution unit 101, a response processing unit 102 and a server configuration unit 103, wherein the message distribution unit 101 is used for acquiring all application terminals on the Android device and sending specified communication messages to all the application terminals; the response processing unit 102 is configured to determine a sender of the response message as a data source when the response message is received, or use the Android system as a data source when no response message is received. The server configuration unit 103 is configured to set the current application end as the server itself and configure to return a response message when receiving the specified communication message when the determined data source is the Android system. The specific implementation manner may refer to the description of the above method part, and is not described herein again.
Specifically, as a preferred embodiment, the data acquisition module 2 includes a first acquisition unit 201 and a second acquisition unit 202: the first obtaining unit 201 is configured to, when the determined data source is the Android system, directly obtain the recording data from the Android system; the second obtaining unit 202 is configured to, when the determined data source is another application serving as a server, create a transmission channel according to instance information of the other application, and obtain the sound recording data through the created transmission channel. The method comprises the steps that instance information comprises an application name, an application ID, a process number of an application end, a packet name of the application end and a communication port of the application end, a transmission channel is created according to the instance information of other application ends, the fact that a selected transmission mode is determined according to the process number of the application end or the communication port of the application end is achieved, namely judgment is carried out according to the process number of the application end, when the other application ends and the application end are judged to be located in the same process, AIDL is selected as the transmission mode, and otherwise, socket is selected as the transmission mode; or judging according to the communication port of the application end, when judging that other application ends and the application end are positioned in the same network segment, selecting AIDL as a transmission mode, and otherwise selecting Socket as the transmission mode. And establishing communication connection with the communication port of the application end through the instance information according to the selected transmission mode. For further concrete implementation, reference may be made to the above method portion, which is not described herein again. Through the combination of the socket and the AIDL, the distribution efficiency of the recording data between the applications and the processes is obviously improved, and the difficulty of upper-layer packaging of the applications is reduced.
In a preferred embodiment, the system further includes an initialization module (not shown in the figure), configured to perform initialization processing before the application determines the data source, and specifically implemented as: firstly, responding to a starting instruction of the whole distribution method, starting an Andriod recording interface, and initializing recording configuration, wherein the initialization comprises setting parameters such as recording sampling rate, bit data, buffer area preparation and the like. When the recording data is obtained according to the determined data source, the current application end also transmits the configured initialization information to the data source so as to obtain the recording data. Therefore, recording data meeting expectations can be acquired according to requirements, excessive processing is not needed by an application layer, and the method is simple to implement.
According to the multiprocess distribution system based on the Android device recording data, the recording data can be intelligently distributed and shared by selecting a specific transmission mode under the condition of multiprocess, excessive operation is not required at an application layer, and the complex realization of multiprocess recording is avoided.
In some embodiments, the present invention provides a non-transitory computer-readable storage medium, where one or more programs including execution instructions are stored, where the execution instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to perform the above method for multi-process distribution of recording data based on an Android device.
In some embodiments, the present invention further provides a computer program product, where the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions, which, when executed by a computer, cause the computer to execute the above method for multi-process distribution of recording data based on an Android device.
In some embodiments, an embodiment of the present invention further provides an electronic device, which includes: at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method for multi-process distribution of the recording data based on the Android device.
In some embodiments, the present invention further provides a storage medium, on which a computer program is stored, where the computer program is capable of executing the method for multi-process distribution of recording data based on an Android device when executed by a processor.
The device for multi-process distribution of recording data based on Android equipment in the embodiment of the invention can be used for executing the method for multi-process distribution of recording data based on Android equipment in the embodiment of the invention, and accordingly achieves the technical effect achieved by the method for multi-process distribution of recording data based on Android equipment in the embodiment of the invention, and the details are not repeated here. In the embodiment of the present invention, the relevant functional module may be implemented by a hardware processor (hardware processor).
Fig. 3 is a schematic hardware structure diagram of an electronic device for executing a method for multi-process distribution of recording data based on an Android device according to another embodiment of the present application, and as shown in fig. 3, the electronic device includes:
one or more processors 510 and memory 520, with one processor 510 being an example in fig. 3.
The device for executing the method for multi-process distribution of the recording data based on the Android device may further include: an input device 530 and an output device 540.
The processor 510, the memory 520, the input device 530, and the output device 540 may be connected by a bus or other means, such as the bus connection in fig. 3.
The memory 520 is used as a non-volatile computer-readable storage medium, and may be used to store a non-volatile software program, a non-volatile computer-executable program, and modules, such as program instructions/modules corresponding to the method for multi-process distribution of recording data based on Android devices in this embodiment of the present application. The processor 510 executes various functional applications and data processing of the server by running the nonvolatile software program, instructions and modules stored in the memory 520, that is, implements the method for multi-process distribution of recording data based on an Android device in the foregoing method embodiment.
The memory 520 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a device for multi-process distribution of recording data based on an Android device, and the like. Further, the memory 520 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 520 may optionally include memory remotely located from the processor 510, and these remote memories may be connected via a network to a means for multi-process distribution of Android device based recording data. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may receive input numeric or character information and generate signals related to user settings and function control of the device based on multi-process distribution of recording data of the Android device. The output device 540 may include a display device such as a display screen.
The one or more modules are stored in the memory 520, and when executed by the one or more processors 510, perform a method for multi-process distribution of recording data based on an Android device in any method embodiment.
The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of the present application.
The electronic device of the embodiments of the present application exists in various forms, including but not limited to:
(1) Mobile communication devices, which are characterized by mobile communication functions and are primarily targeted at providing voice and data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) The ultra-mobile personal computer equipment belongs to the category of personal computers, has the functions of calculation and processing, and generally has the mobile internet access characteristic. Such terminals include PDA, MID, and UMPC devices, such as ipads.
(3) Portable entertainment devices such devices may display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.
(4) The server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic devices with data interaction functions.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions substantially or contributing to the related art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (7)

1. The recording data multi-process distribution method based on the Android device is characterized by comprising the following steps:
before the current application terminal acquires the recording data, determining a data source based on a response condition of a specified communication message sent by the current application terminal, wherein the data source is an Android system or other application terminals serving as a server terminal, and the method comprises the following steps:
the current application terminal is configured to respond to a starting instruction, acquire all application terminals on the Android device and send specified communication messages to all the application terminals, wherein the sent specified communication messages are broadcast messages which are packaged according to a custom protocol and used for determining whether other application terminals use recording data, and when the other application terminals receive the messages, the specified communication messages are analyzed according to the custom protocol and respond according to self conditions;
the current application end determines a data source based on the received response message to the specified communication message, and the data source is realized by the following steps: when the response message is received, determining a sender of the response message as a data source, or when no response message is received, taking the Android system as the data source, setting the Android system as a server and configuring the Android system to return the response message when receiving specified communication messages of other application terminals serving as clients;
the current application end obtains the recording data according to the determined data source;
the current application end acquires the recording data according to the determined data source
When the data source is an Android system, recording data are directly obtained from the Android system;
and when the data source is other application terminals serving as the server terminal, creating a transmission channel according to the instance information of the other application terminals, and acquiring the recording data through the created transmission channel.
2. The method of claim 1, wherein the instance information comprises an application name, an application ID, a process number of the application, a packet name of the application, and an application communication port,
the step of creating the transmission channel according to the instance information of other application terminals comprises
Determining a selected transmission mode according to the process number of the application terminal or the communication port of the application terminal;
and establishing communication connection with the application end communication port through the instance information according to the selected transmission mode.
3. The method according to claim 2, wherein the determining of the selected transmission mode according to the process number of the application terminal or the communication port of the application terminal is implemented as
Judging according to the process number of the application end, when judging that other application ends and the application end are in the same process, selecting AIDL as a transmission mode, and otherwise selecting Socket as the transmission mode; or
And judging according to the communication port of the application end, selecting AIDL as a transmission mode when judging that other application ends and the application end are positioned in the same network segment, and otherwise selecting Socket as the transmission mode.
4. The method according to any one of claims 1 to 3, wherein the current application further performs the following processing before determining the data source:
in response to a starting instruction, before all application terminals on the Android device are acquired, an Android recording interface is started to initialize recording configuration;
and when the recording data is acquired according to the determined data source, the current application end also transmits the configured initialization information to the data source so as to acquire the recording data.
5. Multi-process distribution system of recording data based on Android equipment, its characterized in that includes:
the data source determining module is used for determining a data source based on the response condition of a specified communication message sent by the recording data before the recording data is obtained, wherein the data source is an Android system or other application terminals serving as a server terminal; and
the data acquisition module is used for acquiring the recording data according to the determined data source;
the data source determination module comprises:
the message distribution unit is used for acquiring all application terminals on the Android device and sending specified communication messages to all the application terminals, wherein the sent specified communication messages are broadcast messages which are packaged according to a custom protocol and used for determining whether other application terminals use the recording data, and when the other application terminals receive the messages, the specified communication messages are analyzed according to the custom protocol and respond according to self conditions;
the response processing unit is used for determining a sender of the response message as a data source when the response message is received, or taking the Android system as the data source when no response message is received; and
the server configuration unit is used for setting the current application end as the server and configuring the current application end to return a response message when receiving the specified communication message when the determined data source is the Android system;
the data acquisition module comprises:
the first obtaining unit is used for directly obtaining the recording data from the Android system when the determined data source is the Android system; and
and the second acquisition unit is used for creating a transmission channel according to the example information of other application terminals when the determined data source is other application terminals serving as the server terminal, and acquiring the sound recording data through the created transmission channel.
6. An electronic device, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method of any one of claims 1-4.
7. Storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN201911030758.9A 2019-10-28 2019-10-28 Recording data multi-process distribution method and system based on Android device Active CN110781014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911030758.9A CN110781014B (en) 2019-10-28 2019-10-28 Recording data multi-process distribution method and system based on Android device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911030758.9A CN110781014B (en) 2019-10-28 2019-10-28 Recording data multi-process distribution method and system based on Android device

Publications (2)

Publication Number Publication Date
CN110781014A CN110781014A (en) 2020-02-11
CN110781014B true CN110781014B (en) 2022-11-01

Family

ID=69386985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911030758.9A Active CN110781014B (en) 2019-10-28 2019-10-28 Recording data multi-process distribution method and system based on Android device

Country Status (1)

Country Link
CN (1) CN110781014B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114245060B (en) * 2022-02-28 2022-07-05 荣耀终端有限公司 Path processing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209392A (en) * 2012-01-16 2013-07-17 腾讯科技(深圳)有限公司 Cross-process and multi-application massage pushing method and device
CN106648921A (en) * 2016-09-30 2017-05-10 北京奇虎科技有限公司 Method for achieving recording data share in Android system and electronic device
CN106897146A (en) * 2017-02-09 2017-06-27 青岛海信移动通信技术股份有限公司 The data processing method and the terminal with microphone of a kind of microphone of terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130205284A1 (en) * 2012-02-02 2013-08-08 Dhruva Chakrabarti Ownership acquire policy selection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209392A (en) * 2012-01-16 2013-07-17 腾讯科技(深圳)有限公司 Cross-process and multi-application massage pushing method and device
CN106648921A (en) * 2016-09-30 2017-05-10 北京奇虎科技有限公司 Method for achieving recording data share in Android system and electronic device
CN106897146A (en) * 2017-02-09 2017-06-27 青岛海信移动通信技术股份有限公司 The data processing method and the terminal with microphone of a kind of microphone of terminal

Also Published As

Publication number Publication date
CN110781014A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
CN108536461B (en) Resource updating method, device, terminal and storage medium
CN109542614B (en) Resource allocation method, device, terminal and storage medium
US10698736B2 (en) Method for resource allocation and terminal device
AU2019256257B2 (en) Processor core scheduling method and apparatus, terminal, and storage medium
US20170163478A1 (en) Method,electronic device and system for updating client configuration in key-value pair database
CN110673964A (en) Audio playing control method and device of vehicle-mounted system
CN110955499B (en) Processor core configuration method, device, terminal and storage medium
CN110781014B (en) Recording data multi-process distribution method and system based on Android device
CN112468574B (en) Processing method, device and system for application service publishing and subscribing mechanism
CN112689012A (en) Cross-network proxy communication method and device
CN109981778B (en) Method, device, equipment and storage medium for realizing service of content distribution network
CN107395493B (en) Method and device for sharing message based on intention
CN112367362B (en) Data processing method, device, equipment and computer storage medium
CN115623057A (en) RDMA (remote direct memory Access) -based connection establishing method, device, equipment and storage medium
CN115269063A (en) Process creation method, system, device and medium
CN111767558B (en) Data access monitoring method, device and system
CN114584615A (en) Cloud service collaborative interaction method, device and equipment
CA2802396A1 (en) Systems and methods for managing emulation sessions
CN112423068A (en) Smart television debugging method and device, mobile terminal and readable storage medium
KR100593843B1 (en) An application program management system for a mobile telecommunication terminal
CN112000496B (en) Access method and device of third-party information source API and implementation method thereof
CN109976876B (en) Accelerator management method and device
CN117706968A (en) Device control method, storage medium, and electronic device
CN116737404A (en) Method and terminal device for application connection
CN104519593A (en) Method and equipment for wireless remote control

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
CB02 Change of applicant information

Address after: 215123 building 14, Tengfei Innovation Park, 388 Xinping street, Suzhou Industrial Park, Suzhou City, Jiangsu Province

Applicant after: Sipic Technology Co.,Ltd.

Address before: 215123 building 14, Tengfei Innovation Park, 388 Xinping street, Suzhou Industrial Park, Suzhou City, Jiangsu Province

Applicant before: AI SPEECH Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant