[go: up one dir, main page]

CN107015874B - Data transmission control method, device and terminal - Google Patents

Data transmission control method, device and terminal Download PDF

Info

Publication number
CN107015874B
CN107015874B CN201710209386.0A CN201710209386A CN107015874B CN 107015874 B CN107015874 B CN 107015874B CN 201710209386 A CN201710209386 A CN 201710209386A CN 107015874 B CN107015874 B CN 107015874B
Authority
CN
China
Prior art keywords
data transmission
terminal
application
data
running time
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
CN201710209386.0A
Other languages
Chinese (zh)
Other versions
CN107015874A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710209386.0A priority Critical patent/CN107015874B/en
Publication of CN107015874A publication Critical patent/CN107015874A/en
Application granted granted Critical
Publication of CN107015874B publication Critical patent/CN107015874B/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/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a data transmission control method, a data transmission control device and a terminal. The data transmission control method comprises the following steps: when data transmission is carried out between a terminal application and an audio playing device, if an instruction for indicating the application to carry out version updating is received, a first process is established; determining a second process corresponding to the application, and acquiring running time data of the second process; transmitting the running time data of the second process to the first process through interprocess communication; and establishing data transmission connection between the terminal and the audio playing equipment based on the first process for acquiring the data of the running time of the second process so as to respond to the data transmission request of the audio playing equipment. The embodiment of the invention can improve the flexibility of data transmission between the terminal and the audio playing equipment and improve the playing effect.

Description

数据传输控制方法、装置及终端Data transmission control method, device and terminal

技术领域technical field

本发明属于通信技术领域,尤其涉及一种数据传输控制方法、装置及终端。The present invention belongs to the field of communication technologies, and in particular relates to a data transmission control method, device and terminal.

背景技术Background technique

目前,智能无线音频播放设备(以下简称音频播放设备)正变得越来越普及。音频播放设备可以和移动终端(如手机等)组成一个智能播放系统,以满足用户娱乐、生活需要。At present, smart wireless audio playback devices (hereinafter referred to as audio playback devices) are becoming more and more popular. The audio playback device can form an intelligent playback system with a mobile terminal (such as a mobile phone, etc.) to meet the entertainment and life needs of users.

在移动终端通过专属终端应用,与音频播放设备进行数据传输时,若该专属应用需要进行版本更新,则移动终端会暂时中断与音频播放设备间的数据传输,这将导致音频播放设备无法继续从移动终端处获取数据,也即移动终端与音频播放设备之间的数据传输的灵活性较差,影响播放效果。When the mobile terminal performs data transmission with the audio playback device through the dedicated terminal application, if the dedicated application needs to be updated, the mobile terminal will temporarily interrupt the data transmission with the audio playback device, which will cause the audio playback device to be unable to continue to play from the audio playback device. The data acquired at the mobile terminal, that is, the flexibility of data transmission between the mobile terminal and the audio playback device, is poor, which affects the playback effect.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种数据传输控制方法、装置及终端,可以提高终端与音频播放设备之间的数据传输的灵活性,提升播放效果。Embodiments of the present invention provide a data transmission control method, device, and terminal, which can improve the flexibility of data transmission between the terminal and an audio playback device, and improve the playback effect.

本发明实施例提供一种数据传输控制方法,包括:An embodiment of the present invention provides a data transmission control method, including:

当通过终端应用与音频播放设备进行数据传输时,若接收到用于指示所述应用进行版本更新的指令,则创建第一进程;When performing data transmission with the audio playback device through the terminal application, if an instruction for instructing the application to perform version update is received, a first process is created;

确定与所述应用对应的第二进程,并获取所述第二进程的运行时刻数据;determining a second process corresponding to the application, and acquiring runtime data of the second process;

通过进程间通信,将所述第二进程的运行时刻数据传输至所述第一进程;transmitting the runtime data of the second process to the first process through inter-process communication;

基于获取到所述第二进程运行时刻数据的第一进程,建立终端与所述音频播放设备的数据传输连接,以响应所述音频播放设备的数据传输请求。Based on the first process that obtains the running time data of the second process, a data transmission connection between the terminal and the audio playback device is established to respond to a data transmission request from the audio playback device.

本发明实施例提供一种数据传输控制装置,包括:An embodiment of the present invention provides a data transmission control device, including:

创建模块,用于当通过终端应用与音频播放设备进行数据传输时,若接收到用于指示所述应用进行版本更新的指令,则创建第一进程;The creation module is used to create a first process if an instruction for instructing the application to perform version update is received when data transmission is performed with the audio playback device through the terminal application;

获取模块,用于确定与所述应用对应的第二进程,并获取所述第二进程的运行时刻数据;an acquisition module, configured to determine a second process corresponding to the application, and acquire runtime data of the second process;

传输模块,用于通过进程间通信,将所述第二进程的运行时刻数据传输至所述第一进程;a transmission module, configured to transmit the runtime data of the second process to the first process through inter-process communication;

响应模块,用于基于获取到所述第二进程运行时刻数据的第一进程,建立终端与所述音频播放设备的数据传输连接,以响应所述音频播放设备的数据传输请求。The response module is configured to establish a data transmission connection between the terminal and the audio playback device based on the first process that obtains the running time data of the second process, so as to respond to the data transmission request of the audio playback device.

本发明实施例还提供一种终端,所述终端包括存储器,处理器,以及存储在所述存储器中并可在所述处理器中运行的计算机程序,所述处理器执行所述计算机程序时实现本发明实施例提供的数据传输控制方法中的步骤。An embodiment of the present invention further provides a terminal, where the terminal includes a memory, a processor, and a computer program stored in the memory and executable in the processor, and the processor implements the computer program when the processor executes the computer program. The steps in the data transmission control method provided by the embodiment of the present invention.

本发明实施例提供的数据传输控制方法、装置及终端,在终端通过应用与音频播放设备进行数据传输时,如果接收到用于指示该应用进行版本更新的指令,那么终端可以先创建第一进程。然后,终端可以确定出与该应用对应的第二进程,并获取该第二进程的运行时刻数据。之后,终端可以通过进程间通信,将获取到的第二进程的运行时刻数据传输给第一进程。此后,终端可以基于已经获取到第二进程运行时刻数据的第一进程,建立终端与音频播放设备之间的数据传输连接,以响应音频播放设备的数据传输请求。本发明实施例可以在正用于终端与音频播放设备之间进行数据传输的应用需要进行版本更新时,由终端创建一个新进程来接管该应用对应的进程,以响应音频播放设备的数据传输请求,从而避免在进行版本更新时因该终端应用无法响应音频播放设备的数据传输请求而导致的数据传输中断,即本发明可以提高终端与音频播放设备之间的数据传输的灵活性,提升播放效果。In the data transmission control method, device, and terminal provided by the embodiments of the present invention, when the terminal performs data transmission with an audio playback device through an application, if an instruction for instructing the application to perform version update is received, the terminal may first create a first process . Then, the terminal can determine the second process corresponding to the application, and obtain the running time data of the second process. Afterwards, the terminal may transmit the acquired running time data of the second process to the first process through inter-process communication. Thereafter, the terminal may establish a data transmission connection between the terminal and the audio playback device based on the first process that has obtained the running time data of the second process, so as to respond to the data transmission request of the audio playback device. In this embodiment of the present invention, when an application that is being used for data transmission between the terminal and the audio playback device needs to be updated, the terminal creates a new process to take over the process corresponding to the application to respond to the data transmission request of the audio playback device , so as to avoid data transmission interruption caused by the terminal application being unable to respond to the data transmission request of the audio playback device when the version is updated, that is, the present invention can improve the flexibility of data transmission between the terminal and the audio playback device, and improve the playback effect. .

