CN108024223A - Data sharing method and device - Google Patents

Data sharing method and device Download PDF

Info

Publication number
CN108024223A
CN108024223A CN201711283880.8A CN201711283880A CN108024223A CN 108024223 A CN108024223 A CN 108024223A CN 201711283880 A CN201711283880 A CN 201711283880A CN 108024223 A CN108024223 A CN 108024223A
Authority
CN
China
Prior art keywords
terminal
data
connection
sharing
sharing data
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
CN201711283880.8A
Other languages
Chinese (zh)
Inventor
周鹏
骆艳飞
王乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201711283880.8A priority Critical patent/CN108024223A/en
Publication of CN108024223A publication Critical patent/CN108024223A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Abstract

The disclosure discloses a kind of data sharing method and device, belongs to wireless communication field, the described method includes:Detection first terminal whether there is shake event;When detecting the shake event of first terminal, the vibration parameters of first terminal are obtained, the first sensor data that vibration parameters are gathered by first terminal generate;At least one second terminal that there are identical vibration parameters with first terminal is searched for, the second sensor data that the vibration parameters of second terminal are gathered by second terminal generate;Establish the bluetooth connection with second terminal;First terminal is treated that sharing data is shared to second terminal by bluetooth connection.In the embodiment of the present disclosure, terminal to be connected only needs to keep identical motion state, terminal can carry out bluetooth connection with the terminal in same movement state automatically, terminal to be connected is manually selected without user in whole connection procedure, and connection key need not be manually entered, the process for establishing bluetooth connection is simplified, and then improves the efficiency of data sharing.

Description

