CN113301539A - Data transmission method, electronic device and computer storage medium - Google Patents

Data transmission method, electronic device and computer storage medium Download PDF

Info

Publication number
CN113301539A
CN113301539A CN202110766247.4A CN202110766247A CN113301539A CN 113301539 A CN113301539 A CN 113301539A CN 202110766247 A CN202110766247 A CN 202110766247A CN 113301539 A CN113301539 A CN 113301539A
Authority
CN
China
Prior art keywords
terminal
channel
wireless network
encrypted signal
module chip
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110766247.4A
Other languages
Chinese (zh)
Other versions
CN113301539B (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.)
BOE Technology Group Co Ltd
Beijing BOE Technology Development Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Beijing BOE Technology Development 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 BOE Technology Group Co Ltd, Beijing BOE Technology Development Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110766247.4A priority Critical patent/CN113301539B/en
Publication of CN113301539A publication Critical patent/CN113301539A/en
Application granted granted Critical
Publication of CN113301539B publication Critical patent/CN113301539B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The data transmission method, the electronic equipment and the computer storage medium provided by the present disclosure are applied to the technical field of computers, and the method comprises the following steps: acquiring a first motion value of the first motion sensor; under the condition that the first motion value meets a first preset condition, controlling the first wireless network module chip to transmit an encrypted signal with a second terminal through the first channel; establishing wireless network connection based on a first channel between the second terminal and the second terminal according to the encrypted signal and a first channel communication protocol; sending the data to be transmitted corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel; wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol. The method and the device reduce the influence of a single channel on data transmission between the terminals and improve the stability of the data transmission between the terminals.

Description