附图说明Description of drawings

下面结合附图,通过对本发明的具体实施方式详细描述,将使本发明的技术方案及其有益效果显而易见。The technical solutions of the present invention and its beneficial effects will be apparent through the detailed description of the specific embodiments of the present invention below in conjunction with the accompanying drawings.

图1是本发明实施例提供的数据传输控制方法的流程示意图。FIG. 1 is a schematic flowchart of a data transmission control method provided by an embodiment of the present invention.

图2是本发明实施例提供的数据传输控制方法的另一流程示意图。FIG. 2 is another schematic flowchart of a data transmission control method provided by an embodiment of the present invention.

图3A至图3C是本发明实施例提供的数据传输控制方法的场景示意图。3A to 3C are schematic diagrams of scenarios of a data transmission control method provided by an embodiment of the present invention.

图4是本发明实施例提供的数据传输控制装置的结构示意图。FIG. 4 is a schematic structural diagram of a data transmission control apparatus provided by an embodiment of the present invention.

图5是本发明实施例提供的数据传输控制装置的另一结构示意图。FIG. 5 is another schematic structural diagram of a data transmission control apparatus provided by an embodiment of the present invention.

图6是本发明实施例提供的移动终端的结构示意图。FIG. 6 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present invention.

具体实施方式Detailed ways

请参照图式,其中相同的组件符号代表相同的组件,本发明的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本发明具体实施例,其不应被视为限制本发明未在此详述的其它具体实施例。Please refer to the drawings, in which the same reference numerals represent the same components, and the principles of the present invention are exemplified by being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be construed as limiting other embodiments of the invention not detailed herein.

以下将详细说明。It will be explained in detail below.

请参阅图1,图1是本发明实施例提供的数据传输控制方法的流程示意图,流程可以包括:Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a data transmission control method provided by an embodiment of the present invention. The process may include:

在步骤S101中,当通过终端应用与音频播放设备进行数据传输时,若接收到用于指示该应用进行版本更新的指令,则创建第一进程。In step S101, when data transmission is performed with the audio playback device through the terminal application, if an instruction for instructing the application to perform version update is received, a first process is created.

可以理解的是,本发明实施例的执行主体可以是诸如智能手机以及平板电脑等的终端设备。It can be understood that, the execution body of the embodiment of the present invention may be a terminal device such as a smart phone and a tablet computer.

比如,在移动终端通过专属终端应用,与诸如WiFi(wireless fidelity,无线保真)音箱等音频播放设备进行数据传输时,若该专属应用需要进行版本更新,则移动终端会暂时中断与音频播放设备间的数据传输,这将导致音频播放设备无法继续从移动终端处获取数据,也即移动终端与音频播放设备之间的数据传输的灵活性较差,影响播放效果。For example, when a mobile terminal transmits data to an audio playback device such as a WiFi (wireless fidelity) speaker through a dedicated terminal application, if the dedicated application needs to be updated, the mobile terminal will temporarily interrupt communication with the audio playback device. This will cause the audio playback device to be unable to continue acquiring data from the mobile terminal, that is, the flexibility of data transmission between the mobile terminal and the audio playback device is poor, which affects the playback effect.

在本发明实施例的步骤S101中,在终端通过应用与音频播放设备进行数据传输时,如果移动终端接收到用于指示该应用进行版本更新的指令,那么可以先触发移动终端创建一个新的进程,即第一进程。In step S101 of the embodiment of the present invention, when the terminal performs data transmission with the audio playback device through the application, if the mobile terminal receives an instruction for instructing the application to perform version update, the mobile terminal may be triggered first to create a new process , the first process.

在步骤S102中,确定与该应用对应的第二进程,并获取该第二进程的运行时刻数据。In step S102, a second process corresponding to the application is determined, and running time data of the second process is acquired.

比如,在新创建了第一进程之后,终端可以确定出与该应用对应的第二进程,并获取该第二进程的运行时刻(runtime)数据,也即获取第二进程的运行数据。可以理解的是,该第二进程即是此时终端中对应于该应用的用于与音频播放设备进行数据传输的进程。For example, after the first process is newly created, the terminal may determine the second process corresponding to the application, and obtain the runtime data of the second process, that is, obtain the running data of the second process. It can be understood that the second process is the process corresponding to the application in the terminal for data transmission with the audio playback device at this time.

在步骤S103中,通过进程间通信,将该第二进程的运行时刻数据传输至该第一进程。In step S103, the running time data of the second process is transmitted to the first process through inter-process communication.

比如,在获取到第二进程的运行时刻数据之后,终端可以通过进程间通信,将第二进程的运行时刻数据传输至第一进程。For example, after acquiring the running time data of the second process, the terminal may transmit the running time data of the second process to the first process through inter-process communication.

需要说明的是,进程间通信(Inter-Process Communication)是可以在不同进程间进行数据通信的技术。例如,若终端安装的是安卓(Android)操作系统,那么终端可以使用AIDL(Android Interface Definition Language,安卓接口定义语言)进程通信技术来实现不同进程之间的通信。又如,在安卓操作系统中,还可以使用基于Messenger(信使)的技术来实现跨进程通信,等等。可以理解的是,此处举例不构成对本发明的限定。It should be noted that inter-process communication (Inter-Process Communication) is a technology that can communicate data between different processes. For example, if the terminal is installed with an Android (Android) operating system, the terminal may use the AIDL (Android Interface Definition Language, Android Interface Definition Language) process communication technology to implement communication between different processes. For another example, in the Android operating system, a Messenger-based technology may also be used to implement cross-process communication, and so on. It should be understood that the examples herein do not constitute a limitation to the present invention.

在步骤S104中,基于获取到该第二进程运行时刻数据的第一进程,建立终端与该音频播放设备的数据传输连接,以响应该音频播放设备的数据传输请求。In step S104, a data transmission connection between the terminal and the audio playback device is established based on the first process that obtains the running time data of the second process to respond to the data transmission request of the audio playback device.

比如,在第一进程获取到第二进程的运行时刻数据之后,终端可以基于此时的第一进程建立与音频播放设备之间的数据传输连接,以响应该音频播放设备的数据传输请求。For example, after the first process obtains the runtime data of the second process, the terminal may establish a data transmission connection with the audio playback device based on the current first process to respond to the data transmission request of the audio playback device.

可以理解的是,第二进程的运行时刻数据中包含了终端与音频播放设备之间(通过应用)所建立的数据传输连接的相关数据,因此在将第二进程的运行时刻数据传输给第一进程之后,终端就可以基于第一进程建立其与音频播放设备之间的数据传输连接。也就是说,在获取到第二进程的运行时刻数据之后,第一进程就可以接管原来由第二进程管理的终端与音频播放设备之间的数据传输连接。It can be understood that the runtime data of the second process includes the relevant data of the data transmission connection established between the terminal and the audio playback device (through the application), so the runtime data of the second process is transmitted to the first process. After the process, the terminal can establish a data transmission connection with the audio playback device based on the first process. That is to say, after obtaining the running time data of the second process, the first process can take over the data transmission connection between the terminal and the audio playback device originally managed by the second process.

