CN111601302A - Data transmission method and electronic equipment - Google Patents

Data transmission method and electronic equipment Download PDF

Info

Publication number
CN111601302A
CN111601302A CN202010266593.1A CN202010266593A CN111601302A CN 111601302 A CN111601302 A CN 111601302A CN 202010266593 A CN202010266593 A CN 202010266593A CN 111601302 A CN111601302 A CN 111601302A
Authority
CN
China
Prior art keywords
electronic device
curve
parameter
target
motion
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
CN202010266593.1A
Other languages
Chinese (zh)
Inventor
季宇恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010266593.1A priority Critical patent/CN111601302A/en
Publication of CN111601302A publication Critical patent/CN111601302A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/20Transfer of user or subscriber data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a data transmission method and electronic equipment, relates to the technical field of communication, and aims to solve the problem that the process of transmitting data among different electronic equipment is complex. The method comprises the following steps: receiving a first operation of a user under the condition that the user holds a first electronic device and a second electronic device, wherein the first operation is an operation for controlling the first electronic device and the second electronic device to move simultaneously; in response to the first operation, target data is transmitted between the first electronic device and the second electronic device. The method can be applied to the scene of data transmission between different electronic devices.

Description

Data transmission method and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a data transmission method and electronic equipment.
Background
With the development of communication technology, data can be mutually transmitted between different electronic devices, for example, when a user changes an electronic device, the user may need to transmit data such as pictures and address lists in one electronic device to another electronic device.
Currently, a user may generally trigger the electronic device a to display a setting interface, to determine the electronic device a as a data receiving device through an operation on a "one-key-switch" control in the setting interface, and trigger the electronic device a to generate a two-dimensional code. Also, the user may repeat the above steps for the electronic device B to determine the electronic device B as the data transmission device. Then, the user can operate the electronic device B to scan the two-dimensional code of the electronic device a, so that the electronic device a and the electronic device B establish a local area network capable of transmitting data. Further, the user may select a file (e.g., a picture, an address book, a video, music, etc.) to be transmitted in the electronic device B to trigger the electronic device B to transmit the file selected by the user to the electronic device a. Therefore, the process of transmitting data between one electronic device and another electronic device is complicated, namely the process of transmitting data between different electronic devices is complicated.
Disclosure of Invention
The embodiment of the invention provides a data transmission method and electronic equipment, and aims to solve the problem that the process of transmitting data among different electronic equipment is complex.
In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides a data transmission method, where the method is applied to a first electronic device, and the method includes: receiving a first operation of a user under the condition that the user holds a first electronic device and a second electronic device, wherein the first operation is an operation for controlling the first electronic device and the second electronic device to move simultaneously; in response to the first operation, target data is transmitted between the first electronic device and the second electronic device.
In a second aspect, an embodiment of the present invention provides an electronic device, which is a first electronic device and includes an input module and a transmission module. The input module is used for receiving a first operation of a user under the condition that the user holds the first electronic equipment and the second electronic equipment, wherein the first operation is an operation for controlling the first electronic equipment and the second electronic equipment to move simultaneously; and the transmission module is used for responding to the first operation received by the input module and transmitting the target data between the first electronic equipment and the second electronic equipment.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and when executed by the processor, the computer program implements the steps of the data transmission method provided in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data transmission method provided in the first aspect.
In the embodiment of the invention, under the condition that a user holds the first electronic device and the second electronic device, a first operation of controlling the first electronic device and the second electronic device to move simultaneously by the user can be received, and target data is transmitted between the first electronic device and the second electronic device in response to the first operation. Through the scheme, the user can hold the first electronic device and the second electronic device and directly transmit the target data between the first electronic device and the second electronic device by controlling the first electronic device and the second electronic device to move simultaneously. Compared with the related art, obviously, in the data transmission process, a user does not need to operate one electronic device to generate the two-dimensional code and operate another electronic device to scan the two-dimensional code to establish a local area network to enable the two electronic devices to communicate, and therefore the operation process of data transmission between different electronic devices is simplified.
Drawings
Fig. 1 is a schematic structural diagram of an android operating system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a data transmission method according to an embodiment of the present invention;
fig. 3 is an operation diagram of an electronic device according to an embodiment of the present invention;
fig. 4 is a second schematic diagram of a data transmission method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a time image of an absolute value of an acceleration of an electronic device during a first time period according to an embodiment of the present invention;
fig. 6 is a third schematic diagram of a data transmission method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 8 is a hardware schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The term "and/or" herein is an association relationship describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The symbol "/" herein denotes a relationship in which the associated object is or, for example, a/B denotes a or B.
The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first electronic device and the second electronic device, etc. are for distinguishing different electronic devices, and are not for describing a specific order of the electronic devices.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the embodiments of the present invention, unless otherwise specified, "a plurality" means two or more, for example, a plurality of elements means two or more elements, and the like.
The embodiment of the invention provides a data transmission method and electronic equipment, which can receive a first operation of controlling the first electronic equipment and the second electronic equipment to move simultaneously by a user under the condition that the user holds the first electronic equipment and the second electronic equipment, and respond to the first operation to transmit target data between the first electronic equipment and the second electronic equipment. Through the scheme, the user can hold the first electronic device and the second electronic device and directly transmit the target data between the first electronic device and the second electronic device by controlling the first electronic device and the second electronic device to move simultaneously. Compared with the related art, obviously, in the data transmission process, a user does not need to operate one electronic device to generate the two-dimensional code and operate another electronic device to scan the two-dimensional code to establish a local area network to enable the two electronic devices to communicate, and therefore the operation process of data transmission between different electronic devices is simplified.
The electronic device in the embodiment of the present invention may be an electronic device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present invention are not limited in particular.
The following describes a software environment to which the data transmission method provided by the embodiment of the present invention is applied, by taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of an android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, which are respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third-party application programs) in an android operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes libraries (also called system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of an android operating system and belongs to the bottommost layer of an android operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the android operating system based on the Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the data transmission method provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the data transmission method may operate based on the android operating system shown in fig. 1. That is, the processor or the electronic device may implement the data transmission method provided by the embodiment of the present invention by running the software program in the android operating system.
The electronic device in the embodiment of the invention can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiment of the present invention is not particularly limited.
The execution main body of the data transmission method provided in the embodiment of the present invention may be the electronic device, or may also be a functional module and/or a functional entity capable of implementing the data transmission method in the electronic device, which may be specifically determined according to actual use requirements, and the embodiment of the present invention is not limited. The following takes an electronic device as an example to exemplarily describe the data transmission method provided by the embodiment of the present invention.
The method provided by the embodiment of the present invention may be applicable to a scenario in which different electronic devices may transmit data to each other, for example, a scenario in which data is transmitted between an electronic device a (which may be a first electronic device described below) and an electronic device B (which may be a second electronic device described below). In a case where the user holds the electronic apparatus a and the electronic apparatus B, a first operation of controlling the electronic apparatus a and the electronic apparatus B to move simultaneously by the user may be received, and in response to the first operation, the target data may be transferred between the electronic apparatus a and the electronic apparatus B. Through the scheme, the user can hold the electronic equipment A and the electronic equipment B and directly transmit the target data between the electronic equipment A and the electronic equipment B by controlling the electronic equipment A and the electronic equipment B to move simultaneously. Compared with the related art, obviously, in the data transmission process, a user does not need to operate one electronic device to generate the two-dimensional code and operate another electronic device to scan the two-dimensional code to establish a local area network to enable the two electronic devices to communicate, and therefore the operation process of data transmission between different electronic devices is simplified.
As shown in fig. 2, an embodiment of the present invention provides a data transmission method applied to a first electronic device, and the method may include steps 101 and 102 described below.
Step 101, under the condition that a user holds a first electronic device and a second electronic device, the first electronic device receives a first operation of the user.
The first operation is an operation of controlling the first electronic device and the second electronic device to move simultaneously.
Optionally, in this embodiment of the present invention, the first operation may be an operation in which a user controls the first electronic device and the second electronic device to move in the same or similar movement manner. Specifically, the first operation may be an operation of controlling the movement of the first electronic device and the second electronic device in a case where the user holds the first electronic device and the second electronic device simultaneously with the same hand. Alternatively, the first operation may be an operation in which the user controls the movement of a target apparatus, and the target apparatus may be used to hold or store the first electronic device and the second electronic device (for example, the target apparatus may be a container for storing the first electronic device and the second electronic device, or the target apparatus may be a jig for holding the first electronic device and the second electronic device at the same time). The method and the device can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
By controlling the first operation of the simultaneous movement of the first electronic device and the second electronic device, such as the above-mentioned situation that the user uses the same hand to hold simultaneously, it can be prevented that other users simulate corresponding operations on the third electronic device when the user transmits data between the two electronic devices, thereby interfering with data transmission. Such as: if the first operation is a shake operation, when the two electronic devices are not limited to be moving simultaneously, and when the user shakes the first electronic device and the second electronic device, the user may hold the third electronic device by another person and also shake the third electronic device, so that the user may mistakenly determine that data transmission is performed with the third electronic device.
Optionally, in the embodiment of the present invention, the manner in which the electronic device determines that the user holds the first electronic device and the second electronic device with the same hand may be any of the following: and the mode A is judged by the camera of the first electronic equipment and/or the second electronic equipment. Specifically, the relative position of another electronic device is determined through an image acquired by a camera of one electronic device, and in the case that a user performs a first operation, if the relative position relationship between the first electronic device and the second electronic device is not changed, the first electronic device and the second electronic device are held by the same hand or are located in the same target device. And the mode B is judged through a screen of the first electronic equipment and/or the second electronic equipment and a camera of the first electronic equipment and/or the second electronic equipment. Specifically, when the first electronic device or the second electronic device receives a touch operation of a user on a screen of the electronic device and a relative position relationship between the first electronic device and the second electronic device is not changed, it may be determined that the first electronic device and the second electronic device are held by the same hand or located in the same target device. In the method C, by determining the similarity between the motion curve (e.g., the first curve) of the first electronic device and the motion curve (e.g., the target curve) of the second electronic device, it can be determined that the first electronic device and the second electronic device are held by the same hand or located in the same target apparatus. The following examples are given by way of illustration of the formula C and are not intended to limit the embodiments of the present invention.
For example, as shown in fig. 3, in a case where the user holds the first electronic device 001 and the second electronic device 002 with one hand, the user may shake the first electronic device 001 and the second electronic device 002 back and forth in the F1 direction and the F2 direction. The operation of shaking the first electronic device 001 by the user is the first operation.
It should be noted that, in the embodiment of the present invention, when the first electronic device receives the first operation of the user while the user holds the first electronic device and the second electronic device, the second electronic device also receives the first operation of the user, at this time, the first electronic device may record a parameter (e.g., a first curve) for characterizing a motion condition of the first electronic device, and the second electronic device may also record a parameter (e.g., a target curve) for characterizing a motion condition of the second electronic device.
Optionally, in this embodiment of the present invention, after step 101, the first electronic device may further perform step 103 described below.
Step 103, in the case of receiving the first operation, the first electronic device records a first curve.
The first curve is a curve of a motion parameter of the first electronic device controlled by the first operation to move in the first time period, wherein the motion parameter changes along with time.
Optionally, in an embodiment of the present invention, the first operation may be used to control the first electronic device to move, specifically, the first operation may be an operation of a user shaking the first electronic device, the first operation may also be an operation of the user controlling the first electronic device to move along a preset track, and the first operation may also be an operation of the user controlling a rotation motion of the first electronic device. The method and the device can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
It should be noted that, in the embodiment of the present invention, the first curve may be used to characterize the motion of the first electronic device. For example, the first curve may be a speed-time curve of the movement of the first electronic device, and the curve may characterize the speed of the first electronic device with time during the movement. The first curve may also be a displacement-time curve of the first electronic device, which may characterize a displacement-time transformation of the first electronic device during motion.
Optionally, in an embodiment of the present invention, the motion parameter includes at least one of: acceleration, velocity, displacement, absolute value of acceleration, absolute value of velocity, absolute value of displacement.
In the embodiment of the present invention, the first electronic device may detect a change of a motion parameter of the electronic device during a motion process through a position sensor, a velocity sensor, an accelerometer, a gyroscope, and the like installed in the electronic device, and the first electronic device may draw a relationship graph between the motion parameter and time according to data detected by the sensor (a process of recording a target curve by the second electronic device is similar to that of the first electronic device).
Optionally, in this embodiment of the present invention, the acceleration may be a linear acceleration or an angular acceleration, the speed may be a linear velocity or an angular velocity, and the displacement may be a linear displacement or an angular displacement, which may be specifically determined according to a motion mode of the first electronic device controlled by the first operation and an actual use requirement, which is not specifically limited in this embodiment of the present invention.
Optionally, in this embodiment of the present invention, the first curve may be used to characterize a relationship between a motion parameter of the first operation controlling the first electronic device to move in the first time period and time. Specifically, the first curve may be at least one of: an acceleration-time curve of the first electronic device, a velocity-time curve of the first electronic device, a displacement-time curve of the first electronic device, an absolute value-time curve of the acceleration of the first electronic device, an absolute value-time curve of the velocity of the first electronic device, and an absolute value-time curve of the displacement of the first electronic device.
In an embodiment of the present invention, the first time period is a time period between a start time of the first operation and an end time of the first operation. For example, assume that the first electronic device receives the first operation with a starting time T1The ending time of the first operation received by the first electronic equipment is T2Then the first period of time is T1To T2In betweenTime periods, i.e. time intervals (T)1,T2)。
In this embodiment of the present invention, the second electronic device may also record the motion of the second electronic device according to the motion condition of the second electronic device. Illustratively, the second electronic device may perform step 301 described below, similar to the first electronic device performing step 103.
And 301, under the condition that the first operation is received, recording a target curve by the second electronic equipment.
The target curve is a curve of the motion parameter of the second electronic device controlled by the first operation to move in the first time period, wherein the motion parameter changes along with the time.
In the embodiment of the present invention, the execution sequence of the step 103 and the step 301 is not particularly limited. Illustratively, step 103 may be performed before step 301, step 103 may be performed after step 301, and step 103 may be performed simultaneously with step 301. It should be noted that, the embodiment of the present invention is exemplified by performing step 103 and step 301 at the same time, that is, in the case of receiving the first operation, the first electronic device records the first curve, and at the same time, the second electronic device records the second curve.
In addition, in the embodiment of the present invention, there may be a small deviation between the first time period in step 103 and step 301, that is, there may be a small deviation between the time period during which the first curve actually occurs and the time period during which the target curve actually occurs. In particular, the deviation may be caused by measurement techniques or sensor delays, and is typically preferably not more than 30 milliseconds.
Optionally, in this embodiment of the present invention, the target curve may be used to characterize a relationship between a motion parameter of the first operation controlling the second electronic device to move in the first time period and time. Specifically, the target curve may be at least one of: an acceleration-time curve of the second electronic device, a velocity-time curve of the second electronic device, a displacement-time curve of the second electronic device, an absolute value-time curve of the acceleration of the second electronic device, an absolute value-time curve of the velocity of the second electronic device, and an absolute value-time curve of the displacement of the second electronic device.
Optionally, in the embodiment of the present invention, the second electronic device sends the first information to the first electronic device when the target condition is met.
Wherein the target condition comprises that a curve parameter of a target curve is in a first numerical range; the first information contains a target curve, and the first information can be used for requesting the transmission of target data between the first electronic device and the second electronic device.
Optionally, in this embodiment of the present invention, a manner in which the second electronic device sends the first information to the first electronic device may be any of the following:
in a first mode, when the first electronic device has established communication with the second electronic device before sending the first information, the second electronic device may send the first information to the first electronic device through an existing communication mode. The communication mode in which the first electronic device has established communication with the second electronic device before sending the first information is not particularly limited in the embodiment of the present invention, and may be specifically determined according to actual use requirements.
In a second mode, the second electronic device may broadcast and transmit the first information to all electronic devices within a preset distance range from the second electronic device. The broadcast may be transmitted using short-range wireless communication techniques. Specifically, the short-range wireless communication technology may include at least one of: hlilink protocol, WIFI technology (i.e., IEEE802.11 protocol), Bluetooth technology (Bluetooth), Near Field Communication (NFC), optical fidelity (LiFi), and the like. The method and the device can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
In this embodiment of the present invention, when the first information is sent in a broadcast manner, the distance between the first electronic device and the second electronic device is within a preset distance range, that is, the first electronic device can receive the first information sent by the second electronic device to the first electronic device.
In addition, in the embodiment of the present invention, when the second electronic device sends the first information in a broadcast manner, at least one electronic device within a distance less than the preset distance from the second electronic device may receive the first information, where the first information may be used to request data of the electronic device that receives the first information. If an electronic device located in the area receives the broadcast information of the second electronic device, the electronic device may send data of the electronic device to the second electronic device in response to the received first information, and in this case, the electronic device may be referred to as a first electronic device.
Optionally, in an embodiment of the present invention, the curve parameter includes at least one of the following: the number of periodic curves included in the curve, the frequency of the periodic curves included in the curve, the average of the amplitudes of all the periodic curves included in the curve, the amplitude of at least one periodic curve included in the curve.
It should be noted that the at least one periodic curve may represent a motion law of the electronic device. For example, a periodic curve in the displacement-time curve may indicate that the electronic device conforms to the law of reciprocation. The following embodiments exemplify the acceleration-time curve of the second electronic device as the target curve, and illustrate the curve parameters of the acceleration-time curve.
Illustratively, the acceleration-time curve of the second electronic device at the target curve is in the time interval (T)1,T2) In the above case (i.e. the first time period) that conforms to the sine law (i.e. the first operation is described as an operation of shaking the electronic device back and forth), the curve parameters of the acceleration-time curve of the second electronic device may specifically include: acceleration-time curve in the time interval (T)1,T2) Number of complete sinusoids of one period included, acceleration-time curve in time interval (T)1,T2) Frequency, acceleration-time curve of the middle part in the time interval (T)1,T2) Average of the amplitudes of all sinusoids in the time interval (T) of the acceleration-time curve1,T2) Of the at least one sinusoid.
Specifically, in the embodiment of the present invention, the curve parameter of the target curve is in the first numerical range. The first numerical range may be adaptively adjusted according to different curve parameters. For example, if the curve parameter of the target curve is the number of periodic curves included in the curve, the first numerical range may be a range greater than a first threshold value, the first threshold value being related to the number of periodic curves; if the curve parameter of the target curve is the frequency of the periodic curve included in the curve, the first range of values may be a range greater than a second threshold value, which may represent a frequency; if the curve parameter of the target curve is an average value of the amplitudes of all the periodic curves included in the curve, the first value range may be a range greater than a third threshold value and smaller than a fourth threshold value, the third threshold value may be a lower limit value of the first value range, and the fourth threshold value may be an upper limit value of the first value range.
It should be noted that, in the embodiment of the present invention, the first numerical range may be used to determine the motion state of the electronic device. Specifically, when a curve parameter of a curve (a first curve or a target curve) corresponding to the motion of a certain electronic device (e.g., a first electronic device or a second electronic device) is in a first numerical range, the motion of the electronic device is represented as a special motion and conforms to a preset rule. For example, when the curve parameter of the electronic device during shaking is within the first numerical range, it indicates that the motion (i.e., shaking) of the electronic device conforms to the reciprocating motion law.
It should be noted that, in the embodiment of the present invention, the first numerical range may be used to determine the motion state of the electronic device. When a curve parameter of a curve corresponding to the motion of certain electronic equipment (such as first electronic equipment or second electronic equipment) is in a first numerical range, the motion of the electronic equipment is represented as special motion and conforms to a preset rule. Specifically, for the specific description of the first numerical range, reference may be made to the description of the first numerical range in step 103, and details are not repeated here.
In addition, in the embodiment of the present invention, when the curve parameter of the first curve is in the first numerical range, the motion state of the first electronic device under the first operation action is represented according to the preset rule. The first numerical range may be adaptively adjusted according to different curve parameters.
For example, in a case where the average value of the amplitude of the displacement-time curve of the first electronic device is greater than the third threshold and less than the fourth threshold (i.e., the average value of the amplitude of the displacement-time curve of the first electronic device is in the first numerical range), it indicates that the motion amplitude of the first electronic device fluctuates within a range not exceeding a certain threshold (i.e., meets a preset rule). And when the displacement-time curve frequency of the first electronic device is smaller than the second threshold (namely, the displacement-time curve frequency of the first electronic device is in the first numerical range), the fact that the motion of the first electronic device conforms to the reciprocating motion rule is represented.
Optionally, in the embodiment of the present invention, when the target condition is satisfied, after the second electronic device sends the first information to the first electronic device, the first electronic device may receive the first information sent by the second electronic device.
The first information may include a target curve, and the first information may be used to request data in the first electronic device.
Optionally, in this embodiment of the present invention, the first information may include a target curve and request information. The target curve is a curve of the motion parameter of the second electronic equipment moving in the first time period changing along with the time; the request information may be for requesting data in the first electronic device.
Optionally, in this embodiment of the present invention, the first information may further include target information. The target information may be information indicating the second electronic device, and the target information may specifically include at least one of the following: an identification of the second electronic device, a communication mode of the second electronic device, an identification of a communication mode of the second electronic device, and the like. For example, the target information may be address information of the second electronic device, and WIFI hotspot information of the second electronic device (i.e., account information and password information of the WIFI hotspot, so that other electronic devices that receive the first information through broadcasting can establish communication with the second electronic device through the WIFI hotspot information). It should be noted that the communication method of the second electronic device may be one of the above wireless end distance communication technologies, or may be another communication method, and may be specifically determined according to actual use requirements, and the embodiment of the present invention is not particularly limited.
Optionally, in this embodiment of the present invention, after the first electronic device receives the second information sent by the second electronic device, the first electronic device may establish communication with the second electronic device according to the target information in the first information. For example, if the target information includes address information of the second electronic device and WIFI hotspot information of the second electronic device, the first electronic device may establish communication with the second electronic device according to the address information of the second electronic device and the WIFI hotspot information of the second electronic device. If the target information includes the address information of the second electronic device and the identification of the second electronic device using NFC communication, the first electronic device may establish communication with the second electronic device according to the address information of the second electronic device and the identification of the second electronic device using NFC communication.
It can be understood that, in the embodiment of the present invention, since the first information further includes the target information indicating the information of the second electronic device, the first electronic device may establish communication with the second electronic device according to the target information, so as to prepare for subsequent data transmission.
And 102, responding to the first operation, and transmitting target data between the first electronic equipment and the second electronic equipment.
Optionally, with reference to fig. 2, as shown in fig. 4, the step 102 may be specifically implemented by the following step 102 a.
Step 102a, transmitting target data between the first electronic device and the second electronic device under the condition that the similar parameter between the first curve and the target curve is in the target numerical range.
The first curve is a time-varying curve of a motion parameter for controlling the first electronic device to move through the first operation (i.e., the first curve recorded in step 103), the target curve is a time-varying curve of a motion parameter for controlling the second electronic device to move through the first operation (i.e., the target curve recorded in step 301), and the similarity parameter is a parameter representing a degree of similarity between the first curve and the target curve.
Optionally, in an embodiment of the present invention, the similar parameter includes at least one of a first sub-parameter and a second sub-parameter.
The first sub-parameter is a correlation coefficient of a motion parameter in the first curve and a motion parameter in the target curve; the second sub-parameter is the ratio or difference of the first type curve parameter of the first curve and the first type curve parameter of the target curve; the first type of curve parameter includes at least one of: the number of periodic curves included in the curve, the frequency of the periodic curves included in the curve, and the average of the amplitudes of all the periodic curves included in the curve.
Optionally, in this embodiment of the present invention, the first sub-parameter may be used to characterize a correlation degree of a linear relationship between the motion parameter in the first curve and the motion parameter in the target curve. The first similarity parameter may specifically be any one of the following: the acceleration of the first electronic device and the acceleration of the second electronic device are related to each other, the velocity of the first electronic device and the velocity of the second electronic device are related to each other, the displacement of the first electronic device and the displacement of the second electronic device are related to each other, the absolute value of the acceleration of the first electronic device and the absolute value of the acceleration of the second electronic device are related to each other, the absolute value of the velocity of the first electronic device and the absolute value of the velocity of the second electronic device are related to each other, and the absolute value of the displacement of the first electronic device and the absolute value of the displacement of the second electronic device are related to each other. The determination can be specifically carried out according to actual use requirements.
Optionally, the step 102a may be specifically implemented by the following steps 102a1 to 102a 4.
Step 102a1, calculating a first variance from a parameter of the first curve when the curve parameter of the first curve is within a first range of values.
Wherein the first variance is a variance of a parameter of the first curve in the first time period.
Step 102a2, the first electronic device calculates a second variance according to the motion parameters in the target curve.
And the second variance is the variance of the motion parameters in the target curve in the first time period.
It should be noted that, in the embodiment of the present invention, specifically, the variance of the motion parameter in the preset time period may be calculated according to the graph of the motion parameter represented by the first curve or the target curve. For example, if the first curve is an acceleration-time curve, calculating a variance of the acceleration of the first electronic device in a preset time period as a first variance; if the first curve is a displacement-time curve, calculating the variance of the displacement of the first electronic device in the preset time period as a first variance. The method for calculating the variance may refer to the prior art, and is not described in detail in the embodiments of the present invention.
Step 102a3, the first electronic device calculates the target covariance according to the parameters of the first curve and the motion parameters in the target curve.
The target covariance is the covariance of the parameter of the first curve and the motion parameter in the target curve in the first time period.
It should be noted that the parameter of the first curve and the motion parameter of the target curve are the same motion parameter, i.e. the first variance, the second variance, and the target covariance in the steps 102a 1-102 a3 are all calculated according to the same motion parameter. For example, the first variance is a variance of the acceleration of the first electronic device, the second variance is a variance of the acceleration of the second electronic device, and the target covariance is a covariance of the acceleration of the first electronic device and the acceleration of the second electronic device.
Step 102a4, the first electronic device determines a correlation coefficient of the first curve and the target curve according to the first variance, the second variance and the target covariance, and determines the correlation coefficient as a similar parameter.
Alternatively, the calculation formula of the correlation coefficient may be
Figure BDA0002441490120000091
Wherein the content of the first and second substances,x represents the motion parameter of the first curve, Y represents the motion parameter of the target curve, Cov (X, Y) represents the covariance of the motion parameter of the first curve and the motion parameter of the target curve (i.e., target covariance), Var [ X]Representing the variance of a first curvilinear motion parameter (i.e., a first variance), Var [ Y []Representing the variance (i.e., the second variance) of the target curvilinear motion parameter.
It should be noted that the motion parameter of the first curve and the motion parameter of the target curve (i.e., X and Y) in the above formula for calculating the correlation coefficient may be acceleration in an acceleration-time curve, velocity in a velocity-time curve, displacement in a displacement-time curve, acceleration in an acceleration absolute value-time curve, velocity in a velocity absolute value-time curve, displacement in an absolute value-time curve of displacement, and the like. The following embodiments exemplify the motion parameters as acceleration in an acceleration-time curve.
Illustratively, the first time period is a time interval (T)1,T2) The motion parameter of the first curve is the acceleration in the acceleration-time curve of the first electronic device, and the motion parameter of the target curve is the acceleration in the acceleration-time curve of the second electronic device. Specifically, the formula for calculating the correlation coefficient may further be
Figure BDA0002441490120000092
Wherein, XaIndicating that the first electronic device is in a time interval (T)1,T2) Acceleration value in acceleration-time curve of internal motion, YaIndicating that the second electronic device is in the time interval (T)1,T2) Acceleration value in the acceleration-time curve of an internal movement, Cov (X)a,Ya) Representing the covariance of the acceleration of the first electronic device and the acceleration of the second electronic device, Var [ X ]a]The variance, Var [ Y ], of the acceleration of the first electronic devicea]Representing the variance of the acceleration of the second electronic device.
It should be noted that, in the embodiment of the present invention, when the calculated correlation coefficient is calculated by using acceleration, velocity, or displacement, the value range of the correlation coefficient is (-1, 1). Specifically, if the value of the correlation coefficient is closer to 0, it indicates that the linear correlation degree of the motions of the first electronic device and the second electronic device is lower; if the value of the correlation coefficient approaches to 1, the higher the positive linear correlation degree of the motion of the first electronic device and the second electronic device is; if the value of the correlation coefficient approaches to-1, it indicates that the degree of negative linear correlation of the motions of the first electronic device and the second electronic device is higher. When the calculated correlation coefficient is calculated using the absolute value of the acceleration, the absolute value of the velocity, or the absolute value of the displacement, the range of the correlation coefficient is (0, 1). Specifically, if the value of the correlation coefficient is closer to 0, it indicates that the linear correlation degree of the motions of the first electronic device and the second electronic device is lower; if the value of the correlation coefficient approaches to 1, it indicates that the degree of linear correlation between the motions of the first electronic device and the second electronic device is higher.
Optionally, in an embodiment of the present invention, the second sub-parameter may be used to characterize a difference degree between the first curve and the target curve. Specifically, the second sub-parameter may be at least one of the following: the difference or ratio of the number of the periodic curves included in the first curve and the number of the periodic curves included in the target curve, the difference or ratio of the frequency of the periodic curves included in the first curve and the frequency of the periodic curves included in the target curve, and the difference or ratio of the average of the amplitudes of all the periodic curves included in the first curve and the average of the amplitudes of all the periodic curves included in the target curve. The method can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
Specifically, the number of the period curves may be directly obtained from the first curve or the target curve, and the frequency of the period curves may be determined by a ratio of the number of the period curves in a period of time to the period of time, or may be determined by a ratio of the number of vibrations collected by a sensor in the electronic device to the period of time. I.e. according to the formula
Figure BDA0002441490120000093
Wherein f represents the frequency of the periodic curve; m represents the vibration picked up by the sensorThe number of times (e.g., change once in the direction of acceleration collected by the acceleration sensor each time, which is recorded as one vibration), or the number of periodic curves; Δ t is the length of the time interval during which the vibration is acquired. In the following embodiments, the calculation of the second sub-parameter is specifically described by taking a time curve of the absolute value of the acceleration as an example.
Illustratively, fig. 5 is a time image of the absolute value of the acceleration of the first electronic device and the second electronic device moving during the first time period (i.e., the time period t1 to t 2). The time images of the absolute values of the accelerations of the first electronic device and the second electronic device conform to the y ═ sin (x) i law. As shown in (a) of fig. 5, the number of the periodic curves included in the first curve is 4 (i.e., m)14), the frequency of the periodic curve included in the first curve is then determined
Figure BDA0002441490120000101
The average of the amplitudes of all the periodic curves included in the first curve is
Figure BDA0002441490120000102
As shown in (b) in fig. 5, the number of the periodic curves included in the target curve is 4 (m)24), the frequency of the periodic curve included in the target curve is then determined
Figure BDA0002441490120000103
The average of the amplitudes of all the periodic curves included in the target curve is
Figure BDA0002441490120000104
As such, the first electronic device may take any one of the following as the second sub-parameter:
Figure BDA0002441490120000105
f1-f2
Figure BDA0002441490120000106
a10-a20
Figure BDA0002441490120000107
it should be noted that, in the case that the second sub-parameter is a difference (for example, a difference between the number of the periodic curves included in the curve or a difference between the frequencies of the periodic curves included in the curve), if the value of the second sub-parameter is smaller, the degree of similarity between the motions of the first electronic device and the second electronic device is higher; if the value of the second sub-parameter is larger, the similarity degree of the movement of the first electronic equipment and the second electronic equipment is lower. In the case where the second sub-parameter is a ratio (for example, a ratio of the number of periodic curves included in the curve, or a ratio of the frequency of the periodic curves included in the curve), if the value of the second sub-parameter approaches 1, it indicates that the motion of the first electronic device and the second electronic device is more similar; if the value of the second sub-parameter is far from 1, the lower the similarity degree of the motion of the first electronic device and the second electronic device is.
Optionally, in this embodiment of the present invention, when the similar parameter is in the target value range, the transmitting the target data between the first electronic device and the second electronic device may specifically be that the first electronic device sends the target data in the first electronic device to the second electronic device.
In the embodiment of the present invention, when the similarity parameter is in the target value range, the first curve is similar to the target curve; in the case where the similar parameter is not within the target value range, it is explained that the first curve is not similar to the target curve.
In addition, in the embodiment of the present invention, the first information received by the first electronic device further includes target information that may be used to indicate information of the second electronic device, and the first electronic device may establish communication with the second electronic device according to the target information in the first information.
Optionally, in this embodiment of the present invention, the first electronic device may establish communication with the second electronic device according to the target information included in the first information. Specifically, the first electronic device may find the second electronic device according to a communication mode (e.g., WIFI hotspot information) in the target information, and obtain communication with the second electronic device through the communication mode using a password or a key of the communication mode in the target information (e.g., join a local area network created by the second electronic device based on the WIFI hotspot information through the WIFI hotspot information). Then, the first electronic device can send the target data in the first electronic device to the second electronic device through the communication mode.
Optionally, in this embodiment of the present invention, when the similar parameter is in the target value range and the first electronic device and the second electronic device successfully establish communication, the first electronic device and/or the second electronic device displays first prompt information, where the first prompt information may be used to prompt a user that the first electronic device and the second electronic device have successfully established communication, and the user may send data to the second electronic device through the first electronic device. Wherein, the form of the first prompt message includes and is not limited to: prompt information displayed in an interface of the electronic equipment, sound prompt information, vibration prompt information, prompt information of flashing of an indicator light according to preset frequency and the like.
It can be understood that, in the embodiment of the present invention, since the electronic device may display the first prompt information that may be used to prompt the user that the first electronic device has successfully established communication with the second electronic device, the user may know that communication has been established, and may select the target data that needs to be transmitted, so that the first electronic device sends the target data to the second electronic device.
Optionally, in this embodiment of the present invention, the mode of determining the target data by the first electronic device may be any one of the following two modes:
in a first mode, the first electronic device may receive an input of a user selecting data in the first electronic device, and determine the data selected by the user as target data.
Optionally, in this embodiment of the present invention, when the first electronic device and the second electronic device successfully establish communication, the user may select data in the first electronic device in any one of the following manners: the storage path of the data, the identification of the data, the type of the data, the use time of the data, the source of the data, and the like. The method and the device can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
In a second mode, the first electronic device may determine, according to the first motion trajectory conforming to the first preset motion trajectory, data corresponding to the first preset motion trajectory as target data, or the first electronic device may determine the target data according to the first information.
Optionally, in the embodiment of the present invention, the first motion trajectory corresponds to a first preset motion trajectory in the at least one preset motion trajectory, and the target data is data corresponding to the first preset motion trajectory.
Wherein the first motion trajectory comprises at least one of: the motion track represented by the first curve and the track represented by the target curve; each preset track in the at least one preset motion track corresponds to a group of data in the first electronic device.
It should be noted that, in the embodiment of the present invention, each preset track in the at least one preset motion track corresponds to a set of data in the first electronic device. Specifically, if a first motion trajectory in the at least one motion trajectory is up-and-down shaking of the electronic device, data corresponding to the first motion trajectory may be picture data in the first electronic device; if a first motion track in the at least one motion track is left-right shaking of the electronic equipment, the data corresponding to the first motion track can be address book data in the first electronic equipment; if a first motion trajectory in the at least one motion trajectory is the annular shake of the electronic device, the data corresponding to the first motion trajectory may be video data in the first electronic device. In addition, the electronic device may determine the movement mode of the electronic device according to the recorded movement parameters of the curve, for example, then the first electronic device may determine that the movement mode of the first electronic device is left-right shaking according to the recorded movement parameters of the first curve. The method and the device can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
Optionally, in the embodiment of the present invention, each preset track in the at least one preset motion track corresponds to a corresponding relationship of data in the first electronic device, and may be set by the first electronic device before step 101, or may be set by the second electronic device before step 101, or may be sent to the first electronic device through the first information after the second electronic device is set. The method and the device can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
Alternatively, the user may determine the target data by a motion trajectory (i.e., a motion trajectory represented by the first curve) of the operation performed on the first electronic device. Specifically, the first electronic device may detect whether a motion trajectory of the first electronic device matches a motion trajectory in the at least one preset motion trajectory, and determine, by the first electronic device, data corresponding to a first preset motion trajectory as the target data when the motion trajectory of the first electronic device matches the first preset motion trajectory in the at least one preset motion trajectory.
Optionally, in this embodiment of the present invention, the first information further includes second information, where the second information is an identifier of the target data or information of a motion trajectory represented by the target curve.
Specifically, the second electronic device may record information of a motion trajectory represented by the target curve or an identifier of the target data, and send the information of the motion trajectory represented by the target curve or the information of the motion trajectory represented by the target curve to the first electronic device through the second information in the first information, and then the first electronic device may determine, as the target data, data corresponding to a first preset motion trajectory in the case where the motion trajectory represented by the target curve conforms to the first preset motion trajectory in the at least one preset motion trajectory according to whether the motion trajectory represented by the target curve and the motion trajectory represented by the target curve conform to the motion trajectory in the at least one preset motion trajectory or not, or, the first electronic device may directly determine, as the target data, data indicated by the identification of the target data according to the identification of the target data.
For example, it is assumed that the corresponding relationship between the motion trajectory and the data stored in the first electronic device is: the vertical shaking of the electronic equipment corresponds to a picture in the first electronic equipment, the horizontal shaking of the electronic equipment corresponds to an address book in the first electronic equipment, and the annular shaking of the electronic equipment corresponds to a video in the first electronic equipment. If the user uses one hand to hold the first electronic device and the second electronic device to perform left-right shaking (as shown in fig. 3), the first electronic device can judge that the motion mode of the first electronic device is left-right shaking according to the recorded motion parameters of the first curve (when the electronic device shakes left and right, the motion parameters of the first curve can be characterized in that a speed-time image and a displacement-time image are periodically changed, and a gravitational acceleration-time image tends to be stable and has small change). The first electronic device may determine the address book in the first electronic device as the target file, and after the first electronic device and the second electronic device successfully establish communication, the first electronic device may send the address book to the second electronic device (i.e., target data is transmitted between the first electronic device and the second electronic device).
For example, as shown in fig. 3, in a case where the user holds the first electronic device 001 and the second electronic device 002 with one hand, the user may shake the first electronic device 001 and the second electronic device 002 back and forth in the F1 direction and the F2 direction. Wherein the user shakes the first operation of the first electronic device 001 and the second electronic device 002. As shown in fig. 5 (a), the first electronic device 001 records an acceleration-time curve (i.e., a first curve) of the first electronic device 001, and as shown in fig. 5 (b), the second electronic device 002 records an acceleration-time curve (i.e., a target curve) of the second electronic device 002. The interface displaying the data to be synchronized on the second electronic device (i.e. in the state of the data to be synchronized) and the amplitude of the acceleration-time curve of the second electronic device 002 is at aMAXAnd aMINA ofMAXAnd aMINIn a case where the difference is Δ a (that is, the curve parameter of the target curve is in the first numerical range), the second electronic device 002 may send first information to all electronic devices that are no more than 10 meters away from the second electronic device 002 in a broadcast manner by using the bluetooth technology, where the first information includes the target curve and the WIFI hot spot information of the second electronic device 002Information (account information and password information of the WIFI hotspot initiated by the second electronic device 002 may be specifically included). The first electronic device 001 may receive the first information sent by the second electronic device 002, and the amplitude of the acceleration-time curve (i.e. the first curve) of the first electronic device 001 is at aMAXAnd aMINIn between (i.e. the curve parameter of the target curve is in the first range of values), the first electronic device 001 may be based on the acceleration-time curve of the first electronic device 001 (i.e. the first curve) and the acceleration-time curve of the second electronic device 002 (i.e. the target curve) according to the formula
Figure BDA0002441490120000121
Calculating the time interval (t)1,t2) When the correlation coefficient between the acceleration of the first electronic device and the acceleration of the second electronic device (i.e. the similar parameter) in the range is smaller than a target threshold (i.e. the similar parameter is in the target numerical range), the first electronic device 001 may establish communication with the second electronic device 002 through the received WIFI hotspot information, and send the address book and the picture (i.e. the target information) in the first electronic device 001 to the second electronic device 002 through the WIFI. The second electronic device 002 can receive the address book and the picture transmitted by the first electronic device 001 (i.e., the target data is transmitted between the first electronic device and the second electronic device).
It can be understood that, in the embodiment of the present invention, because the electronic device may conform to the first preset trajectory according to the motion trajectory represented by the first curve or the motion trajectory represented by the target curve, and the electronic device may determine the data corresponding to the first preset motion trajectory as the target data, when the user performs the first operation, the data of the first device may be selected through different operation trajectories, so that the step of selecting the target data by the user is simplified, and the user may use the data conveniently.
It can be understood that, in the embodiment of the present invention, in a case of receiving a first operation of controlling the first electronic device to move by a user, the first electronic device may record a first curve of a motion parameter of the motion of the first electronic device, which varies with time, and receive first information of requesting data by the second electronic device (the first information includes a target curve of the motion parameter of the motion of the second electronic device, which varies with time, in the first time period). The first electronic device detects that the curve parameter of the first curve is in a first numerical range, namely the motion of the first electronic device is special motion, so that the first electronic device acquires the similar parameter between the first curve and the target curve. Under the condition that the similar parameters are in the target numerical range, the first curve and the target curve are relatively similar (namely the motion of the second electronic device is relatively similar to the special motion of the first electronic device), and further the first electronic device sends target data in the first electronic device to the second electronic device. The first electronic device may receive the first information, and when it is determined that the motion of the second electronic device is similar to the special motion of the first electronic device, the first electronic device may establish communication with the second electronic device and transmit the target data to the second electronic device. Compared with the related art, obviously, in the data transmission process, a user does not need to operate one electronic device to generate the two-dimensional code and operate another electronic device to scan the two-dimensional code to establish a local area network to enable the two electronic devices to communicate, and therefore the operation process of data transmission between different electronic devices is simplified.
Alternatively, in conjunction with fig. 2, as shown in fig. 6, the step 102 can be implemented by the following step 102 b.
And 102b, transmitting target data between the first electronic equipment and the second electronic equipment under the condition that the first electronic equipment displays the target interface.
The target interface is used for indicating that the first electronic equipment is in a state of data to be synchronized.
Optionally, in the embodiment of the present invention, that the first electronic device is in a data to be synchronized state means that the first electronic device is a data sending party, and may send data to other electronic devices that establish communication with the first electronic device. Specifically, the state may be any one of two states: in the first state, the first electronic device is started for the first time, and a data synchronization setting interface is displayed, where the data synchronization setting interface may be used to indicate that the first electronic device is in a data to be synchronized state. And in the second state, the first electronic equipment is not started for the first time, and the user triggers the first electronic equipment to be in a state of waiting for data synchronization. In a case that the first electronic device is in the data to-be-synchronized state, the first electronic device may display a target interface, and the target interface (e.g., a data synchronization setting interface) may be used to indicate that the first electronic device is in the data to-be-synchronized state. Besides displaying the target interface, the first electronic device can also display first indication information, and the first indication information is used for indicating that the first electronic device is in a data to-be-synchronized state. The first indication information may specifically be at least one of the following: prompt information displayed in an interface of the electronic equipment, sound prompt information, vibration prompt information, prompt information of flashing of an indicator light according to preset frequency and the like. The method and the device can be determined according to actual use requirements, and the embodiment of the invention is not particularly limited.
Optionally, in the embodiment of the present invention, the first electronic device is in a data to be synchronized state, which may also mean that the first electronic device is a data receiver and may receive data sent by other electronic devices that establish communication with the first electronic device. For example, when a user replaces a mobile phone, the user can open a target interface of a new mobile phone and hold the new mobile phone and the old mobile phone by the same hand to perform corresponding operations, and then the new mobile phone automatically judges that corresponding information of the old mobile phone needs to be received, so that corresponding data is requested from the old mobile phone; and after receiving the request, the old mobile phone sends corresponding data to the new mobile phone. Optionally, the type of the specific requested data may be preset by the user, or may be determined by the type of the corresponding operation. For example, if the operation is a vertical shaking operation, the photos are synchronized; if the user shakes left and right, synchronizing the installed application programs; if the image is in a ring-shaped shaking state, the photo and the installed application program are synchronized. The corresponding relationship between the specific operation mode and the transmission data type may be set by the user, which is not specifically limited in the embodiment of the present invention.
Optionally, in this embodiment of the present invention, when the second electronic device receives the target data sent by the first electronic device, the second electronic device may display a second prompt message, where the second prompt message may be used to prompt a user to confirm to receive the data sent by the first electronic device. It should be noted that, for the related description of the second prompt information, reference may be made to the related description of the first prompt information in step 102a, which is not described herein again.
It can be understood that, because the second prompt message can prompt the user to confirm to receive the message sent by the first electronic device, the user can filter the data received by the second electronic device and selectively receive the data according to the actual use requirement of the user, thereby facilitating the use of the user and improving the use experience of the user.
It should be noted that, in the embodiment of the present invention, the data transmission methods shown in the above drawings are all exemplarily described by referring to one drawing in the embodiment of the present invention. In specific implementation, the data transmission method shown in each of the above figures may also be implemented by combining any other figures that may be combined, which are illustrated in the above embodiments, and are not described herein again.
As shown in fig. 7, an embodiment of the invention provides a first electronic device 700. The first electronic device 700 may comprise an input module 701 and a transmission module 702. The input module 701 may be configured to receive a first operation of a user when the user holds the first electronic device and the second electronic device, where the first operation is an operation of controlling the first electronic device and the second electronic device to move simultaneously. A transmission module 702 may be configured to transmit the target data between the first electronic device and the second electronic device in response to the first operation received by the input module 701.
Optionally, in an embodiment of the present invention, the transmission module 702 may be specifically configured to transmit the target data between the first electronic device and the second electronic device when the similarity parameter between the first curve and the target curve is in the target value range. The first curve is a curve of a motion parameter of the first electronic equipment controlled by the first operation to move along with time, the target curve is a curve of a motion parameter of the second electronic equipment controlled by the first operation to move along with time, and the similarity parameter is a parameter representing the similarity degree between the first curve and the target curve.
Optionally, in an embodiment of the present invention, the similar parameter includes at least one of a first sub-parameter and a second sub-parameter. The first sub-parameter is a correlation coefficient of the motion parameter in the first curve and the motion parameter in the target curve; the second sub-parameter is the ratio or difference of the first type curve parameter of the first curve and the first type curve parameter of the target curve; the first type of curve parameter includes at least one of: the number of periodic curves included in the curve, the frequency of the periodic curves included in the curve, and the average of the amplitudes of all the periodic curves included in the curve.
Optionally, in an embodiment of the present invention, the first motion trajectory corresponds to a first preset motion trajectory of the at least one preset motion trajectory, and the target data is data corresponding to the first preset motion trajectory. Wherein the first motion profile comprises at least one of: the motion trail represented by the first curve and the motion trail represented by the target curve; each preset track in the at least one preset motion track corresponds to a set of data in the first electronic device or the second electronic device.
Optionally, in this embodiment of the present invention, the transmission module 702 may be specifically configured to transmit the target data between the first electronic device and the second electronic device when the first electronic device displays the target interface. The target interface is used for indicating that the first electronic equipment is in a state of data to be synchronized.
The electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the above method embodiments, and is not described herein again to avoid repetition.
The embodiment of the invention provides electronic equipment, which can receive a first operation of controlling the first electronic equipment and the second electronic equipment to move simultaneously by a user under the condition that the user holds the first electronic equipment and the second electronic equipment, and respond to the first operation to transmit target data between the first electronic equipment and the second electronic equipment. Through the scheme, the user can hold the first electronic device and the second electronic device and directly transmit the target data between the first electronic device and the second electronic device by controlling the first electronic device and the second electronic device to move simultaneously. Compared with the related art, obviously, in the data transmission process, a user does not need to operate one electronic device to generate the two-dimensional code and operate another electronic device to scan the two-dimensional code to establish a local area network to enable the two electronic devices to communicate, and therefore the operation process of data transmission between different electronic devices is simplified.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention. As shown in fig. 8, the electronic device 200 includes, but is not limited to: radio frequency unit 201, network module 202, audio output unit 203, input unit 204, sensor 205, display unit 206, user input unit 207, interface unit 208, memory 209, processor 210, and power supply 211. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 8 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, a pedometer, and the like.
The user input module 207 may be configured to receive a first operation of a user when the user holds the first electronic device and the second electronic device, where the first operation is an operation of controlling the first electronic device and the second electronic device to move simultaneously. The radio frequency unit 201 may be configured to transmit target data between the first electronic device and the second electronic device in response to the first operation received by the user input module 207.
It should be understood that, in the embodiment of the present invention, the function of the input module 701 may be specifically implemented by the user input module 207, and the function of the transmission module 702 may be specifically implemented by the radio frequency unit 201. The second electronic device may also implement the above-described functions corresponding to the first electronic device 700.
The embodiment of the invention provides electronic equipment, which can receive a first operation of controlling the first electronic equipment and the second electronic equipment to move simultaneously by a user under the condition that the user holds the first electronic equipment and the second electronic equipment, and respond to the first operation to transmit target data between the first electronic equipment and the second electronic equipment. Through the scheme, the user can hold the first electronic device and the second electronic device and directly transmit the target data between the first electronic device and the second electronic device by controlling the first electronic device and the second electronic device to move simultaneously. Compared with the related art, obviously, in the data transmission process, a user does not need to operate one electronic device to generate the two-dimensional code and operate another electronic device to scan the two-dimensional code to establish a local area network to enable the two electronic devices to communicate, and therefore the operation process of data transmission between different electronic devices is simplified.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 201 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 210; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 201 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 201 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 202, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 203 may convert audio data received by the radio frequency unit 201 or the network module 202 or stored in the memory 209 into an audio signal and output as sound. Also, the audio output unit 203 may also provide audio output related to a specific function performed by the electronic apparatus 200 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 203 includes a speaker, a buzzer, a receiver, and the like.
The input unit 204 is used to receive an audio or video signal. The input unit 204 may include a Graphics Processing Unit (GPU) 2041, a microphone 2042, and a camera module 2043, and the graphics processor 2041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 206. The image frames processed by the graphic processor 2041 may be stored in the memory 209 (or other storage medium) or transmitted via the radio frequency unit 201 or the network module 202. The microphone 2042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 201 in case of a phone call mode. The camera module 2043 collects images and transmits the collected images to the graphic processor 2041.
The electronic device 200 also includes at least one sensor 205, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 2061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 2061 and/or the backlight when the electronic device 200 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 205 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 206 is used to display information input by the user or information provided to the user. The display unit 206 may include a display panel 2061, and the display panel 2061 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), or the like.
The user input unit 207 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 207 includes a touch panel 2071 and other input devices 2072. Touch panel 2071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 2071 (e.g., user operation on or near the touch panel 2071 using a finger, a stylus, or any other suitable object or attachment). The touch panel 2071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 210, and receives and executes commands sent by the processor 210. In addition, the touch panel 2071 may be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 207 may include other input devices 2072 in addition to the touch panel 2071. In particular, the other input devices 2072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not further described herein.
Further, a touch panel 2071 may be overlaid on the display panel 2061, and when the touch panel 2071 detects a touch operation on or near the touch panel 2071, the touch panel is transmitted to the processor 210 to determine the type of the touch event, and then the processor 210 provides a corresponding visual output on the display panel 2061 according to the type of the touch event. Although the touch panel 2071 and the display panel 2061 are shown as two separate components in fig. 8, in some embodiments, the touch panel 2071 and the display panel 2061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 208 is an interface for connecting an external device to the electronic apparatus 200. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 208 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 200 or may be used to transmit data between the electronic apparatus 200 and the external device.
The memory 209 may be used to store software programs as well as various data. The memory 209 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 209 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 210 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 209 and calling data stored in the memory 209, thereby performing overall monitoring of the electronic device. Processor 210 may include one or more processing units; optionally, the processor 210 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 210.
The electronic device 200 may further include a power source 211 (such as a battery) for supplying power to each component, and optionally, the power source 211 may be logically connected to the processor 210 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 200 includes some functional modules that are not shown, and thus are not described in detail herein.
Optionally, an embodiment of the present invention further provides an electronic device, which includes the processor 210 shown in fig. 8, the memory 209, and a computer program stored in the memory 209 and capable of running on the processor 210, and when the computer program is executed by the processor 210, the processes of the method embodiment are implemented, and the same technical effect can be achieved, and details are not described here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the method embodiments, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here. Examples of the computer-readable storage medium include a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A data transmission method is applied to first electronic equipment, and is characterized by comprising the following steps:
receiving a first operation of a user under the condition that the user holds a first electronic device and a second electronic device, wherein the first operation is an operation for controlling the first electronic device and the second electronic device to move simultaneously;
in response to the first operation, target data is transmitted between the first electronic device and the second electronic device.
2. The method of claim 1, wherein the transferring target data between the first electronic device and the second electronic device comprises:
transmitting the target data between the first electronic device and the second electronic device in a case where a similarity parameter between the first curve and the target curve is in a target numerical range;
the first curve is a time-varying curve of a motion parameter for controlling the first electronic device to move by the first operation, the target curve is a time-varying curve of a motion parameter for controlling the second electronic device to move by the first operation, and the similarity parameter is a parameter representing a degree of similarity between the first curve and the target curve.
3. The method of claim 2, wherein the similar parameters comprise at least one of a first sub-parameter and a second sub-parameter;
wherein the first sub-parameter is a correlation coefficient of a motion parameter in the first curve and a motion parameter in the target curve; the second sub-parameter is a ratio or a difference value of a first type curve parameter of the first curve and the first type curve parameter of the target curve; the first type of curve parameter includes at least one of: the number of periodic curves included in the curve, the frequency of the periodic curves included in the curve, and the average of the amplitudes of all the periodic curves included in the curve.
4. The method according to any one of claims 1 to 3, wherein the first motion trajectory conforms to a first preset motion trajectory of at least one preset motion trajectory, and the target data is data corresponding to the first preset motion trajectory;
wherein the first motion profile comprises at least one of: the motion trail represented by the first curve and the motion trail represented by the target curve; each preset track in the at least one preset motion track corresponds to a group of data in the first electronic device or the second electronic device.
5. The method of any of claims 1-3, wherein the transferring target data between the first electronic device and the second electronic device comprises:
transmitting target data between the first electronic device and the second electronic device in a case where the first electronic device displays a target interface;
the target interface is used for indicating that the first electronic equipment is in a state of data to be synchronized.
6. An electronic device, which is a first electronic device, is characterized by comprising an input module and a transmission module;
the input module is used for receiving a first operation of a user under the condition that the user holds a first electronic device and a second electronic device, wherein the first operation is an operation for controlling the first electronic device and the second electronic device to move simultaneously;
the transmission module is used for responding to the first operation received by the input module and transmitting target data between the first electronic equipment and the second electronic equipment.
7. The electronic device according to claim 6, wherein the transmission module is specifically configured to transmit the target data between the first electronic device and the second electronic device if the similarity parameter between the first curve and the target curve is within a target value range;
the first curve is a time-varying curve of a motion parameter for controlling the first electronic device to move by the first operation, the target curve is a time-varying curve of a motion parameter for controlling the second electronic device to move by the first operation, and the similarity parameter is a parameter representing a degree of similarity between the first curve and the target curve.
8. The electronic device of claim 7, wherein the similar parameter comprises at least one of a first sub-parameter and a second sub-parameter;
wherein the first sub-parameter is a correlation coefficient of a motion parameter in the first curve and a motion parameter in the target curve; the second sub-parameter is a ratio or a difference value of a first type curve parameter of the first curve and the first type curve parameter of the target curve; the first type of curve parameter includes at least one of: the number of periodic curves included in the curve, the frequency of the periodic curves included in the curve, and the average of the amplitudes of all the periodic curves included in the curve.
9. The electronic device according to any one of claims 6 to 8, wherein a first motion trajectory corresponds to a first preset motion trajectory of at least one preset motion trajectory, and the target data is data corresponding to the first preset motion trajectory;
wherein the first motion profile comprises at least one of: the motion trail represented by the first curve and the motion trail represented by the target curve; each preset track in the at least one preset motion track corresponds to a group of data in the first electronic device or the second electronic device.
10. The electronic device according to any one of claims 6 to 8, wherein the transmission module is specifically configured to transmit target data between the first electronic device and the second electronic device when the first electronic device displays a target interface;
the target interface is used for indicating that the first electronic equipment is in a state of data to be synchronized.
CN202010266593.1A 2020-04-07 2020-04-07 Data transmission method and electronic equipment Pending CN111601302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010266593.1A CN111601302A (en) 2020-04-07 2020-04-07 Data transmission method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010266593.1A CN111601302A (en) 2020-04-07 2020-04-07 Data transmission method and electronic equipment