Data transmission method, electronic device and computer storage medium
Technical Field
The present disclosure relates to computer technologies, and in particular, to a data transmission method, an electronic device, and a computer storage medium.
Background
With the increasing development of terminal devices, the use of terminal devices by users is no longer limited to the single use of a single terminal device, and the need for the mutual cooperation between a plurality of terminal devices is increasing.
However, if the terminal devices need to be used in cooperation with each other, data interaction between the terminal devices is required to be performed through a network, and the terminal devices in the related art can only perform data transmission through an inherent network connection mode, and if the network connection mode is limited or fails, the stability of data transmission between the terminal devices will be greatly affected.
Disclosure of Invention
The disclosure provides a data transmission method, an electronic device and a computer storage medium.
The present disclosure provides a data transmission method, applied to a first terminal, where the first terminal includes a first motion sensor and a first wireless network module chip, where channels supported by the first wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, and the method includes:
acquiring a first motion value of the first motion sensor;
under the condition that the first motion value meets a first preset condition, controlling the first wireless network module chip to transmit an encrypted signal with a second terminal through the first channel;
establishing wireless network connection based on a first channel between the second terminal and the second terminal according to the encrypted signal and a first channel communication protocol;
sending the data to be transmitted corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel;
wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
The present disclosure provides another data transmission method applied to a second terminal including a second motion sensor and a second wireless network module chip, wherein channels supported by the second wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, the method including:
acquiring a second motion value of the second motion sensor;
under the condition that the second motion value meets a second preset condition, controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel;
establishing wireless network connection based on a first channel between the first terminal and the first terminal according to the encrypted signal and a first channel communication protocol;
receiving data to be transmitted sent by the first terminal through the first channel and/or the second channel;
wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
The present disclosure provides a data transmission apparatus applied to a first terminal, the first terminal including a first motion sensor, a first wireless network module chip, wherein channels supported by the first wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, the apparatus including:
a first detection module configured to acquire a first motion value of the first motion sensor;
the first connection module is configured to control the first wireless network module chip to transmit an encrypted signal with a second terminal through the first channel under the condition that the first motion value meets a first preset condition;
establishing wireless network connection based on a first channel between the second terminal and the second terminal according to the encrypted signal and a first channel communication protocol;
the first transmission module is configured to send data to be transmitted corresponding to a current data selection interface to the second terminal through the first channel and/or the second channel;
wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
The present disclosure provides another data transmission apparatus applied to a second terminal including a second motion sensor, a second wireless network module chip, wherein channels supported by the second wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, the apparatus including:
a second detection module configured to acquire a second motion value of the second motion sensor;
the second connection module is configured to control the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition;
establishing wireless network connection based on a first channel between the first terminal and the first terminal according to the encrypted signal and a first channel communication protocol;
a second transmission module, configured to receive data to be transmitted sent by the first terminal through the first channel and/or the second channel;
wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
The present disclosure provides an electronic device, characterized by comprising: the device comprises a motion sensor, a wireless network module chip, a circuit board, a memory and a processor;
the memory having computer readable code stored therein;
one or more of the processors, the electronic device performing the data transfer method when the computer readable code is executed by the one or more processors.
Optionally, the motion sensor and the wireless network module chip are fixedly arranged on the circuit board.
Optionally, the method further comprises: the display screen, the circuit board passes through block mechanism, sets up in the one side of keeping away from the display surface of display screen.
Optionally, a computer program of the data transmission method as described is stored therein.
The present disclosure provides a computer storage medium having stored thereon instructions that, when executed by a processor, cause the processor to perform a data transmission method as described.
According to the data transmission method, the electronic device and the computer storage medium, the first terminal is triggered to establish wireless network connection with the second terminal through the first channel based on the motion value detected by the motion sensor in the first terminal, so that the first channel and/or the second channel can be selected to carry out data transmission according to actual conditions, the influence of a single channel on data transmission between the terminals is reduced, and the stability of the data transmission between the terminals is improved.
The foregoing description is only an overview of the technical solutions of the present disclosure, and the embodiments of the present disclosure are described below in order to make the technical means of the present disclosure more clearly understood and to make the above and other objects, features, and advantages of the present disclosure more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained according to the drawings without creative efforts for those skilled in the art.
Fig. 1 schematically illustrates a structural diagram of a data transmission system provided by some embodiments of the present disclosure;
fig. 2 schematically illustrates a flow chart of a data transmission method provided by some embodiments of the present disclosure;
fig. 3 schematically illustrates one of the effect diagrams of a data transmission method provided by some embodiments of the present disclosure;
fig. 4 schematically illustrates a second effect diagram of a data transmission method provided by some embodiments of the present disclosure;
fig. 5 schematically illustrates one of the flow diagrams of another data transmission method provided by some embodiments of the present disclosure;
fig. 6 schematically illustrates a third effect diagram of a data transmission method provided by some embodiments of the present disclosure;
fig. 7 schematically illustrates a second flow chart of another data transmission method provided in some embodiments of the present disclosure;
fig. 8 schematically illustrates a fourth effect diagram of a data transmission method provided by some embodiments of the present disclosure;
fig. 9 schematically illustrates a third flow chart of another data transmission method provided by some embodiments of the present disclosure;
fig. 10 schematically illustrates a fourth flowchart of another data transmission method provided by some embodiments of the present disclosure;
fig. 11 schematically illustrates a fifth flowchart of another data transmission method provided by some embodiments of the present disclosure;
fig. 12 schematically illustrates a sixth flowchart of another data transmission method provided by some embodiments of the present disclosure;
fig. 13 schematically illustrates a flow chart of yet another data transmission method provided by some embodiments of the present disclosure;
fig. 13 schematically illustrates one of the flow diagrams of still another data transmission method provided by some embodiments of the present disclosure;
fig. 14 schematically illustrates a second flowchart of another data transmission method provided by some embodiments of the present disclosure;
fig. 15 schematically illustrates a third flowchart of another data transmission method provided by some embodiments of the present disclosure;
fig. 16 schematically illustrates a fifth effect diagram of a data transmission method provided by some embodiments of the present disclosure;
fig. 17 schematically illustrates a fourth flowchart of another data transmission method provided by some embodiments of the present disclosure;
fig. 18 schematically illustrates a structural diagram of a data transmission device according to some embodiments of the present disclosure;
fig. 19 schematically illustrates a structural diagram of another data transmission apparatus provided in some embodiments of the present disclosure;
FIG. 20 schematically illustrates a block diagram of an electronic device for performing a method according to some embodiments of the present disclosure;
fig. 21 schematically illustrates a memory unit for holding or carrying program code implementing methods according to some embodiments of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The terminology used in the embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in the disclosed embodiments and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items. The character "/" herein generally identifies that the pre-and post-association objects are in an "or" relationship.
It should be understood that although the embodiments of the present disclosure may employ the belongings of the first, second, etc. to describe various messages, requests, and terminals, these messages, requests, and terminals should not be limited to these belongings. These belongings are only used to distinguish messages, requests and terminals from each other. For example, a first terminal may be referred to as a second terminal, and similarly, a second terminal may also be referred to as a first terminal, without departing from the scope of embodiments of the present disclosure.
Fig. 1 schematically illustrates a structural diagram of a data transmission system 10 provided by the present disclosure, and the data transmission system includes: first terminal 11, second terminal 12, first terminal 11 includes: the first processor 111, the first wireless network module chip 112, the first motion sensor 113, and the first display screen 114, and the second terminal 12 includes: a second processor 121, a second wireless network module chip 122, a second motion sensor 123, and a second display screen 124.
The first terminal and the second terminal in the embodiment of the disclosure may be electronic devices such as a mobile phone, a tablet computer, a notebook computer, and a smart television, which have a wireless and/or wired data transmission function, a data storage function, a data processing function, and an image display function.
Optionally, the first terminal may be a terminal device with a smaller display screen size, such as a mobile phone, a tablet computer, a notebook computer, and a smart watch, and the corresponding second terminal may be a smart television, a projection device, and the like, and the display device with the larger display screen size is compared with the display device with the first terminal, so that the first terminal sends data to the second terminal, and screen projection display of the data is realized on the display screen of the second terminal. Of course, the description is only an example, the size of the display screen of the second terminal may also be smaller than or equal to that of the second terminal, and the screen projection display of data between terminal devices may also be implemented, which may be specifically set according to actual requirements, and is not limited herein.
The first wireless network module chip 112 and the second wireless network module chip 122 have a wireless signal communication function, and the implementation manner of hardware thereof is not particularly limited, as long as the wireless network module chip having the wireless signal communication function can implement the scheme of the embodiment of the present disclosure. Alternatively, a short-range wireless communication technology chip or a long-range wireless communication technology chip, such as a Wi-Fi chip, a low power bluetooth chip, a ZigBee chip, an RFID chip, an infrared chip, or the like, may be employed.
Wherein, the first wireless network module 112 in the first terminal 11 and the second wireless network module 122 in the second terminal can perform network communication based on the first channel of the peer-to-peer network mode and/or the second channel of the centralized network mode. The peer-to-peer network mode is different from the C/S of a special Server in the topological structure, a special Server is not arranged in the peer-to-peer network structure, each connecting device can play the role of a client and also can play the role of a Server in the network mode, a star network topological structure is generally adopted, the simplest peer-to-peer network is two computers which are directly connected by a twisted pair, the number of the computers is usually not more than 10, and the peer-to-peer network has the characteristic of relatively simple network structure. The centralized network mode is a network in a star or tree topology, wherein all information passes through a central node switch, and various links originate from the central node switch, so that each equipment node needs to transmit data through the central node switch.
Wireless communication refers to a communication method in which electromagnetic waves propagate through space to transmit information. The wireless communication uses electromagnetic waves, and the frequency of the electromagnetic waves can be divided into different frequency bands, wherein the frequency band refers to a frequency range of continuous electromagnetic waves. The wireless channel is a visual analogy of a path between a transmitting end and a receiving end in wireless communication, for radio waves, the radio waves are transmitted from the transmitting end to the receiving end, a physical connection does not exist between the radio waves, the propagation path of the radio waves may be more than one, and in order to visually describe the work between the transmitting end and the receiving end, an invisible path connection between the radio waves and the receiving end can be imagined, and the connection path is called a channel. The channel is further divided on a frequency band basis. Each frequency band can be divided into a plurality of channels, and the plurality of channels can be completely overlapped, partially overlapped or not overlapped, for example, for the frequency band of the frequency range of 2.4GHZ to 2.8GHZ, the frequency bands can be divided into 2.4 to 2.5GHZ channels, 2.5 to 2.6GHZ channels, 2.6 to 2.7GHZ channels and 2.7 to 2.8GHZ channels.
In the embodiment of the present disclosure, the first channel and the second channel refer to channels for communication between terminals, and the first channel and the second channel may be the same or different, that is, the operating frequency bands of the two channels may be completely overlapped, partially overlapped, or not overlapped. Alternatively, the transmission of signals via the first channel and the second channel may also be realized via different communication ports, e.g. electromagnetic waves of different frequency ranges may be transmitted via different numbered ports.
Further, the embodiment of the present disclosure implements data transmission between the first terminal 11 and the second terminal 12 by using a first channel based on a peer-to-peer network mode and/or a second channel based on a centralized network mode, where the first channel and the second channel can simultaneously receive and transmit data signals with the same or different frequencies, and the two channels are complementary to each other to interfere with each other, so that the network speed of data transmission between the terminals is higher; of course, the first channel or the second channel may be used alone to receive and transmit the data signal, and when any one of the channels is unavailable or has a slow transmission speed, another available channel or another channel with a fast transmission speed is used to transmit data, so as to avoid the situation that data transmission cannot be performed between terminals due to the unavailability of a single channel, thereby improving the stability of data transmission between terminals.
In the embodiment of the present disclosure, the first motion sensor 113 detects a first motion value of the first terminal 11, and actively or passively sends the first motion value to the first processor 111, the first processor 111 controls the first wireless network module chip 112 to perform network communication with the second wireless network module chip 122 in the second terminal 12 based on the first channel and/or the second channel by executing program codes of the steps of the data transmission method of the present disclosure if the first motion value satisfies a first preset condition, and sends data to be transmitted in the first terminal 11 to the second terminal 12 if the second motion sensor 123 of the second terminal 12 detects that the second motion value also satisfies a second preset condition.
The second terminal 12 displays the data to be transmitted received by the second wireless network module chip 112 through the second display screen 124, so as to implement the screen projection of the data from the first terminal 11 to the second terminal 12.
Optionally, the first display screen 114 of the first terminal 11 may be a touch screen, and the first terminal 11 may receive a touch operation of a user through the first display screen 114 to control a data transmission process and a data projection display process with the second terminal 12. Of course, the second display screen 124 of the second terminal 12 may also be a touch screen, and may also have the functions of receiving touch operations and controlling the data transmission process and the data projection screen display process between the terminals according to the touch operations.
In the embodiment of the present disclosure, because the network structure of the peer-to-peer network mode is simple, the peer-to-peer network mode is selected as an internal network connection mode between devices, for example, based on bluetooth connection, wireless hotspot connection, internal local area network connection, etc., the network transmission speed based on the peer-to-peer network mode is only affected by the network environment of the device itself and hardware configuration, and because the data transmission process has intermediate devices other than the transmission device, the probability of interception of the transmission data by other devices is smaller, and the security of data transmission can be ensured; for the centralized network mode, the network connection mode of the large external lan is selected, for example: the network transmission based on the centralized network mode is not only influenced by the network environment and hardware configuration of the device, but also influenced by the load, device state and network bandwidth from the intermediate device, but because the channel based on the centralized network mode is usually maintained by a special person and has the characteristic of high popularity, the stability of the channel is higher compared with that based on the peer-to-peer network mode, and stable data communication between terminals can be ensured.
Fig. 2 schematically shows a flowchart of a data transmission method provided by the present disclosure, which is applied to a first terminal including a first motion sensor and a first wireless network module chip, wherein channels supported by the first wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, and the method includes:
step 101, a first motion value of the first motion sensor is obtained.
In the disclosed embodiment, the first motion sensor is a sensor that can convert motion into an electrical signal, and the electrical signal is the first motion value. For example, when the first motion sensor is a speed sensor, the speed sensor may detect a motion condition of the first terminal by using a photoelectric element or a driving element, so as to convert the detected motion condition into a first motion value in the form of an electrical signal; when the first motion sensor is an acceleration sensor, the acceleration sensor measures the received inertial force in the motion process through the elastic element and the sensitive element so as to convert the acceleration into a first motion value in the form of an electric signal, when the first motion sensor is a direction sensor, the direction sensor can detect the motion direction through the piezoelectric effect so as to convert the motion direction into the first motion value, of course, the first motion sensor can also be a gyroscope, a level meter and the like, or a combination of multiple motion sensors, and as long as the sensor capable of detecting the motion condition of an object is suitable for the embodiment of the disclosure, the embodiment is not limited herein.
The first motion sensor in the first terminal can detect the motion condition of the first terminal in real time, for example, when a user shakes, collides or taps a mobile phone, a tablet or other terminal device, the first motion sensor detects a first motion value generated by the current motion of the first terminal. Of course, the first terminal may start the detection passively according to the user operation or actively according to the system device.
And step 102, controlling the first wireless network module chip to transmit an encrypted signal with the second terminal through the first channel under the condition that the first motion value meets a first preset condition.
In this embodiment of the disclosure, the first preset condition is a condition that needs to be met when the first terminal and the second terminal are triggered to perform data transmission, for example, the first motion value is greater than or less than a motion threshold, or the first motion value is similar to motion values of other external terminals, and the like, which may specifically be a default setting of a system, or may be a setting by a user, and may be set according to an actual requirement, where this is not limited.
The first terminal confirms that a user needs to perform data transmission with the second terminal when detecting that a first motion value of the first terminal accords with a first preset condition through the first motion sensor, and at the moment, if the first terminal is detected not to be connected with the second terminal on the basis of a first channel originally, that is, internal network connection based on an equality network mode is not established, an encryption signal can be transmitted to the second terminal through the first channel, and the encryption signal is used for subsequently establishing wireless network connection based on the first channel with the second terminal. It is understood that, since the first channel is an internal network based on the peer-to-peer network mode, a network connection based on the first channel is not necessarily established between the first terminal and the second terminal, and the network connection based on the first channel needs to be detected and completed before data transmission is performed.
And 103, establishing a wireless network connection based on the first channel with the second terminal according to the encrypted signal and a first channel communication protocol, wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
In the disclosed embodiment, the encrypted signal may include encrypted identity information and authentication information of the first terminal and/or the second terminal, and the like. Specifically, the wireless communication protocol refers to rules and conventions that must be followed to complete communication between terminals. In order to ensure the data security and transmission quality in the wireless transmission of the terminal, the wireless communication protocol plays a crucial role. The first channel communication protocol is a transmission protocol for data communication between the first terminal and the external terminal, and includes a standard communication protocol for transmitting data and an encryption communication protocol for encrypting and decrypting the transmitted data. The encrypted communication protocol may be a communication protocol configured by the first terminal before shipment, and may be implemented by using an encryption algorithm of a public key and a private key, for example. Only between two communication parties with the same encryption communication protocol, encryption and decryption operations can be carried out on transmission data, so that terminal identity authentication is realized, and wireless network connection is established. However, since the encryption and decryption operations cannot be performed on the transmission data between two communication parties without the same encryption communication protocol, a wireless network connection cannot be established.
When the first terminal receives an encrypted signal sent by the second terminal, the first terminal analyzes the encrypted signal based on a standard communication protocol and then encrypts the encrypted signal through an encrypted communication protocol to obtain a decrypted signal; the first terminal encrypts a plaintext signal to be sent through an encryption communication protocol and then packages the plaintext signal through a standard communication protocol so as to send the obtained encrypted signal to the second terminal. The first terminal and the second terminal pass through a first channel, encrypted signals containing mutual identity information and verification information are submitted to a counterpart for verification, and after the first terminal and the second terminal pass mutual identity authentication, wireless communication connection based on the first channel between the first terminal and the second terminal can be established.
And 104, sending the data to be transmitted corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel.
In the embodiment of the disclosure, the data to be transmitted is data or a data identifier displayed on a current data selection interface by a first terminal, and a selection input of a user for the data or the data identifier is received, so that the data or the data identifier corresponding to the data specified by the selection input is determined as the data to be transmitted, or the data corresponding to a display interface of a first display of the first terminal is obtained and determined as the data to be transmitted when it is detected that a first motion value of the first terminal meets a first preset condition. Optionally, since the second channel is an external network based on a centralized network mode, the network transmission data is affected by the current load and bandwidth of the external network, and the network transmission speed is unstable, and the first channel is an internal network based on a peer-to-peer network mode, the network transmission speed can receive less external interference, and is more stable and safer than the network transmission speed of the second channel in the data transmission process, so that in the case that both the first channel and the second channel are available, performing data transmission between the first terminal and the second terminal through the first channel and the second channel at the same time can reduce the influence of external interference on the overall data transmission speed of a certain channel as much as possible, and improve the efficiency of data transmission. Optionally, when the first channel or the second channel is unavailable or the data transmission speed of a certain channel is too low, data transmission may be performed only through a currently available channel or a channel with a relatively high data transmission speed in the first channel or the second channel, so that it may also be avoided that data transmission between the first terminal and the second terminal is not possible due to unavailability of a certain channel or too low data transmission speed. And when only the first channel is adopted for data transmission, the first channel is based on the peer-to-peer network mode, and the transmission data does not pass through intermediate forwarding equipment except the first terminal and the second terminal, so that the risk that the transmission data is intercepted by other equipment can be reduced, and the safety of data transmission can be improved. Of course, this is only an exemplary illustration, and how to specifically select the first channel and the second channel in the actual data transmission process may be set according to actual requirements, which is not limited herein.
Illustratively, referring to fig. 3, the embodiment of the present disclosure provides a manner in which a first terminal and a second terminal perform data transmission through a contact motion, wherein the first terminal displays image content in a process a1, and the second terminal does not display the image content of the first terminal, in a process a2, the first terminal makes the first terminal and the second terminal both perform motion due to contact by contacting with the second terminal, so as to trigger the first terminal and the second terminal to perform data communication, the first terminal transmits the displayed image content to the second terminal, so that in a process A3, the second terminal displays the same image content as the first terminal, and a process of data transmission and screen projection display from the first terminal to the second terminal is implemented.
Illustratively, referring to fig. 4, the embodiment of the present disclosure provides a manner in which a first terminal and a second terminal perform screen projection through a contactless motion, wherein the first terminal displays image content in a process B1, and the second terminal does not display the image content of the first terminal, and in a process B2, the first terminal and the second terminal perform contactless motion respectively to trigger the first terminal and the second terminal to perform data communication, the first terminal transmits the displayed image content to the second terminal, and the second terminal displays the same image content as the first terminal, so that the processes of performing data transmission and screen projection display on the first terminal to the second terminal are implemented.
According to the method and the device for the wireless network connection, the first terminal is triggered to establish the wireless network connection with the second terminal through the first channel based on the motion value detected by the motion sensor in the first terminal, the adopted triggering mode is convenient and simple, the complexity of screen projection operation of a user is reduced, and therefore the method and the device can be suitable for actual conditions to select the first channel and/or the second channel to carry out data transmission, the influence of a single channel on data transmission between terminals is reduced, and the stability of the data transmission between the terminals is improved.
Referring to fig. 5, a flow chart of another data transmission method provided by the present disclosure is schematically shown, and the method is applied to a first terminal, where the first terminal includes a first motion sensor and a first wireless network module chip, where channels supported by the first wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, and the method includes:
step 201, a first motion value of the first motion sensor is obtained.
This step can refer to the detailed description of step 101, which is not repeated herein.
Optionally, before the step 201, the method may further include: and under the condition that the first wireless network module chip is in a state of forbidding data communication through the first channel or in a state of forbidding wireless network connection through the first channel, executing a step of detecting whether the first motion value meets a first preset condition.
Optionally, the first terminal further includes: a first display screen; prior to the step 201, the method further comprises: detecting whether the first display screen is in a lighting state; if yes, executing the step of acquiring the first motion value of the first motion sensor; and if not, stopping executing the step of acquiring the first motion value of the first motion sensor.
In the embodiment of the present disclosure, the lighting state means that the display module of the first display screen is in a working state and emits light to the outside. It will be appreciated that the first display, when illuminated, indicates that the first terminal is being used by a user and when not illuminated, indicates that the first terminal is not being used by a user. If the first display screen is in a lighting state, the first motion sensor can be controlled to continuously monitor the first motion value of the first terminal in real time. In this disclosure, optionally, in order to reduce resources consumed by the operation of the first motion sensor, the first motion sensor may be set to be in a turned-off state when the first display screen is not in a lit state, so as to reduce resources required by the operation of the first motion sensor, and avoid resource waste of the first motion sensor as much as possible. Optionally, the first motion sensor may be set to be in an on state when the first display screen is not in the lit state, but the step of controlling the first wireless network module chip to transmit the encrypted signal with the second terminal through the first channel is not performed when it is detected that the first motion value of the first motion sensor meets the first preset condition; and when the first display screen is in a lighting state, setting the first motion sensor to be in a starting state, and executing a step of controlling the first wireless network module chip to transmit an encrypted signal with the second terminal through the first channel under the condition that the first motion value of the first motion sensor is detected to accord with a first preset condition.
In the embodiment of the present disclosure, if the first terminal has previously established a wireless network connection based on the first channel with the second terminal, the first wireless network module chip is in a state of allowing data communication through the first channel or in a state of allowing the wireless network connection through the first channel at this time without establishing a connection with the second terminal by exchanging encrypted signals again. If the first wireless network module chip is in a state of prohibiting data communication through the first channel or in a state of prohibiting wireless network connection through the first channel, it indicates that data transmission between the first wireless network module chip of the first terminal and the second terminal temporarily cannot be performed through the first channel, and at this time, it is necessary to further establish wireless network connection based on the first channel through encrypted signal interaction between the terminals.
Step 202, when the first motion value meets a first preset condition, controlling the first radio network module chip to transmit an encrypted signal with the second terminal through the first channel within a first time period after a first time, where the first time is a time when the first motion value is detected to be greater than a first threshold.
In this embodiment of the disclosure, the first time is a time when the first motion value is detected to be greater than a first threshold, and the first threshold is a basis for determining whether the first motion value of the first terminal is required by the user to perform data transmission between the first terminal and the second terminal, so if the first motion value is greater than the first threshold, it is determined that the first terminal needs to perform data transmission with the second terminal, and at this time, the first terminal continuously sends the encrypted signal to the second terminal to request to establish a wireless communication connection with the second terminal in a first time period after the time when the first motion value is detected to be greater than the first threshold.
For example, when the first motion value is an acceleration, the first threshold may be an acceleration threshold, and when the user shakes the first terminal to a certain extent, the acceleration detected by the first motion sensor will be the acceleration threshold, and the processor in the first terminal will perform the process of sending the encrypted signal to the second terminal in a first time period after determining that the acceleration is greater than a first time of the acceleration threshold. When the first motion value is a speed, the first threshold may also be a speed threshold, and the shake degree of the user for the first terminal may also be detected, which may be specifically set according to an actual requirement, and is not limited here.
Optionally, after the first motion value of the first terminal is greater than the first threshold, the first terminal is turned on based on the data transmission function of the first channel, and a first time period is set for the turned-on function, that is, the first channel-based communication connection with the external terminal can be established only within the first time period, and the first channel-based communication connection with other external terminals cannot be established outside the first time period. According to the embodiment, the error connection between the first terminal and the external terminal caused by the fact that other external terminals send the communication connection request or the other external terminals trigger the communication connection request by mistake when the user of the first terminal does not want to perform data transmission operation can be avoided.
Optionally, the first time period is less than or equal to 4 s. For example, it may be 1s, 2s, 3s, 4 s. For the situation that the first time period is less than or equal to 4s, the user wants to trigger the data transmission function when the first terminal is triggered to reach the first preset condition, the first time period is not set to be too long, and the situation that when the user of the first terminal does not want to perform data transmission operation, due to the fact that other external terminals send communication connection requests or the other external terminals trigger the communication connection requests by mistake, the first terminal and the external terminals are connected by mistake, and the use experience of the user is affected can be avoided.
Optionally, the first time period is greater than or equal to 1s, for example, 1s, 2s, 3s, etc. may be selected. For the situation that the first time period is greater than or equal to 1s, the two terminals can be guaranteed to have knocking actions or the two terminals are not in contact but shake simultaneously, the moments of encrypted signals transmitted by the two terminals are inconsistent, time difference exists, and due to the fact that the two terminals are set to be started for a period of time to transmit the encrypted signals, successful connection of the two terminals based on the wireless network of the first channel can be guaranteed. In the case that the first time period is less than 1s, the time period for opening is too short, so that it is not easy to successfully transceive the encrypted signal based on the first channel to establish the connection of the wireless network, and the data transmission function between the two cannot be opened.
Optionally, the step 202 may include: and sending a first starting signal to the first wireless network module chip under the condition that the first motion value meets a first preset condition, wherein the first starting signal is used for indicating the first wireless network chip to transmit an encryption signal with the second terminal by using the first channel.
In the embodiment of the present disclosure, since the first wireless network module chip may cause resource waste due to continuous invalid standby, the first wireless network module chip may be in a closed state when data transmission is not required, and when the first motion sensor detects that the first motion value is lower than the first preset condition, the first wireless network module chip is started and transmits the encryption signal with the second terminal by sending the first start signal to the first wireless network module chip, so that resource consumption of the first wireless network module chip may be reduced. Of course, the second wireless network module in the second terminal may also reduce resource consumption of the second wireless network module by the way in the embodiment of the present disclosure.
Optionally, before the step 202, the method may include: under the condition that the first motion value meets a first preset condition, controlling the first wireless network module chip to start the authority of encrypted signal transmission through the first channel and the second terminal; and in the first time period, if the encrypted signal is not transmitted to the second terminal through the first channel, controlling the first radio network module chip to stop utilizing the first channel to carry out data communication.
In the embodiment of the disclosure, the first terminal triggers a transmission permission of the first wireless network chip for transmitting encrypted data between the first signal and the second terminal when the first motion value meets a first preset condition, and if the transmission permission of the encrypted data between the first wireless network chip and the second terminal is not detected within a first time period after the transmission permission is started, it indicates that the connection between the first terminal and the second terminal based on the first channel fails, and the first terminal stops performing data communication between the first channel and the second terminal. In practical applications, a user may not successfully connect the first terminal and the second terminal based on the first channel by tapping the first terminal for the first time, for example, if the motion value of the display does not exceed the threshold value, the first channel transmission function is not started, and the first channel transmission function and the second channel transmission function are not connected, the user may perform communication connection with the second terminal based on the first channel by tapping for multiple times, and if the connection is not successful after each tapping, if data communication is not stopped by using the first channel, the next wireless network connection process between the first channel and the second terminal cannot be triggered by detecting the first motion value, so that in the present embodiment, after encrypted signal transmission based on the first channel is started, if signal transmission based on the first channel is not detected by the first terminal and the second terminal in the first time period, data communication by using the first channel may be stopped, so that the user can reconnect with the first terminal again by tapping the first terminal. Therefore, the first terminal and the second terminal can efficiently carry out the next connection process after the connection fails based on the first channel.
Step 203, receiving the second encrypted signal according to the standard communication protocol within the first time period.
In the embodiment of the present disclosure, when the encrypted signal is sent by the second terminal, the encrypted signal is the second encrypted signal automatically sent by the second terminal, that is, the second terminal actively requests to establish a wireless network connection with the first terminal, and of course, to avoid waiting for receiving the second encrypted signal for a long time ineffectiveness, the first terminal only receives the second encrypted signal within the first time period. Specifically, when the first terminal and the second terminal perform data transmission, the transmitting side may encapsulate the encrypted signal based on the data format requirement specified in the standard communication protocol, and then transmit the encapsulated encrypted signal based on the transmission policy specified in the standard communication protocol, such as a timeout retransmission mechanism, a packetization mechanism, and the like, and the receiving side may also decapsulate the encrypted signal based on the data format requirement in the standard communication protocol when receiving the encrypted signal, so as to obtain data that can be recognized by the terminal device.
Step 204, decrypting the second encrypted signal according to the encrypted communication protocol.
In the embodiment of the disclosure, after decapsulating the second encrypted signal based on the standard communication protocol, the terminal further decrypts the second encrypted signal according to the encrypted communication protocol, so as to obtain a plaintext signal for use in a subsequent identity authentication process.
Step 205, performing identity authentication of the second terminal according to the decrypted second encrypted signal.
In this embodiment of the disclosure, the identity of the second terminal may be authenticated based on the identity information of the second terminal in the decrypted second encrypted signal, and a specific authentication process may refer to related technologies, which is not described herein again.
And step 206, responding to the successful identity authentication, and establishing wireless network connection between the second terminal and the second terminal based on the first channel.
In the embodiment of the present disclosure, after the identity authentication of the second terminal is successful, the first terminal sends a feedback signal for indicating that the identity authentication is successful to the second terminal, and after receiving the feedback signal, the second terminal completes the wireless network connection with the first terminal based on the first channel.
Optionally, the encrypted signal comprises: a second encrypted signal sent by the second terminal, where the second encrypted signal includes a second time, and the second time is used to indicate a time when a second motion value of the second terminal is greater than a second threshold, where step 206 may include: and under the condition that the first time falls into a second time period after the second time, determining the identity information of the second terminal, and establishing wireless network connection with the second terminal based on the first channel.
In the embodiment of the present disclosure, the first terminal moves after the second terminal moves, and therefore, by setting the second time period, when the first time after the first terminal moves falls into the second time period after the second time after the second terminal moves, it is also determined that the first terminal and the second terminal can establish wireless network communication, thereby improving the flexibility of the present disclosure in establishing wireless network communication between terminals. Moreover, the first terminal and the second terminal are authenticated through the encrypted communication protocol, and after the authentication is successful, the wireless network connection based on the first channel between the first terminal and the second terminal can be established, so that the transmission of the data to be transmitted with the first terminal can be ensured only by the terminal with the authority, the transmission of other terminals without the authority is prevented, and the data transmission safety is ensured.
Step 207, within the first time period, transmitting the first encrypted signal to the second terminal.
In the embodiment of the present disclosure, if the connection process of the wireless network based on the first channel is initiated by the first terminal, the encrypted signal is a first encrypted signal automatically sent by the first terminal.
Step 208, receiving a feedback signal from the second terminal for the first encrypted signal according to the standard communication protocol.
In the embodiment of the present disclosure, after receiving the first encrypted signal, the second terminal returns a feedback signal for the first encrypted signal to the first terminal as a response.
Step 209, decrypting the feedback signal according to the encrypted communication protocol.
In the embodiment of the present disclosure, the first terminal decapsulates the feedback signal based on a standard communication protocol to obtain a decapsulated feedback signal, and then decrypts the feedback signal based on an encrypted communication protocol to obtain a decrypted feedback signal.
And step 210, determining the identity information of the second terminal according to the decrypted feedback signal, and establishing wireless network connection with the second terminal based on the first channel.
In the embodiment of the disclosure, after the identity authentication of the second terminal based on the decrypted feedback signal is successful, the first terminal establishes a wireless network connection based on the first channel with the first terminal.
Optionally, the encrypted signal comprises: a first encrypted signal sent by the first terminal, where the first encrypted signal includes a first time, where the first time is a time when the first motion value is detected to be greater than a first threshold, where step 210 may include: establishing a wireless network connection with the second terminal based on the first channel if the second time falls within a first time period after a first time, the first time being a time when the first motion value is greater than the first threshold.
In the embodiment of the present disclosure, because there may be an error in the time when the first terminal and the second terminal respectively generate motion, that is, the second terminal generates motion after the first terminal moves, by setting the first time period, when the second time when the second terminal generates motion falls into the first time period after the first time, it is also determined that the first terminal and the second terminal can establish wireless network communication, thereby improving the flexibility of the present disclosure in establishing wireless network communication between terminals.
Step 211, detecting whether a wireless network connection using the second channel is established with an external terminal outside the first time period.
In the embodiment of the present disclosure, after the second terminal establishes the communication connection based on the first channel, the first terminal may further detect a wireless network connection state based on the second channel with an external terminal other than the second terminal.
Step 212, if not, controlling the first wireless network module chip to stop using the first channel to perform data communication.
In the embodiment of the present disclosure, if the first wireless network module chip does not establish the wireless network connection based on the first channel with the external terminal, the data communication based on the first channel between the first wireless network module and the external terminal is closed, so as to avoid that the external terminal accesses during the data transmission between the first terminal and the second terminal and interferes with the data transmission between the first terminal and the second terminal based on the first channel and the second channel.
Step 213, if yes, determining the identity information of the other connected external terminals, and controlling the first wireless network module chip to close the wireless network connection function with the other external terminals based on the first channel, where the other external terminals include: an external terminal other than the second terminal among the connected external terminals.
Step 214, sending the data to be transmitted corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel.
In the embodiment of the disclosure, if the first wireless network module chip has established a wireless network connection with an external terminal based on the first channel and/or the second channel, the data communication between the first wireless network module and the external terminal based on the first channel and/or the second channel is closed, so as to avoid that the external terminal accesses during the data transmission between the first terminal and the second terminal and interferes with the data transmission between the first terminal and the second terminal based on the first channel and/or the second channel.
Optionally, the second terminal includes a second motion sensor, the second encrypted signal is sent by the second terminal in a second time period after a second time, the feedback signal of the first encrypted signal is sent by the second terminal receiving the first encrypted signal in the second time period, and the second time is a time when the second terminal detects that a second motion value of the second motion sensor is greater than a second threshold, where the first time is greater than the second time, and the first time period is smaller than the second time period; or, the second time is greater than the first time, and the second time period is less than the first time period. Similar to the description of the embodiment of the first period in the first terminal, the second period is preferably less than or equal to 3 s.
Optionally, the first threshold is greater than the second threshold.
In some embodiments of the present disclosure, for a scenario in which the first terminal is held in a hand to tap the second terminal to trigger the transmission data function to be turned on, a change amplitude of the first motion value of the first terminal is greater than a change amplitude of the second motion value of the second terminal due to the movement of the first terminal. Therefore, the first threshold value of the first terminal is set to be larger than the second threshold value of the second terminal, so that the second terminal can detect an external trigger action conveniently, and a user can conveniently control to start a data transmission function between the terminals.
For easy understanding, referring to fig. 6, the first terminal taps the second terminal, and when the first terminal is not in contact with the second terminal, the first terminal moves first, and acceleration changes occur before the tap, while acceleration changes occur after the second terminal taps. And defining the moment when the first terminal detects that the first motion value is greater than the first threshold value as a first time, and defining the moment when the second terminal detects that the second motion value is greater than the second threshold value as a second time, wherein the first time is earlier than the second time. Therefore, the first time period for the first terminal to start the encrypted signal transmission function based on the first channel should be longer than the second time period for the second terminal to start the encrypted signal transmission function based on the first channel, so that the overlapping time period for the first terminal to start the encrypted signal transmission function based on the first channel is increased, and the wireless network connection function based on the first channel can be effectively started. According to the research of the inventor, when the user holds the first terminal to tap the second terminal, the difference value between the first time and the second time is generally about 1s, and the difference value between the first time period and the second time period should be set to be greater than or equal to 1s, so that the effect of effectively starting the wireless network connection function based on the first channel can be achieved. Optionally, the first time period for the first terminal to transmit the encrypted signal is longer than the second time period of the second terminal by about 1s, 2s, 4s, and so on. Preferably, the first time period during which the first terminal sends the encrypted signal is longer than the second time period of the second terminal by 1s, so that the difference between the first time and the second time can be made up, and the time period during which the second terminal opens the wireless network connection function based on the first channel falls within the time period during which the first terminal opens the wireless network connection function based on the first channel.
Optionally, an absolute value of a difference between the first time period and the second time period is greater than or equal to an absolute value of a difference between the first time and the second time.
In the embodiment of the present disclosure, in order to avoid that the interval between the first time period and the second time period is short, and the first terminal and the second terminal cannot receive the encrypted signal of the other party due to the user operation delay, the absolute value of the difference between the first time period and the second time period is set to be greater than or equal to the absolute value of the difference between the first time and the second time, so as to ensure that the first terminal and the second terminal can smoothly receive the encrypted signal sent by the other party even if the time interval during which the user moves the first terminal and the second terminal respectively is long.
The first terminal, as an initiator of the data transmission function trigger, generally needs to receive a feedback signal indicating whether the second terminal agrees to perform data transmission, and therefore, a time when the first terminal turns off the transmission function based on the first channel should be later than a time when the second terminal turns off, so as to ensure that the data transmission function is effectively turned on. Therefore, on the basis that the first time when the first terminal is turned on is earlier than the second time when the second terminal is turned on, the difference between the first time when the first terminal keeps turning on the transmission function based on the first channel and the second time when the second terminal keeps turning on the transmission function based on the first channel is larger than the difference between the first time and the second time, so that the time when the first terminal turns off the transmission function based on the first channel should be later than the time when the second terminal turns off.
Referring to fig. 7, the present disclosure also provides another implementable embodiment, after the step 103, the method further comprising:
step 301, displaying a first interface through the first display screen, wherein the first interface includes: the transmission permission instruction is used for indicating the first terminal to start data transmission with the second terminal, and the transmission rejection instruction is used for indicating the first terminal to stop data transmission with the second terminal.
In the embodiment of the disclosure, after a communication connection based on a first channel is established between a first terminal and a second terminal, the first terminal may display, through a first display screen, an option that asks a user whether to send data to be transmitted to the second terminal, which may specifically include an option of transmission approval and an option of transmission rejection, so that the user may control a data transmission process between the first terminal and the second terminal by selecting and inputting the option of transmission approval or the option of transmission rejection.
Optionally, the step 301 may include: and displaying the first interface after the interval time period after the first motion value meets a first preset condition.
In the embodiment of the present disclosure, referring to fig. 8, if the first terminal displays the first interface for the screen-shot prompt immediately after the movement, the finger of the user may easily miss the option of the prompt interface during the process of withdrawing the hand of the user after the tapping. Therefore, after the user holds the first terminal by hand and taps the second terminal, the time interval for preventing the mistaken touch is set, and when the handheld terminals withdraw the normal positions for use, such as about 1s, 2.5s and 3s, the first interface is popped up again, so that the mistaken touch of options in the process of withdrawing the hand is avoided. Preferably, the interval time period is greater than or equal to 2s, and the time for the user to return to the right usually needs 2s, so that the interval time period is greater than or equal to 2s, and the user can effectively avoid mistakenly touching the option in the process of withdrawing the hand. For example, the interval period may be set to 2s, 3s, etc
Optionally, the interval time period is greater than a first time threshold and less than or equal to a second time threshold, and the first time threshold is greater than the second time threshold.
In the embodiment of the present disclosure, since the first time threshold and the second time threshold are time values for the first terminal and the second terminal to determine whether the first terminal and the second terminal need to establish a communication connection, respectively, and when the wireless network data link process is initiated by the first terminal, the interval time period needs to be greater than the first time threshold of the first terminal, so as to ensure that the first terminal can display the first interface for the user to confirm after successfully sending the encrypted signal to the second terminal, and the interval time period needs to be less than or equal to the second time threshold, so as to ensure that the second terminal can have enough time to establish the wireless network connection based on the first channel with the first terminal when displaying the first interface.
Step 302, in response to receiving a selection input for the transmission approval option, executing the step of sending the to-be-transmitted data corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel.
In the embodiment of the disclosure, the first terminal receives a selection input for the option of transmission agreement in the first interface, where the selection input may be in the form of clicking, sliding, long pressing, gesture, voice, and the like for the option of transmission agreement. Specifically, the first terminal performs data transmission with the second terminal through the first channel and/or the second channel according to the selection input of the user for granting the transmission option.
Optionally, the step 302 may include: detecting whether a wireless network connection using the second channel with the second terminal is established; if so, transmitting the data to be transmitted by using the second channel; and if not, transmitting the data to be transmitted by using the first channel.
In the embodiment of the present disclosure, before the first terminal and the second terminal perform data transmission, the first terminal may further detect a wireless network connection condition between the first terminal and the second terminal based on the second channel. If the first terminal detects that the second channel is available, the first terminal can directly transmit data to the second terminal through the second channel, and because the second channel is an external network based on a centralized network mode between the terminals, the transmission speed of wireless signals in the centralized network mode is high generally, data transmission is performed through the second channel, so that the stability of data transmission can be improved, the data transmission speed is improved, and the pause feeling of a display picture of the second terminal in the screen projection process is reduced. Of course, the current communication speed, that is, the data transmission speed, of the first channel and the second channel may be compared, so that a channel with a relatively high current communication speed is selected to transmit data, and the efficiency of data transmission between terminals is improved. Optionally, if the first terminal detects that the wireless network connection with the second terminal using the second channel is not established, the first terminal uses the first channel to transmit the data to be transmitted. Under the condition that wireless network connection utilizing the second channel is not established with the second terminal, in order to ensure the data transmission operation, the data to be transmitted is directly transmitted through the first channel, so that the purpose of screen projection operation of a user can be realized.
Optionally, the step 302 may include: detecting whether a wireless network connection using the second channel with the second terminal is established; if so, simultaneously transmitting the data to be transmitted by using the first channel and the second channel; or, comparing the communication speeds of the first channel and the second channel, and selecting the channel with the high communication speed from the first channel and the second channel to transmit the data to be transmitted; and if not, sending a connection request signal to the second terminal, wherein the connection request signal is used for requesting to establish wireless network connection with the second terminal by using the second channel.
In the embodiment of the present disclosure, if the first terminal detects that the second channel is available, the data to be transmitted may also be transmitted through the first channel and the second channel at the same time, so that the efficiency of data transmission between terminals may be improved. Of course, the current communication speed, that is, the data transmission speed, of the first channel and the second channel may be compared, so that a channel with a relatively high current communication speed is selected to transmit data, and the efficiency of data transmission between terminals is improved. If the first terminal detects that the second channel is unavailable, the first terminal can continue to request to establish wireless network connection based on the second channel with the second terminal by sending a connection request signal to the second terminal and then continue to transmit data through the second channel, so that the stability of data transmission between the terminals is improved
Optionally, the step 302 may include: detecting whether the first wireless network module chip starts a search function of the second channel; and if not, controlling to start a search function of the first wireless network module chip, wherein the search function is used for acquiring the identity information of the second terminal based on the wireless network connection of the first channel and searching the second terminal through the second channel.
In the embodiment of the present disclosure, the search function refers to a search function of the first terminal with respect to the second terminal that can perform data transmission based on the first channel. In order to facilitate a user to select a connected second terminal for data transmission at any time after establishing a wireless network connection with the second terminal through a first terminal, the first terminal in the embodiment of the disclosure further provides a search function for the user to view the second terminal. If the search function is not started, the user can start the search function on the function setting interface so as to check the second terminal which establishes the wireless network communication connection based on the first channel.
Optionally, the step 302 may include: detecting whether the first wireless network module chip starts a search function of the second channel; and if so, executing the step of detecting whether the wireless network connection utilizing the second channel between the second terminal and the second terminal is established.
In the embodiment of the present disclosure, if the search function is turned on, the first terminal may directly obtain the identity information of the second terminal through the second channel to display the identity information, and if the search function is not turned on, the search function is automatically turned on, the subsequent step of searching for the second terminal is automatically executed, and the search function for the second terminal based on the second channel is automatically turned on, so that the wireless network connection with the second terminal based on the second channel is quickly implemented.
And 303, in response to receiving the selection input of the transmission rejection option, disconnecting the wireless network connection with the second terminal based on the first channel.
In the embodiment of the disclosure, the first terminal receives a selection input for the option of rejecting transmission in the first interface, where the selection input may be in the form of clicking, sliding, long pressing, gesture, voice, and the like for the option of rejecting transmission. The first terminal only disconnects the wireless network connection based on the first channel established between the first terminal and the second terminal according to the transmission rejection instruction so as to save data transmission resources, and the second channel is an external network based on a centralized network model between the first terminal and the second terminal, so that the wireless network connection between the first terminal and the second terminal through the second channel can be still maintained.
Optionally, after the step 303, the method may include: and closing the wireless network connection function of the first channel of the first wireless network module chip.
In the disclosed embodiment, in response to receiving a selection input for the transmission rejection option, the first terminal closes the wireless network connection function based on the first channel. The user inputs the transmission rejection option, which indicates that the user does not want to perform the screen projection operation, and then does not need to execute the operation corresponding to the screen projection operation, so that the previously established wireless network connection based on the first channel needs to be disconnected, the power consumption in the wireless network connection function can be reduced, and the energy is saved.
Optionally, after the step 214, the method may further include: and closing the searching function of the second channel of the first wireless network module chip in response to the stop of sending the data to be transmitted to the second terminal.
In the embodiment of the disclosure, when the user controls the first terminal to stop sending the data to be transmitted to the second terminal, or when the first terminal finishes sending the data to be transmitted to the second terminal, the first terminal automatically closes the search function based on the second channel, so that the first terminal does not need to perform the search function based on the second channel when the transmission between the terminals is not required, thereby reducing the power consumption in the wireless network connection function and saving energy.
Optionally, referring to fig. 9, the step 302 may include:
step 3021, sending a transmission request signal to the second terminal.
In this embodiment of the present disclosure, before transmitting data to a second terminal, a first terminal may send a data transmission request signal to the second terminal, where the data transmission request signal may carry data parameters such as a data identifier and a data size of data to be sent.
Step 3022, displaying a second interface through the first display screen, where the second interface includes: and prompt information reflecting the transmission condition of the transmission request signal.
In the embodiment of the disclosure, after the first terminal sends the transmission request signal to the second terminal, the first terminal may prompt the user that the transmission request signal has been sent to the second terminal by displaying the second interface, and wait for the feedback of the second terminal, so that the user may know the progress of data transmission in real time.
Step 3023, receiving a feedback signal from the second terminal for the transmission request signal.
In the embodiment of the present disclosure, the second terminal returns the feedback signal to the first terminal in response to the transmission request signal, and the second interface may also display the prompt information that the feedback signal has been received.
Step 3024, displaying a third interface through the first display screen, where the third interface includes an interface obtained by reducing the current data selection interface according to a preset aspect ratio.
In the embodiment of the disclosure, after receiving the feedback signal of the second terminal, the first terminal may display a current data selection interface, where the current data selection interface may include transmittable data for selection by a user, or the current data selection interface is a current display interface corresponding to the first terminal when the first motion value is greater than the first threshold. The third interface can be displayed in a mode of reducing the display of the current display interface, and the user of the first terminal is reminded of the screen projection operation currently through different aspect ratios when the third interface and the current display interface are displayed.
Optionally, referring to fig. 10, before step 301, the method further includes:
step 3001, determining type information of the second terminal based on the wireless network connection of the first channel.
In the embodiment of the present disclosure, the first terminal obtains the type information of the second terminal from the second terminal through the first channel, where the type information may include parameters of the second terminal, such as hardware configuration, device signals, environment where the first terminal is located, and an operating state, and may be specifically set according to an actual requirement, which is not limited herein.
Step 3002, determining the gap time period according to the type information of the second terminal, wherein the type information of the second terminal includes the size information of the second terminal, and the gap time period is positively correlated to the size information of the second terminal.
In the embodiment of the application, the first terminal extracts the size information of the second terminal from the second terminal type information, and the size information is used for reflecting the screen size of the second display screen of the second terminal or the overall size of the second terminal. For example, the second terminal type information may be a model or size information of the second terminal, and is not particularly limited as long as the size of the second terminal is reflected. For example, the size of the sound box, the desktop display and the television is as follows from small to large: sound box, desktop display, TV. Therefore, the interval period is, in order from small to large: sound box, desktop display, TV. It can be understood that, if the screen size of the second terminal is large, after the user holds the first terminal by hand and makes contact with the second terminal to trigger the wireless network connection between the first terminal and the second terminal, because the distance between the user and the second terminal is short, the user's vision cannot view the complete display content of the second display screen if the second display screen of the second terminal is large. Since the user needs to perform the next operation decision by observing the display screen of the second terminal, the user needs to spend a certain time to adjust the distance between the user and the second display screen of the second terminal, so that the user can view the complete display content of the second display screen visually, and thus, after the first terminal establishes the wireless network communication based on the first channel with the second terminal, the first interface does not need to be displayed immediately, but after the user adjusts the distance between the user and the second display screen, namely after the interval time period, the first interface is displayed for the user to view. Specifically, the interval time period is positively correlated with the size information of the second terminal, that is, the larger the screen size of the second display screen of the second terminal is, the longer the distance between the user and the second display screen needs to be if the user wants to view the complete display content in the second display screen, the longer the interval time period the user needs to adjust the position of the user is, and conversely, the smaller the screen size of the second display screen is, the smaller the interval time period is.
According to the embodiment of the disclosure, after the first terminal and the second terminal establish the first channel-based wireless network connection, the interval time period is reserved for the user to adjust the distance between the user and the second terminal, so that the first interface is displayed after the interval time period, the user can view the complete content of the first interface, and the user experience is improved.
Optionally, referring to fig. 11, before the step 101, the method further includes:
step 401, displaying a fourth interface through the first display screen, where the fourth interface includes: a transfer function on option and a transfer function off option.
Step 402, in response to receiving a selection input for the transfer function enable option, performing the step of obtaining a first motion value of the first motion sensor.
Step 403, in response to receiving a selection input for the transfer function close option, stopping executing the step of acquiring the first motion value of the first motion sensor.
In the embodiments of step 401 to step 402 of the present disclosure, the user may also be enabled to select whether to perform data transmission to other terminals than the second terminal by displaying the fourth interface. Specifically, after the user opens the data transmission application, the first terminal responds to the selection input of the user for the transmission function opening option by displaying a fourth interface including a transmission function opening option and a transmission function closing option, and performs data transmission with the second terminal through the data transmission method provided by the present disclosure.
Optionally, the first channel and the second channel are the same channel.
In the embodiment of the present disclosure, if the first terminal can only perform data transmission through one channel, or does not establish a wireless network connection with the second terminal based on the first channel in advance, any one of a centralized network mode and a peer-to-peer network mode may be selected as a channel to establish the wireless network connection.
Optionally, referring to fig. 12, after the step 103, the method further includes:
step 501, displaying a sharing terminal list on a display screen of the first terminal under the condition that the first motion value is larger than the first threshold value; the sharing terminal list comprises N sharing terminal options, wherein N is a positive integer, and the sharing terminal options are used for indicating the current connectable terminals or terminals which are connected in a historical mode.
In the embodiment of the disclosure, a sharing terminal option of a second terminal that has established a wireless network connection based on a second channel or a peer terminal of a terminal that has established a wireless network connection with a first terminal before a current time point may be automatically displayed through a display screen, where the sharing terminal option is identification information such as an icon for indicating the terminal, a device identifier, and a user account identifier, and is only required to be used for indicating the terminal, so that the user can view the sharing terminal option.
Step 502, in response to a received selection instruction for a target sharing terminal option in the sharing terminal list, taking a terminal indicated by the target sharing terminal option as the second terminal; and M target sharing terminal options exist, wherein M is a positive integer less than or equal to N.
In the embodiment of the present disclosure, the sharing terminal may be used as the second terminal based on a selection instruction input by a user to any sharing terminal in the sharing terminal list, so as to execute a subsequent data transmission process. According to the data transmission method and the data transmission device, the sharing terminal list formed by the currently connected or previously connected terminals is provided for the user to select as the second terminal, so that the user can conveniently select the opposite terminal of the data transmission.
Optionally, the selecting instruction is generated under the following conditions:
detecting touch operation or air-space operation of a target sharing terminal option in the sharing terminal list; or the like, or, alternatively,
and selecting a sharing terminal option in the sharing terminal list as a target sharing terminal option according to the amplitude, the direction and the times of the third motion value detected by the first motion sensor.
In the embodiment of the disclosure, the touch operation is an operation in a manner of clicking, long-pressing and the like on a sharing terminal option representing a second terminal in a touch display screen, and the space operation is an operation in a manner of gesture, voice and the like of a user on the sharing terminal option in a sharing terminal list. Certainly, the first terminal may also select a sharing terminal option in the sending and sharing terminal as the second terminal according to the motion parameters, such as the amplitude, the direction, the number of times, and the like, in the third motion value detected by the first motion sensor after the sharing terminal list is displayed, for example, the sharing terminal option ranked first may be selected in one motion, the sharing terminal option ranked second may be selected in two motions, and specifically may be set according to actual requirements, and the setting is not limited here.
In the embodiment of the disclosure, when the first terminal transmits data to the second terminal, if it is detected that the second terminal is performing data transmission with other external terminals, a prompt interface may be displayed to display a situation that the other external terminals perform data transmission with the second terminal to inform a user of a current data transmission situation of the second terminal, and a specific first terminal may display identity information, transmission data content, and data transmission time of the second terminal in the prompt interface to inform the user, so that the user may make a subsequent decision according to the prompt information.
Optionally, the third interface further comprises: and the suspension button is used for controlling suspension or stopping data transmission with the second terminal, or controlling and adjusting the display parameters of the third interface.
Optionally, after the step 104, the method further comprises: when the second terminal is carrying out data transmission with other external terminals, displaying a prompt interface, wherein the prompt interface is used for describing data transmission conditions of the other external terminals and the second terminal, and the data transmission conditions comprise: at least one of identity information, transmission data content and data transmission time of the second terminal. The floating key in the third interface may further include a control for controlling the data transmission process, for example, a control for pausing or stopping the data transmission process, or a control for controlling display parameters of the third interface, such as display size, display brightness, and display position, which may be specifically set according to actual requirements, and is not limited herein.
Fig. 13 schematically shows a flowchart of still another data transmission method provided by the present disclosure, which is applied to a second terminal including a second motion sensor and a second wireless network module chip, wherein channels supported by the second wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, and the method includes:
step 601, acquiring a second motion value of the second motion sensor.
Step 602, controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition.
Step 603, establishing a wireless network connection based on the first channel with the first terminal according to the encrypted signal and a first channel communication protocol, wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
Step 604, receiving data to be transmitted sent by the first terminal through the first channel and/or the second channel.
The above-mentioned manner and available technical effects of data transmission between the second terminal and the first terminal in steps 601 to 604 may specifically refer to the manner of data transmission between the first terminal and the second terminal in steps 101 to 104, and it can be understood that the tasks executed by the first terminal and the second terminal may be flexibly exchanged according to actual requirements in the implementation process, and are not described herein again.
Referring to fig. 14, a flow chart of still another data transmission method provided by the present disclosure is schematically illustrated, and the method is applied to a second terminal including a second motion sensor and a second wireless network module chip, wherein channels supported by the second wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, and the method includes:
and 701, acquiring a second motion value of the second motion sensor.
Optionally, before the step 201, the method may further include: and under the condition that the second wireless network module chip is in a state of forbidding data communication through the first channel or in a state of forbidding wireless network connection through the first channel, executing a step of detecting whether a second motion value meets a second preset condition.
Optionally, the second terminal further includes: a second display screen, before step 701, the method may further comprise the profile: and responding to the second motion value meeting a second preset condition, and detecting whether the second display screen is in a lighting state. And if not, controlling the second display screen to be lightened, and controlling the second wireless network module chip to start a wireless network connection function between the second wireless network module chip and other external terminals based on the first channel.
Prior to the step 701, the method further comprises: detecting whether the second display screen is in a lighting state. And if so, controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition. If not, stopping executing the step of controlling the second wireless network module chip to transmit the encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition.
Step 702, controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition.
Optionally, the encrypted signal comprises: a first encrypted signal sent by the first terminal.
Step 703, receiving the first encrypted signal according to the standard communication protocol within the second time period.
Step 704, decrypting the first encrypted signal according to the encrypted communication protocol.
Step 705, performing identity authentication of the first terminal according to the decrypted first encrypted signal.
Step 706, in response to the successful identity authentication, establishing a wireless network connection with the first terminal based on the first channel.
Optionally, the encrypted signal comprises: a first encrypted signal sent by the first terminal, where the first encrypted signal includes a first time, where the first time is a time when the first motion value is detected to be greater than a first threshold, and step 708 may include: and on the condition that the first time falls within a second time period after the second time, establishing wireless network connection with the first terminal based on the first channel.
Optionally, the encrypted signal comprises: and the second encrypted signal is sent by the second terminal.
Step 707, transmitting the second encrypted signal to the first terminal within the second time period.
Step 708, receiving a feedback signal from the first terminal for the second encrypted signal according to the standard communication protocol.
Step 709, decrypting the feedback signal according to the encrypted communication protocol.
Step 710, determining the identity information of the first terminal according to the decrypted feedback signal, and establishing a wireless network connection with the first terminal based on the first channel.
Optionally, the encrypted signal comprises: a second encrypted signal sent by the second terminal, where the second encrypted signal includes a second time, and the second time is used to indicate a time when a second motion value of the second terminal is greater than a second threshold, where step 710 includes: and under the condition that the second time falls within a first time period after a first time, determining the identity information of the first terminal, and establishing a wireless network connection between the first terminal and the first terminal based on the first channel, wherein the first time is the moment when the first motion value is greater than the first threshold value.
Step 711, in a second time period after a second time, controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel, where the first time is a time when the second motion value is detected to be greater than a second threshold value.
Optionally, after the step 711, the method further comprises: and detecting whether a wireless network connection based on the first channel is established with an external terminal or not outside the second time period. And if not, controlling the second wireless network module chip to stop utilizing the first channel to carry out data communication. If yes, determining the identity information of other connected external terminals, and controlling the second wireless network module chip to close the wireless network connection function between the second wireless network module chip and other external terminals based on the first channel, wherein the other external terminals include: an external terminal other than the first terminal among the connected external terminals.
Optionally, the second terminal comprises a second motion sensor, and the second encrypted signal is transmitted by the second terminal within a second time period after a second time. The feedback signal of the second encrypted signal is sent by the first terminal receiving the second encrypted signal within the first time period, where the first time is a moment when the first terminal detects that a first motion value of the first motion sensor is greater than a first threshold, the second time is greater than the first time, and the second time period is less than the first time period.
Optionally, an absolute value of a difference between the first time period and the second time period is greater than or equal to an absolute value of a difference between the first time and the second time.
Optionally, an absolute value of a difference between the first time period and the second time period is positively correlated with the second terminal size information.
Optionally, the step 702 may include: and sending a second starting signal to the second wireless network module chip under the condition that the second motion value meets a second preset condition, wherein the second starting signal is used for indicating the second wireless network chip to transmit an encryption signal with the first terminal by using the first channel.
The above-mentioned manner and available technical effects of data transmission between the second terminal and the first terminal in steps 701 to 711 may specifically refer to the manner of data transmission between the first terminal and the second terminal in steps 201 to 210, and it can be understood that the tasks executed by the first terminal and the second terminal may be flexibly exchanged according to actual requirements in the implementation process, and details are not described here.
Optionally, the second terminal further comprises a second speaker, and after the step 604, the method further comprises: and responding to the establishment of the wireless network connection between the first terminal and the first terminal based on the first channel, and playing a prompt tone through the second loudspeaker, wherein the volume level of the played prompt tone is a prompt volume level.
In the embodiment of the present disclosure, the second speaker may be an external speaker device connected to the second terminal, may be a speaker device disposed inside the second terminal content portion, and may be specifically disposed according to actual requirements, which is not limited herein. The initial audio is the audio that the second terminal is playing before the screen projection, and the playing volume level of the initial audio is the initial volume level.
Optionally, the second terminal further comprises a second speaker, and referring to fig. 15, after step 604, the method further comprises:
step 801, detecting that the volume level of the initial audio is the initial volume level when the second speaker plays the initial audio.
In the embodiment of the present disclosure, the first level threshold is a lowest volume level required for playing the alert tone, and if the initial volume level of the currently played audio of the second terminal is less than the first level threshold, the volume level of the played initial audio of the second terminal needs to be raised to the first volume level, so as to avoid that the subsequently played alert tone cannot be heard by the user due to too low or too high volume level, and after the volume level of the initial audio is adjusted, the sound sizes of the initial audio and the alert tone are close to each other, which is convenient for the harmony of the sound sizes of the two audios, so that the user can feel the sound prompt of the screen.
Step 802, setting the volume level of playing the initial audio to a first volume level when the initial volume level is less than a first level threshold.
In the embodiment of the present disclosure, if the initial volume of the initial audio currently played by the second terminal is equal to or less than the first level threshold, it indicates that the initial volume level of the second terminal cannot meet the requirement of clearly playing the alert sound, and the volume level needs to be adjusted.
And 803, playing the initial audio at the first volume level while playing the prompt tone, wherein the first volume level is greater than the initial volume level.
For example, before the screen projection operation, the volume level of the initial audio played by the display is 3, which is less than the first level threshold 5, and the initial audio played by the display is relatively louder. The first volume level may be equal to a first level threshold 5 and the sound level of the alert tone may be set equal to the first level threshold 5 or equal to the first volume level 5. Then, when there is external terminal to connect to the display, the volume level that the display played the initial audio frequency sets to 5, simultaneously, the volume level that the display played the warning tone also sets to 5, therefore, when playing the warning tone, the volume level of playing the initial audio frequency also improves thereupon, two sound stack, be convenient for remind the user to have external terminal to connect to the display at present, and, after adjusting the volume level of initial audio frequency, the volume level size of initial audio frequency and warning tone is close, be convenient for the harmonious nature of two kinds of audio frequency sound sizes, the broadcast of warning tone is not obtrusive, promote user experience. After the prompt tone is played, the display continues to play the initial audio, and the volume level of the initial audio returns to the initial volume level 3, that is, the original initial audio playing of the display is not affected.
Alternatively, the first volume level may be greater than or equal to the first level threshold, e.g., the first volume level may be 5, 6, 7, etc. The first volume level may be equal to the cue volume level. The first level threshold may also be equal to the cue volume level.
Step 804, keeping the volume level of the initial audio playing as the initial volume level when the initial volume level is greater than or equal to a first level threshold.
In the embodiment of the present disclosure, if the initial volume of the initial audio currently played by the first terminal is greater than or equal to the first level threshold, it indicates that the initial volume level of the first terminal can meet the requirement of clearly playing the alert tone, and the volume level of the first terminal does not need to be adjusted, and the initial volume level is maintained to continue playing the audio.
Step 805, while playing the alert tone, continuing to play the initial audio at the initial sound level.
In the embodiment of the present disclosure, if the initial volume of the initial audio currently played by the first terminal is greater than or equal to the first level threshold, it is needless to adjust the volume level of the first terminal and keep the initial volume level to continue playing the audio, which indicates that the initial volume level of the first terminal can meet the requirement of clearly playing the alert tone.
For example, before the screen-casting operation, the volume level of the initial audio played by the display is 6, which is greater than the first level threshold 5, and the sound of the initial audio played by the display is relatively loud initially. The first volume level may be equal to a first level threshold 5 and the sound level of the alert tone is set equal to the first level threshold 5 or equal to the first volume level 5. Then, when an external terminal is connected to the display, the volume level at which the display plays the initial audio remains unchanged and remains 6, and at the same time, the volume level at which the display plays the alert tone remains set to 5. Therefore, when an external terminal is connected to the display, and under the condition that the volume level of the initial audio is greater than or equal to the first level threshold, when the prompt tone is played, the volume level of the played initial audio is kept unchanged, the volume level of the played prompt tone is also large enough, the user can be reminded that the external terminal is connected to the display at present without adjusting the volume level of the initial audio, and the user experience of the user in watching the initial audio is not influenced. After the prompt tone is played, the display continues to play the initial audio, and the volume level of the initial audio is kept unchanged, namely, the original initial audio playing of the display is not influenced. Alternatively, when the volume level of the initial audio played by the display is 6, i.e. greater than the first level threshold 5, the volume level of the alert tone may also be the same as the volume level of the initial audio, i.e. set to 6. Therefore, when an external terminal is connected to the display, the volume level of the played initial audio is kept unchanged, and after the volume level of the prompt tone is adjusted, the volume levels of the initial audio and the prompt tone are close to each other, so that the harmony of the sound levels of the two audios is facilitated, the playing of the prompt tone is not abrupt, and the user experience is improved.
Optionally, the first volume level is greater than or equal to the first level threshold, and/or the first volume level is equal to the prompt volume level, and/or the first level threshold is equal to the prompt volume level.
In the embodiment of the present disclosure, the first volume level at least needs to be greater than or equal to the first level threshold so as to ensure that the played alert sound can be identified by the user's hearing, and the first volume level may be equal to the alert volume level or the first level threshold is equal to the alert volume level, so as to ensure that the play volume of the alert sound is sufficiently large, which is convenient for the user to identify through hearing.
For ease of understanding, referring to fig. 16, after the first terminal and the second terminal move due to the contact, the second terminal does not perform data transmission after the first wireless network connection based on the first channel is first established between the second terminal and the first terminal, but the second terminal plays an alert tone to inform the user that the first terminal has successfully established the wireless network connection with the second terminal.
Optionally, the step 604 may include: and under the condition that at least two data to be transmitted sent by the first terminal exist, displaying the data to be transmitted in a split screen mode.
In the embodiment of the disclosure, if the second terminal receives data to be transmitted respectively sent by at least two first terminals at the same time, the data to be transmitted sent by each first terminal can be respectively displayed through screen division by dividing the display screen, so that the plurality of first terminals can simultaneously project screens in the same second terminal.
Optionally, referring to fig. 17, the step 804 may include:
step 8041, in the case that there are at least two data to be transmitted sent by the first terminal, sending the device identifier of each first terminal to each first terminal.
In the embodiment of the disclosure, when receiving data to be transmitted sent by at least two first terminals at the same time, the second terminal may send, to each first terminal, a device identifier carrying each first terminal and a condition of the data to be transmitted, so that a user on each first terminal may vote to select which data to be transmitted is displayed.
Step 8042, receiving the device identifier acknowledgement information carrying the target device identifier sent by each first terminal.
In the embodiment of the present disclosure, the user of each first terminal may send the device identifier acknowledgement information to the second terminal by selecting the target device identifier from the device identifiers.
Step 8043, in a case that the target device identifiers in the device identifier confirmation information are the same, displaying the to-be-transmitted data sent by the first terminal indicated by the target device identifiers.
In the embodiment of the disclosure, the second terminal counts the target device identifiers carried in the device identifier acknowledgement information sent by each first terminal, and if the target device identifiers are the same, it indicates that the user at each first terminal agrees to display the to-be-transmitted data provided by the first terminal indicated by the target device identifier, and the to-be-transmitted data sent by the first terminal indicated by the target device identifier can be preferentially displayed. Of course, if the target device identifiers are different, the data to be transmitted corresponding to the target device identifier with the highest total percentage may be displayed according to the statistical result, the number of times is only exemplary, and the specific statistical manner may be set according to the actual requirement, which is not limited herein.
According to the method and the device for transmitting the transmission data, the selection display mode based on the fact that the plurality of first terminals transmit the transmission data to the same second terminal is provided, so that the plurality of first terminals can transmit the transmission data to the same second terminal at the same time, and flexibility of data transmission among the terminals is improved.
Fig. 18 schematically shows a structural diagram of a data transmission apparatus 90 provided by the present disclosure, which is applied to a first terminal that includes a first motion sensor and a first wireless network module chip, wherein channels supported by the first wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, and the apparatus includes:
a first detection module 901 configured to acquire a first motion value of the first motion sensor;
a first connection module 902, configured to control the first radio network module chip to transmit an encrypted signal with a second terminal through the first channel if the first motion value meets a first preset condition;
establishing wireless network connection based on a first channel between the second terminal and the second terminal according to the encrypted signal and a first channel communication protocol;
a first transmission module 903, configured to send data to be transmitted corresponding to a current data selection interface to the second terminal through the first channel and/or the second channel;
wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
Optionally, the first connection module 902 is further configured to: and within a first time period after a first time, controlling the first wireless network module chip to transmit an encrypted signal with the second terminal through the first channel, wherein the first time is when the first motion value is detected to be greater than a first threshold value.
Optionally, the encrypted signal comprises: a second encrypted signal sent by the second terminal; optionally, the first connection module 902 is further configured to:
receiving said second encrypted signal according to said standard communication protocol during said first time period;
decrypting the second encrypted signal according to the encrypted communication protocol;
performing identity authentication of the second terminal according to the decrypted second encrypted signal;
responding to the successful identity authentication, and establishing wireless network connection between the second terminal and the second terminal based on the first channel;
or the like, or, alternatively,
the encrypted signal includes: a first encrypted signal sent by the first terminal;
optionally, the first connection module 902 is further configured to:
transmitting the first encrypted signal to the second terminal within the first time period;
receiving a feedback signal from the second terminal for the first encrypted signal according to the standard communication protocol;
decrypting the feedback signal according to the encrypted communication protocol;
and determining the identity information of the second terminal according to the decrypted feedback signal, and establishing wireless network connection between the second terminal and the first terminal based on the first channel.
Optionally, the second terminal comprises a second motion sensor, the second encrypted signal being transmitted by the second terminal within a second time period after a second time; the feedback signal of the first encrypted signal is sent by the second terminal receiving the first encrypted signal within the second time period, which is when the second terminal detects that the second motion value of the second motion sensor is greater than a second threshold value, wherein,
the second time is greater than the first time, and the second time period is less than the first time period.
Optionally, an absolute value of a difference between the first time period and the second time period is greater than or equal to an absolute value of a difference between the first time and the second time.
Optionally, a difference between the first time period and the second time period is greater than or equal to 1 s.
Optionally, the first threshold is greater than the second threshold.
Optionally, the first connection module 902 is further configured to:
detecting whether a wireless network connection using the second channel has been established with an external terminal outside the first period;
if not, controlling the first wireless network module chip to stop utilizing the first channel to carry out data communication;
if yes, determining the identity information of other connected external terminals, and controlling the first wireless network module chip to close the wireless network connection function between the first wireless network module chip and the other external terminals based on the first channel, wherein the other external terminals include: an external terminal other than the second terminal among the connected external terminals.
Optionally, the first connection module 902 is further configured to:
under the condition that the first motion value meets a first preset condition, controlling the first wireless network module chip to start the authority of encrypted signal transmission through the first channel and the second terminal;
and in the first time period, if the encrypted signal is not transmitted to the second terminal through the first channel, controlling the first radio network module chip to stop utilizing the first channel to carry out data communication.
Optionally, the first time period is less than or equal to 4 s.
Optionally, the encrypted signal comprises: a second encrypted signal sent by the second terminal, where the second encrypted signal includes a second time, and the second time is used to indicate a time when a second motion value of the second terminal is greater than a second threshold;
optionally, the first connection module 902 is further configured to:
establishing a wireless network connection with the second terminal based on the first channel if the second time falls within a first time period after a first time, the first time being a time when the first motion value is greater than the first threshold;
or the like, or, alternatively,
the encrypted signal includes: a first encrypted signal sent by the first terminal, where the first encrypted signal includes a first time, and the first time is a time when the first motion value is detected to be greater than a first threshold;
optionally, the first connection module 902 is further configured to:
and under the condition that the first time falls into a second time period after the second time, determining the identity information of the second terminal, and establishing wireless network connection with the second terminal based on the first channel.
Optionally, the first connection module 902 is further configured to:
and sending a first starting signal to the first wireless network module chip under the condition that the first motion value meets a first preset condition, wherein the first starting signal is used for indicating the first wireless network chip to transmit an encryption signal with the second terminal by using the first channel.
Optionally, the first connection module 902 is further configured to: and under the condition that the first wireless network module chip is in a state of forbidding data communication through the first channel or in a state of forbidding wireless network connection through the first channel, executing a step of detecting whether the first motion value meets a first preset condition.
Optionally, the first terminal further includes: a first display screen;
the first connection module 902 is further configured to:
detecting whether the first display screen is in a lighting state;
if yes, controlling the first wireless network module chip to transmit an encrypted signal with a second terminal through the first channel according to a standard communication protocol under the condition that the first motion value meets a first preset condition;
if not, stopping executing the step of controlling the first wireless network module chip to transmit the encrypted signal with the second terminal through the first channel according to a standard communication protocol under the condition that the first motion value meets a first preset condition.
Optionally, the first terminal further includes: a first display screen;
optionally, the first connection module 902 is further configured to:
displaying a first interface through the first display screen, wherein the first interface comprises: the transmission permission instruction is used for indicating the first terminal to start data transmission with the second terminal, and the transmission rejection instruction is used for indicating the first terminal to stop data transmission with the second terminal.
Optionally, the first connection module 902 is further configured to:
responding to the received selection input of the transmission agreement option, and executing the step of sending the data to be transmitted corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel;
and in response to receiving a selection input for the transmission rejection option, disconnecting the wireless network connection with the second terminal based on the first channel.
Optionally, the first transmission module 903 is further configured to:
detecting whether a wireless network connection using the second channel with the second terminal is established;
if so, transmitting the data to be transmitted by using the second channel;
and if not, transmitting the data to be transmitted by using the first channel.
Optionally, the first transmission module 903 is further configured to:
detecting whether a wireless network connection using the second channel with the second terminal is established;
if so, simultaneously transmitting the data to be transmitted by using the first channel and the second channel; or, comparing the communication speeds of the first channel and the second channel, and selecting the channel with the high communication speed from the first channel and the second channel to transmit the data to be transmitted;
and if not, sending a connection request signal to the second terminal, wherein the connection request signal is used for requesting to establish wireless network connection with the second terminal by using the second channel.
Optionally, the first connection module 902 is further configured to:
detecting whether the first wireless network module chip starts a search function of the second channel;
and if so, executing the step of detecting whether the wireless network connection utilizing the second channel between the second terminal and the second terminal is established.
Optionally, the first connection module 902 is further configured to:
detecting whether the first wireless network module chip starts a search function of the second channel;
and if not, controlling to start a search function of the first wireless network module chip, wherein the search function is used for acquiring the identity information of the second terminal based on the wireless network connection of the first channel and searching the second terminal through the second channel.
Optionally, the first connection module 902 is further configured to:
and closing the searching function of the second channel of the first wireless network module chip in response to the stop of sending the data to be transmitted to the second terminal.
Optionally, the first connection module 902 is further configured to:
and displaying the first interface after the interval time period after the first motion value meets a first preset condition.
Optionally, the interval period is greater than or equal to 2 s.
Optionally, the first connection module 902 is further configured to:
determining type information of the second terminal based on the wireless network connection of the first channel;
determining the interval time period according to the type information of the second terminal;
wherein the type information of the second terminal includes size information of the second terminal, and the interval period is positively correlated with the size information of the second terminal.
Optionally, the first transmission module 903 is further configured to:
transmitting a transmission request signal to the second terminal;
displaying a second interface through the first display screen, wherein the second interface comprises: and prompt information reflecting the transmission condition of the transmission request signal.
Optionally, the first transmission module 903 is further configured to:
receiving a feedback signal for the transmission request signal from the second terminal;
and displaying a third interface through the first display screen, wherein the third interface comprises an interface obtained by reducing the current data selection interface according to a preset aspect ratio.
Optionally, the third interface further comprises: and the suspension button is used for controlling suspension or stopping data transmission with the second terminal or controlling and adjusting the aspect ratio of the third interface.
Optionally, the first detecting module 901 is further configured to:
displaying a fourth interface through the first display screen, the fourth interface comprising: a transmission function opening option and a transmission function closing option;
in response to receiving a selection input for the transfer function enable option, performing the step of obtaining a first motion value of the first motion sensor;
in response to receiving a selection input for the transport function close option, ceasing to perform the step of obtaining the first motion value for the first motion sensor.
Optionally, the first channel and the second channel are the same channel.
Optionally, the first connection module 902 is further configured to:
displaying a sharing terminal list on a display screen of the first terminal under the condition that the first motion value is larger than a first threshold value; the sharing terminal list comprises N sharing terminal options, wherein N is a positive integer, and the sharing terminal options are used for indicating the current connectable terminals or terminals which are connected in a historical mode.
Optionally, the first connection module 902 is further configured to:
responding to a received selection instruction of a target sharing terminal option in the sharing terminal list, and taking a terminal indicated by the target sharing terminal option as the second terminal; and M target sharing terminal options exist, wherein M is a positive integer less than or equal to N.
Optionally, the selecting instruction is generated under the following conditions:
detecting touch operation or air-space operation of a target sharing terminal option in the sharing terminal list; or the like, or, alternatively,
and selecting a sharing terminal option in the sharing terminal list as a target sharing terminal option according to the amplitude, the direction and the times of the third motion value detected by the first motion sensor.
Optionally, the first transmission module 903 is further configured to: when the second terminal is carrying out data transmission with other external terminals, displaying a prompt interface, wherein the prompt interface is used for describing data transmission conditions of the other external terminals and the second terminal, and the data transmission conditions comprise: at least one of identity information, transmission data content and data transmission time of the second terminal.
According to the embodiment of the disclosure, the first terminal is triggered to establish wireless network connection with the second terminal through the first channel based on the motion value detected by the motion sensor in the first terminal, so that the first channel and/or the second channel can be selected to perform data transmission according to actual conditions, the influence of a single channel on data transmission between terminals is reduced, and the stability of data transmission between terminals is improved.
Fig. 19 schematically shows a structural diagram of another data transmission apparatus 100 provided by the present disclosure, which is applied to a second terminal including a second motion sensor and a second wireless network module chip, wherein channels supported by the second wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, and the apparatus includes:
a second detection module 1001 configured to acquire a second motion value of the second motion sensor;
the second connection module 1002 is configured to control the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel if the second motion value meets a second preset condition;
establishing wireless network connection based on a first channel between the first terminal and the first terminal according to the encrypted signal and a first channel communication protocol;
a second transmission module 1003, configured to receive data to be transmitted sent by the first terminal through the first channel and/or the second channel;
wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
Optionally, the second connection module 1002 is further configured to:
and within a second time period after a second time, controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel, wherein the first time is when the second motion value is detected to be greater than a second threshold value.
Optionally, the encrypted signal comprises: a first encrypted signal sent by the first terminal; optionally, the second connection module 1002 is further configured to:
receiving the first encrypted signal according to the standard communication protocol within the second time period;
decrypting the first encrypted signal according to the encrypted communication protocol;
performing identity authentication of the first terminal according to the decrypted first encrypted signal;
responding to the successful identity authentication, and establishing wireless network connection between the first terminal and the first terminal based on the first channel;
or the like, or, alternatively,
the encrypted signal includes: a second encrypted signal sent by the second terminal;
the second connection module 1002, further configured to:
transmitting the second encrypted signal to the first terminal within the second time period;
receiving a feedback signal from the first terminal for the second encrypted signal according to the standard communication protocol;
decrypting the feedback signal according to the encrypted communication protocol;
and determining the identity information of the first terminal according to the decrypted feedback signal, and establishing wireless network connection with the first terminal based on the first channel.
Optionally, the second terminal comprises a second motion sensor, the second encrypted signal being transmitted by the second terminal within a second time period after a second time; the feedback signal of the second encrypted signal is sent by the first terminal receiving the second encrypted signal within the first time period, which is when the first terminal detects that the first motion value of the first motion sensor is greater than a first threshold value, wherein,
the second time is greater than the first time, and the second time period is less than the first time period.
Optionally, an absolute value of a difference between the first time period and the second time period is greater than or equal to an absolute value of a difference between the first time and the second time.
Optionally, an absolute value of a difference between the first time period and the second time period is positively correlated with the second terminal size information.
Optionally, the second connection module 1002 is further configured to:
detecting whether a wireless network connection based on the first channel is established with an external terminal outside the second time period;
if not, controlling the second wireless network module chip to stop utilizing the first channel to carry out data communication;
if yes, determining the identity information of other connected external terminals, and controlling the second wireless network module chip to close the wireless network connection function between the second wireless network module chip and other external terminals based on the first channel, wherein the other external terminals include: an external terminal other than the first terminal among the connected external terminals.
Optionally, the encrypted signal comprises: a second encrypted signal sent by the second terminal, where the second encrypted signal includes a second time, and the second time is used to indicate a time when a second motion value of the second terminal is greater than a second threshold;
optionally, the second connection module 1002 is further configured to:
determining identity information of the first terminal and establishing a wireless network connection with the first terminal based on the first channel under the condition that the second time falls within a first time period after a first time, wherein the first time is a moment when the first motion value is larger than the first threshold value;
or the like, or, alternatively,
the encrypted signal includes: a first encrypted signal sent by the first terminal, where the first encrypted signal includes a first time, and the first time is a time when the first motion value is detected to be greater than a first threshold;
optionally, the second connection module 1002 is further configured to:
and on the condition that the first time falls within a second time period after the second time, establishing wireless network connection with the first terminal based on the first channel.
Optionally, the second connection module 1002 is further configured to:
and sending a second starting signal to the second wireless network module chip under the condition that the second motion value meets a second preset condition, wherein the second starting signal is used for indicating the second wireless network chip to transmit an encryption signal with the first terminal by using the first channel.
Optionally, the second connection module 1002 is further configured to:
and under the condition that the second wireless network module chip is in a state of forbidding data communication through the first channel or in a state of forbidding wireless network connection through the first channel, executing a step of detecting whether a second motion value meets a second preset condition.
Optionally, the second terminal further includes: a second display screen;
the second connection module 1002, further configured to:
detecting whether the second display screen is in a lighting state;
if so, executing the step of controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition;
if not, stopping executing the step of controlling the second wireless network module chip to transmit the encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition.
Optionally, the second terminal further includes: a second display screen;
the second connection module 1002, further configured to:
responding to the second motion value meeting a second preset condition, and detecting whether the second display screen is in a lighting state;
and if not, controlling the second display screen to be lightened, and controlling the second wireless network module chip to start a wireless network connection function between the second wireless network module chip and other external terminals based on the first channel.
Optionally, the second terminal further comprises a second speaker;
the second connection module 1002, further configured to:
and responding to the establishment of the wireless network connection between the first terminal and the first terminal based on the first channel, and playing a prompt tone through the second loudspeaker, wherein the volume level of the played prompt tone is a prompt volume level.
Optionally, the second connection module 1002 is further configured to: under the condition that the second loudspeaker plays initial audio, detecting that the volume level of the initial audio is an initial volume level;
setting a volume level at which the initial audio is played to a first volume level if the initial volume level is less than a first level threshold;
playing the initial audio at the first volume level while playing the prompt tone, wherein the first volume level is greater than the initial volume level;
or the like, or, alternatively,
maintaining a volume level at which the initial audio is played at the initial volume level if the initial volume level is greater than or equal to a first level threshold;
and continuously playing the initial audio at the initial sound level while playing the prompt tone.
Optionally, the first volume level is greater than or equal to the first level threshold, and/or the first volume level is equal to the prompt volume level, and/or the first level threshold is equal to the prompt volume level.
The second transmission module 1003, further configured to: and under the condition that at least two data to be transmitted sent by the first terminal exist, displaying the data to be transmitted in a split screen mode.
Optionally, the second transmission module 1003 is further configured to:
under the condition that at least two pieces of data to be transmitted sent by the first terminals exist, sending the equipment identification of each first terminal to each first terminal;
receiving equipment identification confirmation information which is sent by each first terminal and carries a target equipment identification;
and under the condition that the target equipment identifications in the equipment identification confirmation information are the same, displaying the data to be transmitted, which is sent by the first terminal and indicated by the target equipment identifications.
According to the embodiment of the disclosure, the first terminal is triggered to establish wireless network connection with the second terminal through the first channel based on the motion value detected by the motion sensor in the first terminal, so that the first channel and/or the second channel can be selected to perform data transmission according to actual conditions, the influence of a single channel on data transmission between terminals is reduced, and the stability of data transmission between terminals is improved.
An embodiment of the present application provides an electronic device, including: the device comprises a motion sensor, a wireless network module chip, a circuit board, a memory and a processor;
the memory having computer readable code stored therein;
one or more of the processors, the electronic device performing the data transfer method when the computer readable code is executed by the one or more processors.
Optionally, the motion sensor and the wireless network module chip are fixedly arranged on the circuit board.
Optionally, the method further comprises: the display screen, the circuit board passes through block mechanism, sets up in the one side of keeping away from the display surface of display screen.
According to the embodiment of the disclosure, the first terminal is triggered to establish wireless network connection with the second terminal through the first channel based on the motion value detected by the motion sensor in the first terminal, so that the first channel and/or the second channel can be selected to perform data transmission according to actual conditions, the influence of a single channel on data transmission between terminals is reduced, and the stability of data transmission between terminals is improved.
Various component embodiments of the disclosure may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in an electronic device according to embodiments of the present disclosure. The present disclosure may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present disclosure may be stored on a computer-readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
For example, fig. 20 illustrates an electronic device that may implement a method in accordance with the present disclosure. The electronic device conventionally includes a processor 1110 and a computer program product or computer-readable medium in the form of a memory 1120. The memory 1120 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 1120 has storage space 1130 for program code 1131 for performing any of the method steps described above. For example, the memory space 1130 for the program code may include respective program codes 1131 for implementing various steps in the above method, respectively. The program code can be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is typically a portable or fixed storage unit as described with reference to fig. 21. The storage unit may have a memory segment, a memory space, and the like arranged similarly to the memory 1120 in the electronic device of fig. 20. The program code may be compressed, for example, in a suitable form. Generally, the memory unit comprises computer readable code 1131', i.e. code that can be read by a processor, such as 1110, for example, which when executed by an electronic device causes the electronic device to perform the steps of the method described above.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Reference herein to "one embodiment," "an embodiment," or "one or more embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Moreover, it is noted that instances of the word "in one embodiment" are not necessarily all referring to the same embodiment.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the disclosure may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The disclosure may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solutions of the present disclosure, not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (54)