可以理解的是,本实施例可以在正用于终端与音频播放设备之间进行数据传输的应用需要进行版本更新时,由终端创建一个新进程来接管该应用对应的进程,并基于该新进程,建立终端与音频播放设备之间的数据传输连接,以响应该音频播放设备的数据传输请求,从而避免在进行版本更新时由于该应用无法响应音频播放设备的数据传输请求而导致的终端与音频播放设备间的数据传输中断,即本发明实施例可以提高终端与音频播放设备之间的数据传输的灵活性,提升播放效果。It can be understood that, in this embodiment, when an application that is being used for data transmission between the terminal and the audio playback device needs to be updated, a new process can be created by the terminal to take over the process corresponding to the application, and based on the new process , establish a data transmission connection between the terminal and the audio playback device to respond to the data transmission request of the audio playback device, so as to avoid the terminal and audio caused by the inability of the application to respond to the data transmission request of the audio playback device during version update. Data transmission between playback devices is interrupted, that is, the embodiment of the present invention can improve the flexibility of data transmission between the terminal and the audio playback device, and improve the playback effect.

请参阅图2,图2为本发明实施例提供的数据传输控制方法的另一流程示意图,流程可以包括:Please refer to FIG. 2. FIG. 2 is another schematic flowchart of a data transmission control method provided by an embodiment of the present invention. The process may include:

在步骤S201中,当终端通过应用与音频播放设备进行数据传输时,若接收到用于指示该应用进行版本更新的指令,则终端创建第一进程。In step S201, when the terminal performs data transmission with the audio playback device through the application, if an instruction for instructing the application to perform version update is received, the terminal creates a first process.

比如,在终端通过某个预设的应用与音频播放设备建立了数据传输连接并将终端本地的音频数据传输给音频播放设备的过程中,若接收到用于指示该应用进行版本更新的指令,那么终端可以先创建一个新的进程,即第一进程。For example, in the process that the terminal establishes a data transmission connection with the audio playback device through a preset application and transmits the local audio data of the terminal to the audio playback device, if an instruction for instructing the application to update the version is received, Then the terminal can first create a new process, that is, the first process.

在步骤S202中,终端确定与该应用对应的第二进程,并获取该第二进程的运行时刻数据。In step S202, the terminal determines the second process corresponding to the application, and acquires the running time data of the second process.

比如,在新创建了第一进程之后,终端可以确定出与该应用对应的第二进程,并获取该第二进程的运行时刻(runtime)数据。可以理解的是,该第二进程即是此时终端中对应于该应用的用于与音频播放设备进行数据传输的进程。For example, after the first process is newly created, the terminal may determine the second process corresponding to the application, and obtain the runtime data of the second process. It can be understood that the second process is the process corresponding to the application in the terminal for data transmission with the audio playback device at this time.

在步骤S203中,通过进程间通信,终端将该第二进程的运行时刻数据传输至该第一进程。In step S203, through inter-process communication, the terminal transmits the running time data of the second process to the first process.

比如,在获取到第二进程的运行时刻数据之后,终端可以通过进程间通信,将第二进程的运行时刻数据传输至第一进程。For example, after acquiring the running time data of the second process, the terminal may transmit the running time data of the second process to the first process through inter-process communication.

需要说明的是,进程间通信是可以在不同进程间进行数据通信的技术。例如,若终端安装的是安卓操作系统,那么终端可以使用AIDL(Android Interface DefinitionLanguage,安卓接口定义语言)进程通信技术来实现不同进程之间的通信。又如,在安卓操作系统中,还可以使用基于Messenger(信使)的技术来实现跨进程通信,等等。可以理解的是,此处举例不构成对本发明的限定。It should be noted that inter-process communication is a technology that can communicate data between different processes. For example, if the terminal is installed with an Android operating system, the terminal may use the AIDL (Android Interface Definition Language, Android Interface Definition Language) process communication technology to implement communication between different processes. For another example, in the Android operating system, a Messenger-based technology may also be used to implement cross-process communication, and so on. It should be understood that the examples herein do not constitute a limitation to the present invention.

在步骤S204中,基于获取到第二进程运行时刻数据的第一进程,终端建立与音频播放设备的数据传输连接,以响应该音频播放设备的数据传输请求。In step S204, the terminal establishes a data transmission connection with the audio playback device based on the first process that obtains the running time data of the second process to respond to the data transmission request of the audio playback device.

比如,在第一进程获取到第二进程的运行时刻数据之后,终端可以基于此时的第一进程建立其与音频播放设备之间的数据传输连接,以响应该音频播放设备的数据传输请求。例如,由第一进程将保存在终端中的本地音频数据传输到音频播放设备中进行播放。For example, after the first process obtains the runtime data of the second process, the terminal may establish a data transmission connection with the audio playback device based on the current first process to respond to the data transmission request of the audio playback device. For example, the first process transmits the local audio data saved in the terminal to the audio playback device for playback.

可以理解的是,第二进程的运行时刻数据中包含了终端与音频播放设备之间(通过应用)所建立的数据传输连接的相关数据,因此在将第二进程的运行时刻数据传输给第一进程之后,终端就可以基于第一进程建立其与音频播放设备之间的数据传输连接。也就是说,在获取到第二进程的运行时刻数据之后,第一进程就可以接管原来由第二进程管理的终端与音频播放设备之间的数据传输连接。It can be understood that the runtime data of the second process includes the relevant data of the data transmission connection established between the terminal and the audio playback device (through the application), so the runtime data of the second process is transmitted to the first process. After the process, the terminal can establish a data transmission connection with the audio playback device based on the first process. That is to say, after obtaining the running time data of the second process, the first process can take over the data transmission connection between the terminal and the audio playback device originally managed by the second process.

在步骤S205中,终端对用于指示该应用进行版本更新的指令进行响应,并对该应用进行版本更新。In step S205, the terminal responds to the instruction for instructing the application to perform version update, and performs version update for the application.

比如,在终端基于已获取到第二进程运行时刻数据的第一进程,建立与音频播放设备的数据传输连接之后,终端可以对之前接收到的用于指示该应用进行版本更新的指令进行响应,并按照该指令对该应用的版本进行更新。For example, after the terminal establishes a data transmission connection with the audio playback device based on the first process that has obtained the running time data of the second process, the terminal may respond to the previously received instruction for instructing the application to update the version, And follow the instructions to update the version of the app.

可以理解的是,在终端对该应用进行版本更新的过程中,由第一进程来响应终端与音频播放设备之间的数据传输请求,并完成数据传输,而该应用将不再响应音频播放设备的数据传输请求。It can be understood that in the process of updating the version of the application by the terminal, the first process responds to the data transmission request between the terminal and the audio playback device, and completes the data transmission, and the application will no longer respond to the audio playback device. data transfer request.

在步骤S206中,当检测到该应用的版本更新完成后,终端创建对应于版本更新完成后的应用的第三进程。In step S206, after detecting that the version update of the application is completed, the terminal creates a third process corresponding to the application after the version update is completed.

比如,当检测到该应用的版本更新已经完成后,终端可以重启该应用,并创建对应于版本更新完成后的应用的第三进程。For example, after detecting that the version update of the application has been completed, the terminal may restart the application, and create a third process corresponding to the application after the version update is completed.

在一种实施方式中,步骤S206可以包括如下步骤:In one embodiment, step S206 may include the following steps:

当检测到应用的版本更新完成后,检测第一进程是否被终止;After detecting that the version update of the application is completed, detecting whether the first process is terminated;

若检测出第一进程未被终止,则终端创建对应于版本更新完成后的应用的第三进程。If it is detected that the first process has not been terminated, the terminal creates a third process corresponding to the application after the version update is completed.

比如,当检测到该应用的版本更新已经完成后,终端可以检测其是否仍然通过第一进程与音频播放设备保持数据传输连接,也即终端检测第一进程是否被终止。For example, after detecting that the version update of the application has been completed, the terminal may detect whether it still maintains a data transmission connection with the audio playback device through the first process, that is, the terminal detects whether the first process is terminated.

若终端检测出第一进程未被终止,那么终端可以重启该应用,并创建对应于版本更新完成后的应用的第三进程。If the terminal detects that the first process has not been terminated, the terminal may restart the application and create a third process corresponding to the application whose version update is completed.

若终端检测出第一进程被终止,那么终端可以执行其它操作,而不需要重启该应用。例如,在该应用进行版本更新的过程中,用户因不再需要播放音频而中断了终端与音频播放设备之间的数据传输,即用于终端与音频播放设备之间进行数据传输的第一进程被终止。那么,在这种情况下,终端可以执行其它操作。If the terminal detects that the first process is terminated, the terminal can perform other operations without restarting the application. For example, during the version update process of the application, the user interrupts the data transmission between the terminal and the audio playback device because the user no longer needs to play audio, that is, the first process for data transmission between the terminal and the audio playback device was terminated. Then, in this case, the terminal can perform other operations.

在步骤S207中,终端获取第一进程的运行时刻数据,并通过进程间通信,将第一进程的运行时刻数据传输至第三进程。In step S207, the terminal acquires the running time data of the first process, and transmits the running time data of the first process to the third process through inter-process communication.

在步骤S208中,基于获取到第一进程运行时刻数据的第三进程,终端建立与音频播放设备的数据传输连接,以响应该音频播放设备的数据传输请求。In step S208, the terminal establishes a data transmission connection with the audio playback device based on the third process that obtains the running time data of the first process to respond to the data transmission request of the audio playback device.

比如,步骤S207和S208可以包括:For example, steps S207 and S208 may include:

在创建对应于更新完成后的应用的第三进程之后,终端可以获取第一进程的运行时刻数据,并且通过进程间通信,将获取到的第一进程的运行时刻数据传输给第三进程。After creating the third process corresponding to the updated application, the terminal may acquire the running time data of the first process, and transmit the acquired running time data of the first process to the third process through inter-process communication.

然后,终端可以基于已获取到第一进程运行时刻数据的第三进程,建立终端与音频播放设备的数据传输连接,以响应该音频播放设备的数据传输请求。Then, the terminal may establish a data transmission connection between the terminal and the audio playback device based on the third process that has obtained the running time data of the first process to respond to the data transmission request of the audio playback device.

也就是说,在检测到应用完成版本更新之后,终端可以创建对应于该完成版本更新的应用的第三进程,并由第三进程来接管之前由第一进程建立的终端与音频播放设备之间的数据传输连接,以响应音频播放设备的数据传输请求。也即,此后将由第三进程来完成终端与音频播放设备之间的数据传输。例如,由第三进程将保存在终端中的本地音频数据传输到音频播放设备中进行播放。That is to say, after detecting that the application has completed the version update, the terminal can create a third process corresponding to the application whose version update has been completed, and the third process can take over the connection between the terminal and the audio playback device previously established by the first process. data transfer connection in response to data transfer requests from audio playback devices. That is, after that, the third process will complete the data transmission between the terminal and the audio playback device. For example, the third process transmits the local audio data saved in the terminal to the audio playback device for playback.

在步骤S209中,终端终止第一进程。In step S209, the terminal terminates the first process.

比如,在第三进程接管由第一进程建立的终端与音频播放设备之间的数据传输连接之后,终端可以结束第一进程,即终止第一进程。For example, after the third process takes over the data transmission connection between the terminal and the audio playback device established by the first process, the terminal may end the first process, that is, terminate the first process.

可以理解的是,本实施例可以在正用于终端与音频播放设备之间进行数据传输的应用需要进行版本更新时,由终端创建一个新进程来接管该应用对应的进程,并基于该新进程,建立终端与音频播放设备之间的数据传输连接,以响应音频播放设备的数据传输请求,从而避免在进行版本更新时由于该应用无法响应音频播放设备的数据传输请求而导致的终端与音频播放设备间的数据传输中断。也即,本发明实施例可以在该应用进行版本更新的同时,保持终端与音频播放设备之间的数据传输不中断。It can be understood that, in this embodiment, when an application that is being used for data transmission between the terminal and the audio playback device needs to be updated, a new process can be created by the terminal to take over the process corresponding to the application, and based on the new process , establish a data transmission connection between the terminal and the audio playback device to respond to the data transmission request of the audio playback device, so as to avoid the terminal and audio playback caused by the application being unable to respond to the data transmission request of the audio playback device during version update. Data transfer between devices is interrupted. That is, in the embodiment of the present invention, the data transmission between the terminal and the audio playback device can be kept uninterrupted while the version of the application is updated.

另外,本发明实施例可以在该应用更新完成后,由该应用重新接管终端与音频播放设备之间的数据传输连接。因此,本发明实施例可以提高终端与音频播放设备之间进行数据传输的灵活性。In addition, in this embodiment of the present invention, after the application is updated, the application can take over the data transmission connection between the terminal and the audio playback device again. Therefore, the embodiments of the present invention can improve the flexibility of data transmission between the terminal and the audio playback device.

请参阅图3A至图3C,图3A至图3C为本发明实施例提供的数据传输控制方法的场景示意图。Please refer to FIGS. 3A to 3C . FIGS. 3A to 3C are schematic diagrams of scenarios of a data transmission control method provided by an embodiment of the present invention.

比如,移动终端通过某个预设的应用与音频播放设备建立了数据传输连接,并将存储在移动终端本地的音频数据传输到音频播放设备中进行播放。如图3A所示,移动终端需要将本地音频列表中的音频A至音频E传输到音频播放设备中进行播放。For example, the mobile terminal establishes a data transmission connection with the audio playback device through a preset application, and transmits the audio data stored locally in the mobile terminal to the audio playback device for playback. As shown in FIG. 3A , the mobile terminal needs to transmit audio A to audio E in the local audio list to the audio playback device for playback.

在移动终端与该音频播放设备进行数据传输的过程中,移动终端检测到该应用有新的版本,并向用户询问是否对该应用进行版本更新,此时移动终端的界面可以如图3B所示。In the process of data transmission between the mobile terminal and the audio playback device, the mobile terminal detects that the application has a new version, and asks the user whether to update the version of the application. At this time, the interface of the mobile terminal can be as shown in FIG. 3B .

例如,如图3C所示,用户点击了按钮“是”,选择对该应用进行版本更新。此时移动终端接收到用于指示对该应用进行版本更新的指令,在这种情况下,移动终端可以先创建第一进程。For example, as shown in FIG. 3C , the user clicks the button "Yes" and chooses to update the version of the application. At this moment, the mobile terminal receives an instruction for instructing to update the version of the application. In this case, the mobile terminal may create the first process first.

