CN109656842A - A kind of data transmission method, terminal and storage medium - Google Patents

A kind of data transmission method, terminal and storage medium Download PDF

Info

Publication number
CN109656842A
CN109656842A CN201811577735.5A CN201811577735A CN109656842A CN 109656842 A CN109656842 A CN 109656842A CN 201811577735 A CN201811577735 A CN 201811577735A CN 109656842 A CN109656842 A CN 109656842A
Authority
CN
China
Prior art keywords
interface
data
object module
module interface
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811577735.5A
Other languages
Chinese (zh)
Inventor
俞斌
杨维琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201811577735.5A priority Critical patent/CN109656842A/en
Publication of CN109656842A publication Critical patent/CN109656842A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/82Protecting input, output or interconnection devices
    • G06F21/85Protecting input, output or interconnection devices interconnection devices, e.g. bus-connected or in-line devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Abstract

The embodiment of the present application discloses a kind of data transmission method, terminal and storage medium, the coffret of terminal in the embodiment of the present application includes multiple module interfaces, in data transmission, terminal receives interface open instructions corresponding with object module interface first, and the object module interface is used for transmission data corresponding with object module;Then the object module interface is opened according to the interface open instructions, so that the object module interface can transmit data;Receive data transfer instruction;The data of object module corresponding with the object module interface are transmitted according to the data transfer instruction and the object module interface.The program can only be transmitted and have already turned on data corresponding to the module of interface, the data without transmitting the module that other interfaces are not turned on, it is possible to reduce the probability of interface obstruction.

Description