1. A data transmission method applied to a first terminal, the first terminal comprising a first motion sensor and a first wireless network module chip, wherein channels supported by the first wireless network module chip comprise a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, the method comprising:
acquiring a first motion value of the first motion sensor;
under the condition that the first motion value meets a first preset condition, controlling the first wireless network module chip to transmit an encrypted signal with a second terminal through the first channel;
establishing wireless network connection based on a first channel between the second terminal and the second terminal according to the encrypted signal and a first channel communication protocol;
sending the data to be transmitted corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel;
wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
2. The method according to claim 1, wherein said controlling the first radio network module chip to transmit the encrypted signal with the second terminal through the first channel if the first motion value meets a first preset condition comprises:
and within a first time period after a first time, controlling the first wireless network module chip to transmit an encrypted signal with the second terminal through the first channel, wherein the first time is when the first motion value is detected to be greater than a first threshold value.
3. The method of claim 2, wherein encrypting the signal comprises: a second encrypted signal sent by the second terminal; the establishing of the wireless network connection based on the first channel with the second terminal according to the encrypted signal and the first channel communication protocol comprises the following steps:
receiving said second encrypted signal according to said standard communication protocol during said first time period;
decrypting the second encrypted signal according to the encrypted communication protocol;
performing identity authentication of the second terminal according to the decrypted second encrypted signal;
responding to the successful identity authentication, and establishing wireless network connection between the second terminal and the second terminal based on the first channel;
or the like, or, alternatively,
the encrypted signal includes: a first encrypted signal sent by the first terminal;
the establishing of the wireless network connection based on the first channel with the second terminal according to the encrypted signal and the first channel communication protocol comprises the following steps:
transmitting the first encrypted signal to the second terminal within the first time period;
receiving a feedback signal from the second terminal for the first encrypted signal according to the standard communication protocol;
decrypting the feedback signal according to the encrypted communication protocol;
and determining the identity information of the second terminal according to the decrypted feedback signal, and establishing wireless network connection between the second terminal and the first terminal based on the first channel.
4. The method of claim 3, wherein the second terminal includes a second motion sensor, and wherein the second encrypted signal is transmitted by the second terminal for a second time period after a second time; the feedback signal of the first encrypted signal is sent by the second terminal receiving the first encrypted signal within the second time period, where the second time is a moment when the second terminal detects that a second motion value of the second motion sensor is greater than a second threshold value, the second time is greater than the first time, and the second time period is less than the first time period.
5. The method of claim 4, wherein an absolute value of a difference between the first time period and the second time period is greater than or equal to an absolute value of a difference between the first time and the second time.
6. The method of claim 4, wherein the difference between the first time period and the second time period is greater than or equal to 1 s.
7. The method of claim 4, wherein the first threshold is greater than the second threshold.
8. The method according to claim 2, wherein after controlling the first radio network module chip to transmit the encrypted signal with the second terminal through the first channel if the first motion value meets a first preset condition, the method further comprises:
detecting whether a wireless network connection using the second channel has been established with an external terminal outside the first period;
if not, controlling the first wireless network module chip to stop utilizing the first channel to carry out data communication;
if yes, determining the identity information of other connected external terminals, and controlling the first wireless network module chip to close the wireless network connection function between the first wireless network module chip and the other external terminals based on the first channel, wherein the other external terminals include: an external terminal other than the second terminal among the connected external terminals.
9. The method according to claim 2, wherein before controlling the first radio network module chip to transmit the encrypted signal with the second terminal through the first channel if the first motion value satisfies the first predetermined condition, further comprising,
under the condition that the first motion value meets a first preset condition, controlling the first wireless network module chip to start the authority of encrypted signal transmission through the first channel and the second terminal;
and in the first time period, if the encrypted signal is not transmitted to the second terminal through the first channel, controlling the first radio network module chip to stop utilizing the first channel to carry out data communication.
10. The method of claim 2, wherein the first time period is less than or equal to 4 s.
11. The method of claim 1, wherein encrypting the signal comprises: a second encrypted signal sent by the second terminal, where the second encrypted signal includes a second time, and the second time is used to indicate a time when a second motion value of the second terminal is greater than a second threshold;
the establishing of the wireless network connection based on the first channel with the second terminal according to the encrypted signal and the first channel communication protocol comprises the following steps:
establishing a wireless network connection with the second terminal based on the first channel if the second time falls within a first time period after a first time, the first time being a time when the first motion value is greater than the first threshold;
or the like, or, alternatively,
the encrypted signal includes: a first encrypted signal sent by the first terminal, where the first encrypted signal includes a first time, and the first time is a time when the first motion value is detected to be greater than a first threshold;
the establishing of the wireless network connection based on the first channel with the second terminal according to the encrypted signal and the first channel communication protocol comprises the following steps:
and under the condition that the first time falls into a second time period after the second time, determining the identity information of the second terminal, and establishing wireless network connection with the second terminal based on the first channel.
12. The method according to claim 1, wherein said controlling the first radio network module chip to transmit the encrypted signal with the second terminal through the first channel if the first motion value meets a first preset condition comprises:
and sending a first starting signal to the first wireless network module chip under the condition that the first motion value meets a first preset condition, wherein the first starting signal is used for indicating the first wireless network chip to transmit an encryption signal with the second terminal by using the first channel.
13. The method according to claim 1, wherein before controlling the first radio network module chip to transmit the encrypted signal with the second terminal through the first channel if the first motion value meets a first preset condition, the method further comprises:
and under the condition that the first wireless network module chip is in a state of forbidding data communication through the first channel or in a state of forbidding wireless network connection through the first channel, executing a step of detecting whether the first motion value meets a first preset condition.
14. The method of claim 1, wherein the first terminal further comprises: a first display screen;
before controlling the first radio network module chip to transmit the encrypted signal with the second terminal through the first channel according to a standard communication protocol under the condition that the first motion value meets a first preset condition, the method further includes:
detecting whether the first display screen is in a lighting state;
if yes, controlling the first wireless network module chip to transmit an encrypted signal with a second terminal through the first channel according to a standard communication protocol under the condition that the first motion value meets a first preset condition;
if not, stopping executing the step of controlling the first wireless network module chip to transmit the encrypted signal with the second terminal through the first channel according to a standard communication protocol under the condition that the first motion value meets a first preset condition.
15. The method of claim 1, wherein the first terminal further comprises: a first display screen;
after the establishing of the wireless network connection with the second terminal based on the first channel, the method further comprises:
displaying a first interface through the first display screen, wherein the first interface comprises: the transmission permission instruction is used for indicating the first terminal to start data transmission with the second terminal, and the transmission rejection instruction is used for indicating the first terminal to stop data transmission with the second terminal.
16. The method of claim 15, wherein after said displaying a first interface via said first display screen, said method further comprises:
responding to the received selection input of the transmission agreement option, and executing the step of sending the data to be transmitted corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel;
and in response to receiving a selection input for the transmission rejection option, disconnecting the wireless network connection with the second terminal based on the first channel.
17. The method of claim 16, wherein after said receiving a selection input for said consent transmission option, said method further comprises:
detecting whether a wireless network connection using the second channel with the second terminal is established;
if so, transmitting the data to be transmitted by using the second channel;
and if not, transmitting the data to be transmitted by using the first channel.
18. The method of claim 16, wherein after said receiving a selection input for said consent transmission option, said method further comprises:
detecting whether a wireless network connection using the second channel with the second terminal is established;
if so, simultaneously transmitting the data to be transmitted by using the first channel and the second channel; or, comparing the communication speeds of the first channel and the second channel, and selecting the channel with the high communication speed from the first channel and the second channel to transmit the data to be transmitted;
and if not, sending a connection request signal to the second terminal, wherein the connection request signal is used for requesting to establish wireless network connection with the second terminal by using the second channel.
19. The method of any of claims 17-18, wherein after receiving a selection input for the consent transmission option, the method further comprises:
detecting whether the first wireless network module chip starts a search function of the second channel;
and if so, executing the step of detecting whether the wireless network connection utilizing the second channel between the second terminal and the second terminal is established.
20. The method of any of claims 15-18, further comprising, after said receiving a selection input for the consent transmission option:
detecting whether the first wireless network module chip starts a search function of the second channel;
and if not, controlling to start a search function of the first wireless network module chip, wherein the search function is used for acquiring the identity information of the second terminal based on the wireless network connection of the first channel and searching the second terminal through the second channel.
21. The method according to claim 20, wherein after the sending the data to be transmitted corresponding to the current data selection interface to the second terminal through the first channel and/or the second channel, the method further comprises:
and closing the searching function of the second channel of the first wireless network module chip in response to the stop of sending the data to be transmitted to the second terminal.
22. The method of claim 15, wherein displaying the first interface via the first display screen comprises:
and displaying the first interface after the interval time period after the first motion value meets a first preset condition.
23. The method of claim 22, wherein the gap period is greater than or equal to 2 s.
24. The method of claim 22, wherein prior to said displaying a first interface via said first display screen, said method further comprises:
determining type information of the second terminal based on the wireless network connection of the first channel;
determining the interval time period according to the type information of the second terminal;
wherein the type information of the second terminal includes size information of the second terminal, and the interval period is positively correlated with the size information of the second terminal.
25. The method of claim 16, wherein after said receiving a selection input for said consent transmission option, said method further comprises:
transmitting a transmission request signal to the second terminal;
displaying a second interface through the first display screen, wherein the second interface comprises: and prompt information reflecting the transmission condition of the transmission request signal.
26. The method of claim 25, wherein after the sending the transmission request signal to the second terminal, the method further comprises:
receiving a feedback signal for the transmission request signal from the second terminal;
and displaying a third interface through the first display screen, wherein the third interface comprises an interface obtained by reducing the current data selection interface according to a preset aspect ratio.
27. The method of claim 26, wherein the third interface further comprises: and the suspension button is used for controlling suspension or stopping data transmission with the second terminal or controlling and adjusting the aspect ratio of the third interface.
28. The method of claim 1, wherein prior to said acquiring the first motion value of the first motion sensor, the method further comprises:
displaying a fourth interface through the first display screen, the fourth interface comprising: a transmission function opening option and a transmission function closing option;
in response to receiving a selection input for the transfer function enable option, performing the step of obtaining a first motion value of the first motion sensor;
in response to receiving a selection input for the transport function close option, ceasing to perform the step of obtaining the first motion value for the first motion sensor.
29. The method of any one of claims 1-18, wherein the first channel and the second channel are the same channel.
30. The method of claim 1, wherein after the establishing of the wireless network connection with the second terminal based on the first channel, the method further comprises:
displaying a sharing terminal list on a display screen of the first terminal under the condition that the first motion value is larger than a first threshold value; the sharing terminal list comprises N sharing terminal options, wherein N is a positive integer, and the sharing terminal options are used for indicating the current connectable terminals or terminals which are connected in a historical mode.
31. The method according to claim 24, wherein after displaying the list of sharing terminals on the display screen of the first terminal, the method further comprises:
responding to a received selection instruction of a target sharing terminal option in the sharing terminal list, and taking a terminal indicated by the target sharing terminal option as the second terminal; and M target sharing terminal options exist, wherein M is a positive integer less than or equal to N.
32. The method of claim 25, wherein the pick instruction is generated under the following conditions:
detecting touch operation or air-space operation of a target sharing terminal option in the sharing terminal list; or the like, or, alternatively,
and selecting a sharing terminal option in the sharing terminal list as a target sharing terminal option according to the amplitude, the direction and the times of the third motion value detected by the first motion sensor.
33. The method of claim 1, wherein after the establishing of the wireless network connection with the second terminal based on the first channel, the method further comprises:
when the second terminal is carrying out data transmission with other external terminals, displaying a prompt interface, wherein the prompt interface is used for describing data transmission conditions of the other external terminals and the second terminal, and the data transmission conditions comprise: at least one of identity information, transmission data content and data transmission time of the second terminal.
34. A data transmission method applied to a second terminal including a second motion sensor, a second wireless network module chip, wherein channels supported by the second wireless network module chip include a first channel based on a peer-to-peer network mode and a second channel based on a centralized network mode, the method comprising:
acquiring a second motion value of the second motion sensor;
under the condition that the second motion value meets a second preset condition, controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel;
establishing wireless network connection based on a first channel between the first terminal and the first terminal according to the encrypted signal and a first channel communication protocol;
receiving data to be transmitted sent by the first terminal through the first channel and/or the second channel;
wherein the first channel communication protocol comprises a standard communication protocol and an encrypted communication protocol.
35. The method of claim 34, wherein said controlling the second wireless network module chip to transmit the encrypted signal with the second terminal through the first channel comprises:
and within a second time period after a second time, controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel, wherein the first time is when the second motion value is detected to be greater than a second threshold value.
36. The method of claim 35, wherein encrypting the signal comprises: a first encrypted signal sent by the first terminal; the establishing of the wireless network connection based on the first channel with the first terminal according to the encrypted signal and the first channel communication protocol comprises the following steps:
receiving the first encrypted signal according to the standard communication protocol within the second time period;
decrypting the first encrypted signal according to the encrypted communication protocol;
performing identity authentication of the first terminal according to the decrypted first encrypted signal;
responding to the successful identity authentication, and establishing wireless network connection between the first terminal and the first terminal based on the first channel;
or the like, or, alternatively,
the encrypted signal includes: a second encrypted signal sent by the second terminal;
the establishing of the wireless network connection based on the first channel with the first terminal according to the encrypted signal and the first channel communication protocol comprises the following steps:
transmitting the second encrypted signal to the first terminal within the second time period;
receiving a feedback signal from the first terminal for the second encrypted signal according to the standard communication protocol;
decrypting the feedback signal according to the encrypted communication protocol;
and determining the identity information of the first terminal according to the decrypted feedback signal, and establishing wireless network connection with the first terminal based on the first channel.
37. The method of claim 36, wherein the second terminal includes a second motion sensor, and wherein the second encrypted signal is transmitted by the second terminal for a second time period after a second time; the feedback signal of the second encrypted signal is sent by the first terminal receiving the second encrypted signal within the first time period, where the first time is a moment when the first terminal detects that a first motion value of the first motion sensor is greater than a first threshold, the second time is greater than the first time, and the second time period is less than the first time period.
38. The method of claim 37, wherein an absolute value of a difference between the first time period and the second time period is greater than or equal to an absolute value of a difference between the first time and the second time.
39. The method of claim 38, wherein an absolute value of a difference between the first time period and the second time period is positively correlated with the second terminal size information.
40. The method of claim 35, wherein after said controlling the second wireless network module chip to transmit the encrypted signal with the first terminal through the first channel, the method further comprises:
detecting whether a wireless network connection based on the first channel is established with an external terminal outside the second time period;
if not, controlling the second wireless network module chip to stop utilizing the first channel to carry out data communication;
if yes, determining the identity information of other connected external terminals, and controlling the second wireless network module chip to close the wireless network connection function between the second wireless network module chip and other external terminals based on the first channel, wherein the other external terminals include: an external terminal other than the first terminal among the connected external terminals.
41. The method of claim 35, wherein the second time period is less than or equal to 3 s.
42. The method of claim 34, wherein controlling the second wireless network module chip to transmit the encrypted signal with the first terminal through the first channel if the second motion value meets a second preset condition comprises:
and sending a second starting signal to the second wireless network module chip under the condition that the second motion value meets a second preset condition, wherein the second starting signal is used for indicating the second wireless network chip to transmit an encryption signal with the first terminal by using the first channel.
43. The method of claim 35, wherein before controlling the second wireless network module chip to transmit the encrypted signal with the first terminal through the first channel if the second motion value meets a second preset condition, the method further comprises:
and under the condition that the second wireless network module chip is in a state of forbidding data communication through the first channel or in a state of forbidding wireless network connection through the first channel, executing a step of detecting whether a second motion value meets a second preset condition.
44. The method of claim 35, wherein the second terminal further comprises: a second display screen;
before controlling the second wireless network module chip to transmit the encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition, the method further comprises:
detecting whether the second display screen is in a lighting state;
if so, executing the step of controlling the second wireless network module chip to transmit an encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition;
if not, stopping executing the step of controlling the second wireless network module chip to transmit the encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition.
45. The method of claim 35, wherein the second terminal further comprises: a second display screen;
before controlling the second wireless network module chip to transmit the encrypted signal with the first terminal through the first channel under the condition that the second motion value meets a second preset condition, the method further includes:
responding to the second motion value meeting a second preset condition, and detecting whether the second display screen is in a lighting state;
and if not, controlling the second display screen to be lightened, and controlling the second wireless network module chip to start a wireless network connection function between the second wireless network module chip and other external terminals based on the first channel.
46. The method of any of claims 35-45, wherein the second terminal further comprises a second speaker, the method further comprising:
and responding to the establishment of the wireless network connection between the first terminal and the first terminal based on the first channel, and playing a prompt tone through the second loudspeaker, wherein the volume level of the played prompt tone is a prompt volume level.
47. The method of claim 35, wherein prior to said playing an alert tone through said second speaker, said method further comprises:
under the condition that the second loudspeaker plays initial audio, detecting that the volume level of the initial audio is an initial volume level;
the playing of the alert tone through the second speaker includes:
setting a volume level at which the initial audio is played to a first volume level if the initial volume level is less than a first level threshold;
playing the initial audio at the first volume level while playing the prompt tone, wherein the first volume level is greater than the initial volume level;
or the like, or, alternatively,
maintaining a volume level at which the initial audio is played at the initial volume level if the initial volume level is greater than or equal to a first level threshold;
and continuously playing the initial audio at the initial sound level while playing the prompt tone.
48. The method of claim 47, wherein the first volume level is greater than or equal to the first level threshold, and/or wherein the first volume level is equal to the alert volume level, and/or wherein the first level threshold is equal to the alert volume level.
49. The method according to claim 47, wherein after the receiving the data to be transmitted sent by the first terminal through the first channel and/or the second channel, the method further comprises:
and under the condition that at least two data to be transmitted sent by the first terminal exist, displaying the data to be transmitted in a split screen mode.
50. The method according to claim 47, wherein after the receiving the data to be transmitted sent by the first terminal through the first channel and/or the second channel, the method further comprises:
under the condition that at least two pieces of data to be transmitted sent by the first terminals exist, sending the equipment identification of each first terminal to each first terminal;
receiving equipment identification confirmation information which is sent by each first terminal and carries a target equipment identification;
and under the condition that the target equipment identifications in the equipment identification confirmation information are the same, displaying the data to be transmitted, which is sent by the first terminal and indicated by the target equipment identifications.
51. An electronic device, comprising: the device comprises a motion sensor, a wireless network module chip, a circuit board, a memory and a processor;
the memory having computer readable code stored therein;
one or more of the processors, the electronic device performing the data transmission method of any of claims 1-50 when the computer readable code is executed by the one or more processors.
52. The method of claim 51, wherein the motion sensor and the wireless network module chip are fixedly disposed on the circuit board.
53. The method of claim 52, further comprising: the display screen, the circuit board passes through block mechanism, sets up in the one side of keeping away from the display surface of display screen.
54. A computer-readable medium having instructions stored thereon, which when executed by a processor, cause the processor to perform the data transmission method of any one of claims 1-50.
CN202110766247.4A 2021-07-07 2021-07-07 Data transmission method, electronic device and computer storage medium Active CN113301539B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110766247.4A CN113301539B (en) 2021-07-07 2021-07-07 Data transmission method, electronic device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110766247.4A CN113301539B (en) 2021-07-07 2021-07-07 Data transmission method, electronic device and computer storage medium