然后,移动终端可以确定出与该应用对应的第二进程,并获取该第二进程的运行时刻数据。该第二进程即是此时终端中对应于该应用的用于与音频播放设备进行数据传输的进程。Then, the mobile terminal can determine the second process corresponding to the application, and obtain the running time data of the second process. The second process is the process corresponding to the application in the terminal for data transmission with the audio playback device at this time.

在获取到第二进程的运行时刻数据之后,终端可以通过进程间通信,将第二进程的运行时刻数据传输至第一进程。之后,移动终端可以基于该第一进程,建立与音频播放设备的数据传输连接,并响应该音频播放设备的数据传输请求。也就是说,此时由第一进程接管原来由第二进程管理的移动终端与音频播放设备之间的数据传输连接。After acquiring the running time data of the second process, the terminal may transmit the running time data of the second process to the first process through inter-process communication. Afterwards, the mobile terminal may establish a data transmission connection with the audio playback device based on the first process, and respond to the data transmission request of the audio playback device. That is to say, at this time, the first process takes over the data transmission connection between the mobile terminal and the audio playback device originally managed by the second process.

当检测到该应用的版本更新完成后,移动终端可以重启该应用,并检测第一进程是否被终止。After detecting that the version update of the application is completed, the mobile terminal can restart the application and detect whether the first process is terminated.

例如,此时检测到第一进程未被终止,即移动终端仍然通过第一进程与音频播放设备保持数据传输连接。在这种情况下,移动终端可以创建对应于版本更新完成后的应用的第三进程。然后,移动终端可以获取此时的第一进程的运行时刻数据,并将第一进程的运行时刻数据通过进程间通信传输给第三进程。For example, at this time, it is detected that the first process is not terminated, that is, the mobile terminal still maintains a data transmission connection with the audio playback device through the first process. In this case, the mobile terminal may create a third process corresponding to the application after the version update is completed. Then, the mobile terminal may acquire the running time data of the first process at this time, and transmit the running time data of the first process to the third process through inter-process communication.

在第三进程获取到第一进程的运行时刻数据之后,移动终端可以基于第三进程建立与音频播放设备的数据传输连接。也就是说,此时由第三进程接管之前由第一进程管理的移动终端与音频播放设备之间的数据传输连接。After the third process acquires the runtime data of the first process, the mobile terminal may establish a data transmission connection with the audio playback device based on the third process. That is to say, at this time, the third process takes over the data transmission connection between the mobile terminal and the audio playback device that was previously managed by the first process.

此后,移动终端可以终止上述第一进程。Thereafter, the mobile terminal may terminate the above-mentioned first process.

请参阅图4,图4为本发明实施例提供的数据传输控制装置的结构示意图。数据传输控制装置300可以包括:创建模块301,获取模块302,传输模块303,以及响应模块304。Please refer to FIG. 4 , which is a schematic structural diagram of a data transmission control apparatus according to an embodiment of the present invention. The data transmission control apparatus 300 may include: a creation module 301 , an acquisition module 302 , a transmission module 303 , and a response module 304 .

创建模块301,用于当通过终端应用与音频播放设备进行数据传输时,若接收到用于指示所述应用进行版本更新的指令,则创建第一进程。The creation module 301 is configured to create a first process if an instruction for instructing the application to perform version update is received during data transmission with the audio playback device through the terminal application.

比如,在终端通过某个预设的应用与音频播放设备建立了数据传输连接并进行数据传输的过程中,若接收到用于指示该应用进行版本更新的指令,那么可以先由终端的创建模块301创建一个新的进程,即第一进程。For example, in the process that the terminal establishes a data transmission connection with the audio playback device through a preset application and performs data transmission, if an instruction for instructing the application to update the version is received, the creation module of the terminal can first 301 creates a new process, the first process.

获取模块302,用于确定与所述应用对应的第二进程,并获取所述第二进程的运行时刻数据。The obtaining module 302 is configured to determine a second process corresponding to the application, and obtain running time data of the second process.

比如,在创建模块301新创建了第一进程之后,获取模块302可以确定出终端中与该应用对应的第二进程,并获取该第二进程的运行时刻(runtime)数据。可以理解的是,该第二进程即是此时终端中对应于该应用的用于与音频播放设备进行数据传输的进程。For example, after the creation module 301 newly creates the first process, the acquisition module 302 may determine the second process in the terminal corresponding to the application, and acquire the runtime data of the second process. It can be understood that the second process is the process corresponding to the application in the terminal for data transmission with the audio playback device at this time.

传输模块303,用于通过进程间通信,将所述第二进程的运行时刻数据传输至所述第一进程。The transmission module 303 is configured to transmit the runtime data of the second process to the first process through inter-process communication.

比如,在获取模块302获取到第二进程的运行时刻数据之后,传输模块303可以通过进程间通信,将第二进程的运行时刻数据传输至第一进程。For example, after the obtaining module 302 obtains the running time data of the second process, the transmitting module 303 may transmit the running time data of the second process to the first process through inter-process communication.

需要说明的是,进程间通信是可以在不同进程间进行数据通信的技术。例如,若终端安装的是安卓操作系统,那么终端可以使用AIDL(Android Interface DefinitionLanguage,安卓接口定义语言)进程通信技术来实现不同进程之间的通信。又如,在安卓操作系统中,还可以使用基于Messenger(信使)的技术来实现跨进程通信,等等。可以理解的是,此处举例不构成对本发明的限定。It should be noted that inter-process communication is a technology that can communicate data between different processes. For example, if the terminal is installed with an Android operating system, the terminal may use the AIDL (Android Interface Definition Language, Android Interface Definition Language) process communication technology to implement communication between different processes. For another example, in the Android operating system, a Messenger-based technology may also be used to implement cross-process communication, and so on. It should be understood that the examples herein do not constitute a limitation to the present invention.

响应模块304,用于基于获取到所述第二进程运行时刻数据的第一进程,建立终端与所述音频播放设备的数据传输连接,以响应所述音频播放设备的数据传输请求。The response module 304 is configured to establish a data transmission connection between the terminal and the audio playback device based on the first process that obtains the running time data of the second process, so as to respond to the data transmission request of the audio playback device.

比如,在第一进程获取到第二进程的运行时刻数据之后,响应模块304可以基于此时的第一进程建立终端与音频播放设备之间的数据传输连接,以响应该音频播放设备的数据传输请求。例如,由第一进程将保存在终端中的本地音频数据传输到音频播放设备中进行播放。For example, after the first process obtains the runtime data of the second process, the response module 304 may establish a data transmission connection between the terminal and the audio playback device based on the first process at this time, in response to the data transmission of the audio playback device ask. For example, the first process transmits the local audio data saved in the terminal to the audio playback device for playback.

可以理解的是,第二进程的运行时刻数据中包含了终端与音频播放设备之间(通过应用)所建立的数据传输连接的相关数据,因此在将第二进程的运行时刻数据传输给第一进程之后,终端就可以基于第一进程建立其与音频播放设备之间的数据传输连接。也就是说,在获取到第二进程的运行时刻数据之后,第一进程就可以接管原来由第二进程管理的终端与音频播放设备之间的数据传输连接。It can be understood that the runtime data of the second process includes the relevant data of the data transmission connection established between the terminal and the audio playback device (through the application), so the runtime data of the second process is transmitted to the first process. After the process, the terminal can establish a data transmission connection with the audio playback device based on the first process. That is to say, after obtaining the running time data of the second process, the first process can take over the data transmission connection between the terminal and the audio playback device originally managed by the second process.

请一并参阅图5,图5为本发明实施例提供的数据传输控制装置的另一结构示意图。在一实施例中,数据传输控制装置300还可以包括:更新模块305,触发模块306,以及终止模块307。Please refer to FIG. 5 together. FIG. 5 is another schematic structural diagram of a data transmission control apparatus provided by an embodiment of the present invention. In an embodiment, the data transmission control apparatus 300 may further include: an update module 305 , a trigger module 306 , and a termination module 307 .

更新模块305,用于对所述指令进行响应,并对所述应用进行版本更新。An update module 305, configured to respond to the instruction and update the version of the application.

比如,在响应模块304基于已获取到第二进程运行时刻数据的第一进程,建立终端与音频播放设备的数据传输连接之后,更新模块305可以对之前接收到的用于指示该应用进行版本更新的指令进行响应,并按照该指令对该应用的版本进行更新。For example, after the response module 304 establishes a data transmission connection between the terminal and the audio playback device based on the first process that has obtained the running time data of the second process, the update module 305 can update the version of the application received previously for instructing the application , and follow the instructions to update the version of the app.

可以理解的是,在终端对该应用进行版本更新的过程中,由第一进程来响应终端与音频播放设备之间的数据传输请求,并完成数据传输,而该应用将不再响应音频播放设备的数据传输请求。It can be understood that in the process of updating the version of the application by the terminal, the first process responds to the data transmission request between the terminal and the audio playback device, and completes the data transmission, and the application will no longer respond to the audio playback device. data transfer request.

触发模块306,用于当检测到所述应用的版本更新完成后,触发终端创建对应于版本更新完成后的应用的第三进程;获取所述第一进程的运行时刻数据,并通过进程间通信,将所述第一进程的运行时刻数据传输至所述第三进程;基于获取到所述第一进程运行时刻数据的第三进程,建立终端与所述音频播放设备的数据传输连接,以响应所述音频播放设备的数据传输请求。Triggering module 306, configured to trigger the terminal to create a third process corresponding to the application after the version update is completed when it is detected that the version update of the application is completed; obtain the runtime data of the first process, and communicate with each other through inter-process , transmit the running time data of the first process to the third process; based on the third process that obtains the running time data of the first process, establish a data transmission connection between the terminal and the audio playback device, in response to The data transmission request of the audio playback device.

比如,当终端检测到该应用的版本更新已经完成后,触发模块306可以触发终端重启该应用,并创建对应于版本更新完成后的应用的第三进程。For example, when the terminal detects that the version update of the application has been completed, the triggering module 306 may trigger the terminal to restart the application, and create a third process corresponding to the application after the version update is completed.

然后,触发模块306可以获取第一进程的运行时刻数据,并且通过进程间通信,将获取到的第一进程的运行时刻数据传输给第三进程。Then, the triggering module 306 may acquire the running time data of the first process, and transmit the acquired running time data of the first process to the third process through inter-process communication.

此后,触发模块306可以基于已获取到第一进程运行时刻数据的第三进程,建立终端与音频播放设备的数据传输连接,以响应该音频播放设备的数据传输请求。Thereafter, the triggering module 306 may establish a data transmission connection between the terminal and the audio playback device based on the third process that has obtained the data of the running time of the first process, so as to respond to the data transmission request of the audio playback device.

也就是说,在终端检测到应用完成版本更新之后,触发模块306可以创建对应于该完成版本更新的应用的第三进程,并由第三进程来接管之前由第一进程建立的终端与音频播放设备之间的数据传输连接,以响应音频播放设备的数据传输请求。也即,此后将由第三进程来完成终端与音频播放设备之间的数据传输。例如,由第三进程将保存在终端中的本地音频数据传输到音频播放设备中进行播放。That is, after the terminal detects that the application has completed the version update, the triggering module 306 can create a third process corresponding to the application whose version update has been completed, and the third process can take over the terminal and audio playback previously established by the first process. A data transfer connection between devices in response to a data transfer request from an audio playback device. That is, after that, the third process will complete the data transmission between the terminal and the audio playback device. For example, the third process transmits the local audio data saved in the terminal to the audio playback device for playback.

在一种实施方式中,触发模块306可以用于:In one embodiment, trigger module 306 may be used to:

当检测到应用的版本更新完成后,检测第一进程是否被终止;After detecting that the version update of the application is completed, detecting whether the first process is terminated;

若检测出第一进程未被终止,则终端创建对应于版本更新完成后的应用的第三进程。If it is detected that the first process has not been terminated, the terminal creates a third process corresponding to the application after the version update is completed.

比如,当终端检测到该应用的版本更新已经完成后,触发模块306可以检测终端是否通过第一进程与音频播放设备保持数据传输连接,也即触发模块306可以检测第一进程是否被终止。For example, when the terminal detects that the version update of the application has been completed, the triggering module 306 can detect whether the terminal maintains a data transmission connection with the audio playback device through the first process, that is, the triggering module 306 can detect whether the first process is terminated.

若检测出第一进程未被终止,那么触发模块306可以重启该应用,并创建对应于版本更新完成后的应用的第三进程。If it is detected that the first process has not been terminated, the triggering module 306 may restart the application and create a third process corresponding to the application after the version update is completed.

若检测出第一进程已被终止,那么终端可以执行其它操作,而不需要重启该应用。例如,在该应用进行版本更新的过程中,用户因不再需要播放音频而中断了终端与音频播放设备之间的数据传输,即用于终端与音频播放设备之间进行数据传输的第一进程被终止。那么,在这种情况下,终端可以执行其它操作。If it is detected that the first process has been terminated, the terminal can perform other operations without restarting the application. For example, during the version update process of the application, the user interrupts the data transmission between the terminal and the audio playback device because the user no longer needs to play audio, that is, the first process for data transmission between the terminal and the audio playback device was terminated. Then, in this case, the terminal can perform other operations.

终止模块307,用于终止所述第一进程。The termination module 307 is used to terminate the first process.

比如,在第三进程接管由第一进程建立的终端与音频播放设备之间的数据传输连接之后,终止模块307可以结束第一进程,即终止第一进程。For example, after the third process takes over the data transmission connection between the terminal and the audio playback device established by the first process, the termination module 307 may end the first process, that is, terminate the first process.

本发明还提供一种终端,如平板电脑、手机等移动终端,请参阅图6,图6为本发明实施例提供的移动终端结构示意图。该移动终端500可以包括有一个或一个以上计算机可读存储介质的存储器501、输入单元502、显示单元503、音频电路504、无线保真(WiFi,Wireless Fidelity)模块505、包括有一个或者一个以上处理核心的处理器506等部件。本领域技术人员可以理解,图6中示出的移动终端结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The present invention also provides a terminal, such as a mobile terminal such as a tablet computer and a mobile phone. Please refer to FIG. 6 , which is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention. The mobile terminal 500 may include a memory 501 having one or more computer-readable storage media, an input unit 502, a display unit 503, an audio circuit 504, a Wireless Fidelity (WiFi, Wireless Fidelity) module 505, including one or more Components such as the processor 506 of the processing core. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 6 does not constitute a limitation on the mobile terminal, and may include more or less components than those shown, or combine some components, or arrange different components.

存储器501可用于存储应用程序和数据。存储器501存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器506通过运行存储在存储器501的应用程序,从而执行各种功能应用以及数据处理。Memory 501 may be used to store applications and data. The application program stored in the memory 501 includes executable code. Applications can be composed of various functional modules. The processor 506 executes various functional applications and data processing by executing application programs stored in the memory 501 .