A kind of data transmission method, terminal and storage medium
Technical field
This application involves data processing fields, and in particular to a kind of data transmission method, terminal and storage medium.
Background technique
Universal serial bus (USB, Universal Serial Bus) interface is widely used in mobile terminal at present, passes through USB interface realizes data transmission to charge, between other equipment etc., and USB is an external bus standard, for advising Model computer and external equipment are connected and communicate with.Generally, USB uses quadded cable, wherein two are strings for transmitting data Row of channels, another two provide power supply for upstream device, will be with both sides for any peripheral hardware for being successfully connected and being mutually distinguishable The flank speed that equipment can be supported transmits data.
In the prior art, mobile terminal, which is commonly used to USB interface connect with computer, carries out tune-up data biography It is defeated, still, when a certain module when something goes wrong, the tune-up data of all modules can all pass through USB transmission to computer, commissioning content Often data volume is big, and when output, computer will have in the short time and receive mass data, will cause USB interface obstruction.
Summary of the invention
The embodiment of the present application provides a kind of data transmission method, terminal and storage medium, can reduce the general of interface obstruction Rate.
The embodiment of the present application provides a kind of data transmission method, comprising:
Interface open instructions corresponding with object module interface is received, the object module interface is used for transmission and target mould The corresponding data of block;
The object module interface is opened according to the interface open instructions, so that the object module interface can pass Transmission of data;
Receive data transfer instruction;
Number corresponding with the object module is transmitted according to the data transfer instruction and the object module interface According to.
Optionally, in some embodiments, before reception interface open instructions corresponding with object module interface, institute State method further include:
A module interface is respectively set for the modules in the terminal.
Optionally, in some embodiments, a module interface is respectively set in the modules in the terminal Later, the method also includes:
Module interface corresponding to modules in the terminal is set to off closed state.
Optionally, in some embodiments, a module interface is respectively set in the modules in the terminal Later, the method also includes:
The module interface is encrypted respectively.
Optionally, in some embodiments, it is described according to the interface open instructions open with the object module interface, Include:
The object module interface is decrypted, the object module interface after being decrypted;
It is connect according to the object module that the interface open instructions is opened after decryption corresponding with the interface adjustment instruction Mouthful.
Optionally, in some embodiments, described to be passed according to the data transfer instruction and the object module interface After defeated data corresponding with the object module, the method also includes:
Whether detection data transmission terminates;
If terminating, the object module interface is closed.
Optionally, in some embodiments, the data include tune-up data.
Correspondingly, the embodiment of the present application also provides a kind of terminal, the coffret of the terminal includes multiple module interfaces, The terminal includes:
One or more processors;
Memory;And
One or more application program, wherein one or more of application programs are stored in the memory, and It is configured to be executed by the processor;
First receiving unit, for receiving interface open instructions corresponding with object module interface, the object module is connect Mouth is used for transmission data corresponding with object module;
Opening unit, for opening the object module interface according to the interface open instructions, so that the target Module interface can transmit data;
Second receiving unit, for receiving data transmission instruction;
Transmission unit, for according to the data transfer instruction and object module interface transmission and the target mould The corresponding data of block.
Optionally, in some embodiments, the terminal further include:
First setting unit, for a module interface to be respectively set for the modules in the terminal.
Optionally, in some embodiments, the terminal further include:
Second setting unit, for module interface corresponding to modules in the terminal to be set to off closed state.
Optionally, in some embodiments, the terminal further include:
Encryption unit, for the module interface to be encrypted respectively.
Optionally, in some embodiments, the opening unit is specifically used for:
The object module interface is decrypted, the object module interface after being decrypted;
It is connect according to the object module that the interface open instructions is opened after decryption corresponding with the interface adjustment instruction Mouthful.
Optionally, in some embodiments, the terminal further include:
Whether detection unit terminates for detection data transmission;
Closing unit, for when the data transfer ends, closing the object module interface.
Correspondingly, the embodiment of the present application also provides a kind of terminal, comprising:
Radio circuit, memory, bus and processor;
The bus, for connecting the radio circuit, the memory and the processor;
The memory, for storing application program;
The processor, for executing any data provided by the embodiments of the present application by calling the application program Step in transmission method.
In addition, the embodiment of the present application also provides a kind of storage medium, the storage medium is stored with a plurality of instruction, the finger It enables and being loaded suitable for processor, to execute the step in any data transmission method provided by the embodiments of the present application.
The coffret of terminal in the embodiment of the present application includes multiple module interfaces, in data transmission, terminal first Interface open instructions corresponding with object module interface is received, the object module interface is used for transmission corresponding with object module Data;Then the object module interface is opened according to the interface open instructions, so that the object module interface can To transmit data;Receive data transfer instruction;According to the data transfer instruction and object module interface transmission and institute State the corresponding data of object module.The program can only be transmitted and have already turned on data corresponding to the module of interface, without passing The data for the module that other defeated interfaces are not turned on, it is possible to reduce the probability of interface obstruction.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is the first pass schematic diagram of data transmission method provided by the embodiments of the present application;
Fig. 2 is the second procedure schematic diagram of data transmission method provided by the embodiments of the present application;
Fig. 3 a is a kind of structural schematic diagram of terminal provided by the embodiments of the present application;
Fig. 3 b is another structural schematic diagram of terminal provided by the embodiments of the present application;
Fig. 4 a is another structural schematic diagram of terminal provided by the embodiments of the present application;
Fig. 4 b is another structural schematic diagram of terminal provided by the embodiments of the present application;
Fig. 5 is another structural schematic diagram of terminal provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, those skilled in the art's every other implementation obtained without creative efforts Example, shall fall in the protection scope of this application.
In the following description, the specific embodiment of the application will refer to the step as performed by one or multi-section computer And symbol illustrates, unless otherwise stating clearly.Therefore, these steps and operation will have to mention for several times is executed by computer, this paper institute The computer execution of finger includes by representing with the computer processing unit of the electronic signal of the data in a structuring pattern Operation.This operation is converted at the data or the position being maintained in the memory system of the computer, reconfigurable Or in addition change the running of the computer in mode known to the tester of this field.The maintained data structure of the data For the provider location of the memory, there is the specific feature as defined in the data format.But the application principle is with above-mentioned text Word illustrates that be not represented as a kind of limitation, this field tester will appreciate that plurality of step and behaviour as described below Also it may be implemented in hardware.
The principle of the application is grasped using many other wide usages or specific purpose operation, communication environment or configuration Make.The known example suitable for the arithmetic system of the application, environment and configuration may include (but being not limited to) hold phone, Personal computer, server, multicomputer system, system, body frame configuration computer and distributed arithmetic ring based on micro computer Border, which includes any above system or devices.
Term " first ", " second " and " third " in the application etc. are for distinguishing different objects, rather than for retouching State particular order.In addition, term " includes " and " having " and their any deformations, it is intended that cover and non-exclusive include.
The embodiment of the present application provides a kind of data transmission method, terminal and storage medium.
Wherein, the terminal in the application can be mobile phone, tablet computer, palm PC (PDA, Personal Digital Assistant) etc..In the embodiment of the present application, the coffret of terminal includes multiple module interfaces, in data transmission, first Terminal receives interface open instructions corresponding with object module interface, and the object module interface is used for transmission and object module phase Corresponding data;Then the object module interface is opened according to the interface open instructions, so that the object module connects Mouth can transmit data;Receive data transfer instruction;It is transmitted according to the data transfer instruction and the object module interface Data corresponding with the object module.The program can only be transmitted and have already turned on data corresponding to the module of interface, without The data for the module that other interfaces are not turned on can be transmitted, it is possible to reduce the probability of interface obstruction.
It is described in detail separately below.It should be noted that the sequence of following embodiment is not as preferably suitable to embodiment The restriction of sequence.
Wherein, for the embodiment of the present application using the data transmitted as tune-up data, the coffret of terminal is that USB interface is example It is illustrated.
Referring to Fig. 1, Fig. 1 is the first pass schematic diagram of data transmission method provided by the embodiments of the present application.This method Detailed process can be such that
101, interface open instructions corresponding with object module interface is received.
The object module interface is used for transmission data corresponding with object module, wherein when interface does not have data biography When defeated, interface is all in closed state, only the interface data transmission in the open state that just can be carried out respective modules.
It should be noted that the coffret of the terminal in the embodiment of the present application includes multiple module interfaces, because at end During the exploitation of end, need to be respectively provided with a module interface for the modules in terminal, which possesses control The data of corresponding module processed are transmitted.
For example, can be respectively provided with a USB_OPEN in data control file (USBFILE) for modules, (module is connect Mouthful), to control whether the usb data of energy output module;Such as in central processing unit (CPU, Central Processing The USB_OPEN of modules is set in the data control file in Unit), as follows:
Camera_USB_OPEN;
Lcd_USB_OPEN;
Key_USB_OPEN;
Torch_USB_OPEN。
Wherein, Camera_USB_OPEN is used to control the output of the tune-up data of Camera module, and Lcd_USB_OPEN is used In the output of the tune-up data of control Lcd module, Key_USB_OPEN is used to control the output of the tune-up data of Key module, Torch_USB_OPEN is used to control the output of the tune-up data of Torch module.
In the process of development, it is also necessary to module interface corresponding to modules is set to off closed state, wherein this Shen Please be in embodiment, when no tune-up data transmits, module interface corresponding to modules is each all in closed state It is as follows that module interface is in close state code:
Camera_USB_OPEN=0;
Lcd_USB_OPEN=0;
Key_USB_OPEN=0;
Torch_USB_OPEN=0.
Wherein, when USB_OPEN=0, which is in close state, when USB_OPEN=1, at the module interface In opening state.
In some embodiments, it is respectively set after a module interface for the modules in the terminal, the side Method further include: the module interface is encrypted respectively.
Wherein, in another embodiment, it is respectively set after a module interface for modules, it can be by each mould Block interface is all placed in a file, only need to be to including modules interface when module interface is encrypted The file of code is encrypted.
File, which is encrypted, which can place others skilled in the art or user, arbitrarily controls tune-up data USB output, It ensures information security.
Wherein, the interface open instructions in the application is commissioning staff when finding that object module goes wrong, and is led to Cross what corresponding button triggering terminal in terminal generated, which is used to open the corresponding interface of object module from pass Closed state is transformed into opening state.
102, the object module interface is opened according to the interface open instructions, so that the object module interface can To transmit data.
In the present embodiment, after terminal receives interface open instructions corresponding with object module interface, it will according to Interface open instructions opens object module interface.
It specifically, can be when object module interface be Camera_USB, then receiving Camera_USB's in terminal After open instructions, it will acquire the data control file in terminal, be then amended as follows:
Camera_USB_OPEN=1;
Lcd_USB_OPEN=0;
Key_USB_OPEN=0;
Torch_USB_OPEN=0.
It should be noted that in some embodiments, being connect opening the object module according to the interface open instructions Before mouthful, it is also necessary to the object module interface be decrypted, the object module interface after being decrypted, then basis The interface open instructions opens the object module interface after decryption corresponding with the interface adjustment instruction.
Specifically, the password that can receive commissioning staff's input, then compares the password and preset password, if right It answers, then file corresponding to object module interface can be decrypted at this time, if not corresponding to, decryption failure at this time.
103, data transfer instruction is received.
After opening object module interface, then the transmission of the tune-up data of object module interface can be carried out at this time, At this point, firstly the need of data transfer instruction is received, which is used to indicate the tune-up data of terminal transmission module extremely Computer or other terminals, so that the module data in the terminal can be debugged on computer or other terminals, the data Transmission instruction can be triggered by the corresponding button of the terminal by commissioning staff and be generated, and can also access USB data line in terminal When automatically generate, specifically herein without limitation.
104, number corresponding with object module is transmitted according to the data transfer instruction and the object module interface According to.
It, will be according to the data transfer instruction and the mesh after receiving data transfer instruction in the present embodiment It marks module interface and transmits data corresponding with the object module, since in a step 102, terminal only opens and target mould The corresponding interface of block, so terminal also can only transmit tune-up data corresponding with the object module in data transmission.
Specifically, after receiving data transfer instruction, terminal can control in file in data judges that modules connect The switch state of mouth does not transmit the corresponding data of the module then, as the USB_OPEN of module as the USB_OPEN=0 of module When=1, then the corresponding data of the module are transmitted.
It should be noted that then needing to close object module at this time when detecting the data transfer ends (debugging terminates) Interface, i.e., Camera_USB_OPEN=1 is modified as Camera_USB_OPEN=0.
Since in debugging, terminal will not all export the data of all modules to computer or other terminals, it is possible to It reduces computer or other terminals receives the probability of mass data, the i.e. probability of reduction USB interface obstruction in a short time, simultaneously It can also solve the problem of charging pause caused by blocking due to USB.
The coffret of terminal in the embodiment of the present application includes multiple module interfaces, in data transmission, terminal first Interface open instructions corresponding with object module interface is received, the object module interface is used for transmission corresponding with object module Data;Then the object module interface is opened according to the interface open instructions, so that the object module interface can To transmit data;Receive data transfer instruction;According to the data transfer instruction and object module interface transmission and institute State the corresponding data of object module.The program can only be transmitted and have already turned on data corresponding to the module of interface, without passing The data for the module that other defeated interfaces are not turned on, it is possible to reduce the probability of interface obstruction.
Referring to Fig. 2, Fig. 2 is the second procedure schematic diagram of data transmission method provided by the embodiments of the present application.This method Detailed process can be such that
201, a module interface is respectively set for the modules in terminal.
It should be noted that the coffret of the terminal in the embodiment of the present application includes multiple module interfaces, because at end During the exploitation of end, need to be respectively provided with a module interface for the modules in terminal, which possesses control The data of corresponding module processed are transmitted.
For example, can be respectively provided with a USB_OPEN in data control file (USBFILE) for modules, (module is connect Mouthful), to control whether the usb data of energy output module;Such as in central processing unit (CPU, Central Processing The USB_OPEN of modules is set in the data control file in Unit), as follows:
Camera_USB_OPEN;
Lcd_USB_OPEN;
Key_USB_OPEN;
Torch_USB_OPEN。
Wherein, Camera_USB_OPEN is used to control the output of the tune-up data of Camera module, and Lcd_USB_OPEN is used In the output of the tune-up data of control Lcd module, Key_USB_OPEN is used to control the output of the tune-up data of Key module, Torch_USB_OPEN is used to control the output of the tune-up data of Torch module.
202, module interface corresponding to modules in the terminal is set to off closed state.
In the process of development, it is also necessary to module interface corresponding to modules is set to off closed state, wherein this Shen Please be in embodiment, when no tune-up data transmits, module interface corresponding to modules is each all in closed state It is as follows that module interface is in close state code:
Camera_USB_OPEN=0;
Lcd_USB_OPEN=0;
Key_USB_OPEN=0;
Torch_USB_OPEN=0.
Wherein, when USB_OPEN=0, which is in close state, when USB_OPEN=1, at the module interface In opening state.
203, the module interface is encrypted respectively.
In some embodiments, it is respectively set after a module interface for the modules in the terminal, the side Method further include: the module interface is encrypted respectively.
Wherein, in another embodiment, it is respectively set after a module interface for modules, it can be by each mould Block interface is all placed in a file, only need to be to including modules interface when module interface is encrypted The file of code is encrypted.
File, which is encrypted, which can place others skilled in the art or user, arbitrarily controls tune-up data USB output, It ensures information security.
204, interface open instructions corresponding with object module interface is received.
Wherein, the interface open instructions in the application is commissioning staff when finding that object module goes wrong, and is led to Cross what corresponding button triggering terminal in terminal generated, which is used to open the corresponding interface of object module from pass Closed state is transformed into opening state.
205, the object module interface is decrypted, the object module interface after being decrypted.
Before opening the object module interface according to the interface open instructions, it is also necessary to be connect to the object module Mouth is decrypted, the object module interface after being decrypted, and is then opened according to the interface open instructions and is connect with described Object module interface after the corresponding decryption of mouth adjustment instruction.
Specifically, the password that can receive commissioning staff's input, then compares the password and preset password, if right It answers, then file corresponding to object module interface can be decrypted at this time, if not corresponding to, decryption failure at this time.
206, the target mould after decryption corresponding with the interface adjustment instruction is opened according to the interface open instructions Block interface.
After the decryption, it will object module interface is opened according to interface open instructions.
It specifically, can be when object module interface be Camera_USB, then receiving Camera_USB's in terminal After open instructions, it will acquire the data control file in terminal, be then amended as follows:
Camera_USB_OPEN=1;
Lcd_USB_OPEN=0;
Key_USB_OPEN=0;
Torch_USB_OPEN=0.
207, data transfer instruction is received.
After opening object module interface, then the transmission of the tune-up data of object module interface can be carried out at this time, At this point, firstly the need of data transfer instruction is received, which is used to indicate the tune-up data of terminal transmission module extremely Computer or other terminals, so that the module data in the terminal can be debugged on computer or other terminals, the data Transmission instruction can be triggered by the corresponding button of the terminal by commissioning staff and be generated, and can also access USB data line in terminal When automatically generate, specifically herein without limitation.
208, corresponding with the object module according to the data transfer instruction and object module interface transmission Data.
It, will be according to the data transfer instruction and the mesh after receiving data transfer instruction in the present embodiment It marks module interface and transmits data corresponding with the object module, since terminal only opens connect corresponding with object module Mouthful, so terminal also can only transmit tune-up data corresponding with the object module in data transmission.
Specifically, after receiving data transfer instruction, terminal can control in file in data judges that modules connect The switch state of mouth does not transmit the corresponding data of the module then, as the USB_OPEN of module as the USB_OPEN=0 of module When=1, then the corresponding data of the module are transmitted.
209, whether detection data transmission terminates.
Specifically, the end of transmission can be sent by terminal or the computer connecting with terminal or other terminals by commissioning staff Instruction, so that terminal detects the end of transmission, it can also be when USB data line be separated with terminal, automatic trigger terminal induction number According to the end of transmission.
If 210, the data transfer ends, the object module interface is closed.
It when detecting the data transfer ends (debugging terminates), then needs to close the interface of object module at this time, i.e., will Camera_USB_OPEN=1 is modified as Camera_USB_OPEN=0.
Since in debugging, terminal will not all export the data of all modules to computer or other terminals, it is possible to It reduces computer or other terminals receives the probability of mass data, the i.e. probability of reduction USB interface obstruction in a short time, simultaneously It can also solve the problem of charging pause caused by blocking due to USB.
The coffret of terminal in the embodiment of the present application includes multiple module interfaces, in data transmission, terminal first Interface open instructions corresponding with object module interface is received, the object module interface is used for transmission corresponding with object module Data;Then the object module interface is opened according to the interface open instructions, so that the object module interface can To transmit data;Receive data transfer instruction;According to the data transfer instruction and object module interface transmission and institute State the corresponding data of object module.The program can only be transmitted and have already turned on data corresponding to the module of interface, without passing The data for the module that other defeated interfaces are not turned on, it is possible to reduce the probability of interface obstruction.
In order to better implement data transmission method provided by the embodiments of the present application, the embodiment of the present application also provides a kind of end End, the terminal are specifically as follows mobile phone, tablet computer, palm PC etc..The wherein meaning of noun and above-mentioned data transmission method In it is identical, specific implementation details can be with reference to the explanation in embodiment of the method.
Fig. 3 a is please referred to, Fig. 3 a is the structural schematic diagram of terminal 300 provided by the embodiments of the present application, 300 state of terminal Detection device 300 includes the first receiving unit 301, opening unit 302, the second receiving unit 303, transmission unit 304, as follows:
First receiving unit 301, for receiving interface open instructions corresponding with object module interface, the object module Interface is used for transmission data corresponding with object module;
Opening unit 302, for opening the object module interface according to the interface open instructions, so that the mesh Mark module interface can transmit data;
Second receiving unit 303, for receiving data transmission instruction;
Transmission unit 304, for according to the data transfer instruction and object module interface transmission and the mesh Mark the corresponding data of module.
As shown in Figure 3b, in some embodiments, the terminal 300 further include:
First setting unit 305, for a module interface to be respectively set for the modules in the terminal 300.
In some embodiments, the terminal 300 further include:
Second setting unit 306, for module interface corresponding to modules in the terminal 300 to be set off State.
In some embodiments, the terminal 300 further include:
Encryption unit 307, for the module interface to be encrypted respectively.
In some embodiments, the opening unit 302 is specifically used for:
The object module interface is decrypted, the object module interface after being decrypted;
It is connect according to the object module that the interface open instructions is opened after decryption corresponding with the interface adjustment instruction Mouthful.
In some embodiments, the terminal 300 further include:
Whether detection unit 308 terminates for detection data transmission;
Closing unit 309, for when the data transfer ends, closing the object module interface.
The coffret of terminal in the embodiment of the present application includes multiple module interfaces, in data transmission, first first Receiving unit 301 receives interface open instructions corresponding with object module interface, and the object module interface is used for transmission and mesh Mark the corresponding data of module;Then opening unit 302 opens the object module interface according to the interface open instructions, with The object module interface is allowed to transmit data;Second receiving unit 303 receives data transfer instruction;Transmission unit 304 Data corresponding with the object module are transmitted according to the data transfer instruction and the object module interface.The program Data corresponding to the module for having already turned on interface only can be transmitted, the number without transmitting the module that other interfaces are not turned on According to, it is possible to reduce the probability of interface obstruction.
Fig. 4 a is please referred to, Fig. 4 a is a kind of structural schematic diagram of terminal provided by the embodiments of the present application, which includes Memory 410, one or more processors 420 and one or more application program, wherein the one or more application program It is stored in the memory 410, and is configured to be executed by the processor 420;The processor 420 may include the first reception list First 401, opening unit 402, the second receiving unit 403, transmission unit 404.For example, the structure of the above all parts and connection are closed System can be such that
Memory 410 can be used for storing application program and data.It include that can hold in the application program that memory 410 stores Line code.Application program can form various functional modules.Processor 420 is stored in the application journey of memory 410 by operation Sequence, thereby executing various function application and data processing.In addition, memory 410 may include high-speed random access memory, It can also include nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-states are deposited Memory device.Correspondingly, memory 410 can also include Memory Controller, to provide visit of the processor 420 to memory 410 It asks.
Processor 420 is the control centre of device, using the various pieces of various interfaces and the entire terminal of connection, is led to It crosses operation or executes the application program being stored in memory 410, and call the data being stored in memory 410, execute The various functions and processing data of device, to carry out integral monitoring to device.Optionally, processor 420 may include one or Multiple processing cores;Preferably, processor 420 can integrate application processor and modem processor, wherein application processor Main processing operation system, user interface and application program etc..
Specifically in the present embodiment, processor 420 can be according to following instruction, by one or more application program The corresponding executable code of process be loaded into memory 410, and run by processor 420 storage in store 410 Application program, to realize various functions:
First receiving unit 401, for receiving interface open instructions corresponding with object module interface, the object module Interface is used for transmission data corresponding with object module;
Opening unit 402, for opening the object module interface according to the interface open instructions, so that the mesh Mark module interface can transmit data;
Second receiving unit 403, for receiving data transmission instruction;
Transmission unit 404, for according to the data transfer instruction and object module interface transmission and the mesh Mark the corresponding data of module.
As shown in Figure 3b, in some embodiments, the terminal 400 further include:
First setting unit 405, for a module interface to be respectively set for the modules in the terminal 400.
In some embodiments, the terminal 400 further include:
Second setting unit 406, for module interface corresponding to modules in the terminal 400 to be set off State.
In some embodiments, the terminal 400 further include:
Encryption unit 407, for the module interface to be encrypted respectively.
In some embodiments, the opening unit 402 is specifically used for:
The object module interface is decrypted, the object module interface after being decrypted;
It is connect according to the object module that the interface open instructions is opened after decryption corresponding with the interface adjustment instruction Mouthful.
In some embodiments, the terminal 400 further include:
Whether detection unit 408 terminates for detection data transmission;
Closing unit 409, for when the data transfer ends, closing the object module interface.
The coffret of terminal in the embodiment of the present application includes multiple module interfaces, in data transmission, first first Receiving unit 401 receives interface open instructions corresponding with object module interface, and the object module interface is used for transmission and mesh Mark the corresponding data of module;Then opening unit 402 opens the object module interface according to the interface open instructions, with The object module interface is allowed to transmit data;Second receiving unit 403 receives data transfer instruction;Transmission unit 404 Data corresponding with the object module are transmitted according to the data transfer instruction and the object module interface.The program Data corresponding to the module for having already turned on interface only can be transmitted, the number without transmitting the module that other interfaces are not turned on According to, it is possible to reduce the probability of interface obstruction.
Correspondingly, the embodiment of the present application also provides a kind of terminal, as shown in figure 5, the terminal can be used for implementing above-mentioned reality The data transmission method provided in example and terminal are provided.The terminal may include radio frequency (RF, Radio Frequency) circuit 501, It includes one or more the memory 502 of computer readable storage medium, input unit 503, display unit 504, pass Sensor 505, Wireless Fidelity (WiFi, Wireless Fidelity) module 507, includes one or one at voicefrequency circuit 506 The components such as the processor 508 and power supply 509 of a above processing core, wherein above-mentioned all parts can be connected by bus. It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 5, may include than diagram More or fewer components perhaps combine certain components or different component layouts.Wherein:
RF circuit 501 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, one or the processing of more than one processor 508 are transferred to;In addition, the data for being related to uplink are sent to Base station.In general, RF circuit 501 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, uses Family identity module (SIM, Subscriber Identity Module) card, transceiver, coupler, low-noise amplifier (LNA, Low Noise Amplifier), duplexer etc..In addition, RF circuit 501 can also by wireless communication with network and its He communicates equipment.Any communication standard or agreement, including but not limited to global system for mobile communications can be used in the wireless communication (GSM, Global System of Mobile communication), general packet radio service (GPRS, General Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division it is more Location (WCDMA, Wideband Code Division Multiple Access), long term evolution (LTE, Long Term Evolution), Email, short message service (SMS, Short Messaging Service) etc..
Memory 502 can be used for storing software program and module, and processor 508 is stored in memory 502 by operation Software program and module, thereby executing various function application and data processing.Memory 502 can mainly include storage journey Sequence area and storage data area, wherein storing program area can the (ratio of application program needed for storage program area, at least one function Such as sound-playing function, image player function) etc.;Storage data area, which can be stored, uses created data according to terminal (such as audio data, phone directory etc.) etc..In addition, memory 502 may include high-speed random access memory, can also include Nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Phase Ying Di, memory 502 can also include Memory Controller, to provide processor 508 and input unit 503 to memory 502 Access.
Input unit 503 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, in a specific embodiment In, input unit 503 may include touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touch display screen or touching Control plate, collect user on it or nearby touch operation (such as user using any suitable object such as finger, stylus or Operation of the attachment on touch sensitive surface or near touch sensitive surface), and corresponding connection dress is driven according to preset formula It sets.Optionally, touch sensitive surface may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus is examined The touch orientation of user is surveyed, and detects touch operation bring signal, transmits a signal to touch controller;Touch controller from Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then gives processor 508, and can reception processing Order that device 508 is sent simultaneously is executed.Furthermore, it is possible to a variety of using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Type realizes touch sensitive surface.In addition to touch sensitive surface, input unit 503 can also include other input equipments.Specifically, other are defeated Entering equipment can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse One of mark, operating stick etc. are a variety of.
Display unit 504 can be used for showing information input by user or be supplied to user information and terminal it is various Graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof.Display Unit 504 may include display panel, optionally, can using liquid crystal display (LCD, Liquid Crystal Display), The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display panel.Further , touch sensitive surface can cover display panel, after touch sensitive surface detects touch operation on it or nearby, send processing to Device 508 is followed by subsequent processing device 508 and is provided on a display panel accordingly according to the type of touch event to determine the type of touch event Visual output.Although touch sensitive surface and display panel are to realize input and input as two independent components in Fig. 5 Function, but in some embodiments it is possible to touch sensitive surface and display panel are integrated and realizes and outputs and inputs function.
Terminal may also include at least one sensor 505, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjust the brightness of display panel, proximity sensor can close display panel and/or back when terminal is moved in one's ear Light.As a kind of motion sensor, gravity accelerometer can detect (generally three axis) acceleration in all directions Size can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (such as horizontal/vertical screen switching, Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;It can also configure as terminal The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 506, loudspeaker, microphone can provide the audio interface between user and terminal.Voicefrequency circuit 506 can By the electric signal after the audio data received conversion, it is transferred to loudspeaker, voice signal output is converted to by loudspeaker;It is another The voice signal of collection is converted to electric signal by aspect, microphone, is converted to audio data after being received by voicefrequency circuit 506, then After the processing of audio data output processor 508, it is sent to such as another terminal through RF circuit 501, or by audio data Output is further processed to memory 502.Voicefrequency circuit 506 is also possible that earphone jack, with provide peripheral hardware earphone with The communication of terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 507 Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 5 is shown WiFi module 507, but it is understood that, and it is not belonging to must be configured into for terminal, it can according to need do not changing completely Become in the range of the essence of invention and omits.
Processor 508 is the control centre of terminal, using the various pieces of various interfaces and connection whole mobile phone, is led to It crosses operation or executes the software program and/or module being stored in memory 502, and call and be stored in memory 502 Data execute the various functions and processing data of terminal, to carry out integral monitoring to mobile phone.Optionally, processor 508 can wrap Include one or more processing cores;Preferably, processor 508 can integrate application processor and modem processor, wherein answer With the main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication. It is understood that above-mentioned modem processor can not also be integrated into processor 508.
Terminal further includes the power supply 509 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply pipe Reason system and processor 508 are logically contiguous, to realize management charging, electric discharge and power managed by power-supply management system Etc. functions.Power supply 509 can also include one or more direct current or AC power source, recharging system, power failure inspection The random components such as slowdown monitoring circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal can also include camera, bluetooth module etc., and details are not described herein.Specifically in this implementation In example, the processor 508 in terminal can be corresponding by the process of one or more application program according to following instruction Executable file is loaded into memory 502, and the application program being stored in memory 502 is run by processor 508, from And realize various functions:
Interface open instructions corresponding with object module interface is received, the object module interface is used for transmission and target mould The corresponding data of block;
The object module interface is opened according to the interface open instructions, so that the object module interface can pass Transmission of data;
Receive data transfer instruction;
Number corresponding with the object module is transmitted according to the data transfer instruction and the object module interface According to.
Optionally, before reception interface open instructions corresponding with object module interface, the method also includes:
A module interface is respectively set for the modules in the terminal.
Optionally, the modules in the terminal are respectively set after a module interface, and the method is also Include:
Module interface corresponding to modules in the terminal is set to off closed state.
Optionally, the modules in the terminal are respectively set after a module interface, and the method is also Include:
The module interface is encrypted respectively.
It is optionally, described to be opened and the object module interface according to the interface open instructions, comprising:
The object module interface is decrypted, the object module interface after being decrypted;
It is connect according to the object module that the interface open instructions is opened after decryption corresponding with the interface adjustment instruction Mouthful.
Optionally, described according to the data transfer instruction and object module interface transmission and the object module After corresponding data, the method also includes:
Whether detection data transmission terminates;
If terminating, the object module interface is closed.
Optionally, the data include tune-up data.
Above each operation is for details, reference can be made to the embodiment of front, and details are not described herein.
From the foregoing, it will be observed that the coffret of the terminal in the embodiment of the present application includes multiple module interfaces, in data transmission, Terminal receives interface open instructions corresponding with object module interface first, and the object module interface is used for transmission and target mould The corresponding data of block;Then the object module interface is opened according to the interface open instructions, so that the target mould Block interface can transmit data;Receive data transfer instruction;According to the data transfer instruction and the object module interface Transmit data corresponding with the object module.The program can only be transmitted and have already turned on data corresponding to the module of interface, Data without transmitting the module that other interfaces are not turned on, it is possible to reduce the probability of interface obstruction.
It will appreciated by the skilled person that all or part of the steps in the various methods of above-described embodiment can be with It is completed by instructing, or relevant hardware is controlled by instruction to complete, which can store computer-readable deposits in one In storage media, and is loaded and executed by processor.
For this purpose, the embodiment of the present application provides a kind of storage medium, wherein being stored with a plurality of instruction, which can be processed Device is loaded, to execute any network flow resource sharing side for being applied to share terminal provided by the embodiment of the present application Step in method.For example, the instruction can execute following steps:
Interface open instructions corresponding with object module interface is received, the object module interface is used for transmission and target mould The corresponding data of block;
The object module interface is opened according to the interface open instructions, so that the object module interface can pass Transmission of data;
Receive data transfer instruction;
Number corresponding with the object module is transmitted according to the data transfer instruction and the object module interface According to.
The specific implementation of above each operation can be found in the embodiment of front, and details are not described herein.
Wherein, which may include: read-only memory (ROM, Read Only Memory), random access memory Body (RAM, Random Access Memory), disk or CD etc..
By the instruction stored in the storage medium, any data provided by the embodiment of the present application can be executed and passed Step in transmission method, it is thereby achieved that achieved by any data transmission method provided by the embodiment of the present application Beneficial effect is detailed in the embodiment of front, and details are not described herein.
Detailed Jie has been carried out to a kind of data transmission method, terminal and storage medium provided by the embodiment of the present application above It continues, specific examples are used herein to illustrate the principle and implementation manner of the present application, and the explanation of above embodiments is only It is to be used to help understand the method for this application and its core ideas;Meanwhile for those skilled in the art, according to the application's Thought, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as Limitation to the application.

Claims (10)

1. a kind of data transmission method, which is characterized in that the method is applied to terminal, and the coffret of the terminal includes more A module interface, comprising:
Interface open instructions corresponding with object module interface is received, the object module interface is used for transmission and object module phase Corresponding data;
The object module interface is opened according to the interface open instructions, so that the object module interface can transmit number According to;
Receive data transfer instruction;
Data corresponding with the object module are transmitted according to the data transfer instruction and the object module interface.
2. the method according to claim 1, wherein described receive interface opening corresponding with object module interface Before instruction, the method also includes:
A module interface is respectively set for the modules in the terminal.
3. according to the method described in claim 2, it is characterized in that, the modules in the terminal are respectively set one After a module interface, the method also includes:
Module interface corresponding to modules in the terminal is set to off closed state.
4. according to the method described in claim 2, it is characterized in that, the modules in the terminal are respectively set one After a module interface, the method also includes:
The module interface is encrypted respectively.
5. according to the method described in claim 4, it is characterized in that, described open and the mesh according to the interface open instructions Mark module interface, comprising:
The object module interface is decrypted, the object module interface after being decrypted;
The object module interface after decryption corresponding with the interface adjustment instruction is opened according to the interface open instructions.
6. the method according to any one of claims 1 to 5, which is characterized in that described according to the data transfer instruction And after the object module interface transmits data corresponding with the object module, the method also includes:
Whether detection data transmission terminates;
If terminating, the object module interface is closed.
7. the method according to any one of claims 1 to 5, which is characterized in that the data include tune-up data.
8. a kind of terminal, which is characterized in that the coffret of the terminal includes multiple module interfaces, and the terminal includes:
One or more processors;
Memory;And
One or more application program wherein one or more of application programs are stored in the memory, and configures To be executed by the processor;
First receiving unit, for receiving interface open instructions corresponding with object module interface, the object module interface is used In transmission data corresponding with object module;
Opening unit, for opening the object module interface according to the interface open instructions, so that the object module Interface can transmit data;
Second receiving unit, for receiving data transmission instruction;
Transmission unit, for according to the data transfer instruction and object module interface transmission and the object module phase Corresponding data.
9. a kind of terminal characterized by comprising
Radio circuit, memory, bus and processor;
The bus, for connecting the radio circuit, the memory and the processor;
The memory, for storing application program;
The processor, for executing the described in any item data of the claims 1 to 7 by calling the application program Step in transmission method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with a plurality of instruction, and described instruction is suitable for processor It is loaded, the step in 1 to 7 described in any item data transmission methods is required with perform claim.
CN201811577735.5A 2018-12-20 2018-12-20 A kind of data transmission method, terminal and storage medium Pending CN109656842A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811577735.5A CN109656842A (en) 2018-12-20 2018-12-20 A kind of data transmission method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811577735.5A CN109656842A (en) 2018-12-20 2018-12-20 A kind of data transmission method, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN109656842A true CN109656842A (en) 2019-04-19

Family

ID=66115486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811577735.5A Pending CN109656842A (en) 2018-12-20 2018-12-20 A kind of data transmission method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109656842A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209767A (en) * 2016-06-20 2016-12-07 Tcl海外电子(惠州)有限公司 Data transmission method and system
CN108268399A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 A kind of method and mobile terminal of data communication
CN108268415A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 A kind of method and mobile terminal of data communication

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209767A (en) * 2016-06-20 2016-12-07 Tcl海外电子(惠州)有限公司 Data transmission method and system
CN108268399A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 A kind of method and mobile terminal of data communication
CN108268415A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 A kind of method and mobile terminal of data communication

Similar Documents

Publication Publication Date Title
CN104580167B (en) A kind of methods, devices and systems transmitting data
CN106412093B (en) A kind of method for uploading of data, apparatus and system
CN104238893B (en) A kind of method and apparatus that video preview picture is shown
CN107203147B (en) Internet of Things network control system based on cloud platform and method
CN106326773B (en) A kind of method, apparatus and terminal of photo encryption handling
CN108920366A (en) One seed application adjustment method, apparatus and system
CN106598584A (en) Resource file processing method, apparatus and system
CN105389259B (en) A kind of method, apparatus and system for carrying out Application testing
CN106375582B (en) Vibration control method and device
CN110417543A (en) A kind of data ciphering method, device and storage medium
CN110058850A (en) A kind of development approach of application, device and storage medium
CN105530239B (en) Multi-medium data acquisition methods and device
CN107590397A (en) A kind of method and apparatus for showing embedded webpage
CN106371749A (en) Method and device for terminal control
CN104123276A (en) Method, device and system for intercepting popup windows in browser
CN104573437B (en) Information authentication method, device and terminal
CN107423598B (en) A kind of solution lock control method and mobile terminal
CN107066374B (en) Data processing method and mobile terminal
CN104424203B (en) Photo in mobile device shares state inspection method and system
CN106681884B (en) A kind of monitoring method and device of system calling
CN109688611A (en) A kind of configuration method, device, terminal and the storage medium of frequency range parameter
CN109714811A (en) A kind of SOT state of termination detection method, device, terminal and storage medium
CN104123210A (en) Method, device and system for testing performance of browser
CN106528231B (en) A kind of method and apparatus starting application program
CN105282330B (en) The method and device of automatic connection network

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190419

RJ01 Rejection of invention patent application after publication