Publications (2)

Publication Number Publication Date
CN113301539A true CN113301539A (en) 2021-08-24
CN113301539B CN113301539B (en) 2021-11-26

Family

ID=77330759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110766247.4A Active CN113301539B (en) 2021-07-07 2021-07-07 Data transmission method, electronic device and computer storage medium

Country Status (1)

Country Link
CN (1) CN113301539B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130141308A1 (en) * 2011-12-01 2013-06-06 Institute For Information Industry Electronic device and multi-panel interface displaying method
CN103476140A (en) * 2013-09-05 2013-12-25 北京邮电大学 Method for making choice between D2D cooperating multicast mode and fixed relay cooperating multicast mode in cellular system
CN104185226A (en) * 2013-05-24 2014-12-03 中国移动通信集团公司 Terminal equipment switching control method, mobile relay node and terminal equipment
CN106034340A (en) * 2015-03-10 2016-10-19 中兴通讯股份有限公司 Communication mode control method, base station, user terminal and communication mode control system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130141308A1 (en) * 2011-12-01 2013-06-06 Institute For Information Industry Electronic device and multi-panel interface displaying method
CN104185226A (en) * 2013-05-24 2014-12-03 中国移动通信集团公司 Terminal equipment switching control method, mobile relay node and terminal equipment
CN103476140A (en) * 2013-09-05 2013-12-25 北京邮电大学 Method for making choice between D2D cooperating multicast mode and fixed relay cooperating multicast mode in cellular system
CN106034340A (en) * 2015-03-10 2016-10-19 中兴通讯股份有限公司 Communication mode control method, base station, user terminal and communication mode control system