输入单元502可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。在一实施例中,输入单元502可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板。The input unit 502 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. In an embodiment, the input unit 502 may include a touch-sensitive surface as well as other input devices. A touch-sensitive surface, also known as a touch display or trackpad.

显示单元503可用于显示由用户输入的信息或提供给用户的信息以及移动终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元503可包括显示面板。在一实施方式中,可以采用液晶显示器(LCD,LiquidCrystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。The display unit 503 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the mobile terminal, which may be composed of graphics, text, icons, videos and any combination thereof. The display unit 503 may include a display panel. In one embodiment, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode), or the like.

音频电路504可通过扬声器、传声器提供用户与移动终端之间的音频接口。The audio circuit 504 can provide an audio interface between the user and the mobile terminal through speakers and microphones.

无线保真(WiFi)属于短距离无线传输技术,移动终端通过无线保真模块505可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。Wireless Fidelity (WiFi) is a short-distance wireless transmission technology, and the mobile terminal can help users to send and receive emails, browse web pages and access streaming media through the Wi-Fi module 505, which provides users with wireless broadband Internet access.

处理器506是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器501内的应用程序,以及调用存储在存储器501内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。在一实施方式中,处理器508可包括一个或多个处理核心;The processor 506 is the control center of the mobile terminal, uses various interfaces and lines to connect various parts of the entire mobile terminal, and executes the mobile terminal by running or executing the application program stored in the memory 501 and calling the data stored in the memory 501. various functions and processing data, so as to monitor the mobile terminal as a whole. In one embodiment, the processor 508 may include one or more processing cores;

尽管图6中未示出,移动终端还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 6 , the mobile terminal may further include a camera, a Bluetooth module, and the like, which will not be repeated here.

具体在本实施例中,移动终端中的处理器506会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行代码加载到存储器501中,并由处理器506来运行存储在存储器501中的应用程序,从而实现各种功能:Specifically in this embodiment, the processor 506 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 501 according to the following instructions, and the processor 506 executes and stores the executable code in the memory 501. The application program in the memory 501, thereby realizing various functions:

当通过终端应用与音频播放设备进行数据传输时,若接收到用于指示所述应用进行版本更新的指令,则创建第一进程;确定与所述应用对应的第二进程,并获取所述第二进程的运行时刻数据;通过进程间通信,将所述第二进程的运行时刻数据传输至所述第一进程;基于获取到所述第二进程运行时刻数据的第一进程,建立终端与所述音频播放设备的数据传输连接,以响应所述音频播放设备的数据传输请求。When data transmission is performed with the audio playback device through the terminal application, if an instruction for instructing the application to perform version update is received, a first process is created; the second process corresponding to the application is determined, and the first process is obtained. The running time data of the two processes; the running time data of the second process is transmitted to the first process through inter-process communication; based on the first process that obtains the running time data of the second process, the terminal and the the data transmission connection of the audio playback device to respond to the data transmission request of the audio playback device.

处理器506在执行完所述建立终端与所述音频播放设备的数据传输连接,以响应所述音频播放设备的数据传输请求的步骤之后,还可以执行如下步骤:对所述指令进行响应,并对所述应用进行版本更新。After performing the step of establishing a data transmission connection between the terminal and the audio playback device to respond to the data transmission request of the audio playback device, the processor 506 may also perform the following steps: responding to the instruction, and Update the version of the application.

处理器506还可以执行如下步骤:当检测到所述应用的版本更新完成后,触发终端创建对应于版本更新完成后的应用的第三进程;获取所述第一进程的运行时刻数据,并通过进程间通信,将所述第一进程的运行时刻数据传输至所述第三进程;基于获取到所述第一进程运行时刻数据的第三进程,建立终端与所述音频播放设备的数据传输连接,以响应所述音频播放设备的数据传输请求。The processor 506 may also perform the following steps: when it is detected that the version update of the application is completed, trigger the terminal to create a third process corresponding to the application after the version update is completed; obtain the runtime data of the first process, and pass Inter-process communication, transmitting the running time data of the first process to the third process; establishing a data transmission connection between the terminal and the audio playback device based on the third process obtaining the running time data of the first process , in response to a data transmission request from the audio playback device.

处理器506在执行所述当检测到所述应用的版本更新完成后,触发终端创建对应于版本更新完成后的应用的第三进程的步骤时,可以包括:当检测到所述应用的版本更新完成后,检测所述第一进程是否被终止;若检测出所述第一进程未被终止,则触发终端创建对应于版本更新完成后的应用的第三进程。When the processor 506 performs the step of triggering the terminal to create a third process corresponding to the application after the version update is completed after it is detected that the version update of the application is completed, the processor 506 may include: when it is detected that the version update of the application is completed. After completion, it is detected whether the first process is terminated; if it is detected that the first process is not terminated, the terminal is triggered to create a third process corresponding to the application after the version update is completed.

处理器506在执行完所述基于获取到所述第一进程运行时刻数据的第三进程,建立终端与所述音频播放设备的数据传输连接,以响应所述音频播放设备的数据传输请求的步骤之后,还可以包括如下步骤:终止所述第一进程。The processor 506 establishes a data transmission connection between the terminal and the audio playback device after executing the third process based on the data obtained at the running time of the first process to respond to the data transmission request of the audio playback device. Afterwards, the following step may also be included: terminating the first process.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对数据传输控制方法的详细描述,此处不再赘述。In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the detailed description of the data transmission control method above, which will not be repeated here.

本发明实施例提供的所述数据传输控制装置与上文实施例中的数据传输控制方法属于同一构思,在所述数据传输控制装置上可以运行所述数据传输控制方法实施例中提供的任一方法,其具体实现过程详见所述数据传输控制方法实施例,此处不再赘述。The data transmission control apparatus provided in the embodiments of the present invention and the data transmission control method in the above embodiments belong to the same idea, and any one of the data transmission control method provided in the data transmission control apparatus can be executed on the data transmission control apparatus. The specific implementation process is described in the data transmission control method embodiment, which will not be repeated here.

需要说明的是,对本发明实施例所述数据传输控制方法而言,本领域普通测试人员可以理解实现本发明实施例所述数据传输控制方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在存储器中,并被至少一个处理器执行,在执行过程中可包括如所述数据传输控制方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(ROM,Read OnlyMemory)、随机存取记忆体(RAM,Random Access Memory)等。It should be noted that, for the data transmission control method according to the embodiment of the present invention, ordinary testers in the art can understand that all or part of the process of implementing the data transmission control method according to the embodiment of the present invention can be controlled by a computer program. hardware, the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and the execution process can include, for example, the implementation of the data transmission control method. example process. The storage medium may be a magnetic disk, an optical disk, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), and the like.

对本发明实施例的所述数据传输控制装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,所述存储介质譬如为只读存储器,磁盘或光盘等。For the data transmission control device of the embodiment of the present invention, each functional module may be integrated in one processing chip, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk or an optical disk, etc. .

以上对本发明实施例所提供的一种数据传输控制方法、装置以及终端进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A data transmission control method, device, and terminal provided by the embodiments of the present invention have been described in detail above. The principles and implementations of the present invention are described with specific examples in this paper. The descriptions of the above embodiments are only used to help Understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be It is construed as a limitation of the present invention.

Claims (12)