Publications (1)

Publication Number Publication Date
CN111601302A true CN111601302A (en) 2020-08-28

Family

ID=72190424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010266593.1A Pending CN111601302A (en) 2020-04-07 2020-04-07 Data transmission method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111601302A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023001122A1 (en) * 2021-07-21 2023-01-26 维沃移动通信(杭州)有限公司 Object access method and apparatus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100060574A1 (en) * 2008-09-11 2010-03-11 Hsiao-Kuang Lin Operating apparatus for hand-held electronic apparatus and method thereof
CN102904618A (en) * 2011-07-26 2013-01-30 联想(北京)有限公司 Method and device for processing communication between apparatuses
CN104822129A (en) * 2015-04-10 2015-08-05 小米科技有限责任公司 Data transmission method and device thereof
CN104954537A (en) * 2014-03-24 2015-09-30 联想(北京)有限公司 Information processing method and first electronic equipment
CN105392107A (en) * 2015-10-19 2016-03-09 联想(北京)有限公司 Method for establishing communication connection and electronic equipment
CN105468150A (en) * 2015-11-20 2016-04-06 深圳信息职业技术学院 Motion detecting method and device for handheld electronic equipment
CN106375195A (en) * 2016-09-14 2017-02-01 努比亚技术有限公司 Resource sharing method and wristband device thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100060574A1 (en) * 2008-09-11 2010-03-11 Hsiao-Kuang Lin Operating apparatus for hand-held electronic apparatus and method thereof
CN102904618A (en) * 2011-07-26 2013-01-30 联想(北京)有限公司 Method and device for processing communication between apparatuses
CN104954537A (en) * 2014-03-24 2015-09-30 联想(北京)有限公司 Information processing method and first electronic equipment
CN104822129A (en) * 2015-04-10 2015-08-05 小米科技有限责任公司 Data transmission method and device thereof
CN105392107A (en) * 2015-10-19 2016-03-09 联想(北京)有限公司 Method for establishing communication connection and electronic equipment
CN105468150A (en) * 2015-11-20 2016-04-06 深圳信息职业技术学院 Motion detecting method and device for handheld electronic equipment
CN106375195A (en) * 2016-09-14 2017-02-01 努比亚技术有限公司 Resource sharing method and wristband device thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023001122A1 (en) * 2021-07-21 2023-01-26 维沃移动通信(杭州)有限公司 Object access method and apparatus

Similar Documents

Publication Publication Date Title
CN110719402B (en) Image processing method and terminal equipment
CN109743498B (en) Shooting parameter adjusting method and terminal equipment
CN107734175B (en) Notification message prompting method and mobile terminal
CN110058836B (en) Audio signal output method and terminal equipment
CN109862504B (en) Display method and terminal equipment
CN109032486B (en) Display control method and terminal equipment
CN111142991A (en) Application function page display method and electronic equipment
CN110445924B (en) Network task execution method and terminal equipment
CN109710349B (en) Screen capturing method and mobile terminal
CN108984066B (en) Application icon display method and mobile terminal
CN111026484A (en) Application sharing method, first electronic device and computer-readable storage medium
CN111147743B (en) Camera control method and electronic equipment
CN108777763B (en) Photographing method and terminal equipment
CN108551525B (en) State determination method of movement track and mobile terminal
CN108196781B (en) Interface display method and mobile terminal
CN107765954B (en) Application icon updating method, mobile terminal and server
CN107800869B (en) Split screen display method, mobile terminal and storage medium
CN107277364B (en) Shooting method, mobile terminal and computer readable storage medium
CN109933267B (en) Method for controlling terminal equipment and terminal equipment
CN109445589B (en) Multimedia file playing control method and terminal equipment
CN111221602A (en) Interface display method and electronic equipment
CN110769162B (en) Electronic equipment and focusing method
CN110493451B (en) Data transmission method, electronic equipment and terminal
CN108965701B (en) Jitter correction method and terminal equipment
CN111601302A (en) Data transmission method and electronic equipment

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