Also Published As

Publication number Publication date
CN113301539B (en) 2021-11-26

Similar Documents

Publication Publication Date Title
EP3663903B1 (en) Display method and device
RU2650505C2 (en) Method and device for connection with controlled intelligent device
CN104639549B (en) Apparatus bound method and apparatus
CN110972334B (en) Bluetooth pairing connection method, device and readable storage medium
RU2670736C2 (en) Method and device for binding remote control and related device
WO2021114952A1 (en) Data processing method, terminal device, bluetooth device, and storage medium
WO2017148082A1 (en) Device access controlling method, and related device and system
JP2022543684A (en) Terminal device, method and system for implementing one-touch screen projection using remote control device
CN105163366B (en) Wireless network connecting method and device
US20220239718A1 (en) Communication Protocol Switching Method, Apparatus, and System
CN104580265A (en) Equipment binding method and equipment binding device
CN109946986B (en) Household appliance control method, wearable device and computer readable storage medium
KR20140146954A (en) Method and device for providing service
CN108377157B (en) Control method and device of Wi-Fi antenna
CN105182783A (en) Method, apparatus and terminal for controlling intelligent devices
KR101876183B1 (en) Security-enhanced residential gateway device based on internet of things
CN106413011B (en) Method for switching network and device
CN105069875A (en) Electronic key, electronic devices and electronic device networking/pairing method
CN104168605A (en) Data transmission control method and apparatus
WO2018049970A1 (en) Hotspot network switching method and terminal
CN104837178A (en) Network accessing method and device
CN111431882B (en) Data processing method, device and storage medium
CN111148081B (en) Information interaction method and electronic equipment
CN117956546A (en) Device reconnection method, electronic device, storage medium and chip
CN113301539B (en) Data transmission method, electronic device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant