CN114143910A - Data transmission method, device and computer readable storage medium - Google Patents

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

Info

Publication number
CN114143910A
CN114143910A CN202111500889.6A CN202111500889A CN114143910A CN 114143910 A CN114143910 A CN 114143910A CN 202111500889 A CN202111500889 A CN 202111500889A CN 114143910 A CN114143910 A CN 114143910A
Authority
CN
China
Prior art keywords
peer
network connection
data
peer network
infrared data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111500889.6A
Other languages
Chinese (zh)
Inventor
吴晓琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202111500889.6A priority Critical patent/CN114143910A/en
Publication of CN114143910A publication Critical patent/CN114143910A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/20Transfer of user or subscriber data
    • H04W8/205Transfer to or from user equipment or user record carrier
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Landscapes

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

Abstract

The embodiment of the application discloses a data transmission method, a data transmission device and a computer readable storage medium, wherein infrared data sent by equipment to be connected are acquired; extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected; establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information; and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection. Therefore, the peer-to-peer network connection information of the devices to be connected is transmitted by utilizing the infrared data, so that the speed of establishing peer-to-peer network connection between the devices is increased, and the data transmission efficiency is further improved.

Description

Data transmission method, device and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data transmission method, an apparatus, and a computer-readable storage medium.
Background
The WiFi Direct (WiFi-Direct) standard refers to a standard that allows devices in a wireless network to connect to each other without passing through a wireless router. With the development of communication technology, WiFi direct connection is more and more widely applied to the transmission of big data. Such as screen interaction and file sharing of mobile phones, computers and televisions.
However, in the existing Wi-Fi direct technology, when data transmission equipment is connected, problems of too long time for discovering remote equipment before connection and many man-machine interaction links during connection exist, so that the speed of establishing peer-to-peer network connection between the equipment is slow, and the data transmission efficiency is low.
Disclosure of Invention
Embodiments of the present application provide a data transmission method, an apparatus, and a computer-readable storage medium, which can improve a speed of establishing a peer-to-peer network connection between devices, and improve data transmission efficiency.
An embodiment of the present application provides a data transmission method, including:
acquiring infrared data sent by equipment to be connected;
extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected;
establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information;
and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection.
Correspondingly, an embodiment of the present application provides a data transmission apparatus, including:
the acquisition unit is used for acquiring infrared data sent by the equipment to be connected;
the extraction unit is used for extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected;
the establishing unit is used for establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information;
and the transmission unit is used for transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection.
In one embodiment, the transmission unit includes:
an application program identifier obtaining subunit, configured to obtain an application program identifier of an application program to be transmitted;
the searching subunit is used for searching the application program package corresponding to the application program identifier;
a transmission subunit, configured to transmit the application package to the device to be connected based on the peer-to-peer network connection.
In one embodiment, the lookup subunit includes:
the query module is used for querying the position information of the application program package corresponding to the application program identifier;
and the extraction module is used for extracting the application program package corresponding to the application program identifier based on the position information of the application program package.
In one embodiment, the extraction unit includes:
the historical data set acquisition subunit is used for acquiring a historical data set, wherein the historical data set comprises at least one piece of historical infrared data and corresponding historical connection information;
the detection subunit is used for detecting each historical infrared data in the historical data set based on the infrared data;
the target historical connection information acquisition subunit is used for acquiring target historical connection information corresponding to the target historical infrared data when the target historical infrared data matched with the infrared data is detected to exist in the historical data set;
and the assignment subunit is used for taking the target historical connection information as the peer-to-peer network connection information corresponding to the device to be connected.
In an embodiment, the data transmission apparatus further includes:
the infrared data extraction unit is used for extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected when the fact that target historical infrared data matched with the infrared data do not exist in the historical data set is detected;
a storage unit, configured to store the infrared data and the peer-to-peer network connection information in the historical data set.
In one embodiment, the memory cell includes:
the creating subunit is used for creating a mapping relation between the infrared data and the peer-to-peer network connection information;
and the storage subunit is used for storing the infrared data and the peer-to-peer network connection information which have the mapping relationship into the historical data set.
In one embodiment, the establishing unit includes:
the connection subunit is configured to initiate a connection request to the device to be connected according to the peer-to-peer network connection information;
and the feedback information receiving subunit is configured to receive connection acceptance feedback information returned by the to-be-connected device in response to the connection request, and establish peer-to-peer network connection with the to-be-connected device based on the connection acceptance feedback information.
In addition, a computer-readable storage medium is provided, where the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform the steps in any one of the data transmission methods provided in the embodiments of the present application.
In addition, the embodiment of the present application further provides a computer device, which includes a processor and a memory, where the memory stores an application program, and the processor is configured to run the application program in the memory to implement the data transmission method provided in the embodiment of the present application.
Embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the steps in the data transmission method provided by the embodiment of the application.
According to the method and the device, the infrared data sent by the device to be connected are acquired; extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected; establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information; and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection. Therefore, the peer-to-peer network connection information of the equipment to be connected is transmitted by utilizing the infrared data, so that unnecessary operation cost of scanning remote equipment and the like in the prior art is avoided, the speed of establishing peer-to-peer network connection between the equipment is increased, and the data transmission efficiency is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an implementation scenario of a data transmission method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 4 is another schematic flow chart of a data transmission method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a data transmission method, a data transmission device and a computer readable storage medium. The data transmission device may be integrated in a computer device, and the computer device may be a server or a terminal.
For a better understanding of the embodiments of the present application, reference is made to the following terms:
peer-to-peer network: Peer-to-Peer (Peer-to-Peer, abbreviated as P2P) is a distributed application architecture for distributing tasks and workloads among peers (peers), and is a networking or network form formed by Peer-to-Peer computing model in application layer. In a P2P network environment, multiple computer devices connected to each other are in a peer-to-peer status, each computer device has the same function, and there is no master-slave relationship, and one computer device can be used as a server (GO, i.e. group owner) to set shared resources for other computer devices in the network, and also as a workstation (GC, i.e. group user), and the whole network generally does not rely on a dedicated centralized server, nor has a dedicated workstation. Each computer in the network can both act as a requester of network services and provide resources, services and content in response to requests from other computers. Typically these resources and services include: sharing and exchange of information, computing resources (e.g., central processor computing power sharing), storage sharing (e.g., use of cache and disk space), network sharing, printer sharing, and the like.
WiFi-Direct: namely, WiFi direct connection, like WiFi P2P, can enable devices to perform point-to-point direct interconnection through a Wireless Local Area Network (WLAN) without an intermediate access point.
Infrared (IR): infrared is an electromagnetic wave having a frequency between that of microwaves and visible light, and is invisible light having a wavelength of 760 nm to 1 mm and a frequency lower than that of red light. Generally, infrared rays are one of many invisible rays in solar rays, which are also called infrared heat radiation, and have strong heat action. The infrared ray has the characteristics of strong penetrating power, accurate measurement distance, sensitive thermal effect induction and the like.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Network acceleration service (CDN), big data and an artificial intelligence platform. The terminal may be a device capable of performing data transmission, such as a smart television, a tablet computer, a notebook computer, a desktop computer, a smart speaker, and a smart phone, but is not limited thereto. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
Referring to fig. 1, taking an example that a data transmission device is integrated in a terminal, fig. 1 is a schematic view of an implementation scenario of a data transmission method according to an embodiment of the present application, where the terminal may be, but is not limited to, a smart phone, a smart television, a tablet computer, a notebook computer, a desktop computer, and various computer devices capable of performing data transmission. The terminal can acquire infrared data sent by the equipment to be connected; extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected; establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information; and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection.
It should be noted that the schematic diagram of the implementation environment scenario of the data transmission method shown in fig. 1 is only an example, and the implementation environment scenario of the data transmission method described in the embodiment of the present application is for more clearly explaining the technical solution of the embodiment of the present application, and does not constitute a limitation to the technical solution provided by the embodiment of the present application. As can be known to those skilled in the art, with the evolution of data transmission and the emergence of new service scenarios, the technical solution provided in the present application is also applicable to similar technical problems.
With the development of communication technology, WiFi direct connection is more and more widely applied to transmission of big data, such as screen interaction of mobile phones, computers, televisions, file sharing, and the like.
However, in the existing Wi-Fi direct technology, when data transmission equipment is connected, problems of too long time for discovering remote equipment before connection and many man-machine interaction links during connection exist, so that the speed of establishing peer-to-peer network connection between the equipment is slow, and the data transmission efficiency is low.
In order to solve the above problems, embodiments of the present application provide a data transmission method, where peer-to-peer network connection information of a device to be connected is transmitted by using infrared data, so that unnecessary operation costs such as scanning a remote device and performing connection interaction operations in the prior art are avoided, a speed of establishing peer-to-peer network connection between devices is increased, and data transmission efficiency is further improved.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment will be described from the perspective of a data transmission device, which may be specifically integrated in a computer device, and the computer device may be a terminal, and the application is not limited herein.
Referring to fig. 2, fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application. The data transmission method comprises the following steps:
in step 101, infrared data sent by a device to be connected is acquired.
The device to be connected may be a device to be connected, and may be a device supporting a WiFi-Direct function and an infrared function. The infrared data may be data sent by the device to be connected through an infrared function, and the infrared data may carry information required by the device to be connected to establish the WiFi-Direct connection, for example, the information may include a local area network Address (Media Access Control Address, MAC Address for short), a device type (device type), a device name and configuration method (configuration methods), a connection channel, and the like of the device to be connected. The Channel is also called a Channel (Channel), a frequency band, and is a data signal transmission Channel in which a radio signal (electromagnetic wave) is used as a transmission carrier.
In the prior art, before a WiFi-Direct connection is to be established between two devices, a peer-to-peer network connection service (WifiP2pService) needs to be created in a system service (SystemServer), and the peer-to-peer network connection service is started, so that surrounding P2P devices can be searched through a startSearch () function of the WifiP2pSettings, and a target device is selected from the searched P2P devices to establish the WiFi-Direct connection. Therefore, according to the characteristics that infrared rays have strong penetrating power, accurate measurement distance, sensitive thermal effect induction and the like, the embodiment of the application utilizes the infrared rays to trigger the P2P to establish connection, so that the rapid transmission of data is realized. Specifically, information required by the device to be connected for establishing the WiFi-Direct connection can be sent in the form of infrared data through an infrared technology, and then the WiFi-Direct connection can be established directly by acquiring the infrared data sent by the device to be connected. Unnecessary operation cost for scanning remote equipment and the like in the prior art is avoided, the speed of establishing peer-to-peer network connection between the equipment is increased, and then the data transmission efficiency is improved.
Optionally, when initiating the infrared receiving process, the device corresponding to the received infrared data may be used as a device to be connected, when there are multiple devices sending infrared data, the device corresponding to the infrared data that is acquired first may be used as the device to be connected, or according to predetermined device information, the device corresponding to the device information may be used as the device to be connected, and the infrared data sent by the device to be connected is acquired.
In step 102, the infrared data is extracted to obtain peer-to-peer network connection information corresponding to the device to be connected.
The peer-to-peer network connection is a WiFi-Direct connection, that is, a WiFi P2P connection, and the peer-to-peer network connection information may be information of a device to be connected, which is required when establishing a WiFi-Direct connection with the device to be connected, and for example, the peer-to-peer network connection information may include information such as a local area network Address (Media Access Control Address, MAC Address for short), a device type (device type), a device name and configuration method (configuration methods), and a channel of the device to be connected.
Therefore, the information extraction can be carried out on the infrared data sent by the equipment to be connected, so as to extract and obtain the peer-to-peer network connection information corresponding to the equipment to be connected.
In an embodiment, after acquiring the infrared data and extracting the corresponding peer-to-peer network connection information each time, the infrared data and the corresponding peer-to-peer network connection information may be stored, and when acquiring the infrared data next time, the peer-to-peer network connection information corresponding to the infrared data may be determined according to the infrared data and the corresponding peer-to-peer network connection information that are stored in history, so that time for extracting information of the infrared data is avoided, and speed of establishing peer-to-peer network connection is increased. Specifically, a historical data set may be obtained; detecting each historical infrared data in the historical data set based on the infrared data; when the historical data set is detected to have target historical infrared data matched with the infrared data, acquiring target historical connection information corresponding to the target historical infrared data; and taking the target historical connection information as the peer-to-peer network connection information corresponding to the device to be connected.
The historical data set may include at least one piece of historical infrared data and corresponding historical connection information, the historical infrared data may be infrared data acquired all the time, and the historical connection information may be peer-to-peer network connection information corresponding to each piece of historical infrared data extracted according to the historical infrared data.
Specifically, after acquiring the infrared data sent by the device to be connected, a historical data set may be acquired, or a historical data set may be acquired first, and then the infrared data sent by the device to be connected may be acquired, a specific data acquisition sequence may be set according to an actual situation, which is not limited herein, and then each historical infrared data in the historical data set may be traversed according to the infrared data to detect whether the historical infrared data in the historical data set is the same as the infrared data, that is, whether the device to be connected corresponding to the infrared data has already established peer-to-peer network connection in the historical connection, and when detecting that the historical data set has target historical infrared data matching the infrared data, that is, when detecting that the device to be connected corresponding to the infrared data has not first established peer-to-peer network connection, therefore, the peer-to-peer network connection information extracted in the past when connection is established can be acquired and used, specifically, the target historical connection information corresponding to the target historical infrared data can be acquired and used as the peer-to-peer network connection information corresponding to the device to be connected, so that the time for repeatedly extracting the same infrared data is avoided, and the speed of establishing peer-to-peer network connection is improved.
In an embodiment, when it is detected that there is no target historical infrared data matching the infrared data in the historical data set, that is, when peer-to-peer network connection is performed for the first time with the device to be connected corresponding to the infrared data, the infrared data may be extracted to obtain peer-to-peer network connection information corresponding to the device to be connected.
Optionally, a mapping relationship between the infrared data and the peer-to-peer network connection information may be created first, and a mapping relationship between the infrared data and the peer-to-peer network connection information may be created through a data mapping model, for example, the infrared data and the peer-to-peer network connection information may be stored in a database table having a mapping relationship, and then the infrared data and the peer-to-peer network connection information having a mapping relationship may be stored in the historical data set, and stored as historical infrared data and historical connection information.
In step 103, peer-to-peer network connection is established with the device to be connected according to the peer-to-peer network connection information.
Therefore, after the peer-to-peer network connection information corresponding to the to-be-connected equipment required for establishing the peer-to-peer network connection is acquired, the peer-to-peer network connection can be established with the to-be-connected equipment according to the peer-to-peer network connection information.
Specifically, the device to be connected may be found according to the peer-to-peer network connection information, and then a connection request for WiFi-Direct connection may be initiated to the device to be connected, after the device to be connected receives the connection request, a feedback may be made to respond to the connection request, for example, a feedback such as accepting connection or rejecting connection is made, and the feedback information is returned, so that feedback information returned by the device to be connected may be received, and when receiving the connection acceptance feedback information returned by the device to be connected for the connection request, peer-to-peer network connection may be established with the device to be connected. The connection accepting feedback information may be feedback information returned by the device to be connected accepting the connection request.
In step 104, the data to be transmitted is transmitted to the device to be connected based on the peer-to-peer network connection.
The data to be transmitted may be data transmitted based on peer-to-peer network connection, and may be data such as pictures, audio/video, documents, and Application Packages (APKs).
Therefore, the data to be transmitted can be transmitted to the device to be connected in an end-to-end interconnection mode based on the peer-to-peer network connection.
In an embodiment, the data to be transmitted may include an application package, and for the step of transmitting the data to be transmitted to the device to be connected based on the peer-to-peer network connection, the step may include: acquiring an application program identifier of an application program to be transmitted; searching an application program package corresponding to the application program identifier; and transmitting the application program package to the device to be connected based on the peer-to-peer network connection.
The application program to be transmitted may be an application program to be transmitted to a device to be connected through a peer-to-peer network connection, the application program identifier may be identification information corresponding to the application program to be transmitted, and the identification information may be used to uniquely identify the application program to be transmitted, and may be identification information such as a name, an Identity number (ID) and the like of the application program to be transmitted, so that the application program identifier of the application program to be transmitted may be obtained, and an application program package corresponding to the application program identifier may be searched in an application program package that is currently installed, so that the application program package may be transmitted to the device to be connected based on the peer-to-peer network connection. Optionally, the location information of the application package corresponding to the application identifier may be queried, so that the application package may be found based on the location information of the application package, and then the application package corresponding to the application identifier may be extracted, and then the application package is transmitted to the device to be connected based on the peer-to-peer network connection.
In an embodiment, please refer to fig. 3, fig. 3 is a specific flowchart illustration of a data transmission method provided in this embodiment, the data transmission method provided in this embodiment may be integrated in an initiating connection device, the initiating connection device may be a device that initiates a peer-to-peer network connection request, the accepting connection device may be a device that receives the peer-to-peer network connection request initiated by the initiating connection device, the initiating connection device and the accepting connection device may be devices that support a WiFi-Direct function and an infrared function, specifically, the accepting connection device may transmit peer-to-peer network connection information required for establishing peer-to-peer network connection in the form of infrared data, and the initiating connection device may receive infrared data carrying the peer-to-peer network connection information and extract the peer-to-peer network connection information based on the infrared data, so that a connection request of the peer-to-peer network can be initiated to the connection accepting device based on the peer-to-peer network connection information, the connection accepting device can respond to the connection request, send connection accepting feedback information to the connection initiating device, thereby completing the establishment of a peer-to-peer network connection of the initiating connecting device with the accepting connecting device, whereby, when data transfer between the two devices is required, a data transfer request may be initiated, for example, assuming that the data is sent by the accepting connecting device to the initiating connecting device, and the receiving connection device can initiate a request for transmitting data to be transmitted, when the initiating connection device receives the request for transmitting data to be transmitted initiated by the receiving connection device, the request may be acknowledged to grant receipt of the data to be transmitted by the accepting connection device, in this way, the initiating connecting device may communicate data with the accepting connecting device via a peer-to-peer network connection.
According to the method, the infrared data sent by the equipment to be connected are acquired; extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected; establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information; and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection. Therefore, the peer-to-peer network connection information of the equipment to be connected is transmitted by utilizing the infrared data, so that unnecessary operation cost of scanning remote equipment and the like in the prior art is avoided, the speed of establishing peer-to-peer network connection between the equipment is increased, and the data transmission efficiency is further improved.
The method described in the above examples is further illustrated in detail below by way of example.
In this embodiment, the data transmission apparatus is specifically integrated in a computer device as an example. The data transmission method takes a terminal as an execution main body.
For a better description of the embodiments of the present application, please refer to fig. 4. As shown in fig. 4, fig. 4 is another schematic flow chart of the information obtaining method according to the embodiment of the present application. The specific process is as follows:
in step 201, the terminal acquires infrared data sent by a device to be connected, acquires a historical data set, and detects each historical infrared data in the historical data set based on the infrared data.
The terminal can acquire infrared data sent by the device to be connected, meanwhile, in order to improve the speed of establishing peer-to-peer network connection, a pre-stored historical data set can be acquired, and then each historical infrared data in the historical data set can be traversed based on the infrared data so as to detect whether historical infrared data matched with the infrared data exist in the historical data set.
In step 202, when it is detected that target historical infrared data matched with the infrared data exists in the historical data set, the terminal acquires target historical connection information corresponding to the target historical infrared data, and takes the target historical connection information as peer-to-peer network connection information corresponding to the device to be connected.
Specifically, when the terminal detects that the historical infrared data set contains the target historical infrared data matched with the infrared data, that is, the device to be connected corresponding to the infrared data does not establish peer-to-peer network connection for the first time, therefore, the terminal can acquire and use the peer-to-peer network connection information extracted in the past when connection is established, specifically, the terminal can acquire the target historical connection information corresponding to the target historical infrared data and use the target historical connection information as the peer-to-peer network connection information corresponding to the device to be connected, so that the time for extracting repeated information of the same infrared data is avoided, and the speed of establishing peer-to-peer network connection is improved.
In step 203, when it is detected that there is no target historical infrared data matching the infrared data in the historical data set, the terminal extracts the infrared data to obtain peer-to-peer network connection information corresponding to the device to be connected.
When the terminal detects that the historical data set does not contain target historical infrared data matched with the infrared data, the terminal performs peer-to-peer network connection with the to-be-connected device corresponding to the infrared data for the first time, so that the terminal can extract the infrared data to obtain peer-to-peer network connection information corresponding to the to-be-connected device.
In step 204, the terminal creates a mapping relationship between the infrared data and the peer-to-peer network connection information, and stores the infrared data and the peer-to-peer network connection information in the history data set.
Specifically, the terminal may first create a mapping relationship between the infrared data and the peer-to-peer network connection information, and may create a mapping relationship between the infrared data and the peer-to-peer network connection information through a data mapping model, for example, the terminal may store the infrared data and the peer-to-peer network connection information in a database table having a mapping relationship, and further may store the infrared data and the peer-to-peer network connection information having a mapping relationship in the historical data set, and store the infrared data and the peer-to-peer network connection information as historical infrared data and historical connection information.
In step 205, the terminal initiates a connection request to the device to be connected according to the peer-to-peer network connection information, receives connection acceptance feedback information returned by the device to be connected for the connection request, and establishes peer-to-peer network connection with the device to be connected based on the connection acceptance feedback information.
Specifically, the terminal may find the device to be connected according to the peer-to-peer network connection information, and may further initiate a connection request for WiFi-Direct connection to the device to be connected, and after the device to be connected receives the connection request, may make a feedback to respond to the connection request, for example, a feedback such as accepting connection or rejecting connection is made, and return the feedback information to the terminal, so that the terminal may receive the feedback information returned by the device to be connected, and when the terminal receives the connection acceptance feedback information returned by the device to be connected for the connection request, the peer-to-peer network connection with the device to be connected may be established.
In step 206, the terminal obtains the application identifier of the application to be transmitted, queries the location information of the application package corresponding to the application identifier, extracts the application package corresponding to the application identifier based on the location information of the application package, and transmits the application package to the device to be connected based on the peer-to-peer network connection.
Specifically, the terminal may obtain an application identifier of the application to be transmitted, and may further query, in the currently installed application list, the application package location information corresponding to the application identifier, and may further find the application package based on the application package location information, so that the application package may be transmitted to the device to be connected based on the peer-to-peer network connection.
As can be seen from the above, in the embodiment of the application, the terminal acquires the infrared data sent by the device to be connected, acquires the historical data set, and detects each piece of historical infrared data in the historical data set based on the infrared data; when the historical data set is detected to have target historical infrared data matched with the infrared data, the terminal acquires target historical connection information corresponding to the target historical infrared data, and the target historical connection information is used as peer-to-peer network connection information corresponding to the device to be connected; when the fact that target historical infrared data matched with the infrared data do not exist in the historical data set is detected, the terminal extracts the infrared data to obtain peer-to-peer network connection information corresponding to the device to be connected; the terminal creates a mapping relation between the infrared data and the peer-to-peer network connection information, and stores the infrared data and the peer-to-peer network connection information with the mapping relation into the historical data set; the terminal initiates a connection request to the device to be connected according to the peer-to-peer network connection information, receives connection receiving feedback information returned by the device to be connected aiming at the connection request, and establishes peer-to-peer network connection with the device to be connected based on the connection receiving feedback information; the terminal acquires an application program identifier of an application program to be transmitted, inquires the position information of an application program package corresponding to the application program identifier, extracts the application program package corresponding to the application program identifier based on the position information of the application program package, and transmits the application program package to the equipment to be connected based on the peer-to-peer network connection. Therefore, the peer-to-peer network connection information of the devices to be connected is transmitted by utilizing the infrared data, and the peer-to-peer network connection information corresponding to the infrared data is quickly extracted through the historical data set stored historically, so that the speed of establishing peer-to-peer network connection between the devices is improved, unnecessary operation cost of scanning the remote devices before connection and realizing connection establishment by interaction in the connection establishing process in the prior art is avoided, and further the data transmission efficiency is improved.
In order to better implement the above method, an embodiment of the present invention further provides a data transmission apparatus, which may be integrated in a terminal.
For example, as shown in fig. 5, for a schematic structural diagram of a data transmission apparatus provided in an embodiment of the present application, the data transmission apparatus may include an obtaining unit 301, an extracting unit 302, a establishing unit 303, and a transmitting unit 304, as follows:
an obtaining unit 301, configured to obtain infrared data sent by a device to be connected;
an extracting unit 302, configured to extract the infrared data to obtain peer-to-peer network connection information corresponding to the device to be connected;
an establishing unit 303, configured to establish peer-to-peer network connection with the device to be connected according to the peer-to-peer network connection information;
a transmitting unit 304, configured to transmit data to be transmitted to the device to be connected based on the peer-to-peer network connection.
In one embodiment, the transmission unit 304 includes:
an application program identifier obtaining subunit, configured to obtain an application program identifier of an application program to be transmitted;
the searching subunit is used for searching the application program package corresponding to the application program identifier;
and the transmission subunit is used for transmitting the application program package to the device to be connected based on the peer-to-peer network connection.
In one embodiment, the lookup subunit includes:
the query module is used for querying the position information of the application program package corresponding to the application program identifier;
and the extraction module is used for extracting the application program package corresponding to the application program identifier based on the position information of the application program package.
In one embodiment, the extracting unit 302 includes:
the historical data set acquisition subunit is used for acquiring a historical data set, wherein the historical data set comprises at least one piece of historical infrared data and corresponding historical connection information;
the detection subunit is used for detecting each historical infrared data in the historical data set based on the infrared data;
the target historical connection information acquisition subunit is used for acquiring target historical connection information corresponding to the target historical infrared data when the target historical infrared data matched with the infrared data is detected to exist in the historical data set;
and the assignment subunit is used for taking the target historical connection information as the peer-to-peer network connection information corresponding to the device to be connected.
In an embodiment, the data transmission apparatus further includes:
the infrared data extraction unit is used for extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected when the fact that target historical infrared data matched with the infrared data do not exist in the historical data set is detected;
a storage unit for storing the infrared data and the peer-to-peer network connection information to the historical data set.
In one embodiment, the memory cell includes:
a creating subunit, configured to create a mapping relationship between the infrared data and the peer-to-peer network connection information;
and the storage subunit is used for storing the infrared data and the peer-to-peer network connection information which have the mapping relationship into the historical data set.
In an embodiment, the establishing unit 303 includes:
a connection subunit, configured to initiate a connection request to the device to be connected according to the peer-to-peer network connection information;
and the feedback information receiving subunit is configured to receive connection acceptance feedback information returned by the to-be-connected device in response to the connection request, and establish peer-to-peer network connection with the to-be-connected device based on the connection acceptance feedback information.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, in the embodiment of the present application, the acquisition unit 301 acquires infrared data sent by a device to be connected; the extraction unit 302 extracts the infrared data to obtain peer-to-peer network connection information corresponding to the device to be connected; the establishing unit 303 establishes peer-to-peer network connection with the device to be connected according to the peer-to-peer network connection information; the transmission unit 304 transmits data to be transmitted to the device to be connected based on the peer-to-peer network connection. Therefore, the peer-to-peer network connection information of the equipment to be connected is transmitted by utilizing the infrared data, so that unnecessary operation cost of scanning remote equipment and the like in the prior art is avoided, the speed of establishing peer-to-peer network connection between the equipment is increased, and the data transmission efficiency is further improved.
An embodiment of the present application further provides a computer device, as shown in fig. 6, which shows a schematic structural diagram of a computer device according to an embodiment of the present application, where the computer device may be a terminal, and specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 6 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data transmission by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 via a power management system, so that functions of managing charging, discharging, and power consumption are implemented via the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
acquiring infrared data sent by equipment to be connected; extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected; establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information; and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein. It should be noted that the computer device provided in the embodiment of the present application and the data transmission method in the foregoing embodiment belong to the same concept, and specific implementation processes thereof are described in the foregoing method embodiment and are not described herein again.
As can be seen from the above, in the embodiment of the application, the infrared data sent by the device to be connected is acquired; extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected; establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information; and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection. Therefore, the peer-to-peer network connection information of the equipment to be connected is transmitted by utilizing the infrared data, so that unnecessary operation cost of scanning remote equipment and the like in the prior art is avoided, the speed of establishing peer-to-peer network connection between the equipment is increased, and the data transmission efficiency is further improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the data transmission methods provided in the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring infrared data sent by equipment to be connected; extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected; establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information; and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any data transmission method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data transmission method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
According to an aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations provided by the embodiments described above.
The data transmission method, the data transmission device, and the computer-readable storage medium provided by the embodiments of the present application are described in detail above, and specific examples are applied herein to illustrate the principles and implementations of the present application, and the descriptions of the above embodiments are only used to help understand the method and the core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method of data transmission, comprising:
acquiring infrared data sent by equipment to be connected;
extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected;
establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information;
and transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection.
2. The data transmission method according to claim 1, wherein the data to be transmitted includes an application package, and the transmitting the data to be transmitted to the device to be connected based on the peer-to-peer network connection includes:
acquiring an application program identifier of an application program to be transmitted;
searching an application program package corresponding to the application program identifier;
transmitting the application package to the device to be connected based on the peer-to-peer network connection.
3. The data transmission method of claim 2, wherein said finding the application package corresponding to the application identifier comprises:
inquiring the position information of the application program package corresponding to the application program identification;
and extracting the application program package corresponding to the application program identification based on the application program package position information.
4. The data transmission method according to claim 1, wherein the extracting the infrared data to obtain peer-to-peer network connection information corresponding to the device to be connected includes:
acquiring a historical data set, wherein the historical data set comprises at least one piece of historical infrared data and corresponding historical connection information;
detecting each historical infrared data in the historical data set based on the infrared data;
when the historical data set is detected to have target historical infrared data matched with the infrared data, acquiring target historical connection information corresponding to the target historical infrared data;
and taking the target historical connection information as the peer-to-peer network connection information corresponding to the equipment to be connected.
5. The data transmission method of claim 4, wherein after traversing each historical infrared data in the set of historical data based on the infrared data, further comprising:
when it is detected that target historical infrared data matched with the infrared data do not exist in the historical data set, extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected;
storing the infrared data and the peer-to-peer network connection information to the historical data set.
6. The data transmission method of claim 5, wherein said storing the infrared data and the peer-to-peer network connection information to the historical data set comprises:
creating a mapping relationship between the infrared data and the peer-to-peer network connection information;
storing the infrared data and the peer-to-peer network connection information in a mapping relationship to the historical data set.
7. The data transmission method according to claim 1, wherein the establishing peer-to-peer network connection with the device to be connected according to the peer-to-peer network connection information includes:
initiating a connection request to the equipment to be connected according to the peer-to-peer network connection information;
receiving connection receiving feedback information returned by the device to be connected aiming at the connection request, and establishing peer-to-peer network connection with the device to be connected based on the connection receiving feedback information.
8. A data transmission apparatus, comprising:
the acquisition unit is used for acquiring infrared data sent by the equipment to be connected;
the extraction unit is used for extracting the infrared data to obtain peer-to-peer network connection information corresponding to the equipment to be connected;
the establishing unit is used for establishing peer-to-peer network connection with the equipment to be connected according to the peer-to-peer network connection information;
and the transmission unit is used for transmitting the data to be transmitted to the equipment to be connected based on the peer-to-peer network connection.
9. A computer-readable storage medium storing instructions adapted to be loaded by a processor to perform the steps of the data transmission method according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps of the data transmission method according to any one of claims 1 to 7.
CN202111500889.6A 2021-12-09 2021-12-09 Data transmission method, device and computer readable storage medium Pending CN114143910A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111500889.6A CN114143910A (en) 2021-12-09 2021-12-09 Data transmission method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111500889.6A CN114143910A (en) 2021-12-09 2021-12-09 Data transmission method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114143910A true CN114143910A (en) 2022-03-04

Family

ID=80385625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111500889.6A Pending CN114143910A (en) 2021-12-09 2021-12-09 Data transmission method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114143910A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453854A (en) * 2016-09-22 2017-02-22 努比亚技术有限公司 Application sharing apparatus and method
CN109309967A (en) * 2018-12-11 2019-02-05 连尚(新昌)网络科技有限公司 Transmit method, equipment and the computer readable storage medium of file
CN109646940A (en) * 2018-12-19 2019-04-19 努比亚技术有限公司 Method, terminal and the computer readable storage medium of synchronization applications
CN111182515A (en) * 2019-12-14 2020-05-19 深圳市优必选科技股份有限公司 Network distribution method, device, terminal and computer storage medium
CN111885582A (en) * 2020-08-14 2020-11-03 深圳市当智科技有限公司 Wireless network connection method and device, electronic equipment and readable storage medium
CN113141671A (en) * 2021-04-23 2021-07-20 Tcl通讯(宁波)有限公司 Communication method and device of wifi device and computer readable storage medium
CN113316124A (en) * 2021-06-03 2021-08-27 阿波罗智联(北京)科技有限公司 Vehicle machine interconnection method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453854A (en) * 2016-09-22 2017-02-22 努比亚技术有限公司 Application sharing apparatus and method
CN109309967A (en) * 2018-12-11 2019-02-05 连尚(新昌)网络科技有限公司 Transmit method, equipment and the computer readable storage medium of file
CN109646940A (en) * 2018-12-19 2019-04-19 努比亚技术有限公司 Method, terminal and the computer readable storage medium of synchronization applications
CN111182515A (en) * 2019-12-14 2020-05-19 深圳市优必选科技股份有限公司 Network distribution method, device, terminal and computer storage medium
CN111885582A (en) * 2020-08-14 2020-11-03 深圳市当智科技有限公司 Wireless network connection method and device, electronic equipment and readable storage medium
CN113141671A (en) * 2021-04-23 2021-07-20 Tcl通讯(宁波)有限公司 Communication method and device of wifi device and computer readable storage medium
CN113316124A (en) * 2021-06-03 2021-08-27 阿波罗智联(北京)科技有限公司 Vehicle machine interconnection method and device

Similar Documents

Publication Publication Date Title
JP6751094B2 (en) Method, apparatus and system for supporting wireless communication
CN111580995B (en) Synchronous communication method and system of distributed cloud platform and Internet of things intelligent terminal based on MQTT asynchronous communication scene
US20230247388A1 (en) Communication system, method and device for miniature intelligent sensor
KR101453364B1 (en) SYSTEM FOR DYNAMIC IDENTIFICATION OF IoT DEVICES IN INTERNET OF THINGS AND METHOD THEREOF
CN107517438B (en) Method for requesting sharing of Bluetooth device, electronic device and computer storage medium
KR101332813B1 (en) Wireless communication apparatus and method for generating wireless access channel thereof
CN101459526B (en) Projector sharing conference system based on service discovery
CN113347242B (en) Cross-device resource access method and device, storage medium and electronic device
CN109413759B (en) Method and equipment for wireless connection
US20100005155A1 (en) Standardized mechanism of remote management of embedded radio modules
US11463376B2 (en) Resource distribution method and apparatus in Internet of Things, device, and storage medium
CN105474669A (en) Method and apparatus for providing persistent USB service for wireless USB devices
KR20210006457A (en) Access methods, devices and systems
KR20110093087A (en) Method and apparatus for using service of home network device based on remote access
US20230045914A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
CN112269842A (en) Information processing method and device, storage medium and computer equipment
WO2015172497A1 (en) Message pushing and acquisition methods and devices, and computer readable storage medium
US20150058491A1 (en) Information processing apparatus, information processing method, and program
CN105684478A (en) Discovery of wi-fi direct services via discovery probe
CN104301400A (en) Multi-screen cooperation and resource sharing method on basis of Samba protocol
KR101574767B1 (en) System and method for detect for ble device
WO2023020432A1 (en) Computing power request method, computing power allocation method, computing power execution method, and terminal and network-side device
CN114143910A (en) Data transmission method, device and computer readable storage medium
CN104135464B (en) The account processing method of web application, device and system in a kind of through transport
CN116132324A (en) Network state detection method and device, electronic equipment and 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