CN113542393A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN113542393A
CN113542393A CN202110784611.XA CN202110784611A CN113542393A CN 113542393 A CN113542393 A CN 113542393A CN 202110784611 A CN202110784611 A CN 202110784611A CN 113542393 A CN113542393 A CN 113542393A
Authority
CN
China
Prior art keywords
terminal device
data
collision
terminal equipment
sensor
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.)
Granted
Application number
CN202110784611.XA
Other languages
Chinese (zh)
Other versions
CN113542393B (en
Inventor
喻纯
黄滟雯
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Interactive Future Beijing Technology Co ltd
Original Assignee
Interactive Future Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Interactive Future Beijing Technology Co ltd filed Critical Interactive Future Beijing Technology Co ltd
Priority to CN202110784611.XA priority Critical patent/CN113542393B/en
Publication of CN113542393A publication Critical patent/CN113542393A/en
Application granted granted Critical
Publication of CN113542393B publication Critical patent/CN113542393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/03Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
    • G10L25/24Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being the cepstrum
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a data transmission method and a device, wherein the method comprises the following steps: acquiring first sensor data of each sensor in first terminal equipment; judging whether inter-device collision occurs or not based on the data of each first sensor; if so, recording a first collision time point; starting an audio acquisition module, and sending first verification information to terminal equipment within a preset range; when second verification information sent by a second terminal device is received, determining a main vibration object based on the first verification information and the second verification information, and generating vibration by the main vibration object; sending first collision information to a second terminal device, receiving second collision information sent by the second terminal device, and judging whether the first collision information and the second collision information are close to each other or not based on the first collision information and the second collision information; and if so, establishing data transmission connection to realize data transmission of the two. By applying the method, data transmission can be realized only by closely connecting two terminal devices together, the operation is convenient, and the use experience of a user is improved.

Description

Data transmission method and device
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data transmission method and apparatus.
Background
With the development of social economy and science and technology, the popularity of mobile intelligent devices such as mobile phones and the like is gradually increased, and people increasingly need to perform data transmission operation among multiple devices.
Currently, in a common data transmission operation, for example, through bluetooth transmission, it is necessary to manually search nearby bluetooth devices, select a target device, and confirm pairing between the two devices to perform the data transmission operation; and in addition, an application chat tool or a network disk transmission mode is adopted, so that the data can be transmitted only by inputting account numbers and passwords of the same application on two devices for logging in and uploading the data to a cloud. These data transmission methods are cumbersome to operate and have a high learning cost.
Disclosure of Invention
In view of this, the present invention provides a data transmission method, by which data transmission can be realized only by closely connecting two terminal devices, which is convenient to operate and improves user experience.
The invention also provides a data transmission device for ensuring the realization and the application of the method in practice.
A data transmission method is applied to a first terminal device, and comprises the following steps:
acquiring first sensor data of each sensor preset in the first terminal equipment;
judging whether the first terminal equipment generates inter-equipment collision or not based on the data of each first sensor;
when the first terminal equipment generates inter-equipment collision, recording a first collision time point of the inter-equipment collision;
starting an audio acquisition module preset in the first terminal equipment;
sending first verification information to terminal equipment within a preset range, wherein the first verification information comprises the first collision time point and a first equipment number of the first terminal equipment;
when second verification information sent by any terminal equipment is received, determining the terminal equipment sending the second verification information as second terminal equipment;
determining a main vibration object based on the first verification information and the second verification information, wherein the main vibration object generates vibration, and the main vibration object is the first terminal equipment or the second terminal equipment;
acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by the audio acquisition module;
sending first collision information corresponding to the first terminal device to the second terminal device, wherein the first collision information comprises data of each second sensor and the first vibration audio;
when second collision information sent by the second terminal equipment is received, judging whether the first terminal equipment and the second terminal equipment are close to each other or not based on the first collision information and the second collision information;
and if the first terminal equipment and the second terminal equipment are abutted against each other, establishing data transmission connection with the second terminal equipment to realize data transmission with the second terminal equipment.
Optionally, the method for acquiring the first sensor data of each sensor preset in the first terminal device includes:
starting a detection application preset in the first terminal device;
and acquiring first sensor data of each sensor in the first terminal equipment by using the detection application according to a preset time period.
Optionally, the method for determining whether the first terminal device has an inter-device collision based on the data of each first sensor includes:
applying the detection application to extract first sensor statistics for each of the first sensor data;
acquiring a preset first support vector machine;
inputting the statistical characteristics of each first sensor into the first support vector machine to obtain a detection result output by the first support vector machine;
judging whether the detection result contains a first identification bit; the first identification position is identification information for representing the collision between the first terminal equipment and the equipment;
if the detection result contains a first identification position, determining that the first terminal equipment has inter-equipment collision;
and if the detection result does not contain the first identification bit, determining that the first terminal equipment has no inter-equipment collision.
In the above method, optionally, the determining a main vibration object based on the first verification information and the second verification information includes:
acquiring a second collision time point in the second verification information and a second device number of the second terminal device, wherein the second collision time point is a collision time point when the second terminal device generates inter-device collision;
judging whether the time difference between the first collision time point and the second collision time point is within a preset time difference value;
if the time difference between the first collision time point and the second collision time point is within a preset time difference value, determining the number size between the first equipment number and the second equipment number;
when the first equipment number is larger than the second equipment number, determining that the first terminal equipment is the main vibration object;
and when the second equipment number is larger than the first equipment number, determining that the second terminal equipment is the main vibration object.
Optionally, the method for determining whether the first terminal device and the second terminal device are close to each other based on the first collision information and the second collision information includes:
acquiring each third sensor data and a second vibration audio contained in the second collision information, and extracting a third sensor statistical characteristic of each third sensor data and a second sensor statistical characteristic of each second sensor data by using the detection application;
extracting a first audio data characteristic corresponding to the first vibration audio and a second audio data characteristic corresponding to the second vibration audio by applying preset short-time Fourier transform (STFT) and Mel Frequency Cepstrum Coefficient (MFCC);
extracting second linear acceleration data and second rotation vector data from each second sensor data corresponding to the first terminal device;
extracting third linear acceleration data and third rotation vector data from each third sensor data corresponding to the second terminal device;
calculating a motion correlation characteristic between the first terminal device and the second terminal device based on the second linear acceleration data, the second rotation vector data, the third linear acceleration data, and the third rotation vector data;
splicing the second sensor statistical characteristics, the third sensor statistical characteristics, the first audio data characteristics, the second audio data characteristics and the motion correlation characteristics into a characteristic vector, and inputting the characteristic vector into a preset second support vector machine to obtain vibration information output by the second support vector machine;
judging whether the first terminal equipment and the second terminal equipment vibrate at the same frequency or not based on the vibration information;
if the first terminal equipment and the second terminal equipment vibrate at the same frequency, determining that the first terminal equipment and the second terminal equipment are close to each other;
and if the first terminal equipment and the second terminal equipment do not vibrate at the same frequency, determining that the first terminal equipment and the second terminal equipment are not close to each other.
Optionally, the method further includes, after establishing the data transmission connection with the second terminal device:
detecting whether the first terminal equipment has a data file to be sent or not;
if the first terminal equipment has a data file to be sent, sending the data file to the second terminal equipment;
and if the first terminal equipment does not have the data file to be sent, popping up a prompt window, and displaying all the transmittable data files in the first terminal equipment to a user through the prompt window.
A data transmission apparatus, the apparatus being applied to a first terminal device, the apparatus comprising:
a first acquisition unit configured to acquire first sensor data of each sensor preset in the first terminal device;
a first judging unit, configured to judge whether inter-device collision occurs in the first terminal device based on each of the first sensor data;
the terminal equipment comprises a recording unit, a judging unit and a judging unit, wherein the recording unit is used for recording a first collision time point when the first terminal equipment generates the inter-equipment collision;
the starting unit is used for starting an audio acquisition module preset in the first terminal equipment;
a first sending unit, configured to send first verification information to a terminal device within a preset range, where the first verification information includes the first collision time point and a first device number of the first terminal device;
the terminal equipment comprises a first determining unit, a second determining unit and a judging unit, wherein the first determining unit is used for determining that the terminal equipment which sends second verification information is second terminal equipment when the second verification information sent by any terminal equipment is received;
a second determination unit configured to determine a main vibration object by which vibration is generated based on the first verification information and the second verification information, the main vibration object being the first terminal device or the second terminal device;
the second acquisition unit is used for acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by the audio acquisition module;
a second sending unit, configured to send first collision information to the second terminal device, where the first collision information includes each of the second sensor data and the first vibration audio;
a second judging unit, configured to, when receiving second collision information sent by the second terminal device, judge whether the first terminal device and the second terminal device are close to each other based on the first collision information and the second collision information;
and the connection unit is used for establishing data transmission connection with the second terminal equipment if the first terminal equipment and the second terminal equipment are abutted against each other, so as to realize data transmission with the second terminal equipment.
The above apparatus, optionally, the first obtaining unit includes:
the starting sub-unit is used for starting a detection application preset in the first terminal device;
and the first acquisition subunit is configured to acquire, by using the detection application, first sensor data of each sensor in the first terminal device according to a preset time period.
Optionally, the apparatus described above, wherein the first determining unit includes:
a first extraction subunit, configured to apply the detection application to extract a first sensor statistical feature of each of the first sensor data;
the second acquisition subunit is used for acquiring a preset first support vector machine;
the first input subunit is used for inputting the statistical characteristics of each first sensor into the first support vector machine to obtain a detection result output by the first support vector machine;
the first judgment subunit is used for judging whether the detection result contains a first identification bit; the first identification position is identification information for representing the collision between the first terminal equipment and the equipment;
the first determining subunit is configured to determine that the first terminal device has inter-device collision if the detection result includes a first identification bit;
and the second determining subunit is configured to determine that no inter-device collision occurs in the first terminal device if the detection result does not include the first identification bit.
The above apparatus, optionally, the second determining unit includes:
a second extraction subunit, configured to extract, by using the detection application, a third sensor statistical feature of each of the third sensor data and a second sensor statistical feature of each of the second sensor data;
the third extraction subunit is used for applying preset short-time Fourier transform (STFT) and Mel Frequency Cepstrum Coefficient (MFCC) to extract a first audio data feature corresponding to the first vibration audio and a second audio data feature corresponding to the second vibration audio;
a fourth extraction subunit, configured to extract second linear acceleration data and second rotation vector data from each second sensor data corresponding to the first terminal device;
a fifth extraction subunit operable to extract third linear acceleration data and third rotation vector data from respective third sensor data corresponding to the second terminal device;
a calculation subunit configured to calculate a motion correlation characteristic between the first terminal device and the second terminal device based on the second linear acceleration data, the second rotation vector data, the third linear acceleration data, and the third rotation vector data;
the second input subunit is configured to splice the second sensor statistical features, the third sensor statistical features, the first audio data features, the second audio data features, and the motion correlation features into a feature vector, and input the feature vector into a preset second support vector machine to obtain output vibration information of the second support vector machine;
a third judging subunit, configured to judge whether the first terminal device and the second terminal device vibrate at the same frequency based on the vibration information;
a third determining subunit, configured to determine that the first terminal device and the second terminal device are close to each other if the first terminal device and the second terminal device vibrate at the same frequency;
a fourth determining subunit, configured to determine that the first terminal device and the second terminal device are not close to each other if the first terminal device and the second terminal device are not co-frequency vibrations.
A storage medium, the storage medium comprising stored instructions, wherein when the instructions are executed, a device in which the storage medium is located is controlled to execute the above data transmission method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the above-described data transmission method.
Compared with the prior art, the invention has the following advantages:
the invention provides a data transmission method, which comprises the following steps: acquiring first sensor data of each sensor preset in first terminal equipment; judging whether inter-device collision occurs or not based on the data of each first sensor; when the first terminal equipment generates inter-equipment collision, recording a first collision time point of the inter-equipment collision; starting an audio acquisition module preset in first terminal equipment; sending first verification information to terminal equipment within a preset range; when second verification information is received, determining that the terminal equipment which sends the second verification information is second terminal equipment; determining a main vibration object based on the first verification information and the second verification information, wherein the main vibration object generates vibration; acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by an audio acquisition module; sending first collision information corresponding to the first terminal equipment to second terminal equipment; when second collision information sent by second terminal equipment is received, whether the first terminal equipment and the second terminal equipment are close to each other or not is judged based on the first collision information and the second collision information; and if the first terminal equipment and the second terminal equipment are close to each other, establishing data transmission connection with the second terminal equipment to realize data transmission with the second terminal equipment. By applying the method provided by the invention, data transmission can be realized only by closely connecting two terminal devices, the operation is convenient, and the use experience of a user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method of data transmission according to an embodiment of the present invention;
fig. 2 is a flowchart of another method of a data transmission method according to an embodiment of the present invention;
fig. 3 is a flowchart of another method of a data transmission method according to an embodiment of the present invention;
fig. 4 is a diagram illustrating a data transmission method according to an embodiment of the present invention;
fig. 5 is a diagram illustrating an apparatus structure of a data transmission apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
In this application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions, and 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 identical elements in a process, method, article, or apparatus that comprises the element.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
An embodiment of the present invention provides a data transmission method, where the method may be applied to multiple system platforms, an execution subject of the method may be a first terminal device, and a flowchart of the method is shown in fig. 1, where the method specifically includes:
s101: and acquiring first sensor data of each sensor preset in the first terminal equipment.
In the present invention, the first terminal device is provided with a plurality of sensors, which may specifically include: acceleration sensors, linear acceleration sensors, gravity sensors, gyroscope sensors, rotary vector sensors, magnetic force sensors, and the like.
It will be appreciated that the first terminal device acquires the first sensor data of each sensor in real time, for example every 10 ms.
Optionally, the first terminal device in the embodiment of the present invention may detect whether a collision occurs in real time, and if a collision is detected, acquire data of each first sensor.
S102: and judging whether the first terminal equipment generates inter-equipment collision or not based on the data of each first sensor.
In the present invention, if the first terminal device collides, the first sensor data of each sensor in the first terminal device will change, for example, the linear acceleration changes 180 degrees in the direction of the three-dimensional space, and the gyroscope and the linear acceleration data will have obvious collision peaks. However, when the first terminal device collides, it is impossible to determine whether the first terminal device collides with another terminal device or another object or a human body. Therefore, whether the first terminal device has the inter-device collision is judged according to the currently acquired data of each first sensor.
S103: when the first terminal equipment generates the inter-equipment collision, recording a first collision time point of the inter-equipment collision.
In the invention, when the first terminal equipment is determined to have the inter-equipment collision, the collision time point of the first terminal equipment and other terminal equipment when the inter-equipment collision occurs is recorded.
S104: and starting an audio acquisition module preset in the first terminal equipment.
The audio acquisition module may be a microphone disposed in the first terminal device, and is configured to acquire a vibration audio within a first preset time period.
It should be noted that, when the first terminal device starts the audio acquisition module, the terminal device colliding with the first terminal device also starts the audio acquisition module therein.
S105: and sending the first verification information to the terminal equipment within the preset range.
The first verification information comprises the first collision time point and a first device number of the first terminal device.
In the invention, after the first terminal collides, whether data transmission connection needs to be established or not cannot be determined, and the terminal equipment which needs to perform data transmission cannot be determined, so that temporary connection is established with each terminal equipment in the preset range, and the first verification information is sent to all the terminal equipment in the preset range.
S106: when second verification information sent by any terminal equipment is received, the terminal equipment sending the second verification information is determined to be the second terminal equipment.
In the invention, if any terminal equipment also has inter-equipment collision in the preset range, the terminal equipment also sends verification information to all terminal equipment in the preset range including the first terminal equipment.
S107: determining a main vibration object based on the first verification information and the second verification information, the main vibration object generating vibration.
Wherein the main vibration object is the first terminal device or the second terminal device.
In the present invention, after receiving the second verification information, the first terminal device cannot directly determine whether the second terminal device is a device with which the second terminal device collides. Therefore, after the second verification information is received, the main vibration object which vibrates is determined based on the first verification information and the second verification information, and whether the main vibration object and the main vibration object are close to each other or not is verified through data collected after the main vibration object vibrates.
S108: and acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by the audio acquisition module.
In the present invention, the first preset time period may be a vibration time period during which the first terminal device generates the vibration signal after determining that the inter-device collision has occurred. When the main vibration object generates a vibration signal, each sensor in the main vibration object will change.
If the first terminal device is a main vibration object, the second sensor data is sensor data that changes after the vibration is finished; if the first terminal device is not the main vibration object, the second sensor data may be consistent with the sensor data before vibration, or may be sensor data that changes after the sensor in the first terminal device senses the vibration of the second terminal device and abuts against the first terminal device when the second terminal device vibrates. The first vibrational audio is audio data collected over a first preset time period.
S109: and sending first collision information corresponding to the first terminal equipment to the second terminal equipment.
The first collision information comprises the second sensor data and first vibration audio collected by the audio collection module.
In the invention, first collision information is formed by the data of each second sensor and the first vibration audio, and the collision information is sent to each terminal device within a preset range.
S110: and when second collision information sent by the second terminal equipment is received, judging whether the first terminal equipment and the second terminal equipment are close to each other or not based on the first collision information and the second collision information.
In the invention, the second terminal device also generates collision information after the main vibration object generates vibration, and sends the collision information to the first terminal device. And the first terminal equipment and the second terminal equipment further verify whether the two sides are close to each other or not according to the received collision information of the opposite side and the collision information of the first terminal equipment and the second terminal equipment.
And the second collision information comprises second vibration audio collected by the second terminal equipment and each third sensor data. The second vibration audio is audio data in a first preset time period collected by an audio collection module in the second terminal equipment. If the second terminal device is a main vibration object, the third sensor data is the sensor data which changes after the vibration is finished; if the second terminal device is not the main vibration object, the third sensor data may be consistent with the sensor data before vibration, or may be sensor data that changes after the sensor in the second terminal device senses the vibration of the first terminal device due to the mutual close proximity of the first terminal device and the second terminal device when the first terminal device generates the vibration.
It can be understood that if the first terminal device and the second terminal device are in close proximity to each other, the collision time points of the two devices are consistent or slightly different, the vibration audios are similar, and the motion correlation calculated from the sensor data is high.
S111: and if the first terminal equipment and the second terminal equipment are abutted against each other, establishing data transmission connection with the second terminal equipment to realize data transmission with the second terminal equipment.
In the invention, if data transmission is needed to be carried out on two terminal devices, the two terminal devices need to be collided and then are closely connected together, so that the collision between the first terminal device and the second terminal device is recognized, the first terminal device and the second terminal device are closely connected with each other, the fact that the first terminal device and the second terminal device need to carry out data transmission is represented, the data transmission connection between the first terminal device and the second terminal device is built, and the first terminal device and the second terminal device can mutually transmit data after the connection is built.
In the data transmission method provided by the embodiment of the invention, the first sensor data of each sensor in the first terminal is acquired, and whether the first terminal equipment collides with other terminal equipment or not is judged, namely, whether the first terminal equipment collides with other terminal equipment or not is judged. If so, recording a first collision time point, and starting the audio acquisition module. And sending first verification information to the terminal equipment within the preset range, receiving second verification information sent by other terminal equipment, and setting the terminal equipment sending the second verification information as second terminal equipment. And determining a main vibration object generating vibration between the first terminal equipment and the second terminal equipment through the first verification information and the second verification information, and vibrating by the main vibration object. And acquiring second sensor data after the change of each sensor in a first preset time period and a first vibration audio acquired by the audio acquisition module. And generating first collision information containing the data of each second sensor and the first vibration audio, and sending the first collision information to the second terminal equipment. And if the second collision information sent by the second terminal equipment is received, judging whether the first terminal equipment and the second terminal equipment are close to each other or not based on the first collision information and the second collision information, if so, carrying out data transmission between the first terminal equipment and the second terminal equipment, establishing data transmission connection, and realizing the data transmission between the first terminal equipment and the second terminal equipment.
Based on the above embodiments, in the data transmission method provided by the present invention, the process of data transmission between terminal devices has a specific implementation process:
when terminal a and terminal B need to perform data transmission, a and B collide and come into close proximity. A and B respectively acquire first sensor data of each preset sensor, and respectively judge whether inter-equipment collision occurs. For the terminal A, when the collision between the devices is determined, recording a first collision time point, starting an audio acquisition module, and sending first verification information to the surrounding devices. And for the terminal B, when the collision between the devices is determined, recording a second collision time point, starting the audio acquisition module, and sending second verification information to the surrounding devices. And the terminal A and the terminal B both determine a main vibration object between the first authentication information and the second authentication information according to the first authentication information and the second authentication information, and the main vibration object generates vibration. After the main vibration object generates vibration, the terminal A acquires second sensor data of each sensor and a first vibration audio acquired by an audio acquisition module in a first preset time period; and the terminal B acquires the third sensor data of each sensor and the second vibration audio acquired by the audio acquisition module in a first preset time period. The terminal A sends first collision information containing the data of each second sensor and the first vibration audio to the terminal B; the terminal B transmits second impact information containing the respective third sensor data and the second vibration audio to the terminal a. After receiving the second collision information, the terminal A judges whether the terminal A and the terminal B are close to each other or not according to the first collision information and the second collision information; similarly, after receiving the first collision information, the terminal B determines whether the terminal a and the terminal B are close to each other according to the first collision information and the second collision information. And if the two are determined to be close to each other, establishing data transmission connection for data transmission.
By applying the method provided by the embodiment of the invention, the data transmission can be realized by only tightly connecting two terminal devices by a user, the operation is convenient, and the use experience of the user is improved.
Optionally, in the method provided in the embodiment of the present invention, the process of establishing, by the first terminal device, a data transmission connection with the second terminal device may specifically include:
sending a first connection request to a second terminal device;
and when receiving a first feedback message fed back by the second terminal device based on the first connection request and receiving a second connection request sent by the second terminal device, feeding back a second feedback message corresponding to the second connection request to the second terminal device, and establishing data transmission connection with the second terminal device.
It can be understood that, after the first terminal device and the second terminal device determine that the two devices are close to each other, the first terminal device and the second terminal device respectively send connection requests to the other party, and after receiving the connection request sent by the other party, feed back a feedback message corresponding to the received connection request, and establish a data transmission connection.
In the method provided in the embodiment of the present invention, based on the content of S101, the acquiring first sensor data of each sensor preset in the first terminal device may specifically include:
starting a detection application preset in the first terminal device;
and acquiring first sensor data of each sensor in the first terminal equipment by using the detection application according to a preset time period.
In the data transmission method provided by the embodiment of the invention, the detection application is an application module which is arranged in the terminal equipment and is used for realizing data transmission. Both terminal devices need to set up a detection application to enable data transmission. The detection application connects all sensors in the terminal equipment, and collects first sensor data of each sensor according to a time period. Likewise, after the terminal device generates the vibration signal, the data of each second sensor generated by the vibration signal is collected.
Optionally, in the above embodiment of the present invention, the detection application needs to be started first to obtain the first sensor data of each sensor in the first terminal device. In the actual application process, the situation that the detection application is not started may exist, and therefore, a collision detection device may be arranged in the terminal device to detect whether the terminal device collides or not in real time. When the terminal equipment is collided, the first terminal equipment detects whether the detection application is started, and if so, the data of each first sensor acquired by the detection application in the current time period is directly acquired; if not, prompting the user to start the detection application, and acquiring first sensor data of each sensor in the first terminal equipment through the detection application after the user selects to start the detection application.
In particular, the detection application may extract statistical features of each sensor data in addition to collecting the sensor data. Referring to fig. 2, based on the content of S102, the determining whether the first terminal device has an inter-device collision based on the respective first sensor data may include:
s201: applying the detection application to extract first sensor statistics for each of the first sensor data.
In the present invention, the sensor statistics include the average, maximum, minimum, standard deviation, kurtosis, and skewness of the sensor on the x, y, and z axes.
S202: and acquiring a preset first support vector machine.
In the invention, a first support vector machine is a support vector machine SVM with a radial basis function RBF kernel, the first support vector machine applies a large number of sensor statistical characteristics as training data to carry out machine learning, a detection result corresponding to each sensor statistical characteristic is trained and identified, and when the error precision of the first support vector machine reaches a training condition, the first support vector machine is applied to identify each sensor statistical characteristic in the first terminal equipment.
S203: inputting the statistical characteristics of each first sensor into the first support vector machine to obtain a detection result output by the first support vector machine.
In the invention, after machine learning training of a large amount of training data, the first support vector machine can identify the collision type of the collision of the terminal equipment according to the input statistical characteristics of each sensor, and output the corresponding detection result.
S204: judging whether the detection result contains a first identification bit;
the first identification position is identification information for representing that the first terminal equipment generates inter-equipment collision.
In the invention, if the first support vector machine identifies that the collision of the first terminal equipment is the inter-equipment collision, the first identification bit is marked on the output detection result, otherwise, the first identification bit is not marked. Therefore, the first terminal device determines whether the first terminal device has an inter-device collision by judging whether the detection result includes the first identification bit. If yes, go to S205; if not, go to S206.
S205: and if the detection result contains a first identification bit, determining that the first terminal equipment has inter-equipment collision.
In the present invention, if the first terminal device has an inter-device collision, it needs to further determine whether there is a terminal device close to the first terminal device, and the above-mentioned processes from S103 to S108 are continuously executed.
S206: and if the detection result does not contain the first identification bit, determining that the first terminal equipment has no inter-equipment collision.
In the invention, if the first terminal equipment does not collide with other terminal equipment, the data transmission with other terminal equipment is not required at present, and the detection application acquires the first sensor data of each sensor according to a time period.
In the data transmission method provided by the embodiment of the invention, after the first sensor data of each sensor in the first terminal device is acquired, the statistical characteristics of the first sensor of each first sensor data are extracted by detection application, the statistical characteristics of each first sensor are input into the first support vector machine, and the first support vector machine identifies the collision type of the first terminal device in collision. Acquiring a detection result output by a first support vector machine, and judging whether the detection result contains a first identification bit; if yes, collision between the first terminal equipment and the second terminal equipment occurs; otherwise, no inter-device collision occurs. By identifying the type of the first terminal equipment in collision, the collision with people or other objects during normal application of the terminal equipment is prevented from being mistakenly identified as the inter-equipment collision.
It should be noted that, in the present invention, if two terminal devices need to perform data transmission, the two terminal devices must collide and abut against each other. In an actual application process, there may be a case that the devices are not in close proximity to each other after collision, and therefore, the first terminal device needs to send the first collision information to all the terminal devices within the preset range, so that the terminal device in collision with the first terminal device further detects whether the two terminal devices are in close proximity to each other. Similarly, the first terminal device will also receive second collision information sent by the terminal device that needs to perform data transmission with the first terminal device within the preset range, and can identify whether the first terminal device is close to the second terminal device that sends the second collision information according to the second collision information and the first collision information.
Therefore, referring to fig. 3, in the method according to the embodiment of the present invention, based on the content of S110, the determining whether the first terminal device and the second terminal device are close to each other based on the first collision information and the second collision information may specifically include:
s301: and acquiring each third sensor data and a second vibration audio contained in the second collision information, and extracting a third sensor statistical characteristic of each third sensor data and a second sensor statistical characteristic of each second sensor data by using the detection application.
And the second vibration audio is audio data in a first preset time period collected by an audio collection module in the second terminal equipment. If the second terminal device is a main vibration object, each third sensor data is the sensor data which changes after the vibration is finished; if the second terminal device is not the main vibration object, the data of each third sensor may be consistent with the data of each sensor before vibration, or may be the data of the sensor which changes after the sensor in the second terminal device senses the vibration of the first terminal device when the first terminal device vibrates and the sensor is close to the second terminal device.
S302: and extracting a first audio data characteristic corresponding to the first vibration audio and a second audio data characteristic corresponding to the second vibration audio by applying preset short-time Fourier transform (STFT) and Mel Frequency Cepstrum Coefficient (MFCC).
In the invention, the STFT is a classical algorithm for analyzing non-stationary signals and extracting time and frequency characteristics, and the STFT is used for converting an acquired audio time sequence into a two-dimensional time-frequency image to obtain the frequency characteristics. Meanwhile, the MFCC is applied in the frequency domain to extract the sub-process features, the MFCC is obtained from coefficients represented by the cepstrum of the microphone audio data, and can be used for approximating the auditory features of human beings and extracting 26 MFCC features. And splicing the frequency features extracted by the STFT and the MFCC features extracted by the MFCC into an audio data feature.
And for the first vibration audio, applying STFT and MFCC to carry out feature extraction to obtain first audio data features corresponding to the first vibration audio. And for the second vibration audio, performing feature extraction by applying STFT and MFCC to obtain a second audio data feature corresponding to the second vibration audio.
S303: and extracting second linear acceleration data and second rotation vector data from each second sensor data corresponding to the first terminal device.
In the invention, the first terminal device and the second terminal device are respectively provided with a plurality of sensors such as an acceleration sensor, a linear acceleration sensor, a gravity sensor, a gyroscope sensor, a rotation vector sensor, a magnetic sensor and the like, and when whether the first terminal device and the second terminal device are close to each other needs to be determined, the motion correlation characteristics between the first terminal device and the second terminal device need to be further calculated. Before calculating the motion correlation characteristic, it is necessary to calculate using linear acceleration data of the linear acceleration sensor and rotation vector data of the rotation vector sensor in each sensor data.
S304: and extracting third linear acceleration data and third rotation vector data from each third sensor data corresponding to the second terminal device.
Similarly, after the second linear acceleration data and the second rotation vector data in the first terminal device are obtained, third linear acceleration data and third rotation vector data in the second terminal device also need to be obtained.
S305: calculating a motion-related feature between the first terminal device and the second terminal device based on the second linear acceleration data, the second rotational vector data, the third linear acceleration data, and the third rotational vector data.
In the present invention, a first terminal device is a, a second terminal device is B, and the recorded rotation vector data are quaternions qA、qBA, B, the relative rotation vector required to rotate A to B is:
Figure BDA0003158240300000161
referring to FIG. 4, q in equation (1)AIs the direction of A, qBIs the direction of B, and after their included angle is calculated, the force of a can be rotated to the direction of B force at this included angle. When A and B collide, a relative force is generated to linearly accelerate mAAnd mBTo represent A, B, the relationship between the two data is:
Figure BDA0003158240300000162
since the forces act on each other, when two devices collide, device a exerts a force on B, which also exerts a force on a. The opposing forces are a pair of equal and opposite forces acting on the two devices, respectively. After rotating the motion of a to the coordinate system of B, the linear acceleration of a becomes:
Figure BDA0003158240300000171
wherein the left sides in the formula (2) are all multiplied by qBOn the right side all ride
Figure BDA0003158240300000172
And substituting the formula in the formula (1) into the formula (3). This equation (3) represents the new linear acceleration value of A after rotating the motion of A onto the coordinate system of B. Based on the above formulas (1) to (3), the motion correlation characteristics of a and B on the three axes x, y and z are calculated as:
Figure BDA0003158240300000173
Figure BDA0003158240300000174
Figure BDA0003158240300000175
wherein the content of the first and second substances,
Figure BDA0003158240300000176
for the motion dependency characteristics of a and B on the x-axis,
Figure BDA0003158240300000177
for the motion dependency characteristics of a and B in the y-axis,
Figure BDA0003158240300000178
is the motion correlation characteristic of A and B on the z-axis.
S306: and splicing the second sensor statistical characteristics, the third sensor statistical characteristics, the first audio data characteristics, the second audio data characteristics and the motion correlation characteristics into a characteristic vector, and inputting the characteristic vector into a preset second support vector machine to obtain the vibration information output by the second support vector machine.
In the present invention, the second support vector machine is a support vector machine SVM having a radial basis function RBF kernel, the second support vector machine and the first support vector machine in S202 are the same type of neural network model, the same feature vector of the second support vector machine is used as training data to perform machine learning, the vibration information corresponding to each feature vector is trained and identified, the second support vector machine is subjected to convergence calculation according to the vibration information, until the second support vector machine reaches a set convergence condition, the precision of the second support vector machine is represented to reach a set precision value, the training process of the second support vector machine is completed, and the second support vector machine is applied to a terminal device for detecting the vibration information between two terminal devices, the vibration information is used for representing whether the first terminal device and the second terminal device vibrate at the same frequency.
S307: and judging whether the first terminal equipment and the second terminal equipment vibrate at the same frequency or not based on the vibration information.
In the invention, if the two terminal devices are close to each other, the motion data between the two terminal devices have higher similarity, and the similarity of the characteristics of the audio data respectively captured by the two terminal devices is also higher.
S308: and if the first terminal equipment and the second terminal equipment vibrate at the same frequency, determining that the first terminal equipment and the second terminal equipment are close to each other.
In the invention, if the first terminal device and the second terminal device vibrate at the same frequency, the motion data representing the first terminal device and the second terminal device have higher similarity, and the similarity of the characteristics of the audio data captured by the first terminal device and the second terminal device respectively is also higher, so that the first terminal device and the second terminal device can be determined to be close to each other currently.
S309: and if the time difference between the first collision time point and the second collision time point is not within a preset time difference value, or the first terminal equipment and the second terminal equipment do not vibrate at the same frequency, determining that the first terminal equipment and the second terminal equipment are not abutted to each other.
In the invention, if the time difference between the first collision time point and the second collision time point is not within the preset time difference value, or the first terminal device and the second terminal device vibrate at different frequencies, it is characterized that the first terminal device and the second terminal device do not collide simultaneously, the motion data similarity between the first terminal device and the second terminal device is low, the similarity of the features of the respectively captured audio data is low, and the first terminal device and the second terminal device are not close to each other.
It can be understood that, within the same preset time range, there may be a situation where multiple sets of terminal devices are close to each other respectively, or there is a situation where two devices are separated after being collided carelessly, and in order to avoid data error transmission between two terminal devices, it is necessary to determine that two terminal devices are close to each other before data transmission is implemented.
In the data transmission method provided in the embodiment of the present invention, after a first terminal device generates inter-device collision and receives second collision information sent by a second terminal device, it is further necessary to determine whether the first terminal device and the second terminal device are close to each other. And acquiring second sensor data and a first vibration audio in the first collision information, and acquiring third sensor data and a second vibration audio in the second collision information. And acquiring a first audio data characteristic corresponding to the first vibration audio and a second audio data characteristic corresponding to the second vibration audio through the STFT and the MFCC. Meanwhile, in each second sensor data, second linear acceleration data and second rotation vector data are extracted; in each of the third sensor data, third linear acceleration data and third rotation vector data are extracted. And calculating second linear acceleration data, second rotation vector data, third linear acceleration data and third rotation vector data to obtain the motion correlation characteristics between the first terminal equipment and the second terminal equipment. Wherein the motion correlation characteristics between the first terminal device and the second terminal device comprise motion correlation characteristics of three axes of x, y and z. And splicing the second sensor statistical characteristic, the third sensor statistical characteristic, the first audio data characteristic, the second audio data characteristic and the motion correlation characteristic into a characteristic vector, inputting the characteristic vector into a second support vector machine, and determining whether the first terminal equipment and the second terminal equipment vibrate at the same frequency according to vibration information by the second support vector machine through identifying the vibration information between the first terminal equipment and the second terminal equipment. If yes, the two terminal devices are close to each other; if not, the two terminal devices are not close to each other.
In the method provided by the embodiment of the present invention, after it is determined that the first terminal device and the second terminal device both generate device collision and are close to each other, a data transmission connection between the first terminal device and the second terminal device needs to be established, thereby implementing a data transmission process between the first terminal device and the second terminal device. After the first terminal device establishes the data transmission connection with the second terminal device, the first terminal device may further include the following implementation processes:
detecting whether the first terminal equipment has a data file to be sent or not;
if the first terminal equipment has a data file to be sent, sending the data file to the second terminal equipment;
and if the first terminal equipment does not have the data file to be sent, popping up a prompt window, and displaying all the transmittable data files in the first terminal equipment to a user through the prompt window.
It can be understood that after the first terminal device and the second terminal device are in data transmission connection, data transmission can be autonomously achieved. After the data transmission connection, the first terminal device detects whether a data file to be sent exists at present, for example, the first terminal device marks the data file to be sent as a state to be sent if the data file to be sent is already selected before the inter-device collision, and directly sends the data file marked as the state to be sent after the data transmission connection is performed with the second terminal device without the need of a user to perform operation again. Similarly, if the second terminal device has the data file of the status to be sent, the second terminal device may also actively send the data file to the first terminal device. If the first terminal device or the second terminal device does not have the data file to be sent, a prompt window can be popped up to the user, a file list of all the transmittable data files in the device is displayed, and the user can select the data file to be sent from the file list.
Further, the first terminal device and the second terminal device may perform data transmission connection and data transmission in a bluetooth mode, a WiFi mode, a short-range wireless communication technology, an ultrasonic mode, or the like.
By applying the method provided by the embodiment of the invention, the first terminal equipment and the second terminal equipment are close to each other to realize data transmission, and the data file to be transmitted can be transmitted independently during data transmission, so that the use experience of a user is improved.
Based on the content of S107, the determining a main vibration object based on the first verification information and the second verification information includes:
acquiring a second collision time point in the second verification information and a second device number of the second terminal device, wherein the second collision time point is a collision time point when the second terminal device generates inter-device collision;
judging whether the time difference between the first collision time point and the second collision time point is within a preset time difference value;
if the time difference between the first collision time point and the second collision time point is within a preset time difference value, determining the number size between the first equipment number and the second equipment number;
when the first equipment number is larger than the second equipment number, determining that the first terminal equipment is the main vibration object;
and when the second equipment number is larger than the first equipment number, determining that the second terminal equipment is the main vibration object.
It can be understood that, after determining that the inter-device collision occurs and the audio acquisition module is started, the first terminal device broadcasts the first verification information to the terminal devices within the preset range, and meanwhile, the terminal devices colliding with the first terminal device also broadcasts the second verification information within the preset range. When the first terminal device receives second verification information of the second terminal device, whether the first terminal device collides with the second terminal device cannot be determined, therefore, a second collision time point in the second verification information is obtained, the first collision time point and the second collision time point are calculated, a time difference between the first collision time point and the second collision time point is obtained, and the first terminal device preliminarily determines that the first terminal device collides with the second terminal device when the time difference is within a preset time difference value. In order to further determine whether two devices are close together after collision, a main vibration object generating vibration is required to be agreed between the two devices. And for the first terminal equipment, comparing the second equipment number in the second verification information with the first equipment number in the first verification information, wherein the terminal equipment with the larger equipment number is the main vibration object. If the main vibration object is the first terminal device, the first terminal device generates vibration within a first preset time period. And if the main vibration object is the second terminal equipment, the second terminal equipment generates vibration within a first preset time period. And finally determining whether the two terminal devices are close to each other or not according to the sensor data, the vibration audio and the like of the two terminal devices after the first preset time period.
It should be noted that the equipment number of the terminal equipment may be an IMEI, and the IMEI is a unique identity of each terminal equipment and is composed of 15-17 digits.
By applying the method provided by the invention, the object colliding with the first terminal equipment among the equipment is preliminarily determined, the main vibration object is determined according to the related verification information, and whether the two terminal equipments are close to each other is further determined according to the related data acquired after the main vibration object generates vibration.
The specific implementation procedures and derivatives thereof of the above embodiments are within the scope of the present invention.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a data transmission apparatus, which is used for specifically implementing the method in fig. 1, where the data transmission apparatus provided in the embodiment of the present invention may be applied to a first mobile device, and a schematic structural diagram of the data transmission apparatus is shown in fig. 5, and specifically includes:
a first obtaining unit 501, configured to obtain first sensor data of each sensor preset in the first terminal device;
a first judging unit 502, configured to judge whether an inter-device collision occurs in the first terminal device based on each of the first sensor data;
a recording unit 503, configured to record a first collision time point when an inter-device collision occurs in the first terminal device;
an opening unit 504, configured to open an audio acquisition module preset in the first terminal device;
a first sending unit 505, configured to send first verification information to a terminal device within a preset range, where the first verification information includes the first collision time point and a first device number of the first terminal device;
a first determining unit 506, configured to determine, when receiving second authentication information sent by any terminal device, that the terminal device sending the second authentication information is a second terminal device;
a second determining unit 507, configured to determine a main vibration object based on the first verification information and the second verification information, where the main vibration object generates vibration, and the main vibration object is the first terminal device or the second terminal device;
a second obtaining unit 508, configured to obtain second sensor data of each sensor in a first preset time period, and a first vibration audio collected by the audio collection module;
a second sending unit 509, configured to send first collision information to the second terminal device, where the first collision information includes the second sensor data and the first vibration audio;
a second determining unit 510, configured to determine, when receiving second collision information sent by the second terminal device, whether the first terminal device and the second terminal device are close to each other based on the first collision information and the second collision information;
a connection unit 511, configured to establish a data transmission connection with the second terminal device if the first terminal device and the second terminal device are close to each other, so as to implement data transmission with the second terminal device.
In the data transmission device provided in the embodiment of the present invention, first sensor data of each sensor in the first terminal is acquired, and whether the first terminal device collides with another terminal device is determined, that is, whether the first terminal device collides with another terminal device is determined. If so, recording a first collision time point, and starting the audio acquisition module. And sending first verification information to the terminal equipment within the preset range, receiving second verification information sent by other terminal equipment, and setting the terminal equipment sending the second verification information as second terminal equipment. And determining a main vibration object generating vibration between the first terminal equipment and the second terminal equipment through the first verification information and the second verification information, and vibrating by the main vibration object. And acquiring second sensor data after the change of each sensor in a first preset time period and a first vibration audio acquired by the audio acquisition module. And generating first collision information containing the data of each second sensor and the first vibration audio, and sending the first collision information to the second terminal equipment. And if the second collision information sent by the second terminal equipment is received, judging whether the first terminal equipment and the second terminal equipment are close to each other or not based on the first collision information and the second collision information, if so, carrying out data transmission between the first terminal equipment and the second terminal equipment, establishing data transmission connection, and realizing the data transmission between the first terminal equipment and the second terminal equipment.
By applying the device provided by the embodiment of the invention, a user can realize data transmission only by tightly connecting two terminal devices together, the operation is convenient, and the use experience of the user is improved.
In the apparatus provided in the embodiment of the present invention, the obtaining unit 501 includes:
the starting sub-unit is used for starting a detection application preset in the first terminal device;
and the first acquisition subunit is configured to acquire, by using the detection application, first sensor data of each sensor in the first terminal device according to a preset time period.
In the apparatus provided in the embodiment of the present invention, the first determining unit 502 includes:
a first extraction subunit, configured to apply the detection application to extract a first sensor statistical feature of each of the first sensor data;
the second acquisition subunit is used for acquiring a preset first support vector machine;
the first input subunit is used for inputting the statistical characteristics of each first sensor into the first support vector machine to obtain a detection result output by the first support vector machine;
the first judgment subunit is used for judging whether the detection result contains a first identification bit; the first identification position is identification information for representing the collision between the first terminal equipment and the equipment;
the first determining subunit is configured to determine that the first terminal device has inter-device collision if the detection result includes a first identification bit;
and the second determining subunit is configured to determine that no inter-device collision occurs in the first terminal device if the detection result does not include the first identification bit.
In the apparatus provided in the embodiment of the present invention, the second determining unit 507 includes:
a third obtaining subunit, configured to obtain a second collision time point in the second verification information and a second device number of the second terminal device, where the second collision time point is a collision time point when the second terminal device generates an inter-device collision;
the second judgment subunit is used for judging whether the time difference between the first collision time point and the second collision time point is within a preset time difference value;
a third determining subunit, configured to determine a number size between the first device number and the second device number if a time difference between the first collision time point and the second collision time point is within a preset time difference;
a fourth determining subunit, configured to determine that the first terminal device is the main vibration object when the first device number is greater than the second device number;
and the fifth determining subunit is configured to determine that the second terminal device is the main vibration object when the second device number is greater than the first device number.
In the apparatus provided in the embodiment of the present invention, the second determining unit 510 includes:
a fourth acquiring subunit, configured to acquire each piece of third sensor data and a second vibration audio included in the second collision information, and extract, by using the detection application, a third sensor statistical feature of each piece of the third sensor data and a second sensor statistical feature of each piece of the second sensor data;
the third extraction subunit is used for applying preset short-time Fourier transform (STFT) and Mel Frequency Cepstrum Coefficient (MFCC) to extract a first audio data feature corresponding to the first vibration audio and a second audio data feature corresponding to the second vibration audio;
a fourth extraction subunit, configured to extract second linear acceleration data and second rotation vector data from each second sensor data corresponding to the first terminal device;
a fifth extraction subunit operable to extract third linear acceleration data and third rotation vector data from respective third sensor data corresponding to the second terminal device;
a calculation subunit configured to calculate a motion correlation characteristic between the first terminal device and the second terminal device based on the second linear acceleration data, the second rotation vector data, the third linear acceleration data, and the third rotation vector data;
the second input subunit is configured to splice the second sensor statistical features, the third sensor statistical features, the first audio data features, the second audio data features, and the motion correlation features into a feature vector, and input the feature vector into a preset second support vector machine to obtain output vibration information of the second support vector machine;
a third judging subunit, configured to judge whether the first terminal device and the second terminal device vibrate at the same frequency based on the vibration information;
a sixth determining subunit, configured to determine that the first terminal device and the second terminal device are close to each other if the first terminal device and the second terminal device vibrate at the same frequency;
a seventh determining subunit, configured to determine that the first terminal device and the second terminal device are not close to each other if the first terminal device and the second terminal device are not co-frequency vibrations.
The device provided by the embodiment of the invention further comprises:
the data transmission unit is used for detecting whether the first terminal equipment has a data file to be sent or not; if the first terminal equipment has a data file to be sent, sending the data file to the second terminal equipment; and if the first terminal equipment does not have the data file to be sent, popping up a prompt window, and displaying all the transmittable data files in the first terminal equipment to a user through the prompt window.
The specific working processes of each unit and sub-unit in the data transmission device disclosed in the above embodiment of the present invention can refer to the corresponding contents in the data transmission method disclosed in the above embodiment of the present invention, and are not described herein again.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the device where the storage medium is located is controlled to execute the data transmission method.
An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 6, which specifically includes a memory 601 and one or more instructions 602, where the one or more instructions 602 are stored in the memory 601 and configured to be executed by one or more processors 603 to perform the following operations on the one or more instructions 602:
acquiring first sensor data of each sensor preset in the first terminal equipment;
judging whether the first terminal equipment generates inter-equipment collision or not based on the data of each first sensor;
when the first terminal equipment generates inter-equipment collision, recording a first collision time point of the inter-equipment collision;
starting an audio acquisition module preset in the first terminal equipment, and generating a vibration signal;
acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by the audio acquisition module;
sending first collision information corresponding to the first terminal device to each terminal device within a preset range, wherein the first collision information comprises each piece of second sensor data, the first vibration audio and the first collision time point;
when second collision information sent by any terminal equipment is received in a second preset time period, the terminal equipment sending the second collision information is determined as second terminal equipment;
judging whether the first terminal equipment and the second terminal equipment are close to each other or not based on the first collision information and the second collision information;
and if the first terminal equipment and the second terminal equipment are abutted against each other, establishing data transmission connection with the second terminal equipment to realize data transmission with the second terminal equipment.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both.
To clearly illustrate this interchangeability of hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data transmission method, applied to a first terminal device, the method comprising:
acquiring first sensor data of each sensor preset in the first terminal equipment;
judging whether the first terminal equipment generates inter-equipment collision or not based on the data of each first sensor;
when the first terminal equipment generates inter-equipment collision, recording a first collision time point of the inter-equipment collision;
starting an audio acquisition module preset in the first terminal equipment;
sending first verification information to terminal equipment within a preset range, wherein the first verification information comprises the first collision time point and a first equipment number of the first terminal equipment;
when second verification information sent by any terminal equipment is received, determining the terminal equipment sending the second verification information as second terminal equipment;
determining a main vibration object based on the first verification information and the second verification information, wherein the main vibration object generates vibration, and the main vibration object is the first terminal equipment or the second terminal equipment;
acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by the audio acquisition module;
sending first collision information corresponding to the first terminal device to the second terminal device, wherein the first collision information comprises data of each second sensor and the first vibration audio;
when second collision information sent by the second terminal equipment is received, judging whether the first terminal equipment and the second terminal equipment are close to each other or not based on the first collision information and the second collision information;
and if the first terminal equipment and the second terminal equipment are abutted against each other, establishing data transmission connection with the second terminal equipment to realize data transmission with the second terminal equipment.
2. The method of claim 1, wherein the obtaining of the first sensor data of each sensor preset in the first terminal device comprises:
starting a detection application preset in the first terminal device;
and acquiring first sensor data of each sensor in the first terminal equipment by using the detection application according to a preset time period.
3. The method according to claim 1 or 2, wherein the determining whether the first terminal device has an inter-device collision based on each of the first sensor data comprises:
applying the detection application to extract first sensor statistics for each of the first sensor data;
acquiring a preset first support vector machine;
inputting the statistical characteristics of each first sensor into the first support vector machine to obtain a detection result output by the first support vector machine;
judging whether the detection result contains a first identification bit; the first identification position is identification information for representing the collision between the first terminal equipment and the equipment;
if the detection result contains a first identification position, determining that the first terminal equipment has inter-equipment collision;
and if the detection result does not contain the first identification bit, determining that the first terminal equipment has no inter-equipment collision.
4. The method of claim 1, wherein determining a primary vibration object based on the first verification information and the second verification information comprises:
acquiring a second collision time point in the second verification information and a second device number of the second terminal device, wherein the second collision time point is a collision time point when the second terminal device generates inter-device collision;
judging whether the time difference between the first collision time point and the second collision time point is within a preset time difference value;
if the time difference between the first collision time point and the second collision time point is within a preset time difference value, determining the number size between the first equipment number and the second equipment number;
when the first equipment number is larger than the second equipment number, determining that the first terminal equipment is the main vibration object;
and when the second equipment number is larger than the first equipment number, determining that the second terminal equipment is the main vibration object.
5. The method of claim 2, wherein the determining whether the first terminal device and the second terminal device are in close proximity to each other based on the first collision information and the second collision information comprises:
acquiring each third sensor data and a second vibration audio contained in the second collision information, and extracting a third sensor statistical characteristic of each third sensor data and a second sensor statistical characteristic of each second sensor data by using the detection application;
extracting a first audio data characteristic corresponding to the first vibration audio and a second audio data characteristic corresponding to the second vibration audio by applying preset short-time Fourier transform (STFT) and Mel Frequency Cepstrum Coefficient (MFCC);
extracting second linear acceleration data and second rotation vector data from each second sensor data corresponding to the first terminal device;
extracting third linear acceleration data and third rotation vector data from each third sensor data corresponding to the second terminal device;
calculating a motion correlation characteristic between the first terminal device and the second terminal device based on the second linear acceleration data, the second rotation vector data, the third linear acceleration data, and the third rotation vector data;
splicing the second sensor statistical characteristics, the third sensor statistical characteristics, the first audio data characteristics, the second audio data characteristics and the motion correlation characteristics into a characteristic vector, and inputting the characteristic vector into a preset second support vector machine to obtain vibration information output by the second support vector machine;
judging whether the first terminal equipment and the second terminal equipment vibrate at the same frequency or not based on the vibration information;
if the first terminal equipment and the second terminal equipment vibrate at the same frequency, determining that the first terminal equipment and the second terminal equipment are close to each other;
and if the first terminal equipment and the second terminal equipment do not vibrate at the same frequency, determining that the first terminal equipment and the second terminal equipment are not close to each other.
6. The method of claim 1, wherein after establishing the data transmission connection with the second terminal device, further comprising:
detecting whether the first terminal equipment has a data file to be sent or not;
if the first terminal equipment has a data file to be sent, sending the data file to the second terminal equipment;
and if the first terminal equipment does not have the data file to be sent, popping up a prompt window, and displaying all the transmittable data files in the first terminal equipment to a user through the prompt window.
7. A data transmission apparatus, wherein the apparatus is applied to a first terminal device, the apparatus comprises:
a first acquisition unit configured to acquire first sensor data of each sensor preset in the first terminal device;
a first judging unit, configured to judge whether inter-device collision occurs in the first terminal device based on each of the first sensor data;
the terminal equipment comprises a recording unit, a judging unit and a judging unit, wherein the recording unit is used for recording a first collision time point when the first terminal equipment generates the inter-equipment collision;
the starting unit is used for starting an audio acquisition module preset in the first terminal equipment;
a first sending unit, configured to send first verification information to a terminal device within a preset range, where the first verification information includes the first collision time point and a first device number of the first terminal device;
the terminal equipment comprises a first determining unit, a second determining unit and a judging unit, wherein the first determining unit is used for determining that the terminal equipment which sends second verification information is second terminal equipment when the second verification information sent by any terminal equipment is received;
a second determination unit configured to determine a main vibration object by which vibration is generated based on the first verification information and the second verification information, the main vibration object being the first terminal device or the second terminal device;
the second acquisition unit is used for acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by the audio acquisition module;
a second sending unit, configured to send first collision information to the second terminal device, where the first collision information includes each of the second sensor data and the first vibration audio;
a second judging unit, configured to, when receiving second collision information sent by the second terminal device, judge whether the first terminal device and the second terminal device are close to each other based on the first collision information and the second collision information;
and the connection unit is used for establishing data transmission connection with the second terminal equipment if the first terminal equipment and the second terminal equipment are abutted against each other, so as to realize data transmission with the second terminal equipment.
8. The apparatus of claim 7, wherein the first obtaining unit comprises:
the starting sub-unit is used for starting a detection application preset in the first terminal device;
and the first acquisition subunit is configured to acquire, by using the detection application, first sensor data of each sensor in the first terminal device according to a preset time period.
9. The apparatus according to claim 8, wherein the first determining unit comprises:
a first extraction subunit, configured to apply the detection application to extract a first sensor statistical feature of each of the first sensor data;
the second acquisition subunit is used for acquiring a preset first support vector machine;
the first input subunit is used for inputting the statistical characteristics of each first sensor into the first support vector machine to obtain a detection result output by the first support vector machine;
the first judgment subunit is used for judging whether the detection result contains a first identification bit; the first identification position is identification information for representing the collision between the first terminal equipment and the equipment;
the first determining subunit is configured to determine that the first terminal device has inter-device collision if the detection result includes a first identification bit;
and the second determining subunit is configured to determine that no inter-device collision occurs in the first terminal device if the detection result does not include the first identification bit.
10. The apparatus of claim 7, wherein the second determining unit comprises:
a second extraction subunit, configured to extract, by using the detection application, a third sensor statistical feature of each of the third sensor data and a second sensor statistical feature of each of the second sensor data;
the third extraction subunit is used for applying preset short-time Fourier transform (STFT) and Mel Frequency Cepstrum Coefficient (MFCC) to extract a first audio data feature corresponding to the first vibration audio and a second audio data feature corresponding to the second vibration audio;
a fourth extraction subunit, configured to extract second linear acceleration data and second rotation vector data from each second sensor data corresponding to the first terminal device;
a fifth extraction subunit operable to extract third linear acceleration data and third rotation vector data from respective third sensor data corresponding to the second terminal device;
a calculation subunit configured to calculate a motion correlation characteristic between the first terminal device and the second terminal device based on the second linear acceleration data, the second rotation vector data, the third linear acceleration data, and the third rotation vector data;
the second input subunit is configured to splice the second sensor statistical features, the third sensor statistical features, the first audio data features, the second audio data features, and the motion correlation features into a feature vector, and input the feature vector into a preset second support vector machine to obtain output vibration information of the second support vector machine;
a third judging subunit, configured to judge whether the first terminal device and the second terminal device vibrate at the same frequency based on the vibration information;
a third determining subunit, configured to determine that the first terminal device and the second terminal device are close to each other if the first terminal device and the second terminal device vibrate at the same frequency;
a fourth determining subunit, configured to determine that the first terminal device and the second terminal device are not close to each other if the first terminal device and the second terminal device are not co-frequency vibrations.
CN202110784611.XA 2021-07-12 2021-07-12 Data transmission method and device Active CN113542393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110784611.XA CN113542393B (en) 2021-07-12 2021-07-12 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110784611.XA CN113542393B (en) 2021-07-12 2021-07-12 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN113542393A true CN113542393A (en) 2021-10-22
CN113542393B CN113542393B (en) 2024-06-14

Family

ID=78098547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110784611.XA Active CN113542393B (en) 2021-07-12 2021-07-12 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN113542393B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115529576A (en) * 2022-01-13 2022-12-27 荣耀终端有限公司 Collision connection method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013124020A (en) * 2011-12-15 2013-06-24 Keihin Corp Vehicle collision determination apparatus
CN103345304A (en) * 2013-07-05 2013-10-09 百度在线网络技术(北京)有限公司 Operating method and device of mobile equipment on the basis of time-share trigger of sensor
CN103916852A (en) * 2012-12-28 2014-07-09 联想(北京)有限公司 Data transmission method and mobile terminal
CN105300439A (en) * 2015-10-19 2016-02-03 腾讯科技(深圳)有限公司 Collision determining system, method and device
CN105976449A (en) * 2016-05-27 2016-09-28 大连楼兰科技股份有限公司 Remote automatic damage assessment and collision detection method and system for vehicle
CN106375931A (en) * 2015-07-24 2017-02-01 阿里巴巴集团控股有限公司 Interaction method, interaction device and server
US20190111876A1 (en) * 2017-10-18 2019-04-18 Qirfiraz Siddiqui Smart surface for detecting collision forces
CN110667506A (en) * 2019-10-18 2020-01-10 广州斯沃德科技有限公司 Collision recognition method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013124020A (en) * 2011-12-15 2013-06-24 Keihin Corp Vehicle collision determination apparatus
CN103916852A (en) * 2012-12-28 2014-07-09 联想(北京)有限公司 Data transmission method and mobile terminal
CN103345304A (en) * 2013-07-05 2013-10-09 百度在线网络技术(北京)有限公司 Operating method and device of mobile equipment on the basis of time-share trigger of sensor
CN106375931A (en) * 2015-07-24 2017-02-01 阿里巴巴集团控股有限公司 Interaction method, interaction device and server
CN105300439A (en) * 2015-10-19 2016-02-03 腾讯科技(深圳)有限公司 Collision determining system, method and device
CN105976449A (en) * 2016-05-27 2016-09-28 大连楼兰科技股份有限公司 Remote automatic damage assessment and collision detection method and system for vehicle
US20190111876A1 (en) * 2017-10-18 2019-04-18 Qirfiraz Siddiqui Smart surface for detecting collision forces
CN110667506A (en) * 2019-10-18 2020-01-10 广州斯沃德科技有限公司 Collision recognition method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115529576A (en) * 2022-01-13 2022-12-27 荣耀终端有限公司 Collision connection method and device

Also Published As

Publication number Publication date
CN113542393B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
CN106055088B (en) The air of interactive wearable device writes and gesture system
US20200309930A1 (en) System and Method Associated with User Authentication Based on an Acoustic-Based Echo-Signature
EP3412014B1 (en) Liveness determination based on sensor signals
CN110178179B (en) Voice signature for authenticating to electronic device users
US20100040293A1 (en) Kinematic Based Authentication
US20150245164A1 (en) Interaction between wearable devices via broadcasted sensor-related data
US10353495B2 (en) Personalized operation of a mobile device using sensor signatures
US20140379354A1 (en) Method, apparatus and system for payment validation
CN110225002B (en) Business handling method and related product
US20230410112A1 (en) Transaction confirmation and authentication based on device sensor data
US20070091292A1 (en) System, medium, and method controlling operation according to instructional movement
US7805128B2 (en) Authentication based on future geo-location
US20230306971A1 (en) In-ear liveness detection for voice user interfaces
TW201546642A (en) Methods and apparatus to enhance security of authentication
US20150334504A1 (en) Determining positions of media devices based on motion data
CN113542393B (en) Data transmission method and device
CN108710788A (en) A kind of safety certifying method, device, terminal and storage medium
CN111314299B (en) Identity verification method, device and system
CN106921500B (en) Identity authentication method and device for mobile equipment
CN111580660B (en) Operation triggering method, device, equipment and readable storage medium
JP2017182242A (en) Authentication system, mobile terminal, information processing apparatus, authentication method, and program
TWI604330B (en) Methods for dynamic user identity authentication
CN113448536B (en) Equipment interaction method and device
CN112863523B (en) Voice anti-counterfeiting method and device, terminal equipment and storage medium
CN105119883B (en) A kind of verification method and server based on vibration signal

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
GR01 Patent grant
GR01 Patent grant