CN113542393B - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN113542393B
CN113542393B CN202110784611.XA CN202110784611A CN113542393B CN 113542393 B CN113542393 B CN 113542393B CN 202110784611 A CN202110784611 A CN 202110784611A CN 113542393 B CN113542393 B CN 113542393B
Authority
CN
China
Prior art keywords
terminal equipment
terminal device
data
collision
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.)
Active
Application number
CN202110784611.XA
Other languages
Chinese (zh)
Other versions
CN113542393A (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

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 collision between devices occurs or not based on the data of each first sensor; if yes, recording a first collision time point; starting an audio acquisition module and sending first verification information to terminal equipment within a preset range; when receiving second verification information sent by the second terminal equipment, determining a main vibration object based on the first verification information and the second verification information, and generating vibration by the main vibration object; the method comprises the steps of sending first collision information to second terminal equipment, receiving second collision information sent by the second terminal equipment, 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; if yes, establishing data transmission connection to realize data transmission of the two. By applying the method, data transmission can be realized by only closely connecting two terminal devices, 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 is gradually increased, and people are increasingly required to perform data transmission operation among multiple devices.
The currently common data transmission operation, such as through bluetooth transmission, needs to manually search for nearby bluetooth devices, select a target device, and confirm pairing on the two devices to perform the data transmission operation; in addition, the chat tool or the network disk transmission mode is applied, and the data transmission can be performed only by inputting the account number and password of the same application on two devices and uploading the data to the cloud. These data transmission modes are cumbersome to operate and have high learning cost.
Disclosure of Invention
In view of the above, the present invention provides a data transmission method, by which data transmission can be achieved only by bringing two terminal devices close together, and the operation is convenient, and the use experience of a user is improved.
The invention also provides a data transmission device which is used for ensuring the realization and the application of the method in practice.
A data transmission method, the method being 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 collides with equipment or not based on the first sensor data;
recording a first collision time point when the first terminal equipment collides with equipment;
Starting an audio acquisition module preset in the first terminal equipment;
transmitting 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 receiving second verification information sent by any terminal equipment, 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;
Transmitting first collision information corresponding to the first terminal equipment to the second terminal equipment, wherein the first collision information comprises the second sensor data and the first vibration audio;
when receiving second collision information sent by the 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;
If the first terminal equipment and the second terminal equipment are close to each other, establishing data transmission connection with the second terminal equipment, and realizing data transmission with the second terminal equipment.
The method, optionally, the obtaining the first sensor data of each sensor preset in the first terminal device includes:
starting a detection application preset in the first terminal equipment;
And the detection application is applied to acquire the first sensor data of each sensor in the first terminal equipment according to a preset time period.
In the above method, optionally, the determining, based on each of the first sensor data, whether the first terminal device collides with another device includes:
Extracting first sensor statistical features of each first sensor data by applying the detection application;
Acquiring a preset first support vector machine;
Inputting the statistical features 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 or not; the first identification bit is identification information representing that the first terminal equipment collides with each other;
if the detection result contains a first identification bit, determining that the first terminal equipment collides with equipment;
and if the detection result does not contain the first identification bit, determining that the first terminal equipment does not collide with the equipment.
In the above method, optionally, the determining the 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 equipment number of the second terminal equipment, wherein the second collision time point is a collision time point when the second terminal equipment collides with each other;
judging whether the time difference between the first collision time point and the second collision time point is within a preset time difference value or not;
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.
In the above method, optionally, the determining, based on the first collision information and the second collision information, whether the first terminal device and the second terminal device are close to each other includes:
acquiring each third sensor data and second vibration audio contained in the second collision information, and extracting a third sensor statistical feature of each third sensor data and a second sensor statistical feature 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 a preset short-time Fourier transform STFT and a 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 equipment;
Extracting third linear acceleration data and third rotation vector data from each third sensor data corresponding to the second terminal equipment;
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 feature, the third sensor statistical feature, the first audio data feature, the second audio data feature and the motion correlation feature into a feature vector, inputting the feature vector into a preset second support vector machine, and obtaining output vibration information of 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.
The above method, optionally, further includes, after establishing a data transmission connection with the second terminal device:
detecting whether the first terminal equipment has a data file to be transmitted or not;
if the first terminal equipment has the data file to be sent, sending the data file to the second terminal equipment;
If the first terminal equipment does not have the data files to be sent, a prompt window is popped up, and all the data files which can be transmitted in the first terminal equipment are displayed 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 acquiring unit, configured to acquire first sensor data of each sensor preset in the first terminal device;
a first judging unit configured to judge whether or not an inter-device collision occurs in the first terminal device based on each of the first sensor data;
A recording unit configured to record a first collision time point at which an inter-device collision occurs when the first terminal device generates the inter-device 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;
A first determining unit, configured to determine, when second authentication information sent by an arbitrary terminal device is received, that the terminal device sending the second authentication information is a second terminal device;
a second determining unit configured to determine a main vibration object based on the first verification information and the second verification information, the main vibration object generating vibration, 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 the first vibration audio acquired by the audio acquisition module;
A second transmitting unit configured to transmit first collision information to the second terminal device, the first collision information including each of the second sensor data and the first vibration audio;
A second judging unit, configured to 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 when receiving the second collision information sent by the second terminal device;
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 mutually close to each other, so as to realize data transmission with the second terminal equipment.
The above apparatus, optionally, the first obtaining unit includes:
the promoter unit is used for starting a detection application preset in the first terminal equipment;
The first acquisition subunit is used for acquiring the first sensor data of each sensor in the first terminal equipment by the detection application according to a preset time period.
The above apparatus, optionally, the first determining unit includes:
A first extraction subunit, configured to apply the detection application, and extract a first sensor statistical feature of each 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 judging subunit is used for judging whether the detection result contains a first identification bit or not; the first identification bit is identification information representing that the first terminal equipment collides with each other;
A first determining subunit, configured to determine that an inter-device collision occurs between the first terminal device if the detection result includes a first identification bit;
and the second determining subunit is used for determining that the first terminal equipment does not collide with the equipment if the detection result does not contain the first identification bit.
The above apparatus, optionally, the second judging unit includes:
A second extraction subunit configured to extract 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 using the detection application;
a third extraction subunit, configured to apply a preset short-time fourier transform STFT and mel-frequency cepstrum coefficient MFCC, and 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, configured to extract third linear acceleration data and third rotation vector data from each third sensor data corresponding to the second terminal device;
a calculating subunit, configured to calculate a motion correlation feature 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 feature, the third sensor statistical feature, the first audio data feature, the second audio data feature and the motion correlation feature into a feature vector, input the feature vector into a preset second support vector machine, and 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 abut against each other if the first terminal device and the second terminal device vibrate at the same frequency;
And the fourth determination subunit is used for determining that the first terminal equipment and the second terminal equipment are not close to each other if the first terminal equipment and the second terminal equipment are not vibrated at the same frequency.
A storage medium comprising stored instructions, wherein the instructions, when executed, control a device in which the storage medium resides to perform the data transmission method described above.
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 perform the data transmission method described above by one or more processors.
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 collision between devices occurs or not based on the data of each first sensor; recording a first collision time point when the first terminal equipment collides with the equipment; starting an audio acquisition module preset in the first terminal equipment; sending first verification information to terminal equipment within a preset range; when receiving second verification information, determining that the terminal equipment sending the second verification information is second terminal equipment; determining a main vibration object based on the first verification information and the second verification information, and generating vibration by the main vibration object; acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by an audio acquisition module; transmitting first collision information corresponding to the first terminal equipment to second terminal equipment; when receiving second collision information sent by the 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; if the first terminal equipment and the second terminal equipment are close to each other, establishing data transmission connection with the second terminal equipment, and realizing data transmission with the second terminal equipment. By applying the method provided by the invention, data transmission can be realized by only 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 that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a method flowchart of a data transmission method 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 an exemplary diagram of a data transmission method according to an embodiment of the present invention;
Fig. 5 is a device structure diagram of a data transmission device 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 following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the present disclosure, 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 "comprise," "include," 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 one … …" does not exclude the presence of other like 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 devices, multiprocessor devices, distributed computing environments that include any of the above devices or devices, and the like.
The embodiment of the invention provides a data transmission method, which can be applied to various system platforms, wherein an execution main body of the method can be first terminal equipment, and a flow chart of the method is shown in fig. 1, and specifically comprises the following steps:
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, gyroscopic sensors, rotation vector sensors, magnetic sensors, and the like.
It will be appreciated that the first terminal device acquires the first sensor data of each sensor in real time, e.g. each sensor data 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 the collision is detected, acquire each first sensor data.
S102: and judging whether the first terminal equipment collides with equipment or not based on the first sensor data.
In the 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 will change 180 degrees in the direction of the three-dimensional space, and obvious collision peaks will appear in the gyroscope and the linear acceleration data. However, when the first terminal device collides, it cannot be determined whether the first terminal device collides with other terminal devices or other objects or human bodies. Therefore, whether the first terminal device collides with the device or not is judged through the first sensor data acquired currently.
S103: and when the first terminal equipment collides with the equipment, recording a first collision time point when the collision between the equipment occurs.
In the invention, when the first terminal device is determined to collide with other terminal devices, the collision time point when the first terminal device collides with other terminal devices is recorded.
S104: and starting an audio acquisition module preset in the first terminal equipment.
The audio collection module may be a microphone disposed in the first terminal device, and configured to collect vibration audio in a first preset time period.
It should be noted that, when the first terminal device starts the audio acquisition module, the terminal device that collides with the first terminal device also starts the audio acquisition module therein.
S105: and sending the first verification information to the terminal equipment within a preset range.
The first verification information comprises the first collision time point and a first equipment number of the first terminal equipment.
In the invention, after the first terminal collides, whether the data transmission connection needs to be constructed or not cannot be determined, and the terminal equipment which needs to carry out the data transmission cannot be determined, so that temporary connection is established with each terminal equipment in the preset range, and first verification information is sent to all the terminal equipment in the preset range.
S106: and when receiving the second verification information sent by any terminal equipment, determining the terminal equipment sending the second verification information as the second terminal equipment.
In the invention, in the preset range, if any terminal equipment collides with each other, the terminal equipment also sends verification information to all the terminal equipment in the preset range including the first terminal equipment.
S107: and determining a main vibration object based on the first verification information and the second verification information, and generating vibration by the main vibration object.
Wherein the main vibration object is the first terminal device or the second terminal device.
In the invention, after receiving the second verification information, the first terminal device cannot directly determine whether the second terminal device is a device colliding with the second terminal device. Therefore, after receiving the second verification information, the main vibration object that 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 in close proximity to each other is verified by data acquired 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 period may be a vibration period during which the first terminal device generates the vibration signal after determining that the collision between the devices occurs. The primary vibrating object will also change each of its sensors when a vibration signal is generated.
If the first terminal device is the main vibration object, the second sensor data is the sensor data changed 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 is close to the first terminal device when the second terminal device vibrates, so that the sensor in the first terminal device senses that the second terminal device vibrates and then changes. The first vibration audio is audio data collected during 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 the first vibration audio acquired by the audio acquisition module.
In the invention, first collision information is formed by each second sensor data and the first vibration audio, and the collision information is sent to each terminal device in a preset range.
S110: and when receiving second collision information sent by the 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.
In the present invention, after the main vibration object vibrates, the second terminal device also generates collision information and transmits the collision information to the first terminal device. The first terminal device and the second terminal device further verify whether the two parties are close to each other according to the received collision information of the other party and the collision information of the first terminal device and the second terminal device.
The second collision information comprises second vibration audio acquired by the second terminal equipment and third sensor data. The second vibration audio is audio data in a first preset time period acquired by an audio acquisition module in the second terminal equipment. If the second terminal equipment is a main vibration object, the third sensor data is 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 is close to the second terminal device when the first terminal device vibrates, so that the sensor in the second terminal device senses that the first terminal device vibrates and then changes.
It will be appreciated 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 are identical or have a small difference, the vibration tones are similar, and the motion correlation calculated from the sensor data is high.
S111: if the first terminal equipment and the second terminal equipment are close to each other, establishing data transmission connection with the second terminal equipment, and realizing data transmission with the second terminal equipment.
In the invention, if the two terminal devices need to transmit data, the two terminal devices need to collide and then are close together, so that the first terminal device is identified to collide with the second terminal device, the first terminal device and the second terminal device are close to each other, the data transmission between the first terminal device and the second terminal device is represented, the data transmission connection between the first terminal device and the second terminal device is constructed, and the data can be transmitted between the first terminal device and the second terminal device after the connection is established.
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 yes, recording a first collision time point, and starting an audio acquisition module. And sending the first verification information to the terminal equipment within the preset range, receiving the second verification information sent by other terminal equipment, and setting the terminal equipment sending the second verification information as the 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 each sensor changes in a first preset time period and first vibration audio acquired by the audio acquisition module. First collision information containing the second sensor data and the first vibration audio is generated and sent to the second terminal equipment. 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, data transmission is needed to be carried out between the first terminal equipment and the second terminal equipment, and data transmission connection is established to realize 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 performing 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 abut together. A and B respectively acquire first sensor data of each sensor preset therein, and respectively judge whether collision between devices occurs. For the terminal A, when the collision between the devices is determined, a first collision time point is recorded, an audio acquisition module is started, and first verification information is sent to 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 surrounding devices. The terminal A and the terminal B determine a main vibration object between the terminal A and the terminal B according to the first verification information and the second verification information, and the main vibration object generates vibration. After the main vibration object vibrates, the terminal A acquires second sensor data of each sensor and first vibration audio acquired by the 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 second sensor data and the first vibration audio to the terminal B; the terminal B transmits second collision information including 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 according to the first collision information and the second collision information; also, 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. If the two are determined to be mutually close to each other, establishing data transmission connection for data transmission.
By applying the method provided by the embodiment of the invention, the user can realize data transmission by only closely connecting two terminal devices, the operation is convenient, and the use experience of the user is improved.
Optionally, in the method provided by the embodiment of the present invention, a process of establishing, by a first terminal device, a data transmission connection with a second terminal device may specifically include:
Sending a first connection request to a second terminal device;
And when a first feedback message fed back by the second terminal equipment based on the first connection request is received and a second connection request sent by the second terminal equipment is received, feeding back a second feedback message corresponding to the second connection request to the second terminal equipment, and establishing data transmission connection with the second terminal equipment.
It can be understood that after the first terminal device and the second terminal device determine that the first terminal device and the second terminal device are close to each other, the connection requests are respectively sent to the opposite sides, after the connection requests sent by the opposite sides are received, feedback messages corresponding to the received connection requests are fed back, and data transmission connection is established.
In the method provided by the embodiment of the present invention, based on the content of S101, the acquiring the first sensor data of each sensor preset in the first terminal device may specifically include:
starting a detection application preset in the first terminal equipment;
And the detection application is applied to acquire the first sensor data of each sensor in the first terminal equipment 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 used for realizing data transmission. Both terminal devices need to set detection applications to realize data transmission. The detection application is connected with all the sensors in the terminal equipment, and first sensor data of each sensor are collected according to a time period. Likewise, after the terminal device generates the vibration signal, the respective second sensor data generated due to the vibration signal are collected.
Optionally, in the foregoing embodiment of the present invention, the detection application may be started first to obtain the first sensor data of each sensor in the first terminal device. In the actual application process, there may be a situation that the detection application is not opened, so the collision detection device may be disposed in the terminal device to detect whether the terminal device collides in real time. When the terminal equipment collides, the first terminal equipment detects whether to start a detection application, if so, each first sensor data 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 the 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, based on each of the first sensor data, whether the first terminal device collides with the device may include:
S201: and extracting first sensor statistical characteristics of each piece of first sensor data by using the detection application.
In the present invention, the sensor statistics include average, maximum, minimum, standard deviation, kurtosis and skewness of the sensor on the x, y, 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, a large number of sensor statistical features are applied to the first support vector machine as training data for machine learning, a detection result corresponding to each sensor statistical feature 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 feature in the first terminal equipment.
S203: and inputting the statistical features of each first sensor into the first support vector machine to obtain a detection result output by the first support vector machine.
According to the invention, after machine learning training of a large amount of training data, the first support vector machine can identify the collision type of collision of the terminal equipment according to the input statistical characteristics of each sensor, and output a corresponding detection result.
S204: judging whether the detection result contains a first identification bit or not;
The first identification bit is identification information representing that the first terminal equipment collides with each other.
In the invention, if the first support vector machine recognizes that the collision of the first terminal equipment is the collision between the equipment, 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 collides with the device by judging whether the detection result contains the first identification bit. If yes, executing S205; if not, S206 is performed.
S205: and if the detection result comprises the first identification bit, determining that the first terminal equipment collides with equipment.
In the present invention, if the first terminal device collides with another device, it is further determined whether or not the terminal device is in close proximity to the first terminal device, and the above-described processes S103 to S108 are continuously performed.
S206: and if the detection result does not contain the first identification bit, determining that the first terminal equipment does not collide with the equipment.
In the invention, if the first terminal equipment does not collide with other terminal equipment, the data transmission is characterized in that the data transmission with other terminal equipment is not needed at present, and the detection application acquires the first sensor data of each sensor according to the 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 equipment are acquired, the first sensor statistical characteristics of each first sensor data are extracted by the detection application, the statistical characteristics of each first sensor are input into the first support vector machine, and the collision type of the collision of the first terminal equipment is identified by the first support vector machine. Obtaining a detection result output by a first support vector machine, and judging whether the detection result contains a first identification bit or not; if so, the first terminal equipment collides with each other; otherwise, no collision between devices occurs. By identifying the type of collision that the first terminal device has made, false identification of collisions with people or other objects during normal application of the terminal device as inter-device collisions is avoided.
In the present invention, if two terminal devices need to transmit data, the two terminal devices must collide and abut against each other. In the actual application process, there may be a situation that the devices do not abut against each other after the collision between the devices, so 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 that collides with the first terminal device further detects whether the two abut against each other. Similarly, the first terminal device will also receive the 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 and the second terminal device that sends the second collision information are close to each other according to the second collision information and the first collision information.
Therefore, referring to fig. 3, in the method provided by the embodiment of the present invention, based on the content of S110, the determining, based on the first collision information and the second collision information, whether the first terminal device and the second terminal device are close to each other may specifically include:
S301: and acquiring the third sensor data and the second vibration audio contained in the second collision information, and extracting the third sensor statistical characteristic of each third sensor data and the second sensor statistical characteristic of each second sensor data by using the detection application.
The second vibration audio is audio data in a first preset time period acquired by an audio acquisition module in the second terminal equipment. If the second terminal equipment is a main vibration object, the third sensor data are sensor data which are changed 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 is close to the second terminal device when the first terminal device vibrates, so that the sensors in the second terminal device sense that the first terminal device vibrates and then changes.
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 a preset short-time Fourier transform STFT and a Mel frequency cepstrum coefficient MFCC.
In the present invention, STFT is a classical algorithm for analyzing non-stationary signals and extracting time and frequency features, and the acquired audio time series is converted into two-dimensional time-frequency images using STFT to obtain frequency features. Meanwhile, the MFCC extraction sub-process features are applied in the frequency domain, and the MFCCs are obtained from coefficients of cepstral representation of microphone audio data, and can be used for approximating human auditory features, and extracting 26 MFCC features. The STFT extracted frequency features and the MFCC extracted MFCC features are spliced into an audio data feature.
And for the first vibration audio, performing feature extraction by using the STFT and the MFCC to obtain first audio data features corresponding to the first vibration audio. And for the second vibration audio, performing feature extraction by using the STFT and the MFCC to obtain second audio data features 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 equipment.
In the invention, 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 are arranged in the first terminal equipment and the second terminal equipment, and when the first terminal equipment and the second terminal equipment need to be determined whether to be abutted against each other or not, the motion correlation characteristics between the first terminal equipment and the second terminal equipment need to be further calculated. Before calculating the motion correlation characteristic, it is necessary to apply linear acceleration data of the linear acceleration sensor and rotation vector data of the rotation vector sensor to calculate 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 equipment.
Likewise, after the second linear acceleration data and the second rotation vector data in the first terminal device are obtained, the third linear acceleration data and the third rotation vector data in the second terminal device also need to be obtained.
S305: and 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.
In the invention, the first terminal equipment is A, the second terminal equipment is B, the recorded rotation vector data are quaternion q A、qB and the relative rotation vector of A, B are respectively that the included angle required in the direction of rotating A to B is:
Referring to fig. 4, q A is the direction of a and q B is the direction of B in equation (1), and after calculating their angle, the force of a can be rotated by this angle into the direction of the force of B. When A and B collide, a relative acting force is generated, and the linear acceleration m A and the linear acceleration m B are used for representing the movement of A, B, and the relation between the two data is that:
Since the forces are mutually applied, when two devices collide, device a applies a force to B, which also applies a force to 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:
wherein, the left side in the formula (2) is multiplied by q B, and the right side is multiplied by q B And then combining the formula in the formula (1), and substituting the formula into the formula (3). The formula (3) represents a new linear acceleration value of a after rotating the motion of a onto the coordinate system of B. Based on the formulas (1) to (3), the motion correlation characteristics of A and B on the x, y and z three axes are calculated as follows:
/>
Wherein, For the motion correlation features of A and B in the x-axis,/>For the motion correlation features of A and B on the y-axis,/>Is a motion correlation characteristic of a and B in the z-axis.
S306: and splicing the second sensor statistical feature, the third sensor statistical feature, the first audio data feature, the second audio data feature and the motion correlation feature into a feature vector, inputting the feature vector into a preset second support vector machine, and obtaining the output vibration information of the second support vector machine.
In the invention, the second support vector machine is a support vector machine SVM with a radial basis function RBF kernel, the second support vector machine and the first support vector machine in the S202 are of the same type neural network model, the second support vector machine takes the same feature vector as training data to carry out machine learning, vibration information corresponding to each feature vector is trained and identified, convergence calculation is carried out on the second support vector machine 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, the second support vector machine is applied to terminal equipment, and the second support vector machine is used for detecting vibration information between two terminal equipment, wherein the vibration information is used for representing whether the first terminal equipment and the second terminal equipment vibrate in 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 two terminal devices are close to each other, the motion data between the two terminal devices has higher similarity, and the characteristic similarity 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 equipment and the second terminal equipment vibrate at the same frequency, the motion data between the first terminal equipment and the second terminal equipment is characterized to have higher similarity, and the similarity of the characteristics of the audio data respectively captured by the first terminal equipment and the second terminal equipment is also high, so that the first terminal equipment and the second terminal equipment can be determined to be mutually close to each other.
S309: 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 device and the second terminal device do not vibrate in the same frequency, determining that the first terminal device and the second terminal device are not close 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, or the first terminal device and the second terminal device vibrate in different frequencies, the first terminal device and the second terminal device are not collided at the same time, the similarity of motion data between the first terminal device and the second terminal device is low, the similarity of the characteristics of the respectively captured audio data is low, and the first terminal device and the second terminal device are not abutted against each other.
It can be understood that, in the same preset time range, there may be a plurality of groups of terminal devices that are close to each other, or that are separated after the two devices are carelessly collided, in order to avoid data transmission errors between the two terminal devices, it is necessary to determine that the two terminal devices are close to each other before data transmission is implemented.
In the data transmission method provided by the embodiment of the invention, after the first terminal equipment collides with the equipment and receives the second collision information sent by the second terminal equipment, whether the first terminal equipment and the second terminal equipment are close to each other needs to be further determined. And acquiring second sensor data and first vibration audio in the first collision information, and acquiring third sensor data and 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, extracting second linear acceleration data and second rotation vector data from each second sensor data; 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 motion correlation characteristics between the first terminal equipment and the second terminal equipment. Wherein the motion correlation features between the first terminal device and the second terminal device comprise motion correlation features in three axes, x, y and z. And the second support vector machine determines whether the first terminal equipment and the second terminal equipment vibrate at the same frequency according to the vibration information by identifying the vibration information between the first terminal equipment and the second terminal equipment. If yes, the two terminal devices are mutually abutted; if not, the two terminal devices are not close to each other.
In the method provided by the embodiment of the invention, after the first terminal equipment and the second terminal equipment are determined to collide and abut against each other, the data transmission connection between the first terminal equipment and the second terminal equipment is required to be established, so that the data transmission process between the first terminal equipment and the second terminal equipment is realized. After the first terminal device establishes the data transmission connection with the second terminal device, the first terminal device may specifically further include the following implementation process:
detecting whether the first terminal equipment has a data file to be transmitted or not;
if the first terminal equipment has the data file to be sent, sending the data file to the second terminal equipment;
If the first terminal equipment does not have the data files to be sent, a prompt window is popped up, and all the data files which can be transmitted in the first terminal equipment are displayed to a user through the prompt window.
It can be understood that after the first terminal device and the second terminal device are connected through data transmission, the transmission between the data can be automatically realized. After data transmission connection, the first terminal device detects whether a data file to be sent exists or not, for example, before the first terminal device collides with the devices, the first terminal device marks the data file to be sent, and after the first terminal device is connected with the second terminal device, the data file marked to be sent is directly sent without the need of the user to perform operation again. Similarly, if the second terminal device has a data file in a state 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 data files which can be transmitted in the device is displayed, and the user can select the data file to be sent in the file list.
Further, the first terminal device and the second terminal device can perform data transmission connection and data transmission through Bluetooth, wiFi, a short-range wireless communication technology or ultrasonic wave.
By applying the method provided by the embodiment of the invention, the first terminal equipment and the second terminal equipment are mutually abutted to realize data transmission, and the data file to be transmitted can be transmitted automatically during data transmission, so that the user experience is improved.
Based on the content of S107, the determining the 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 equipment number of the second terminal equipment, wherein the second collision time point is a collision time point when the second terminal equipment collides with each other;
judging whether the time difference between the first collision time point and the second collision time point is within a preset time difference value or not;
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 the first terminal device determines that the collision between devices occurs and starts the audio acquisition module, the first terminal device broadcasts the first verification information to the terminal devices within a preset range, and at the same time, the terminal device that collides with the first terminal device also broadcasts the second verification information within the preset range. When the first terminal equipment receives second verification information of the second terminal equipment, whether the first terminal equipment collides with the second terminal equipment cannot be determined, so that a second collision time point in the second verification information is acquired, 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 collision time point and the second collision time point are preliminarily determined to collide with the second terminal equipment within a preset time difference value. In order to further determine whether or not two devices are immediately together after collision, a main vibration object generating vibration needs to be agreed between the two devices. For the first terminal equipment, the second equipment number in the second verification information is compared with the first equipment number in the first verification information, and the terminal equipment with the larger equipment number is the main vibration object. If the main vibration object is the first terminal equipment, the first terminal equipment generates vibration in a first preset time period. If the main vibration object is the second terminal equipment, the second terminal equipment generates vibration in a first preset time period. After a first preset period of time, finally determining whether the two terminal devices are close to each other according to sensor data of the two terminal devices, vibration audio and the like.
It should be noted that the equipment number of the terminal equipment may be an IMEI, which 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 which collides with the first terminal equipment is preliminarily determined, so that the main vibration object is determined according to the related verification information, and whether the two terminal equipment are mutually abutted is further determined according to the related data obtained after the main vibration object vibrates.
The specific implementation process and derivative manner of the above embodiments are all within the protection scope of the present invention.
Corresponding to the method shown in fig. 1, the embodiment of the present invention further provides a data transmission device, which is used for implementing the method shown in fig. 1, where the data transmission device 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 device 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 between the first terminal devices based on each of the first sensor data;
a recording unit 503 configured to record a first collision time point at which an inter-device collision occurs when the first terminal device generates the inter-device collision;
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 an arbitrary 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 period of time, and first vibration audio acquired by the audio acquisition module;
a second transmitting unit 509 configured to transmit 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 510, 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 511 is 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 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 yes, recording a first collision time point, and starting an audio acquisition module. And sending the first verification information to the terminal equipment within the preset range, receiving the second verification information sent by other terminal equipment, and setting the terminal equipment sending the second verification information as the 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 each sensor changes in a first preset time period and first vibration audio acquired by the audio acquisition module. First collision information containing the second sensor data and the first vibration audio is generated and sent to the second terminal equipment. 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, data transmission is needed to be carried out between the first terminal equipment and the second terminal equipment, and data transmission connection is established to realize 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 by only closely connecting two terminal devices together, the operation is convenient, and the use experience of the user is improved.
In the apparatus provided by the embodiment of the present invention, the obtaining unit 501 includes:
the promoter unit is used for starting a detection application preset in the first terminal equipment;
The first acquisition subunit is used for acquiring the first sensor data of each sensor in the first terminal equipment by the detection application 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, and extract a first sensor statistical feature of each 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 judging subunit is used for judging whether the detection result contains a first identification bit or not; the first identification bit is identification information representing that the first terminal equipment collides with each other;
A first determining subunit, configured to determine that an inter-device collision occurs between the first terminal device if the detection result includes a first identification bit;
and the second determining subunit is used for determining that the first terminal equipment does not collide with the equipment if the detection result does not contain the first identification bit.
In the apparatus provided by 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 collides with each other;
A second judging subunit, configured to judge whether a 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 value;
a fourth determining subunit, configured to determine, when the first device number is greater than the second device number, that the first terminal device is the main vibration object;
and a fifth determining subunit, 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 obtaining subunit, configured to obtain each third sensor data and a second vibration audio that are included in the second collision information, and extract a third sensor statistical feature of each third sensor data and a second sensor statistical feature of each second sensor data by applying the detection application;
a third extraction subunit, configured to apply a preset short-time fourier transform STFT and mel-frequency cepstrum coefficient MFCC, and 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, configured to extract third linear acceleration data and third rotation vector data from each third sensor data corresponding to the second terminal device;
a calculating subunit, configured to calculate a motion correlation feature 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 feature, the third sensor statistical feature, the first audio data feature, the second audio data feature and the motion correlation feature into a feature vector, input the feature vector into a preset second support vector machine, and 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 abut against 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 do not abut against each other if the first terminal device and the second terminal device do not vibrate at the same frequency.
The device provided by the embodiment of the invention further comprises:
a data transmission unit, configured to detect whether the first terminal device has a data file to be sent; if the first terminal equipment has the data file to be sent, sending the data file to the second terminal equipment; if the first terminal equipment does not have the data files to be sent, a prompt window is popped up, and all the data files which can be transmitted in the first terminal equipment are displayed to a user through the prompt window.
The specific working process of each unit and subunit in the data transmission device disclosed in the above embodiment of the present invention may refer to the corresponding content in the data transmission method disclosed in the above embodiment of the present invention, and will not be described herein again.
The embodiment of the invention also provides a storage medium, which comprises stored instructions, wherein the equipment where the storage medium is located is controlled to execute the data transmission method when the instructions run.
The embodiment of the present invention further provides an electronic device, whose structural schematic diagram is shown in fig. 6, specifically including 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 the one or more processors 603, where the one or more instructions 602 perform the following operations:
Acquiring first sensor data of each sensor preset in the first terminal equipment;
judging whether the first terminal equipment collides with equipment or not based on the first sensor data;
recording a first collision time point when the first terminal equipment collides with equipment;
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;
Transmitting first collision information corresponding to the first terminal equipment to each terminal equipment in a preset range, wherein the first collision information comprises each 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, determining the terminal equipment sending the second collision information 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;
If the first terminal equipment and the second terminal equipment are close to each other, establishing data transmission connection with the second terminal equipment, and realizing data transmission with the second terminal equipment.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the elements and algorithm steps of the examples 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 solution. 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 (5)

1. A data transmission method, wherein the method is applied to a first terminal device, the method comprising:
Acquiring first sensor data of each sensor preset in the first terminal equipment;
Based on the respective first sensor data, determining whether the first terminal device has an inter-device collision includes: applying a detection application to extract first sensor statistical features of each first sensor data; acquiring a preset first support vector machine; inputting the statistical features 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 or not; the first identification bit is identification information representing that the first terminal equipment collides with each other; if the detection result contains the first identification bit, determining that the first terminal equipment collides with equipment; if the detection result does not contain the first identification bit, determining that the first terminal equipment does not collide with each other;
recording a first collision time point when the first terminal equipment collides with equipment;
Starting an audio acquisition module preset in the first terminal equipment;
transmitting 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 receiving second verification information sent by any terminal equipment, determining the terminal equipment sending the second verification information as second terminal equipment; the second verification information comprises a second collision time point and a second equipment number of the second terminal equipment; the second collision time point is a collision time point when the second terminal equipment collides with each other;
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;
The determining a main vibration object based on the first verification information and the second verification information includes: acquiring the second collision time point in the second verification information and a second equipment number of the second terminal equipment; judging whether the time difference between the first collision time point and the second collision time point is within a preset time difference value or not; 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; when the second equipment number is larger than the first equipment number, determining that the second terminal equipment is the main vibration object;
acquiring second sensor data of each sensor in a first preset time period and first vibration audio acquired by the audio acquisition module;
Transmitting first collision information corresponding to the first terminal equipment to the second terminal equipment, wherein the first collision information comprises the second sensor data and the first vibration audio;
When receiving second collision information sent by the second terminal device, judging whether the first terminal device and the second terminal device are close to each other or not based on the first collision information and the second collision information, including: acquiring each third sensor data and second vibration audio contained in the second collision information, and extracting a third sensor statistical feature of each third sensor data and a second sensor statistical feature 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 a preset short-time Fourier transform STFT and a 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 equipment; extracting third linear acceleration data and third rotation vector data from each third sensor data corresponding to the second terminal equipment; 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 feature, the third sensor statistical feature, the first audio data feature, the second audio data feature and the motion correlation feature into feature vectors, inputting the feature vectors into a preset second support vector machine, and obtaining output vibration information of 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; 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; the second collision information includes each of the third sensor data and the second vibration audio;
If the first terminal equipment and the second terminal equipment are close to each other, establishing data transmission connection with the second terminal equipment, and realizing data transmission with the second terminal equipment.
2. The method according to claim 1, wherein the acquiring the first sensor data of each sensor preset in the first terminal device includes:
starting the detection application preset in the first terminal equipment;
And the detection application is applied to acquire the first sensor data of each sensor in the first terminal equipment according to a preset time period.
3. The method of claim 1, further comprising, after establishing a data transmission connection with the second terminal device:
detecting whether the first terminal equipment has a data file to be transmitted or not;
if the first terminal equipment has the data file to be sent, sending the data file to the second terminal equipment;
If the first terminal equipment does not have the data files to be sent, a prompt window is popped up, and all the data files which can be transmitted in the first terminal equipment are displayed to a user through the prompt window.
4. A data transmission apparatus, the apparatus being applied to a first terminal device, the apparatus comprising:
A first acquiring unit, configured to acquire first sensor data of each sensor preset in the first terminal device;
a first judging unit configured to judge whether or not an inter-device collision occurs in the first terminal device based on each of the first sensor data;
the first judging unit includes: the device comprises a first extraction subunit, a second acquisition subunit, a first input subunit, a first judgment subunit, a first determination subunit and a second determination subunit;
The first extraction subunit is used for applying detection application to extract first sensor statistical characteristics of each piece of first sensor data;
the second acquisition subunit is used for acquiring a preset first support vector machine;
The first input subunit is configured to input statistical features of each first sensor into the first support vector machine, and obtain a detection result output by the first support vector machine;
The first judging subunit is configured to judge whether the detection result includes a first identifier bit; the first identification bit is identification information representing that the first terminal equipment collides with each other;
the first determining subunit is configured to determine that an inter-device collision occurs between the first terminal device if the detection result includes the first identification bit;
The second determining subunit is configured to determine that the first terminal device does not collide with the device if the detection result does not include the first identifier;
A recording unit configured to record a first collision time point at which an inter-device collision occurs when the first terminal device generates the inter-device 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;
a first determining unit, configured to determine, when second authentication information sent by an arbitrary terminal device is received, that the terminal device sending the second authentication information is a second terminal device; the second verification information comprises a second collision time point and a second equipment number of the second terminal equipment; the second collision time point is a collision time point when the second terminal equipment collides with each other;
a second determining unit configured to determine a main vibration object based on the first verification information and the second verification information, the main vibration object generating vibration, the main vibration object being the first terminal device or the second terminal device;
the second determination unit includes: the third acquisition subunit, the second judging subunit, the third determining subunit, the fourth determining subunit and the fifth determining subunit;
the third obtaining subunit is configured to obtain the second collision time point in the second verification information and a second device number of the second terminal device;
The second judging subunit is configured to judge whether a time difference between the first collision time point and the second collision time point is within a preset time difference value;
the third determining subunit is 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 value;
the fourth determining subunit is 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;
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;
the second acquisition unit is used for acquiring second sensor data of each sensor in a first preset time period and the first vibration audio acquired by the audio acquisition module;
A second sending unit, configured to send first collision information corresponding to the first terminal device 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 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 when receiving the second collision information sent by the second terminal device;
The second judging unit includes: the fourth acquisition subunit, the third extraction subunit, the fourth extraction subunit, the fifth extraction subunit, the calculation subunit, the second input subunit, the third judgment subunit, the sixth determination subunit and the seventh determination subunit;
The fourth obtaining subunit is configured to obtain each third sensor data and a second vibration audio that are included in the second collision information, and apply the detection application to extract a third sensor statistical feature of each third sensor data, and a second sensor statistical feature of each second sensor data; the second collision information includes each of the third sensor data and the second vibration audio;
The third extraction subunit is configured to apply a preset short-time fourier transform STFT and mel-frequency cepstrum coefficient MFCC, and extract a first audio data feature corresponding to the first vibration audio and a second audio data feature corresponding to the second vibration audio;
the fourth extraction subunit is configured to extract second linear acceleration data and second rotation vector data from each second sensor data corresponding to the first terminal device;
The fifth extraction subunit is configured to extract third linear acceleration data and third rotation vector data from each third sensor data corresponding to the second terminal device;
The calculating subunit is configured to calculate a motion correlation feature 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 feature, the third sensor statistical feature, the first audio data feature, the second audio data feature, and the motion correlation feature into a feature vector, input the feature vector into a preset second support vector machine, and obtain output vibration information of the second support vector machine;
The third judging subunit is configured to judge whether the first terminal device and the second terminal device vibrate at the same frequency based on the vibration information;
the sixth determining subunit is configured to determine that the first terminal device and the second terminal device abut against each other if the first terminal device and the second terminal device vibrate at the same frequency;
The seventh determining subunit is configured to determine that the first terminal device and the second terminal device do not abut against each other if the first terminal device and the second terminal device do not vibrate at the same frequency;
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 mutually close to each other, so as to realize data transmission with the second terminal equipment.
5. The apparatus of claim 4, wherein the first acquisition unit comprises:
the promoter unit is used for starting a detection application preset in the first terminal equipment;
The first acquisition subunit is used for acquiring the first sensor data of each sensor in the first terminal equipment by the detection application according to a preset time period.
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 CN113542393A (en) 2021-10-22
CN113542393B true 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)

Families Citing this family (1)

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

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (6)

* 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
CN103916852B (en) * 2012-12-28 2018-04-27 联想(北京)有限公司 A kind of data transmission method and a kind of mobile terminal
CN103345304B (en) * 2013-07-05 2016-08-31 百度在线网络技术(北京)有限公司 The sensor-based timesharing of mobile device triggers the method and apparatus carrying out operating
CN106375931A (en) * 2015-07-24 2017-02-01 阿里巴巴集团控股有限公司 Interaction method, interaction device and server
US10926727B2 (en) * 2017-10-18 2021-02-23 Qirfiraz Siddiqui Smart surface for detecting collision forces
CN110667506B (en) * 2019-10-18 2022-01-04 广州斯沃德科技有限公司 Collision recognition method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN113542393A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
RU2763392C1 (en) Voice control method, wearable device and terminal
US10706850B2 (en) Location based voice association system
CN106055088B (en) The air of interactive wearable device writes and gesture system
US10353495B2 (en) Personalized operation of a mobile device using sensor signatures
US20100040293A1 (en) Kinematic Based Authentication
US11783335B2 (en) Transaction confirmation and authentication based on device sensor data
US20140379354A1 (en) Method, apparatus and system for payment validation
CN110225002B (en) Business handling method and related product
KR101581632B1 (en) Method for determining contact between terminals, computer program and application therefor
US20220120885A1 (en) Electronic device for recognizing object, and operating method thereof
CN113542393B (en) Data transmission method and device
JP6607111B2 (en) Avatar robot connection management system
CN108600559B (en) Control method and device of mute mode, storage medium and electronic equipment
US20230197084A1 (en) Apparatus and method for classifying speakers by using acoustic sensor
Wang et al. WearID: Wearable-assisted low-effort authentication to voice assistants using cross-domain speech similarity
CN113448536B (en) Equipment interaction method and device
CN112863523B (en) Voice anti-counterfeiting method and device, terminal equipment and storage medium
CN113472945B (en) Data transmission method and system based on collision detection and mobile equipment
CN112954659A (en) Method and device for connecting Bluetooth devices, electronic device and storage medium
KR20200016111A (en) Audio information collecting apparatus and control method thereof
US12015663B1 (en) Authenticating users using localization of speech or correlations in audio data
US11696130B2 (en) Mobile phone authentication method using implicit authentication
CN114098387B (en) Mirror adjustment method, device, mirror, electronic apparatus, and computer-readable medium
US20220309394A1 (en) Electronic device and operation method of the same
KR101974073B1 (en) Method of reconstructing groud surface for mixed reality

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