Data sharing method and device
Technical field
The embodiment of the present disclosure is related to wireless communication field, more particularly to a kind of data sharing method and device.
Background technology
Constantly improve and development with Bluetooth transfer techniques, terminal room carries out closely data transfer using bluetooth to be become One selection well.
When user carries out closely data transfer using the bluetooth of terminal, the bluetooth of sending side terminal and receiving side terminal It is in opening.Sending side terminal search has nearby opened the other-end of bluetooth, and shows corresponding terminal list;With Family is selected in terminal list after needing the receiving side terminal for establishing bluetooth connection, and sending side terminal is sent to receiving side terminal Connection request;After receiving side terminal receives connection request, key authentication instruction is sent to sending side terminal, so that sender is whole End sends the key authentication request for carrying connection key according to key authentication instruction;When detect connection key it is pre- with itself During the key agreement deposited, receiving side terminal then establishes bluetooth connection with sending side terminal, and then carries out data by bluetooth connection Share.During whole data sharing, receiving side terminal and input connection key are selected from terminal list by user's hand It is dynamic to complete.
The content of the invention
During solving data sharing, establish bluetooth connection operation it is excessively cumbersome the problem of, the embodiment of the present disclosure A kind of information sharing method and device are provided, the technical solution is as follows:
First aspect, there is provided a kind of data sharing method, for first terminal, this method includes:
Detection first terminal whether there is shake event;
When detecting the shake event of first terminal, the vibration parameters of first terminal are obtained, vibration parameters are whole by first The first sensor data generation of end collection;
Search and at least one second terminal of the first terminal with identical vibration parameters, the vibration parameters of second terminal by The second sensor data generation of second terminal collection;
Establish the bluetooth connection with second terminal;
First terminal is treated that sharing data is shared to second terminal by bluetooth connection.
Optionally, this method, further includes:
Whether detection first terminal opens Bluetooth pairing function;
If first terminal opens Bluetooth pairing function, and the bluetooth of first terminal is closed, then in vibration parameters When the vibration frequency of instruction is more than threshold value, the bluetooth of first terminal is set on state.
Optionally, search has at least one second terminal of identical vibration parameters with first terminal, including:
The connection unpaired message of other each terminal broadcasts around obtaining;Connection unpaired message is that terminal is detecting shake Generated during event according to the vibration parameters of acquisition;
When detecting the second connection unpaired message identical with the first connection unpaired message, the connection of broadcast second is matched The terminal of information is determined as second terminal;First connection unpaired message is generated by first terminal according to the vibration parameters got;
The bluetooth connection with second terminal is established, including:
The connection request for including the first connection unpaired message is sent to second terminal by bluetooth, second terminal is used for basis Connection request sends request to first terminal by bluetooth and receives instruction;
Instruction is received according to request and establishes bluetooth connection with second terminal.
Optionally, first terminal is treated that sharing data is shared to second terminal by bluetooth connection, including:
When detecting when sharing data is dragged to presumptive area, sent by bluetooth connection to second terminal and wait to share Data, second terminal is used for when receiving when sharing data, according to the corresponding type of sharing data is treated, by applying accordingly Sharing data is treated in program response.
Second aspect, there is provided a kind of data sharing method, for second terminal, this method includes:
Detection second terminal whether there is shake event;
When detecting the shake event with second terminal, the vibration parameters of second terminal are obtained, vibration parameters are by second The second sensor data generation of terminal collection;
The first terminal that there are identical vibration parameters with second terminal is searched for, the vibration parameters of first terminal are by first terminal The first sensor data generation of collection;
Establish the bluetooth connection with first terminal;
Sharing data is treated by what bluetooth connection reception first terminal was shared.
Optionally, this method, further includes:
When receiving when sharing data, shown in notification bar and share notice;
When receiving the clicking operation to sharing notice, according to the data type for treating sharing data, accordingly should enable Sharing data is treated with program response;
Wherein, when treating that sharing data is picture, enable picture browsing application response and treat sharing data;
Sharing data is treated when when sharing data is multimedia, enabling multimedia application response;
When sharing data is text, enabling text-processing application response and treat sharing data;
When sharing data is application program, enabling sharing data is treated using the response of shop program.
The third aspect, there is provided a kind of data sharing device, for first terminal, which includes:
Detection module is shaken, detection first terminal is configured as and whether there is shake event;
Acquisition module, when being configured as detecting the shake event of first terminal, obtains the vibration parameters of first terminal, The first sensor data that vibration parameters are gathered by first terminal generate;
Search module, is configured to search at least one second terminal for having identical vibration parameters with first terminal, the The second sensor data that the vibration parameters of two terminals are gathered by second terminal generate;
Module is established, is configured as establishing the bluetooth connection with second terminal;
Sharing module, is configured as that first terminal being treated, sharing data is shared to second terminal by bluetooth connection.
Optionally, the device, further includes:
Function detection module, is configured as whether detection first terminal opens Bluetooth pairing function;
Setup module, if being configured as first terminal opens Bluetooth pairing function, and the bluetooth of first terminal is in and closes State, then when the vibration frequency of vibration parameters instruction is more than threshold value, state is set on by the bluetooth of first terminal.
Optionally, search module, including:
Acquiring unit, is configured as the connection unpaired message of other each terminal broadcasts around obtaining;Connect unpaired message It is that terminal is generated when detecting shake event according to the vibration parameters of acquisition;
Determination unit, when being configured as detecting the second connection unpaired message identical with the first connection unpaired message, The terminal for broadcasting the second connection unpaired message is determined as second terminal;First connection unpaired message is by first terminal according to acquisition The vibration parameters generation arrived;
Module is established, including:
Transmitting element, being configured as please to connection of the second terminal transmission comprising the first connection unpaired message by bluetooth Ask, second terminal is used to receive instruction to first terminal transmission request by bluetooth according to connection request;
Unit is established, is configured as receiving instruction according to request and second terminal establishes bluetooth connection.
Optionally, sharing module, is additionally configured to:
When detecting when sharing data is dragged to presumptive area, sent by bluetooth connection to second terminal and wait to share Data, second terminal is used for when receiving when sharing data, according to the corresponding type of sharing data is treated, by applying accordingly Sharing data is treated in program response.
Fourth aspect, there is provided a kind of data sharing device, for second terminal, which includes:
Detection module is shaken, detection second terminal is configured as and whether there is shake event;
Acquisition module, when being configured as detecting the shake event with second terminal, obtains the vibration ginseng of second terminal Number, the second sensor data that vibration parameters are gathered by second terminal generate;
Search module, is configured to search for the first terminal for having identical vibration parameters with second terminal, first terminal The first sensor data that vibration parameters are gathered by first terminal generate;
Module is established, is configured as establishing the bluetooth connection with first terminal;
Receiving module, is configured as treating sharing data by what bluetooth connection reception first terminal was shared.
Optionally, the device, further includes:
Display module, is configured as receiving when sharing data, is shown in notification bar and share notice;
Respond module, when being configured as receiving the clicking operation to sharing notice, according to the data for treating sharing data Type, enables corresponding application response and treats sharing data;
Wherein, when treating that sharing data is picture, enable picture browsing application response and treat sharing data;
Sharing data is treated when when sharing data is multimedia, enabling multimedia application response;
When sharing data is text, enabling text-processing application response and treat sharing data;
When sharing data is application program, enabling sharing data is treated using the response of shop program.
5th aspect, there is provided a kind of terminal, the terminal include:
Processor;
For storing the memory of processor-executable instruction;
Wherein, processor is configured as:
Detection first terminal whether there is shake event;
When detecting the shake event of first terminal, the vibration parameters of first terminal are obtained, vibration parameters are whole by first The first sensor data generation of end collection;
Search and at least one second terminal of the first terminal with identical vibration parameters, the vibration parameters of second terminal by The second sensor data generation of second terminal collection;
Establish the bluetooth connection with second terminal;
First terminal is treated that sharing data is shared to second terminal by bluetooth connection.
6th aspect, there is provided a kind of terminal of knowing clearly, the terminal include:
Processor;
For storing the memory of processor-executable instruction;
Wherein, processor is configured as:
Detection second terminal whether there is shake event;
When detecting the shake event with second terminal, the vibration parameters of second terminal are obtained, vibration parameters are by second The second sensor data generation of terminal collection;
The first terminal that there are identical vibration parameters with second terminal is searched for, the vibration parameters of first terminal are by first terminal The first sensor data generation of collection;
Establish the bluetooth connection with first terminal;
Sharing data is treated by what bluetooth connection reception first terminal was shared.
7th aspect, there is provided a kind of computer-readable medium, is stored thereon with programmed instruction, which is processed The data sharing method as described in above-mentioned first aspect is realized when device performs.
Eighth aspect, there is provided a kind of computer-readable medium, is stored thereon with programmed instruction, which is processed The data sharing method as described in above-mentioned second aspect is realized when device performs.
The beneficial effect brought of technical solution that the embodiment of the present disclosure provides is:
In the embodiment of the present disclosure, when terminal room carries out data sharing, user shakes terminal at the same time, and terminal is according to itself Vibration parameters, search and its other-end with identical vibration parameters, and bluetooth connection is established with the other-end searched, And then sent by bluetooth connection and treat sharing data.Terminal to be connected only needs to keep identical motion state, terminal Automatically bluetooth connection is carried out with the terminal in same movement state, is manually selected in whole connection procedure without user and waits to connect Terminal, and connection key need not be manually entered, simplify the process for establishing bluetooth connection, and then improve the effect of data sharing Rate.
Brief description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, without creative efforts, other can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is the operation chart for the data sharing that one exemplary embodiment of the disclosure provides;
Fig. 2A is the flow chart of the data sharing method of the disclosure another exemplary embodiment offer;
Fig. 2 B are the schematic diagrames for the coordinate method for building up that one exemplary embodiment of the disclosure provides;
Fig. 3 is the flow chart for the data sharing method that one exemplary embodiment of the disclosure provides;
Fig. 4 is the flow chart of the data sharing method of the disclosure another exemplary embodiment offer;
Fig. 5 A are the flow charts of the data sharing method of the disclosure another exemplary embodiment offer;
Fig. 5 B are the operation charts that sharing data is treated in the transmission that one exemplary embodiment of the disclosure provides;
Fig. 6 shows the structure chart for the data sharing device that one exemplary embodiment of the disclosure provides;
Fig. 7 shows the structure chart for the data sharing device that another exemplary embodiment of the disclosure provides;
Fig. 8 is a kind of block diagram of terminal according to an exemplary embodiment.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
In correlation technique, in order to establish bluetooth connection in terminal room, user needs to manually complete terminal selection in terminal And connection key input etc. operation, cause whole operation flow excessively cumbersome, data sharing it is less efficient.
In order to simplify the operating process for establishing bluetooth connection, and then improve the efficiency of data sharing, each implementation of the disclosure In the data sharing method that example provides, when needing to establish bluetooth connection in terminal room, user is only needed terminal to be connected Putting together and rock, terminal can generate corresponding vibration parameters according to the sensing data that motion sensor collects, And based on the vibration parameters with establishing bluetooth connection with the terminal of same movement state, that is, the selection of terminal to be connected with And the input of connection key is automatically performed by terminal, is manually entered without user.
Schematically, as shown in Figure 1, first terminal 11 and second terminal 12 are stacked shake, first terminal by user 11 can establish bluetooth connection with the second terminal 12 with same movement state automatically.Optionally, when three and above terminal When stacking shake, the terminal room with same movement state can establish bluetooth connection, in following each embodiments only It is illustrated so that two terminals establish bluetooth connection as an example.
The data sharing method that each embodiment of the disclosure provides is performed by terminal, which is to be built-in with motion sensor And the electronic equipment with Bluetooth function, which can be mobile phone or tablet computer.Optionally, which is Acceleration transducer and/or angular-rate sensor.In order to facilitate description, following each embodiments are used in Fig. 1 with data sharing First terminal 11 and second terminal 12 exemplified by illustrate.
Fig. 2A is the flow chart for the data sharing method that one exemplary embodiment of the disclosure provides.The present embodiment is with data Sharing method in first terminal 11 and second terminal 12 for coming for example, the data sharing method includes the following steps:
In step 201, first terminal detects whether that there are shake event.
In a kind of possible embodiment, first terminal enables motion sensor, and obtains motion sensor collection First sensor data, when the shake amplitude of first sensor data instruction is more than threshold value, first terminal determines first eventually There are shake event at end.
Optionally, which is angular-rate sensor or acceleration transducer.Wherein, angular-rate sensor is used for The angular velocity data of the instruction terminal motion states such as acquisition terminal angular speed size, angular speed direction;Acceleration transducer is used for The acceleration information of the instruction terminal motion states such as acquisition terminal acceleration magnitude, acceleration direction.
In step 202, when first terminal detects shake event, the vibration parameters of first terminal, vibration ginseng are obtained Number is generated by the first sensor data of first terminal collection.
After first terminal detects first terminal there are shake event, i.e., according to the first sensor of motion sensor collection Data generate vibration parameters.
Optionally, vibration parameters include vibration time and vibration number.
In a kind of possible implementation, the angular velocity data generation vibration that terminal is gathered according to angular-rate sensor is joined Number.Detecting that first terminal enables angular-rate sensor, and obtains angular-rate sensor and adopt when opening Bluetooth pairing function The angular velocity data collected, the angular velocity data are used to indicate the angular velocity of rotation of first terminal in all directions.
Optionally, which is three-axis gyroscope, for acquisition terminal in three dimensions three directions Angular speed.
Schematically, in rectangular coordinate system in space shown in Fig. 2 B, the direction perpendicular to 21 the right and left of terminal is X-axis side To being Y direction perpendicular to the direction on terminal both sides about 21, be Z-direction perpendicular to the direction of 21 screen of terminal.Three axis tops The angular velocity data that spiral shell instrument collects is inscribed when being each, angular speed size of the first terminal in X-axis, Y-axis or Z-direction With angular speed direction.
First terminal is according to the number of the angular speed directional statistics angular speed direction change at each moment, due to once vibrating During angular speed direction change once, therefore, the number of angular speed direction change of first terminal statistics is first terminal Vibration number.
Schematically, as shown in Figure 2 B, according to right-hand screw rule provide the angular speed positive direction vibrated in X-direction and Angular speed negative direction, wherein, hand thumb direction is consistent with X-axis positive direction, if direction of vibration is directed toward unanimously with remaining four finger, The angular speed direction is angular speed positive direction;If direction of vibration with four refer to be directed toward on the contrary, if the angular speed direction born for angular speed Direction.Method as defined in the angular speed positive direction and angular speed negative direction vibrated in Y-axis and Z-direction and the rule in X-direction It is consistent to determine method, details are not described herein.
Further, when detect the angular speed in X-direction from be just changed into it is negative (i.e. from angular speed positive direction be changed into angle speed Spend negative direction), or, angular speed from it is negative be changed into just (being changed into angular speed positive direction from angular speed negative direction) when, first terminal is Determine that first terminal occurs once to vibrate in the X-axis direction.The definite method of first terminal vibration number in Y-axis and Z-direction Identical with the definite method in X-direction, details are not described herein.
By above-mentioned steps, first terminal determines the vibration number on X, Y and Z-direction.For example first terminal determines The vibration number gone out on X, Y and Z-direction is respectively 10 times, 8 times and 8 times.
In alternatively possible embodiment, the acceleration information that terminal is gathered according to acceleration transducer generates vibration Parameter.When opening Bluetooth pairing function, first terminal opens acceleration transducer, and obtains acceleration transducer and collect Acceleration information.Wherein, acceleration magnitude and the acceleration direction of first terminal are inscribed when acceleration information is each.
First terminal is according to the number of the acceleration directional statistics acceleration direction change at each moment, due to once vibrating During acceleration direction change once, therefore, the number of acceleration direction change of first terminal statistics is first terminal Vibration number.
Optionally, when the acceleration direction for detecting current time is opposite with last moment acceleration direction, first eventually End determines itself to have vibrated once.
By above-mentioned steps, first terminal determines the vibration number of itself according to the change frequency in acceleration direction.Than Such as, first terminal determines that the vibration number of itself is 8 times.
In step 203, second terminal detects whether that there are shake event.
The embodiment of this step is similar to above-mentioned steps 201, and details are not described herein for the present embodiment.
In step 204, when second terminal detects the shake event of second terminal, the vibration ginseng of second terminal is obtained Number, the second sensor data that vibration parameters are gathered by second terminal generate.
The embodiment of this step is similar to above-mentioned steps 202, and details are not described herein for the present embodiment.
It should be noted that shaken since second terminal and first terminal stack, step 203 to 204 perform at the same time with above-mentioned steps 201 to 202.
In step 205, first terminal search has at least one second terminal of identical vibration parameters with first terminal, The second sensor data that the vibration parameters of second terminal are gathered by second terminal generate.
In correlation technique, in order to establish bluetooth connection in terminal room, user, which needs to manually complete in terminal, treats connection eventually The operation such as end selection and connection key input.
In order to simplify the flow for establishing bluetooth connection, avoid user from manually selecting terminal and input key, in the present embodiment, After first terminal gets vibration parameters, automatic search and its second terminal with identical vibration parameters, and automatically with second Terminal carries out bluetooth connection.
In a kind of possible embodiment, after terminal generates vibration parameters according to sensing data, that is, pass through broadcast Mode broadcasts vibration parameters, correspondingly, first terminal receives the vibration identical with itself vibration parameters of other-end broadcast During parameter, it is determined that the terminal for broadcasting the vibration parameters is to need to establish the second terminal of bluetooth connection, wherein, there is identical shake The terminal of dynamic parameter is in identical motion state.
In step 206, first terminal establishes the bluetooth connection with second terminal.
First terminal determined after being in the second terminal of same movement state with itself according to vibration parameters, i.e., with second Terminal establishes bluetooth connection.
In a kind of possible implementation, first terminal sends the connection request for including vibration parameters to second terminal, Correspondingly, whether the vibration parameters in second terminal detection request are consistent with itself, and bluetooth connection is established when consistent.
In step 207, second terminal search has the first terminal of identical vibration parameters, first terminal with second terminal The first sensor data that are gathered by first terminal of vibration parameters generate.
While first terminal search is with its second terminal with identical vibration parameters, second terminal can also search for and it First terminal with identical vibration parameters, correspondingly, when second terminal receives the vibration ginseng identical with itself vibration parameters During number, it is determined that the terminal for broadcasting the vibration parameters is to need to establish the first terminal of bluetooth connection.
In a step 208, second terminal establishes the bluetooth connection with first terminal.
Second terminal determined after being in the first terminal of same movement state with itself according to vibration parameters, i.e., with first Terminal establishes bluetooth connection.Wherein, it is similar to above-mentioned steps 206 to establish the mode of bluetooth connection, the present embodiment is no longer superfluous herein State.
In step 209, first terminal is treated that sharing data is shared to second terminal by first terminal by bluetooth connection.
After first terminal and second terminal establish bluetooth connection, user may be selected to treat sharing data, and by sharing data It is sent to second terminal.
In step 210, second terminal treats sharing data by what bluetooth connection reception first terminal was shared.
Correspondingly, second terminal treats sharing data by what bluetooth connection reception first terminal was shared.
In a kind of possible implementation, in order to which the data shared are presented to user faster, second terminal receives After sharing data, i.e., according to the type for treating sharing data, enable corresponding application response and treat sharing data.
In conclusion in the embodiment of the present disclosure, when terminal room carries out data sharing, user shakes terminal at the same time, and terminal is According to the vibration parameters of itself, search and its other-end with identical vibration parameters, and built with the other-end searched Vertical bluetooth connection, and then sent by bluetooth connection and treat sharing data.Terminal to be connected only needs to keep identical movement shape State, terminal can carry out bluetooth connection with the terminal in same movement state automatically, without user's hand in whole connection procedure It is dynamic to select terminal to be connected, and connection key need not be manually entered, the process for establishing bluetooth connection is simplified, and then improve The efficiency of data sharing.
In a kind of possible implementation, first terminal generates connection unpaired message according to vibration parameters, and according to even Connect unpaired message and determine second terminal to be connected, and then bluetooth connection is established with second terminal.Below using schematical real Example is applied to illustrate.
Fig. 3 is the flow chart for the data sharing method that one exemplary embodiment of the disclosure provides.Due in second terminal Connection unpaired message generating mode it is identical with first terminal, therefore for convenience describe, the present embodiment is with data sharing Method is come for first terminal 11 for example, the data sharing method includes the following steps:
In step 302, detection first terminal whether there is shake event.
In step 304, when detecting the shake event of first terminal, the vibration parameters of first terminal are obtained, are vibrated The first sensor data that parameter is gathered by first terminal generate.
The embodiment of step 302 to 304 is similar to above-mentioned steps 201 to 202, and details are not described herein for the present embodiment.
Within step 306, the connection unpaired message of other each terminal broadcasts around obtaining;It is terminal to connect unpaired message Generated when detecting shake event according to the vibration parameters of acquisition.
In a kind of possible implementation, vibration number and vibration time of the terminal in vibration parameters calculate vibration Frequency, and connection unpaired message is generated according to vibration frequency.Wherein, vibration frequency=vibration number ÷ vibration times.It is following each Illustrated in a step exemplified by connecting unpaired message as connection pairing code.
With reference to first example in step 202, the angular velocity data generation that terminal is gathered according to angular-rate sensor is shaken Dynamic parameter.When vibration time is 2s, and the vibration number on X, Y and Z-direction is respectively 10 times, 8 times and 8 times, first terminal It is 5 times/second that the vibration frequency of first terminal in the X-axis direction, which is calculated, and vibration frequency in the Y-axis direction is 4 times/second, Vibration frequency on Z axis is 4 times/second.
For the generating mode of connection pairing code, in a kind of possible embodiment, first terminal is in all directions Vibration frequency (vibration frequency comprising decimal carries out rounding processing) be combined, so as to generate the first connection pairing code.
For example connection pairing code is the character string that 6 bit digitals are composed, wherein, the front two of connection pairing code is X-axis Vibration frequency on direction, middle two are the vibration frequency in Y direction, and latter two are the vibration frequency in Z-direction.Knot Above-mentioned example is closed, the first connection pairing code of first terminal generation is 050404.
In other possible embodiments, the vibration frequency input on X, Y and Z-direction is preset connection by first terminal Code generating algorithm is matched, and default connection is matched into the output of code generating algorithm as the first connection pairing code.
For example the vibration frequency in all directions is multiplied by default connection pairing code generating algorithm instruction, shows with reference to above-mentioned Example, the first connection pairing code of first terminal generation is 80.
With reference to second example in step 202, the acceleration information generation that terminal is gathered according to acceleration transducer is shaken Dynamic parameter.When vibration time is 2s, and vibration number is 8 times, it is 4 times/second that the vibration frequency of itself, which is calculated, in first terminal.
After first terminal determines the vibration frequency of itself, i.e., according to vibration frequency, (vibration frequency comprising decimal carries out Rounding is handled) the connection pairing code of generation first.
With reference to above-mentioned example, first terminal generation the first connection pairing code is 04.
In order to make to identify between terminal to be connected other in same movement state according to connection pairing code Terminal, and bluetooth connection is established with it, after code is matched in the connection of generation first, first terminal broadcasts life by way of Bluetooth broadcast Into first connection pairing code.
In step 308, when detecting the second connection unpaired message identical with the first connection unpaired message, will broadcast The terminal of second connection unpaired message is determined as second terminal;First connection unpaired message is shaken by first terminal according to what is got Dynamic parameter generation.
While first terminal broadcast the first connection pairing code, since other-end to be connected also can be wide by bluetooth The connection pairing code of itself generation is broadcast, therefore, first terminal can get the connection pairing of each terminal broadcast by bluetooth Code.
Such as first terminal get and be identified as " the connection pairing code " 050404 " of the terminal broadcast of device 002 ", Get and be identified as that " the connection pairing code " 030303 " of the terminal broadcast of device 003 ", gets and be identified as " device The connection pairing code " 030303 " of 004 " terminal broadcast.
After first terminal gets the connection pairing code of each terminal broadcast, code and itself are matched in the connection that will be got The first connection pairing code matched, when the connection pairing code for determining to get, with the first connection of itself to match code identical When, the terminal for broadcasting connection pairing code is determined as second terminal by first terminal.
For example, when the first connection pairing code of first terminal is 050404, due to " the connection that device 002 " is broadcasted Match code and match that code is consistent, and therefore, first terminal will be identified as that " terminal of device 002 " is determined as second with the first connection Terminal.
In the step 310, sent by bluetooth to second terminal and include the first connection request for connecting unpaired message, second Terminal is used to receive instruction to first terminal transmission request by bluetooth according to connection request.
When first terminal is determined to be in the second terminal of same movement state with itself, sent out by bluetooth to second terminal The connection request that code is matched comprising the first connection is sent, correspondingly, second terminal further determines that after the connection request is received First connection pairing code is identical with the second connection pairing code, and sends request to first terminal by bluetooth and receive instruction.
It should be noted that since second terminal is when code is matched in the connection for getting other-end broadcast, also can be true Determine and it is in the first terminal of same movement state, therefore, second terminal can also send to first terminal and carry the second connection The connection request of code is matched, correspondingly, first terminal sends request according to the connection request to second terminal receives instruction.
In step 312, instruction is received according to request and establishes bluetooth connection with second terminal.
After the request that first terminal receives second terminal transmission receives instruction, you can establish bluetooth with second terminal and connect Connect, and can be carried out data transmission by the bluetooth connection with second terminal.
In a step 314, first terminal is treated that sharing data is shared to second terminal by bluetooth connection.
The embodiment of this step is similar to above-mentioned steps 209, and details are not described herein for the present embodiment.
In the present embodiment, first terminal generates connection unpaired message according to vibration parameters, and then according to connection unpaired message Determine second terminal to be connected, due to connect unpaired message form it is simple, and comprising data volume it is few compared with vibration parameters, because This, when the connection unpaired message received is connected unpaired message matching by first terminal with first, it is necessary to matched data volume Also it is corresponding less, the efficiency for establishing bluetooth connection is improved, and then the efficiency of data sharing is improved, and reduce processor Power consumption.
It is further simple flow in a kind of possible implementation, the efficiency for establishing bluetooth connection is improved, in Fig. 3 On the basis of, as shown in figure 4, further including step 305A and 305B after above-mentioned steps 304.
In step 305, whether detection first terminal opens Bluetooth pairing function.
For the consideration of economize on electricity, the bluetooth of terminal is typically in closed mode, but when establishing connection with other-end, eventually The bluetooth at end needs to be in opening, and therefore, in order to automatically turn on bluetooth before bluetooth connection is established, first terminal detection is No unlatching Bluetooth pairing function.
Optionally, the Bluetooth pairing function button for opening Bluetooth pairing function is preset in first terminal operating system, User can be turned on and off the Bluetooth pairing function of first terminal by the button.
In step 305B, if first terminal opens Bluetooth pairing function, and the bluetooth of first terminal is closed, Then when the vibration frequency of vibration parameters instruction is more than threshold value, the bluetooth of first terminal is set on state.
Optionally, vibration frequency threshold (such as 3 times/second) is pre-set in first terminal, which uses In it is determined whether to enable bluetooth.After first terminal detects unlatching Bluetooth pairing function, whether continue to detect bluetooth in closing State;When the bluetooth of first terminal is closed, and vibration frequency of the first terminal within a period of time is more than vibration frequency During rate threshold value, first terminal automatically turns on bluetooth.Wherein, which is three sides being calculated according to angular velocity data Minimum vibration frequency upwards, or, the vibration frequency of the first terminal arrived calculated according to acceleration information.
It should be noted that when first terminal is not turned on Bluetooth pairing function, due to and bluetooth need not be established connect Connect, therefore even if detecting that vibration frequency is more than threshold value, first terminal will not open bluetooth.
In the present embodiment, when opening Bluetooth pairing function, terminal can automatically open up bluetooth according to itself vibration frequency, Without user's manual unlocking Bluetooth function, so as to further simplify the operating process for establishing bluetooth connection.
After first terminal establishes connection with second terminal, first terminal can carry out data transmission with second terminal, this reality Apply example and provide a kind of method of convenient transmission, on the basis of Fig. 2A, as shown in Figure 5A, step 209 further includes step 209A, Step 211 and 212 are further included after step 210:
In step 209A, when first terminal is detected when sharing data is dragged to presumptive area, connected by bluetooth Connect to send to second terminal and treat sharing data.
In a kind of possible implementation, when receiving the selection signal for treating sharing data, second terminal is shown Corresponding terminal icon, the presumptive area are the corresponding region of terminal icon.
In the present embodiment, when first terminal, which receives user, treats the selection signal of sharing data, in user interface Show the corresponding terminal icon of second terminal (icon for having established the terminal of bluetooth connection).Optionally, first terminal is worked as When establishing bluetooth connection with multiple terminals, multiple terminal icons are shown in user interface.
Wherein, this treats sharing data for document, picture, audio, video or application program etc..
Schematically, as shown in Figure 5 B, when first terminal 51 receives user to the selection signal of file 511, user The corresponding terminal icon 512 of second terminal is shown in interface.
In a kind of possible implementation, when receiving the dragging signal for the treatment of sharing data, and it is signified to drag signal When terminal icon is directed toward in the direction shown, is sent by bluetooth connection to second terminal and treat sharing data, second terminal is used to connect Receive when sharing data, according to the corresponding type of sharing data is treated, sharing data is treated by corresponding application response.
Further, after receiving the selection signal for treating sharing data, first terminal persistently detects whether to receive pair Treat the dragging signal of sharing data, and whether the direction for detecting the dragging signal designation is directed toward terminal icon;Treated when detecting The dragging signal of sharing data, and drag signal indicated by direction be directed toward terminal icon when, first terminal i.e. determine the dragging Signal carries out data transmission for triggering, and will treat that sharing data is sent to second terminal by bluetooth.
Schematically, as shown in Figure 5 B, when receive user to terminal icon 512 drag file 511 dragging signal when, File 511 is sent to second terminal by first terminal 51 by bluetooth.
In step 211, when second terminal is received when sharing data, shown in notification bar and share notice.
Correspondingly, second terminal is received after sharing data, i.e., shown in notification bar and share notice, wherein, share Notice includes treating sharing data information, such as treats the corresponding filename of sharing data, file size and file icon.
In a kind of possible implementation, second terminal is received after sharing data, Automatic-expanding notification bar, and Sharing data information is treated in display in notification bar.
Schematically, as shown in Figure 5 B, second terminal 52 is received after sharing data, and notification bar 521 is unfolded, and logical Know that sharing data information 522 is treated in display in column.
In the step 212, when second terminal receives the clicking operation to sharing notice, according to the number for treating sharing data According to type, enable corresponding application response and treat sharing data.
Correspondingly, the corresponding response mode of preset various file types in second terminal, treated point when second terminal receives When enjoying data, according to the type for treating sharing data, automated to respond to treat sharing data by corresponding application program.
Schematically, the correspondence of file type and response mode is as shown in Table 1:
Table one
File type Response mode (unfolding mode)
Picture Picture library A
Multimedia Multimedia player C
Text Text editor B
Application program Using shop D
Optionally, when treating that sharing data is picture, enable picture browsing application response and treat sharing data.
For example, when receiving when sharing data is picture, the automatic arousal system picture library of second terminal, passes through system diagram Open the picture in storehouse.
Sharing data is treated when when sharing data is multimedia, enabling multimedia application response.
For example, when receiving when sharing data is video, the automatic arousal system video player of second terminal is opened The video.
When sharing data is text, enabling text-processing application response and treat sharing data.
For example, when receiving when sharing data is text, the automatic arousal system text editor of second terminal is opened The text.
When sharing data is application program, enabling sharing data is treated using the response of shop program.
When receiving when sharing data download link corresponding for application program, second terminal is automatically opened up using business Shop, and prompt to download the application program.
In the present embodiment, after first terminal and second terminal establish bluetooth connection, when receive will treat sharing data drag to During the dragging signal of the corresponding terminal icon of second terminal, first terminal will treat that sharing data is sent to second terminal, letter Data transfer flow is changed;And second terminal is when receiving when sharing data, according to treating that it is different that sharing data type is aroused Application program automated tos respond to treat sharing data, improves user and checks the efficiency for treating sharing data.
It should be noted that in above-mentioned each embodiment, using first terminal as executive agent the step of can be implemented separately As the data sharing method of first terminal side, using second terminal as executive agent the step of can be implemented separately as second eventually The data sharing method of side, details are not described herein for the present embodiment.
Following is embodiment of the present disclosure, can be used for performing embodiments of the present disclosure.It is real for disclosure device The details not disclosed in example is applied, refer to embodiments of the present disclosure.
With reference to figure 6, the structure chart of the data sharing device provided it illustrates disclosure one embodiment.The device can be with Pass through all or part being implemented in combination with as first terminal 11 of software, hardware or both.The device includes:Shake Detection module 610, acquisition module 620, search module 630, establish module 640, sharing module 650.
Detection module 610 is shaken, detection first terminal is configured as and whether there is shake event;
Acquisition module 620, when being configured as detecting the shake event of first terminal, obtains the vibration ginseng of first terminal Number, the first sensor data that vibration parameters are gathered by first terminal generate;
Search module 630, is configured to search at least one second terminal for having identical vibration parameters with first terminal, The second sensor data that the vibration parameters of second terminal are gathered by second terminal generate;
Module 640 is established, is configured as establishing the bluetooth connection with second terminal;
Sharing module 650, is configured as that first terminal being treated, sharing data is shared to second terminal by bluetooth connection.
Optionally, the device, further includes:
Function detection module, is configured as whether detection first terminal opens Bluetooth pairing function;
Setup module, if being configured as first terminal opens Bluetooth pairing function, and the bluetooth of first terminal is in and closes State, then when the vibration frequency of vibration parameters instruction is more than threshold value, state is set on by the bluetooth of first terminal.
Optionally, search module 630, including:
Acquiring unit, is configured as the connection unpaired message of other each terminal broadcasts around obtaining;Connect unpaired message It is that terminal is generated when detecting shake event according to the vibration parameters of acquisition;
Determination unit, when being configured as detecting the second connection unpaired message identical with the first connection unpaired message, The terminal for broadcasting the second connection unpaired message is determined as second terminal;First connection unpaired message is by first terminal according to acquisition The vibration parameters generation arrived;
Module 640 is established, including:
Transmitting element, being configured as please to connection of the second terminal transmission comprising the first connection unpaired message by bluetooth Ask, second terminal is used to receive instruction to first terminal transmission request by bluetooth according to connection request;
Unit is established, is configured as receiving instruction according to request and second terminal establishes bluetooth connection.
Optionally, sharing module 650, are additionally configured to:
When detecting when sharing data is dragged to presumptive area, sent by bluetooth connection to second terminal and wait to share Data, second terminal is used for when receiving when sharing data, according to the corresponding type of sharing data is treated, by applying accordingly Sharing data is treated in program response.
In conclusion in the embodiment of the present disclosure, when terminal room carries out data sharing, user shakes terminal at the same time, and terminal is According to the vibration parameters of itself, search and its other-end with identical vibration parameters, and built with the other-end searched Vertical bluetooth connection, and then sent by bluetooth connection and treat sharing data.Terminal to be connected only needs to keep identical movement shape State, terminal can carry out bluetooth connection with the terminal in same movement state automatically, without user's hand in whole connection procedure It is dynamic to select terminal to be connected, and connection key need not be manually entered, the process for establishing bluetooth connection is simplified, and then improve The efficiency of data sharing.
In the present embodiment, first terminal generates connection unpaired message according to vibration parameters, and then according to connection unpaired message Determine second terminal to be connected, due to connect unpaired message form it is simple, and comprising data volume it is few compared with vibration parameters, because This, when the connection unpaired message received is connected unpaired message matching by first terminal with first, it is necessary to matched data volume Also it is corresponding less, the efficiency for establishing bluetooth connection is improved, and then the efficiency of data sharing is improved, and reduce processor Power consumption.
In the present embodiment, when opening Bluetooth pairing function, terminal can automatically open up bluetooth according to itself vibration frequency, Without user's manual unlocking Bluetooth function, so as to further simplify the operating process for establishing bluetooth connection.
In the present embodiment, after first terminal and second terminal establish bluetooth connection, when receive will treat sharing data drag to During the dragging signal of the corresponding terminal icon of second terminal, first terminal will treat that sharing data is sent to second terminal, letter Data transfer flow is changed;And second terminal is when receiving when sharing data, according to treating that it is different that sharing data type is aroused Application program automated tos respond to treat sharing data, improves user and checks the efficiency for treating sharing data.
With reference to figure 7, the structure chart of the data sharing device provided it illustrates disclosure one embodiment.The device can be with Pass through all or part being implemented in combination with as second terminal 12 of software, hardware or both.The device includes:Shake Detection module 710, acquisition module 720, search module 730, establish module 740, sharing module 750.
Detection module 710 is shaken, detection second terminal is configured as and whether there is shake event;
Acquisition module 720, when being configured as detecting the shake event with second terminal, obtains the vibration of second terminal Parameter, the second sensor data that vibration parameters are gathered by second terminal generate;
Search module 730, is configured to search for the first terminal for having identical vibration parameters with second terminal, first terminal The first sensor data that are gathered by first terminal of vibration parameters generate;
Module 740 is established, is configured as establishing the bluetooth connection with first terminal;
Receiving module 750, is configured as treating sharing data by what bluetooth connection reception first terminal was shared.
Optionally, the device, further includes:
Display module, is configured as receiving when sharing data, is shown in notification bar and share notice;
Respond module, when being configured as receiving the clicking operation to sharing notice, according to the data for treating sharing data Type, enables corresponding application response and treats sharing data;
Wherein, when treating that sharing data is picture, enable picture browsing application response and treat sharing data;
Sharing data is treated when when sharing data is multimedia, enabling multimedia application response;
When sharing data is text, enabling text-processing application response and treat sharing data;
When sharing data is application program, enabling sharing data is treated using the response of shop program.
In conclusion in the embodiment of the present disclosure, when terminal room carries out data sharing, user shakes terminal at the same time, and terminal is According to the vibration parameters of itself, search and its other-end with identical vibration parameters, and built with the other-end searched Vertical bluetooth connection, and then sent by bluetooth connection and treat sharing data.Terminal to be connected only needs to keep identical movement shape State, terminal can carry out bluetooth connection with the terminal in same movement state automatically, without user's hand in whole connection procedure It is dynamic to select terminal to be connected, and connection key need not be manually entered, the process for establishing bluetooth connection is simplified, and then improve The efficiency of data sharing.
In the present embodiment, first terminal generates connection unpaired message according to vibration parameters, and then according to connection unpaired message Determine second terminal to be connected, due to connect unpaired message form it is simple, and comprising data volume it is few compared with vibration parameters, because This, when the connection unpaired message received is connected unpaired message matching by first terminal with first, it is necessary to matched data volume Also it is corresponding less, the efficiency for establishing bluetooth connection is improved, and then the efficiency of data sharing is improved, and reduce processor Power consumption.
In the present embodiment, when opening Bluetooth pairing function, terminal can automatically open up bluetooth according to itself vibration frequency, Without user's manual unlocking Bluetooth function, so as to further simplify the operating process for establishing bluetooth connection.
In the present embodiment, after first terminal and second terminal establish bluetooth connection, when receive will treat sharing data drag to During the dragging signal of the corresponding terminal icon of second terminal, first terminal will treat that sharing data is sent to second terminal, letter Data transfer flow is changed;And second terminal is when receiving when sharing data, according to treating that it is different that sharing data type is aroused Application program automated tos respond to treat sharing data, improves user and checks the efficiency for treating sharing data.
Fig. 8 is a kind of block diagram of terminal 800 according to an exemplary embodiment.
With reference to Fig. 8, terminal 800 can include following one or more assemblies:Processing component 802, memory 804, power supply Component 806, display module 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication Component 816.
The integrated operation of the usual control terminal 800 of processing component 802, such as with display, call, data communication, phase The operation that machine operates and record operation is associated.Processing component 802 can refer to including one or more processors 820 to perform Order, to complete all or part of step of above-mentioned method.In addition, processing component 802 can include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 can include multi-media module, it is aobvious to facilitate Show the interaction between module 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in terminal 800.These data are shown Example includes the instruction of any application program or method for being operated in terminal 800, and contact data, telephone book data, disappears Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) are erasable to compile Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of terminal 800.Power supply module 806 can include power management system System, one or more power supplys, and other components associated with generating, managing and distributing electric power for terminal 800.
Display module 808 is included in the screen of one output interface of offer between the terminal 800 and user.At some In embodiment, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Touch-screen is may be implemented as, to receive input signal from the user.Touch panel includes one or more touch sensors Touched with sensing, the gesture on slip and touch panel.The touch sensor can not only sense touch or sliding action Border, but also detection and the duration and pressure associated with the touch or slide operation.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when terminal 800 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set Part 816 is sent.In certain embodiments, audio component 810 further includes a loudspeaker, for exports audio signal.
I/O interfaces 812 provide interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.In the present embodiment, which can be to be arranged on terminal front side or the physical button of side, the physical button In be provided with fingerprint recognition module, for gathering the fingerprint of user;The I/O interfaces 812 can also be to be arranged on the terminal back side Fingerprint identification area, includes fingerprint recognition module in the fingerprint identification area.
Sensor component 814 includes one or more sensors, and the state for providing various aspects for terminal 800 is commented Estimate.For example, sensor component 814 can detect opening/closed mode of terminal 800, and the relative positioning of component, for example, it is described Component is the display and keypad of terminal 800, and sensor component 814 can be with 800 1 components of detection terminal 800 or terminal Position change, the existence or non-existence that user contacts with terminal 800,800 orientation of terminal or acceleration/deceleration and terminal 800 Temperature change.Sensor component 814 can include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor component 814 can also include optical sensor, such as CMOS or ccd image sensor, for into As being used in application.In the present embodiment, which can include acceleration transducer and angular-rate sensor, point Not Yong Yu acquisition terminal 800 acceleration information and angular velocity data.
Communication component 816 is configured to facilitate the communication of wired or wireless way between terminal 800 and other equipment.Terminal 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote junction service.Example Such as, in NFC module radio frequency identification (RFID) technology can be based on, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, terminal 800 can be believed by one or more application application-specific integrated circuit (ASIC), numeral Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing above-mentioned data sharing method.
In the exemplary embodiment, additionally providing one kind includes computer-readable medium, such as the memory including instruction 804, above-metioned instruction can be performed by the processor 820 of terminal 800 to complete above-mentioned data sharing method.For example, the computer Computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
Those skilled in the art will readily occur to the disclosure its after considering specification and putting into practice invention disclosed herein Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be appreciated that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by appended claim.

Claims (16)

  1. A kind of 1. data sharing method, it is characterised in that for first terminal, the described method includes:
    Detect the first terminal and whether there is shake event;
    When detecting the shake event of the first terminal, the vibration parameters of the first terminal, the vibration parameters are obtained The first sensor data gathered by the first terminal generate;
    Search at least one second terminal that there are identical vibration parameters with the first terminal, the vibration ginseng of the second terminal The second sensor data that number is gathered by the second terminal generate;
    Establish the bluetooth connection with the second terminal;
    The first terminal is treated that sharing data is shared to the second terminal by the bluetooth connection.
  2. 2. according to the method described in claim 1, it is characterized in that, the method, further includes:
    Detect whether the first terminal opens Bluetooth pairing function;
    If the first terminal opens the Bluetooth pairing function, and the bluetooth of the first terminal is closed, then is existed When the vibration frequency of the vibration parameters instruction is more than threshold value, the bluetooth of the first terminal is set on state.
  3. 3. method according to claim 1 or 2, it is characterised in that described search has identical shake with the first terminal At least one second terminal of dynamic parameter, including:
    The connection unpaired message of other each terminal broadcasts around obtaining;The connection unpaired message is that terminal is detecting shake Generated during event according to the vibration parameters of acquisition;
    When detecting the second connection unpaired message identical with the first connection unpaired message, the second connection pairing will be broadcasted The terminal of information is determined as the second terminal;The first connection unpaired message is shaken by the first terminal according to what is got Dynamic parameter generation;
    The foundation and the bluetooth connection of the second terminal, including:
    The connection request for including the described first connection unpaired message, the second terminal are sent to the second terminal by bluetooth Receive instruction for sending request to the first terminal by bluetooth according to the connection request;
    Instruction is received according to the request and establishes bluetooth connection with the second terminal.
  4. 4. method according to claim 1 or 2, it is characterised in that described whole by described first by the bluetooth connection End treats that sharing data is shared to the second terminal, including:
    It is described when sharing data is dragged to presumptive area when detecting, institute is sent to the second terminal by bluetooth connection State and treat sharing data, the second terminal be used for receive it is described when sharing data when, treat that sharing data corresponds to according to described Type, by treating sharing data described in corresponding application response.
  5. A kind of 5. data sharing method, it is characterised in that for second terminal, the described method includes:
    Detect the second terminal and whether there is shake event;
    When detecting the shake event with the second terminal, the vibration parameters of the second terminal, the vibration ginseng are obtained The second sensor data that number is gathered by the second terminal generate;
    The first terminal that there are identical vibration parameters with the second terminal is searched for, the vibration parameters of the first terminal are by described The first sensor data generation of first terminal collection;
    Establish the bluetooth connection with the first terminal;
    Sharing data is treated by what the bluetooth connection reception first terminal was shared.
  6. 6. according to the method described in claim 5, it is characterized in that, the method, further includes:
    When receive it is described when sharing data when, shown in notification bar and share notice;
    When receiving the clicking operation for sharing notice to described, according to the data type for treating sharing data, enable corresponding Application response described in treat sharing data;
    Wherein, treat that sharing data is picture when described, enable and treat sharing data described in picture browsing application response;
    When described when sharing data is multimedia, enable and treat sharing data described in multimedia application response;
    When described when sharing data is text, enable and treat sharing data described in text-processing application response;
    When described when sharing data is application program, enable and treat sharing data using described in the response of shop program.
  7. A kind of 7. data sharing device, it is characterised in that for first terminal, described device, including:
    Detection module is shaken, is configured as detecting the first terminal and whether there is shake event;
    Acquisition module, when being configured as detecting the shake event of the first terminal, obtains the vibration of the first terminal Parameter, the first sensor data that the vibration parameters are gathered by the first terminal generate;
    Search module, is configured to search at least one second terminal for having identical vibration parameters with the first terminal, institute State the second sensor data generation that the vibration parameters of second terminal are gathered by the second terminal;
    Module is established, is configured as establishing the bluetooth connection with the second terminal;
    Sharing module, is configured as that the first terminal being treated, sharing data is shared to described second by the bluetooth connection Terminal.
  8. 8. device according to claim 7, it is characterised in that described device, further includes:
    Function detection module, is configured as detecting whether the first terminal opens Bluetooth pairing function;
    Setup module, if being configured as the first terminal opens the Bluetooth pairing function, and the bluetooth of the first terminal It is closed, then when the vibration frequency of vibration parameters instruction is more than threshold value, the bluetooth of the first terminal is set It is set to opening.
  9. 9. the device according to claim 7 or 8, it is characterised in that described search module, including:
    Acquiring unit, is configured as the connection unpaired message of other each terminal broadcasts around obtaining;The connection unpaired message It is that terminal is generated when detecting shake event according to the vibration parameters of acquisition;
    Determination unit, will be wide when being configured as detecting the second connection unpaired message identical with the first connection unpaired message The terminal for broadcasting the second connection unpaired message is determined as the second terminal;The first connection unpaired message is by described first Terminal is generated according to the vibration parameters got;
    It is described to establish module, including:
    Transmitting element, is configured as sending the connection for including the described first connection unpaired message to the second terminal by bluetooth Request, the second terminal are used to receive instruction to first terminal transmission request by bluetooth according to the connection request;
    Unit is established, is configured as receiving instruction according to the request and the second terminal establishes bluetooth connection.
  10. 10. the device according to claim 7 or 8, it is characterised in that the sharing module, is additionally configured to:
    It is described when sharing data is dragged to presumptive area when detecting, institute is sent to the second terminal by bluetooth connection State and treat sharing data, the second terminal be used for receive it is described when sharing data when, treat that sharing data corresponds to according to described Type, by treating sharing data described in corresponding application response.
  11. 11. a kind of data sharing device, it is characterised in that for second terminal, described device includes:
    Detection module is shaken, is configured as detecting the second terminal and whether there is shake event;
    Acquisition module, when being configured as detecting the shake event with the second terminal, obtains shaking for the second terminal Dynamic parameter, the second sensor data that the vibration parameters are gathered by the second terminal generate;
    Search module, is configured to search for the first terminal for having identical vibration parameters with the second terminal, described first eventually The first sensor data that the vibration parameters at end are gathered by the first terminal generate;
    Module is established, is configured as establishing the bluetooth connection with the first terminal;
    Receiving module, is configured as treating sharing data by what the bluetooth connection reception first terminal was shared.
  12. 12. according to the devices described in claim 11, it is characterised in that described device, further includes:
    Display module, is configured as receiving described when sharing data, is shown in notification bar and shares notice;
    Respond module, when being configured as receiving the clicking operation for sharing notice to described, according to the sharing data for the treatment of Data type, enables and treats sharing data described in corresponding application response;
    Wherein, treat that sharing data is picture when described, enable and treat sharing data described in picture browsing application response;
    When described when sharing data is multimedia, enable and treat sharing data described in multimedia application response;
    When described when sharing data is text, enable and treat sharing data described in text-processing application response;
    When described when sharing data is application program, enable and treat sharing data using described in the response of shop program.
  13. 13. a kind of terminal, it is characterised in that the terminal includes:
    Processor;
    For storing the memory of processor-executable instruction;
    Wherein, the processor is configured as:
    Detection first terminal whether there is shake event;
    When detecting the shake event of the first terminal, the vibration parameters of the first terminal, the vibration parameters are obtained The first sensor data gathered by the first terminal generate;
    Search at least one second terminal that there are identical vibration parameters with the first terminal, the vibration ginseng of the second terminal The second sensor data that number is gathered by the second terminal generate;
    Establish the bluetooth connection with the second terminal;
    The first terminal is treated that sharing data is shared to the second terminal by the bluetooth connection.
  14. 14. a kind of terminal, it is characterised in that the terminal includes:
    Processor;
    For storing the memory of processor-executable instruction;
    Wherein, the processor is configured as:
    Detection second terminal whether there is shake event;
    When detecting the shake event with the second terminal, the vibration parameters of the second terminal, the vibration ginseng are obtained The second sensor data that number is gathered by the second terminal generate;
    The first terminal that there are identical vibration parameters with the second terminal is searched for, the vibration parameters of the first terminal are by described The first sensor data generation of first terminal collection;
    Establish the bluetooth connection with the first terminal;
    Sharing data is treated by what the bluetooth connection reception first terminal was shared.
  15. 15. a kind of computer-readable medium, it is characterised in that be stored thereon with programmed instruction, described program is instructed by processor The data sharing method as described in Claims 1-4 is any is realized during execution.
  16. 16. a kind of computer-readable medium, it is characterised in that be stored thereon with programmed instruction, described program is instructed by processor The data sharing method as described in claim 5 or 6 is any is realized during execution.
CN201711283880.8A 2017-12-07 2017-12-07 Data sharing method and device Pending CN108024223A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711283880.8A CN108024223A (en) 2017-12-07 2017-12-07 Data sharing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711283880.8A CN108024223A (en) 2017-12-07 2017-12-07 Data sharing method and device

Publications (1)

Publication Number Publication Date
CN108024223A true CN108024223A (en) 2018-05-11

Family

ID=62078857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711283880.8A Pending CN108024223A (en) 2017-12-07 2017-12-07 Data sharing method and device

Country Status (1)

Country Link
CN (1) CN108024223A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108616663A (en) * 2018-05-16 2018-10-02 Oppo广东移动通信有限公司 Sharing files method, apparatus, mobile terminal and storage medium
CN109451139A (en) * 2018-09-13 2019-03-08 腾讯科技(深圳)有限公司 Method for message transmission, terminal, device, electronic equipment and readable medium
CN109714744A (en) * 2019-02-28 2019-05-03 深圳市空联技术有限公司 A kind of device pairing method and system
CN111083707A (en) * 2018-10-19 2020-04-28 海能达通信股份有限公司 Networking method, terminal thereof and device with storage function
CN111148086A (en) * 2019-12-31 2020-05-12 宇龙计算机通信科技(深圳)有限公司 Bluetooth pairing method and device, storage medium and electronic equipment
CN111405539A (en) * 2020-05-20 2020-07-10 孙瑛楠 Method, device, equipment and storage medium for establishing wireless connection between equipment
CN111431564A (en) * 2020-05-12 2020-07-17 深圳市龙岳科技有限公司 Bluetooth device fast connection device and method
CN112334977A (en) * 2018-08-14 2021-02-05 华为技术有限公司 Voice recognition method, wearable device and system
CN113347073A (en) * 2020-02-17 2021-09-03 上海哔哩哔哩科技有限公司 Close-range social contact method and system and mobile terminal
US11452151B2 (en) 2018-05-31 2022-09-20 Huawei Technologies Co., Ltd. Application function implementation method and electronic device
CN112334977B (en) * 2018-08-14 2024-05-17 华为技术有限公司 Voice recognition method, wearable device and system

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523556A (en) * 2011-12-15 2012-06-27 百度在线网络技术(北京)有限公司 Matching method and system of mobile terminal as well as mobile terminal and server
CN103024143A (en) * 2012-11-14 2013-04-03 广东欧珀移动通信有限公司 Method for mobile device to transmit files
CN103078900A (en) * 2012-12-20 2013-05-01 北京小米科技有限责任公司 File transmission method and file transmission system between terminals
CN103179168A (en) * 2011-12-26 2013-06-26 鸿富锦精密工业(深圳)有限公司 Electronic device and method for sharing data through Bluetooth
WO2014000595A1 (en) * 2012-06-30 2014-01-03 华为终端有限公司 Data transmission method and apparatus
CN103731186A (en) * 2013-12-23 2014-04-16 上海斐讯数据通信技术有限公司 Method for transmitting files and transmission terminal
CN103916852A (en) * 2012-12-28 2014-07-09 联想(北京)有限公司 Data transmission method and mobile terminal
CN104955165A (en) * 2014-03-25 2015-09-30 上海龙旗科技股份有限公司 Method for establishing wireless connection among mobile equipment triggered through motion induction
CN104967725A (en) * 2015-04-30 2015-10-07 努比亚技术有限公司 Method of transmitting data and device of transmitting data
CN105072253A (en) * 2015-07-08 2015-11-18 广东欧珀移动通信有限公司 Method of terminal data interaction, terminal
CN105101056A (en) * 2015-07-08 2015-11-25 广东欧珀移动通信有限公司 File transmission method and mobile terminal
CN105635948A (en) * 2015-12-31 2016-06-01 上海创功通讯技术有限公司 Data sending method and data sending module
CN106412311A (en) * 2016-10-19 2017-02-15 广东欧珀移动通信有限公司 Data transmission method and terminal device
CN106792041A (en) * 2016-12-09 2017-05-31 北京小米移动软件有限公司 Content share method and device
CN106844067A (en) * 2017-01-24 2017-06-13 维沃移动通信有限公司 The processing method and mobile terminal of a kind of content

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523556A (en) * 2011-12-15 2012-06-27 百度在线网络技术(北京)有限公司 Matching method and system of mobile terminal as well as mobile terminal and server
CN103179168A (en) * 2011-12-26 2013-06-26 鸿富锦精密工业(深圳)有限公司 Electronic device and method for sharing data through Bluetooth
WO2014000595A1 (en) * 2012-06-30 2014-01-03 华为终端有限公司 Data transmission method and apparatus
CN103024143A (en) * 2012-11-14 2013-04-03 广东欧珀移动通信有限公司 Method for mobile device to transmit files
CN103078900A (en) * 2012-12-20 2013-05-01 北京小米科技有限责任公司 File transmission method and file transmission system between terminals
CN103916852A (en) * 2012-12-28 2014-07-09 联想(北京)有限公司 Data transmission method and mobile terminal
CN103731186A (en) * 2013-12-23 2014-04-16 上海斐讯数据通信技术有限公司 Method for transmitting files and transmission terminal
CN104955165A (en) * 2014-03-25 2015-09-30 上海龙旗科技股份有限公司 Method for establishing wireless connection among mobile equipment triggered through motion induction
CN104967725A (en) * 2015-04-30 2015-10-07 努比亚技术有限公司 Method of transmitting data and device of transmitting data
CN105072253A (en) * 2015-07-08 2015-11-18 广东欧珀移动通信有限公司 Method of terminal data interaction, terminal
CN105101056A (en) * 2015-07-08 2015-11-25 广东欧珀移动通信有限公司 File transmission method and mobile terminal
CN105635948A (en) * 2015-12-31 2016-06-01 上海创功通讯技术有限公司 Data sending method and data sending module
CN106412311A (en) * 2016-10-19 2017-02-15 广东欧珀移动通信有限公司 Data transmission method and terminal device
CN106792041A (en) * 2016-12-09 2017-05-31 北京小米移动软件有限公司 Content share method and device
CN106844067A (en) * 2017-01-24 2017-06-13 维沃移动通信有限公司 The processing method and mobile terminal of a kind of content

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108616663A (en) * 2018-05-16 2018-10-02 Oppo广东移动通信有限公司 Sharing files method, apparatus, mobile terminal and storage medium
US11864248B2 (en) 2018-05-31 2024-01-02 Huawei Technologies Co., Ltd. Application function implementation method and electronic device
US11452151B2 (en) 2018-05-31 2022-09-20 Huawei Technologies Co., Ltd. Application function implementation method and electronic device
CN112334977A (en) * 2018-08-14 2021-02-05 华为技术有限公司 Voice recognition method, wearable device and system
CN112334977B (en) * 2018-08-14 2024-05-17 华为技术有限公司 Voice recognition method, wearable device and system
CN109451139A (en) * 2018-09-13 2019-03-08 腾讯科技(深圳)有限公司 Method for message transmission, terminal, device, electronic equipment and readable medium
CN111083707A (en) * 2018-10-19 2020-04-28 海能达通信股份有限公司 Networking method, terminal thereof and device with storage function
CN111083707B (en) * 2018-10-19 2023-09-05 海能达通信股份有限公司 Networking method, terminal thereof and device with storage function
CN109714744A (en) * 2019-02-28 2019-05-03 深圳市空联技术有限公司 A kind of device pairing method and system
CN111148086A (en) * 2019-12-31 2020-05-12 宇龙计算机通信科技(深圳)有限公司 Bluetooth pairing method and device, storage medium and electronic equipment
CN111148086B (en) * 2019-12-31 2024-02-20 宇龙计算机通信科技(深圳)有限公司 Bluetooth pairing method and device, storage medium and electronic equipment
CN113347073A (en) * 2020-02-17 2021-09-03 上海哔哩哔哩科技有限公司 Close-range social contact method and system and mobile terminal
CN111431564A (en) * 2020-05-12 2020-07-17 深圳市龙岳科技有限公司 Bluetooth device fast connection device and method
CN111405539A (en) * 2020-05-20 2020-07-10 孙瑛楠 Method, device, equipment and storage medium for establishing wireless connection between equipment

Similar Documents

Publication Publication Date Title
CN108024223A (en) Data sharing method and device
CN104503688B (en) The control method and device of intelligent hardware devices
CN104780155B (en) Apparatus bound method and device
CN104536684B (en) interface display method and device
CN104601441B (en) For the authority control method and instant communication client of group chat
CN105068467B (en) Control the method and device of smart machine
CN105093980B (en) Control the method and device of smart machine start and stop
CN107239527A (en) web access method and device
CN103955275A (en) Application control method and device
CN108319886A (en) Fingerprint identification method and device
CN106528081A (en) Method and device for operation execution
CN107219992A (en) Open the method and device of split screen function
CN105179286B (en) Electric wind fan controlling method and device
CN106027336A (en) Equipment sharing method and device
CN105068632A (en) Terminal charging method and device and terminal
CN104536659B (en) Object information processing method and device
CN107071862A (en) Account binding method and device and smart machine
CN105872360A (en) Camera control method, camera control device and mobile equipment
CN108121573A (en) A kind of startup method and apparatus of application program
CN107105517A (en) Method for connecting network and device
CN106993265A (en) Communication means, terminal, wearable device based on wearable device
CN104298424A (en) File operation method and device
CN104375760B (en) Method for information display and device
CN107393528A (en) Sound control method and device
CN105335061A (en) Information display method and apparatus and 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180511