1. A data transmission control method, characterized in that the method comprises:
when data transmission is carried out between a terminal application and an audio playing device, if an instruction for indicating the application to carry out version updating is received, a first process is established;
determining a second process corresponding to the application, and acquiring running time data of the second process, wherein the second process is a process which corresponds to the application in the current terminal and is used for carrying out data transmission with audio playing equipment;
transmitting the running time data of the second process to the first process through inter-process communication so that the first process takes over the data transmission connection between the terminal managed by the second process and the audio playing equipment;
establishing data transmission connection between a terminal and the audio playing equipment based on the first process for acquiring the data of the running time of the second process so as to respond to a data transmission request of the audio playing equipment;
and when detecting that the version of the application is updated, triggering the terminal to create a third process corresponding to the application after the version is updated, wherein the third process is used for taking over the data transmission connection between the terminal and the audio playing equipment, which is established by the first process.
2. The data transmission control method according to claim 1, further comprising, after the step of establishing a data transmission connection between the terminal and the audio playback device in response to a data transmission request from the audio playback device:
and responding to the instruction, and updating the version of the application.
3. The data transmission control method according to claim 2, wherein after the triggering the terminal to create the third process corresponding to the application after the version update of the application is completed is detected, the method further comprises:
acquiring the running time data of the first process, and transmitting the running time data of the first process to the third process through inter-process communication;
and establishing data transmission connection between the terminal and the audio playing equipment based on a third process for acquiring the data of the running time of the first process so as to respond to a data transmission request of the audio playing equipment.
4. The data transmission control method according to claim 3, wherein the triggering the terminal to create a third process corresponding to the application after the version update of the application is completed after detecting that the version update of the application is completed comprises:
detecting whether the first process is terminated or not after detecting that the version updating of the application is completed;
and if the first process is not detected to be terminated, triggering the terminal to create a third process corresponding to the application after the version updating is completed.
5. The data transmission control method according to claim 3 or 4, wherein after the step of establishing a data transmission connection between the terminal and the audio playback device based on the third process that acquires the data at the running time of the first process, so as to respond to the data transmission request of the audio playback device, the method further includes:
terminating the first process.
6. A data transmission control apparatus, characterized in that the apparatus comprises:
the system comprises a creating module, a first processing module and a second processing module, wherein the creating module is used for creating a first process if an instruction for indicating the application to update the version is received when data transmission is carried out between the terminal application and the audio playing equipment;
the acquisition module is used for determining a second process corresponding to the application and acquiring running time data of the second process, wherein the second process is a process which corresponds to the application in the current terminal and is used for carrying out data transmission with audio playing equipment;
the transmission module is used for transmitting the running time data of the second process to the first process through inter-process communication so as to enable the first process to take over the data transmission connection between the terminal originally managed by the second process and the audio playing equipment;
the response module is used for establishing data transmission connection between the terminal and the audio playing equipment based on the first process for acquiring the data of the running time of the second process so as to respond to a data transmission request of the audio playing equipment;
and the triggering module is used for triggering the terminal to establish a third process corresponding to the application after the version updating of the application is finished when the completion of the version updating of the application is detected, wherein the third process is used for taking over the data transmission connection between the terminal and the audio playing equipment established by the first process.
7. The data transmission control device according to claim 6, characterized in that the device further comprises:
and the updating module is used for responding to the instruction and updating the version of the application.
8. The data transmission control device of claim 7, wherein the triggering module is further configured to:
acquiring the running time data of the first process, and transmitting the running time data of the first process to the third process through inter-process communication;
and establishing data transmission connection between the terminal and the audio playing equipment based on a third process for acquiring the data of the running time of the first process so as to respond to a data transmission request of the audio playing equipment.
9. The data transmission control device of claim 8, wherein the triggering module is configured to:
detecting whether the first process is terminated or not after detecting that the version updating of the application is completed;
and if the first process is not detected to be terminated, triggering the terminal to create a third process corresponding to the application after the version updating is completed.
10. The data transmission control device according to claim 8 or 9, characterized in that the device further comprises:
a termination module to terminate the first process.
11. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable in the processor, wherein the processor implements the steps in the data transmission control method according to any one of claims 1 to 5 when executing the computer program.
12. A computer-readable storage medium storing a computer program, wherein the computer program is executable by a processor to implement the method of any one of claims 1 to 5.
CN201710209386.0A 2017-03-31 2017-03-31 Data transmission control method, device and terminal Active CN107015874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710209386.0A CN107015874B (en) 2017-03-31 2017-03-31 Data transmission control method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710209386.0A CN107015874B (en) 2017-03-31 2017-03-31 Data transmission control method, device and terminal

Publications (2)

Publication Number Publication Date
CN107015874A CN107015874A (en) 2017-08-04
CN107015874B true CN107015874B (en) 2020-01-14

Family

ID=59446328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710209386.0A Active CN107015874B (en) 2017-03-31 2017-03-31 Data transmission control method, device and terminal

Country Status (1)

Country Link
CN (1) CN107015874B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572797B (en) * 2020-04-29 2024-05-31 阿里巴巴集团控股有限公司 Data processing method, device and system and electronic equipment
CN112883220B (en) * 2021-01-22 2023-05-26 北京雷石天地电子技术有限公司 Audio processing method, audio processing device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033758A (en) * 2009-09-25 2011-04-27 深圳市福智软件技术有限公司 Firmware updating method of audio playing device and system using same
CN104965730A (en) * 2015-06-02 2015-10-07 广东欧珀移动通信有限公司 Version upgrading method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033758A (en) * 2009-09-25 2011-04-27 深圳市福智软件技术有限公司 Firmware updating method of audio playing device and system using same
CN104965730A (en) * 2015-06-02 2015-10-07 广东欧珀移动通信有限公司 Version upgrading method and system

Also Published As

Publication number Publication date
CN107015874A (en) 2017-08-04

Similar Documents

Publication Publication Date Title
JP6226394B2 (en) Instantiable gesture object
US11188225B2 (en) Touch control method and apparatus
WO2018188289A1 (en) Information display method, apparatus, and terminal
CN104765591A (en) Method and system for updating software configuration parameter, and terminal server
WO2018077041A1 (en) Method and apparatus for running application
US20140351729A1 (en) Method of operating application and electronic device implementing the same
US10474507B2 (en) Terminal application process management method and apparatus
US10506292B2 (en) Video player calling method, apparatus, and storage medium
CN105580392A (en) Seamless call switching
CN108021321A (en) Application running state control method and mobile terminal
CN108124016B (en) Method and device for sending POST (POST on POST) request
KR102118415B1 (en) Method and apparatus for executing application
CN106713608B (en) Application function state modification method and device and terminal
CN106919458B (en) Method and device for Hook target kernel function
EP3584700A1 (en) Fingerprint recognition method and related product
CN107515791B (en) Method for event service of local client application by local server
US10262648B2 (en) Method for controlling interference in audio service and terminal
WO2015062234A1 (en) Mobile terminal resource processing method, device and apparatus
CN107015874B (en) Data transmission control method, device and terminal
CN108762799A (en) A kind of method and terminal of update application
KR101876394B1 (en) Method and device for playing media data on a terminal
WO2017005080A1 (en) Webpage display method, terminal device and storage medium
CN115905742A (en) A data display method, device, equipment and storage medium
WO2024212776A1 (en) Resource reloading method and apparatus, electronic device, and storage medium
CN107391196B (en) Application update method and mobile terminal

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: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant