[go: up one dir, main page]

CN115190535B - Data transmission method and related equipment - Google Patents

Data transmission method and related equipment Download PDF

Info

Publication number
CN115190535B
CN115190535B CN202211107304.9A CN202211107304A CN115190535B CN 115190535 B CN115190535 B CN 115190535B CN 202211107304 A CN202211107304 A CN 202211107304A CN 115190535 B CN115190535 B CN 115190535B
Authority
CN
China
Prior art keywords
transmitted
codes
data
client
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211107304.9A
Other languages
Chinese (zh)
Other versions
CN115190535A (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.)
Beijing Abt Networks Co ltd
Original Assignee
Beijing Abt Networks 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 Beijing Abt Networks Co ltd filed Critical Beijing Abt Networks Co ltd
Priority to CN202211107304.9A priority Critical patent/CN115190535B/en
Publication of CN115190535A publication Critical patent/CN115190535A/en
Application granted granted Critical
Publication of CN115190535B publication Critical patent/CN115190535B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast

Landscapes

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

Abstract

The invention discloses a data transmission method and related equipment. The method comprises the following steps: generating a plurality of groups of codes to be transmitted based on data to be transmitted; and changing the first wireless communication name according to each group of codes to be transmitted so that the second client acquires the codes to be transmitted based on the first wireless communication name of the first client to acquire the data to be transmitted, wherein the length of the codes to be transmitted is determined based on the length of the first wireless communication name, and the first wireless communication name is the name of the broadcast equipment when the first client seeks to establish wireless connection. According to the data transmission method provided by the embodiment of the application, a first client generates a code to be transmitted according to the data to be transmitted, a first wireless communication name is changed according to the code to be transmitted, and a second client obtains the code to be transmitted according to the first wireless communication name, so that the data to be transmitted is obtained. The key point is that the wireless communication name is used as a data transmission carrier, and the method can be used only by a terminal with functional modules such as Bluetooth or WIFI.

Description

Data transmission method and related equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a data transmission method and related devices.
Background
Near Field Communication (NFC) is an emerging technology, and devices (such as mobile phones) using the NFC technology can exchange data when they are close to each other, and is integrated and evolved from a non-contact radio frequency identification and interconnection technology, and by integrating functions of an induction card reader, an induction card and point-to-point Communication on a single chip, applications such as mobile payment, electronic ticketing, door access, mobile identity identification, anti-counterfeiting and the like are realized by using a mobile terminal.
However, the communication technology of NFC often needs special hardware support, and since the old devices do not have the NFC hardware, NFC near field communication cannot be performed. If bluetooth is used, one-to-many cannot be supported, and in the low-version bluetooth protocol, only one-to-one connection is often possible. In the scene that needs sharing and broadcasting, it is relatively inefficient. If a WLAN is used for near field transmission, traffic consumption is incurred.
Disclosure of Invention
A series of concepts in a simplified form are introduced in the summary section, which is described in further detail in the detailed description section. The summary of the invention is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
In order to provide a one-to-many close range data transmission method, in a first aspect, the present invention provides a data transmission method, where the method includes:
generating a plurality of groups of codes to be transmitted based on data to be transmitted;
and changing a first wireless communication name according to each group of codes to be transmitted so that the second client acquires the codes to be transmitted based on the first wireless communication name of the first client to acquire the data to be transmitted, wherein the length of the codes to be transmitted is determined based on the length of the first wireless communication name, and the first wireless communication name is the name of the broadcast equipment when the first client seeks to establish wireless connection.
Optionally, the codes to be transmitted include sequence number codes and data codes, the sequence number codes are used to distinguish the groups of the codes to be transmitted, and the data codes are used to store data corresponding to the data to be transmitted.
Optionally, the method further includes:
determining the number of the second clients participating in data transmission;
receiving feedback information sent by the second client, wherein the feedback information is formed after each group of codes to be transmitted, which are transmitted by the first client, are received by the second client, and the feedback information is determined by a second wireless communication name corresponding to the second client;
and changing the first wireless communication name based on the next group of codes to be transmitted under the condition that the number of the received feedback information is greater than or equal to the number of the second clients.
Optionally, the method further includes:
and under the condition that the number of the received feedback information is smaller than that of the second clients and the sending time of the current group of codes to be transmitted exceeds a preset time length, changing the first wireless communication name based on the next group of codes to be transmitted.
Optionally, the method further includes:
under the condition that all the codes to be transmitted are sent, counting the codes to be transmitted, the number of which is smaller than the number of the second clients, and determining the codes to be transmitted as incomplete transmission codes;
and executing a second round of operation of changing the name of the first wireless communication according to the incomplete transmission code so that a second client which does not receive the incomplete transmission code obtains complete data to be transmitted.
Optionally, the method further includes:
and after the second round of operation of changing the first wireless communication name is finished and under the condition that the second client side still does not completely receive the data to be transmitted, changing the first wireless communication name into an auxiliary transmission name so as to enable the second client side which completely receives the data to be transmitted to help the second client side which does not completely receive the data to be transmitted to obtain complete data to be transmitted by changing the second wireless name.
Optionally, the method further includes:
and generating a plurality of groups of codes to be transmitted based on the data to be transmitted and preset encryption rules, wherein the same preset encryption rules are stored in the second client.
In a second aspect, the present invention further provides a data transmission control apparatus, including:
the generating unit is used for generating a plurality of groups of codes to be transmitted based on the data to be transmitted;
and a changing unit, configured to change a first wireless communication name according to each group of the codes to be transmitted, so that a second client obtains the codes to be transmitted based on the first wireless communication name of the first client, so as to obtain the data to be transmitted, where a length of the codes to be transmitted is determined based on a length of the first wireless communication name, and the first wireless communication name is an equipment name of a broadcast when the first client seeks to establish a wireless connection.
In a third aspect, an electronic device includes: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the steps of the data transmission method according to any one of the first aspect when the computer program stored in the memory is executed.
In a fourth aspect, the present invention also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the data transmission method of any one of the above-mentioned first aspects.
To sum up, the data transmission method of the embodiment of the present application includes: generating a plurality of groups of codes to be transmitted based on data to be transmitted; and changing a first wireless communication name according to each group of codes to be transmitted so that the second client acquires the codes to be transmitted based on the first wireless communication name of the first client to acquire the data to be transmitted, wherein the length of the codes to be transmitted is determined based on the length of the first wireless communication name, and the first wireless communication name is the name of the broadcast equipment when the first client seeks to establish wireless connection. According to the data transmission method provided by the embodiment of the application, a first client generates a code to be transmitted according to the data to be transmitted, a first wireless communication name is changed according to the code to be transmitted, and a second client obtains the code to be transmitted according to the first wireless communication name, so that the data to be transmitted is obtained. The near field data transmission method is characterized in that a wireless communication name is used as a data transmission carrier, near field data transmission is carried out through a designed transmission algorithm, the requirement on hardware is low, any equipment capable of broadcasting wireless signals can complete the method, the core is that data are transmitted through the name, connection does not need to be actually generated, one-to-many connection can be achieved, the method is suitable for data sharing scenes, such as group sending photos, group sending videos and the like, flow consumption is not generated, TCP/IP data transmission is avoided, data transmission is only hidden through the name, various types of terminals can be supported, only functional modules such as Bluetooth or WIFI are provided, and the universality is high.
Additional advantages, objects, and features of the data transmission method of the present invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention.
Drawings
Various additional advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the specification. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flow chart of a data transmission method according to an embodiment of the present application;
fig. 2 is a schematic diagram of another data transmission method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a picture to be transmitted according to an embodiment of the present application;
fig. 4 is a schematic diagram of unencrypted data to be transmitted according to an embodiment of the present application;
fig. 5 is a schematic diagram of encrypted data to be transmitted according to an embodiment of the present application;
fig. 6 is a schematic diagram of a structure of a code to be transmitted according to an embodiment of the present application;
fig. 7 is a schematic diagram of a first wireless communication name provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data transmission control apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
According to the data transmission method provided by the embodiment of the application, a first client generates a code to be transmitted according to the data to be transmitted, a first wireless communication name is changed according to the code to be transmitted, and a second client obtains the code to be transmitted according to the first wireless communication name, so that the data to be transmitted is obtained. The near field data transmission method is characterized in that a wireless communication name is used as a data transmission carrier, near field data transmission is carried out through a designed transmission algorithm, the requirement on hardware is low, any equipment capable of broadcasting wireless signals can complete the method, the core is that data are transmitted through the name, connection does not need to be actually generated, one-to-many connection can be achieved, the method is suitable for data sharing scenes, such as group sending photos, group sending videos and the like, flow consumption is not generated, TCP/IP data transmission is avoided, data transmission is only hidden through the name, various types of terminals can be supported, only functional modules such as Bluetooth or WIFI are provided, and the universality is high.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments.
Referring to fig. 1, a schematic flow chart of a data transmission method provided in the embodiment of the present application may specifically include:
s110, generating a plurality of groups of codes to be transmitted based on the data to be transmitted;
for example, the data to be transmitted may be text data, image data, audio data, video data, or the like, and the data is analyzed to form a plurality of groups of codes to be transmitted, for example, the image shown in fig. 2 is analyzed to form codes to be transmitted as shown in fig. 3, each row is a group of codes to be transmitted, and all the codes to be transmitted are transcoded to form the image shown in fig. 2.
And S120, changing a first wireless communication name according to each group of codes to be transmitted, so that a second client acquires the codes to be transmitted based on the first wireless communication name of the first client, thereby acquiring the data to be transmitted, wherein the length of the codes to be transmitted is determined based on the length of the first wireless communication name, and the first wireless communication name is a broadcast equipment name when the first client seeks to establish wireless connection.
For example, the first wireless communication name is changed through each group of codes to be transmitted, the wireless communication may be a wireless communication mode such as WiFi communication and bluetooth, and the first wireless communication name is a device name broadcast by the first client when seeking to establish wireless communication with the second client. The first client and the second client are different clients, the number of the second clients may be multiple, the first client and the second client are clients with wireless transmission function, such as mobile clients like mobile phones and tablet computers, and may also be fixed clients with wireless transmission function, it should be noted that, in order to ensure the effect of data transmission, the distance between the first client and the second client should be within the effective broadcast range when establishing wireless connection. The first wireless communication name is changed according to the codes to be transmitted, the second client does not need to establish wireless transmission connection with the first client, the codes to be transmitted can be automatically stored in the second client by directly obtaining the name of the first wireless communication, and after transmission of all groups of codes to be transmitted is completed, the second client can obtain the data to be transmitted by carrying out data analysis according to the complete codes to be transmitted. It should be noted that the length of each group of codes to be transmitted is determined based on the length of the first wireless communication name, the name of the bluetooth protocol and the WIFI name are used as channels for data transmission, and the total length of the codes is also obstructed according to obstructed use protocols. Generally, the bluetooth name length of an android device is limited to 20 bytes, and the WIFI is limited to 32 bytes, and when a code to be transmitted is grouped, the limitation of different wireless transmission modes on the file transmission length needs to be considered.
To sum up, in the data transmission method provided in the embodiment of the present application, the first client generates a code to be transmitted according to the data to be transmitted, changes the name of the first wireless communication according to the code to be transmitted, and the second client obtains the code to be transmitted according to the name of the first wireless communication, so as to obtain the data to be transmitted. The near field data transmission method is characterized in that a wireless communication name is used as a data transmission carrier, near field data transmission is carried out through a designed transmission algorithm, the requirement on hardware is low, any equipment capable of broadcasting wireless signals can complete the method, the core is that data are transmitted through the name, connection does not need to be actually generated, one-to-many connection can be achieved, the method is suitable for data sharing scenes, such as group sending photos, group sending videos and the like, flow consumption is not generated, TCP/IP data transmission is avoided, data transmission is only hidden through the name, various types of terminals can be supported, only functional modules such as Bluetooth or WIFI are provided, and the universality is high.
In some examples, the codes to be transmitted include sequence number codes and data codes, the sequence number codes are used for distinguishing the groups of the codes to be transmitted, and the data codes are used for storing data corresponding to the data to be transmitted.
The data codes are data corresponding to the data to be transmitted, and can be 2-system codes, 10-system codes, 16-system codes and the like.
In summary, in the data transmission method provided in the embodiment of the present application, the codes to be transmitted are divided into the serial number codes and the data codes in the data transmission process, so that the first client and the second client can count the sent data and the received data conveniently, and confusion in the transmission process is avoided.
In some examples, the method further comprises:
determining the number of the second clients participating in data transmission;
receiving feedback information sent by the second client, wherein the feedback information is formed after each group of codes to be transmitted, which are transmitted by the first client, are received by the second client, and the feedback information is determined by a second wireless communication name corresponding to the second client;
and changing the first wireless communication name based on the next group of codes to be transmitted under the condition that the number of the received feedback information is greater than or equal to the number of the second clients.
For example, the second client generates feedback information after receiving each group of codes to be transmitted sent by the first client, the feedback information of the second client is realized by modifying the wireless communication name of the second client, and the first client can know whether the second client completes data transmission of the group of codes to be transmitted after acquiring the wireless communication name of the second client. In order to realize that the first client monitors the data receiving situation of the plurality of second clients, the number of the second client side sections which are ready to participate in data transmission may be preset before the first client prepares for data transmission, for example, the number may be 5, after the first client completes a group of codes to be transmitted, the number of the clients which have completed the group of data transmission to be transmitted is determined according to the received feedback information number, and when the feedback information number is greater than or equal to the number of the second clients, it is considered that all the second clients have completed the transmission tasks of the group of codes to be transmitted, the transmission work of the next group of codes to be transmitted is started, and the first wireless communication name is changed according to the next group of codes to be transmitted, so that continuous data transmission is realized.
In summary, in the data transmission method provided in the embodiment of the present application, the number of the second clients is set at the first client, and after each group of codes to be transmitted is sent, the data receiving conditions of the plurality of second clients are determined based on the feedback information and the number of the second clients, so that it is ensured that the preset number of second clients all receive the group of codes to be transmitted and then start the transmission work of the next group of codes to be transmitted, thereby achieving the data transmission continuity.
In some examples, the method further comprises:
and under the condition that the number of the received feedback information is smaller than that of the second clients and the sending time of the current group of codes to be transmitted exceeds a preset time length, changing the first wireless communication name based on the next group of codes to be transmitted.
For example, within a preset time length for the first client to send the group of codes to be transmitted, for example, 5 seconds, part of the second clients still do not complete the receiving work of the current group of codes to be transmitted, that is, under the condition that the number of the received feedback information is less than the number of the second clients, in order to ensure that other second clients can quickly complete the data transmission work, the next group of codes to be transmitted continues to be transmitted.
In summary, in the data transmission method provided in the embodiment of the present application, by setting the preset duration, it can be avoided that a part of the second clients cannot acquire the to-be-transmitted codes of the current group, so that the data transmission work of the first client is involved in a deadlock, and the data transmission continuity is ensured.
In some examples, the method further comprises:
under the condition that all the codes to be transmitted are sent to the end, counting the codes to be transmitted, the number of which is less than the number of the second clients, and determining the codes to be transmitted as incomplete transmission codes;
and executing a second round of operation of changing the name of the first wireless communication according to the incomplete transmission code so as to enable the second client terminal which does not receive the incomplete transmission code to acquire complete data to be transmitted.
For example, after the first client sends all groups of codes to be transmitted, feedback information is collected according to each group of data transmission, the number of the codes to be transmitted, which is less than the number of the second clients, is fed back, that is, all the codes to be transmitted, which are not completely received by all the second clients, are determined as codes which are not completely transmitted, and second round sending is performed according to the codes which are not completely transmitted, and the second round sending is still performed by changing the first wireless name, so that the second clients which do not receive the codes which are not completely transmitted, can obtain complete data to be transmitted.
In summary, in the data transmission method provided in the embodiment of the present application, incomplete transmission codes are determined by counting the number of feedback information in the first round of transmission, and second round transmission is performed on the incomplete transmission codes, so that a second client that does not receive the incomplete transmission codes can obtain complete data to be transmitted.
In some examples, the method further comprises:
and after the second round of operation of changing the first wireless communication name is finished and under the condition that the second client side still does not completely receive the data to be transmitted, changing the first wireless communication name into an auxiliary transmission name so as to enable the second client side which completely receives the data to be transmitted to help the second client side which does not completely receive the data to be transmitted to obtain complete data to be transmitted by changing a second wireless name.
For example, in a case that there are still second clients that do not completely receive the data to be transmitted after the second round of data transmission, the distance between the second clients that do not completely receive the data transmission and the first client may exceed the effective distance of the near field transmission, at this time, the first wireless name may be changed to the assisted transmission name by controlling the first client, and after the second client that completely receives the data to be transmitted receives the assisted transmission name, the second client that completely receives the data to be transmitted may obtain the complete data to be transmitted from the second client that does not completely receive the data to be transmitted in a manner similar to that of the first client by changing the corresponding second wireless name. It should be noted that the assisted transmission name includes a field for triggering the second client to assist transmission, and also includes a specific serial number code of the code to be transmitted, which needs to assist transmission.
In summary, in the data transmission method provided in the embodiment of the present application, the first wireless name is changed to the transmission assisting name, so that the second client that has completed data transmission can be controlled to help the first client to implement a task of data transmission, and it is ensured that all the second clients can receive the data to be transmitted as much as possible.
In some examples, the method further comprises:
and generating a plurality of groups of codes to be transmitted based on the data to be transmitted and a preset encryption rule, wherein the same preset encryption rule is stored in the second client.
Exemplarily, in the process of data transmission, in order to avoid other illegal clients from intercepting data to be transmitted, the same encryption rules may be stored in the first client and the second client, the first client performs encryption based on the preset encryption rule in the process of generating codes, the legal second client performs decryption based on the same preset encryption rule after receiving the codes to be transmitted, so as to obtain the data to be transmitted, the security of data transmission is improved, the preset encryption rule may use time as a seed, and the preset encryption rule is updated at intervals within the preset time.
In summary, the data transmission method provided by the embodiment of the application guarantees data security through a designed encryption transmission algorithm, and ensures that the data content cannot be obtained even if seen by others.
In some examples, data transmission may be performed in the manner shown in fig. 2, where the first client is a sending end, the second client is a receiving end, and the first client is provided with a terminal setting module, a data reading and analyzing module, a data encryption module, a data encoding module, and a bluetooth/WIFI name transmission module; the second client comprises a Bluetooth/WIFI name receiving module, a Bluetooth/WIFI name feedback module and a data storage module.
The specific method comprises the following steps:
s210, a first client sets sending equipment as a sending end through a terminal setting module, sets the number of receiving ends, the sending end mainly reads, encrypts and sends data, the receiving ends mainly receive, decrypts and stores data, and a plurality of terminals can synchronously receive data;
s220, the first client is responsible for reading the data to be transmitted through the data reading and analyzing module, and the picture shown in the figure 3 is stored into the data in the 16-system format shown in the figure 4 after being read;
s230, the first client encrypts the data through the data encryption module, and may specifically use a key with a length of 32 bits:
Key=bytearray((0x61,0x40,0x48,0x79,0x90,0x50,0x56,0x46,0x93,0x98,0x65,0x21,0x54,0x32,0x16,0x87,0x61,0x40,0x48,0x79,0x90,0x50,0x56,0x46,0x93,0x98,0x65,0x21,0x54,0x32,0x16,0x87))
carrying out AES and CBC mode encryption on original data every 1024 bytes:
def encrypt _ rules (_ json _ file), defining an encryption function, and substituting into a json _ file variable;
fin _ file = _ Json _ file.replace ('. Json', '. Fin')/Json _ file variable suffix is replaced by fin;
aes = AEScryptor (key, aes. Mode _ CBC, iv, padding mode = "ZeroPadding", characterSet = 'utf-8')/encryption with ZeroPadding using predefined key and iv, zeroPadding means padding if the length is not sufficient;
a/binary open jf file for reading;
with open (_ fin _ file, 'wb') as ff:/binary open ff file for writing;
while 1:/start cycle;
content = jf.read (1024)/read jf file 1024 bytes;
break/jump out of loop if there is no content;
ret_data = aes.encryptFromBytes(content);
write (ret _ data. Tbytes ())/write the ciphertext content into the ff file;
print ("= = = Done = = = = =")/print completion flag. Resulting in encrypted data as shown in fig. 5.
S240, the first client side adopts the data coding module to code the data to form a code to be transmitted, and the data coding module is responsible for coding the encrypted data. The code to be transmitted mainly comprises two parts, wherein the first part is serial number code, and the second part is data code. Generally, the bluetooth name length of an android device is limited to 20 bytes, and the WIFI is 32 bytes, and when codes to be transmitted are grouped, the limitation of different wireless transmission modes on the file transmission length needs to be considered. When data is transmitted in the WIFI form, the length of the code is 31 characters, and then the 31 characters are used as a transmission channel to perform data coding transmission, as shown in fig. 6: the length 1 is a serial number code, the next 30 bytes are data codes, and the sequence of the digital codes is 1,2,3,4-0, a, B, C-Z, A, B, C and D-Z. The total 62 codes are 1,2,3 \8230fromthe beginning when the serial number is coded as Z, the length of 30 bits is data code, and the encrypted data is filled to the length of 30 bits in sequence.
The bluetooth/wifi name change according to the above rule is that for the first time, the bluetooth name/wifi name is set to be 118e3628aa776a3c8432066c6f64838 with a total length of 31 characters; second, set the Bluetooth/wifi name to 261b334c06b4e5f0350104517ff12e7 with a total length of 31 characters. Thirdly, the Bluetooth name/wifi name is set to 31d291cd6bfd5d1692dd699249035de total length of 31 characters. Transmitting the rest data; at 62 th time, the Bluetooth name/wifi name is set to Zac21a407ef67ad84421a57b7930a14 with a total length of 31 characters. The next sequence number continues to start from 1, and the function of the following data sequence number coding is transmitted, which is mainly used for determining the sequence of the data and the following feedback module for feeding back the successfully received message.
S250, the Bluetooth/WiFi name transmission module of the first client side carries out data transmission, the Bluetooth/WiFi name transmission module judges whether the equipment has a Bluetooth function or a WiFi function, and if the equipment has the Bluetooth function, the Bluetooth name is set to be a serial number code and a data code generated by the coding module. And setting a bluetooth or wifi hotspot as a discoverable mode. At this time, the bluetooth/wifi name named as the string of codes can be searched in each terminal to complete data transmission. And coding for multiple times through the data coding module, circularly transmitting all data, and completing the data transmission. The Bluetooth/wifi transmission module also needs to continuously discover nearby Bluetooth/wifi signals, and after the signals fed back by the feedback module are searched, the next data sending judgment is made.
S260, a Bluetooth/wifi name receiving module of the second client receives the to-be-transmitted coding data of the first client. After the sending end sets the bluetooth/wifi name, as shown in fig. 7, at this time, bluetooth devices with names of Zac21a407ef67ad84421a57b7930a14 can be searched for at multiple receiving ends. The Bluetooth/wifi name receiving module is responsible for analyzing the first bit sequence number code Z and the subsequent data code "ac21a407ef67ad84421a57b7930a14", so that one-time data transmission is realized, and after the data is confirmed to be received, the signal is sent to the Bluetooth/wifi name feedback module.
The method includes the steps that S270, a second client Bluetooth/wifi name feedback module generates feedback information, and a Bluetooth/wifi name of a second client is set in a default state to be a. After the feedback module receives a successful signal serial number code of 1, a Bluetooth/wifi name is set, wherein the Bluetooth/wifi name is 1. After the feedback module receives a successful signal serial number which is coded as 2, the Bluetooth/wifi name is set as 12. After the feedback module receives a successful signal sequence number code as 3, can set up bluetooth/wifi name as: a.. By analogy, when receiving a serial number code, the receiving terminal can add the serial number code to the Bluetooth/wifi name of the receiving terminal, so that the sending terminal can judge whether each receiving terminal receives the data of the appointed code by counting whether the number received by each code is equal to the number of the receiving terminals which are arranged at the beginning. For example, the setting module sets the receiving end to 20, and then when the sending end sends data with sequence number 1, 20 terminals successfully receive the data, 20 bluetooth/wifi with the name of 1. And the process is circulated until all data is sent out.
S270, when the receiving module continuously receives the last data, all the data are assembled in sequence, because the data are ciphertext, the data need to be decrypted by using the AESCBC mode, and the key which is the same as the encryption rule is used:
key=bytearray((0x61,0x40,0x48,0x79,0x90,0x50,0x56,0x46,0x93,0x98,0x65,0x21,0x54,0x32,0x16,0x87,0x61,0x40,0x48,0x79,0x90,0x50,0x56,0x46,0x93,0x98,0x65,0x21,0x54,0x32,0x16,0x87))
the decryption method is as follows:
def decrypt _ rules (_ fin _ file): define an encryption function, bring in fin _ file variable
A suffix in a _json _ file = _ fin _ file.replace ('. Fin', '. Json')/fin _ file variable is replaced by fin;
aes = AEScryptor (key, aes. Mode _ CBC, iv, padding mode = "ZeroPadding", charactersett = 'utf-8')/decrypting with ZeroPadding using predefined key and iv, zeroPadding means not long enough to fill;
open jf file with binary for reading;
binary open ff file for writing;
while 1:/start cycle;
content = ff read (1024)/read ff file 1024 bytes;
if not content break/jump out loop if there is no content;
ret _ data = aes. Decryptfrmbytes (content)/decrypt by byte;
write (ret _ data. Tbytes ())/write the decrypted contents to jf file;
print ("= = = Done = = = = =")/print completion flag.
And decrypting each 1024 bytes of the received message, wherein the decrypted data is shown in fig. 4, and the second client is opened by using a picture program and can obtain the picture shown in fig. 3 after correct analysis.
Referring to fig. 8, an embodiment of a data transmission control apparatus in an embodiment of the present application may include:
a generating unit 21, configured to generate multiple groups of codes to be transmitted based on data to be transmitted;
a changing unit 22, configured to change a first wireless communication name according to each group of the codes to be transmitted, so that the second client obtains the codes to be transmitted based on the first wireless communication name of the first client, so as to obtain the data to be transmitted, where a length of the codes to be transmitted is determined based on a length of the first wireless communication name, and the first wireless communication name is a device name of a broadcast when the first client seeks to establish a wireless connection.
As shown in fig. 9, the embodiment of the present application further provides an electronic device 300, which includes a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor, wherein when the computer program 311 is executed by the processor 320, the steps of any of the methods for data transmission described above are implemented.
Since the electronic device described in this embodiment is a device used for implementing a data transmission control apparatus in this embodiment, based on the method described in this embodiment, a person skilled in the art can understand a specific implementation of the electronic device in this embodiment and various modifications thereof, so that how to implement the method in this embodiment by the electronic device is not described in detail herein, and as long as the person skilled in the art implements the device used for implementing the method in this embodiment, the device used for implementing the method in this embodiment belongs to the scope of protection of this application.
In a specific implementation, the computer program 311 may implement any of the embodiments corresponding to fig. 1 when executed by a processor.
It should be noted that, in the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to relevant descriptions of other embodiments for parts that are not described in detail in a certain embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Embodiments of the present application further provide a computer program product, where the computer program product includes computer software instructions, and when the computer software instructions are executed on a processing device, the processing device is caused to execute the flow of data transmission in the corresponding embodiment of fig. 1.
The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). Computer-readable storage media can be any available media that a computer can store or a data storage device, such as a server, data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application 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 in the embodiments of the present application.

Claims (10)

1. A data transmission method, used for a first client, comprising:
generating a plurality of groups of codes to be transmitted based on data to be transmitted;
and changing a first wireless communication name according to each group of codes to be transmitted so as to enable the second client to obtain the codes to be transmitted based on the first wireless communication name of the first client so as to obtain the data to be transmitted, wherein the length of the codes to be transmitted is determined based on the length of the first wireless communication name, and the first wireless communication name is the name of the broadcast equipment when the first client seeks to establish wireless connection.
2. The method of claim 1, wherein the codes to be transmitted comprise sequence number codes and data codes, the sequence number codes are used for distinguishing the groups of the codes to be transmitted, and the data codes are used for storing data corresponding to the data to be transmitted.
3. The method of claim 1, further comprising:
determining a number of the second clients participating in data transmission;
receiving feedback information sent by the second client, wherein the feedback information is formed after each group of codes to be transmitted, which are transmitted by the first client, are received by the second client, and the feedback information is determined by a second wireless communication name corresponding to the second client;
and changing the first wireless communication name based on the next group of codes to be transmitted under the condition that the number of the received feedback information is larger than or equal to the number of the second clients.
4. The method of claim 3, further comprising:
and under the condition that the received feedback information is less than the number of the second clients and the sending time of the codes to be transmitted of the current group exceeds a preset time length, changing the name of the first wireless communication based on the next group of codes to be transmitted.
5. The method of claim 4, further comprising:
under the condition that all the codes to be transmitted are sent, counting the codes to be transmitted, the number of which is smaller than the number of the second clients, and determining the codes to be transmitted as incomplete transmission codes;
and executing a second round of operation of changing the first wireless communication name according to the incomplete transmission code so that a second client which does not receive the incomplete transmission code obtains complete data to be transmitted.
6. The method of claim 5, further comprising:
and after the second round of operation of changing the first wireless communication name is finished and under the condition that the second client does not completely receive the data to be transmitted, changing the first wireless communication name into an auxiliary transmission name so as to enable the second client which completely receives the data to be transmitted to help the second client which does not completely receive the data to be transmitted to obtain complete data to be transmitted by changing the second wireless name.
7. The method of claim 1, further comprising:
and generating a plurality of groups of codes to be transmitted based on the data to be transmitted and a preset encryption rule, wherein the same preset encryption rule is stored in the second client.
8. A self-data transmission control device, comprising:
the generating unit is used for generating a plurality of groups of codes to be transmitted based on the data to be transmitted;
and the changing unit is used for changing a first wireless communication name according to each group of codes to be transmitted so as to enable a second client to obtain the codes to be transmitted based on the first wireless communication name of the first client to obtain the data to be transmitted, wherein the length of the codes to be transmitted is determined based on the length of the first wireless communication name, and the first wireless communication name is a broadcast equipment name when the first client seeks to establish wireless connection.
9. An electronic device, comprising: memory and processor, characterized in that the processor is adapted to carry out the steps of the data transmission method according to any of claims 1-7 when executing a computer program stored in the memory.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program, when executed by a processor, implements a data transmission method as claimed in any one of claims 1-7.
CN202211107304.9A 2022-09-13 2022-09-13 Data transmission method and related equipment Active CN115190535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211107304.9A CN115190535B (en) 2022-09-13 2022-09-13 Data transmission method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211107304.9A CN115190535B (en) 2022-09-13 2022-09-13 Data transmission method and related equipment

Publications (2)

Publication Number Publication Date
CN115190535A CN115190535A (en) 2022-10-14
CN115190535B true CN115190535B (en) 2022-11-22

Family

ID=83524671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211107304.9A Active CN115190535B (en) 2022-09-13 2022-09-13 Data transmission method and related equipment

Country Status (1)

Country Link
CN (1) CN115190535B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101536586A (en) * 2006-11-07 2009-09-16 诺基亚公司 Multiradio priority control based on modem buffer load
WO2013175414A1 (en) * 2012-05-24 2013-11-28 Renesas Mobile Corporation Methods, apparatus and computer programs for protecting transmitter|identification in transmissions
CN105554062A (en) * 2015-11-30 2016-05-04 东莞酷派软件技术有限公司 A file transfer method, related equipment and system
CN106788731A (en) * 2017-03-17 2017-05-31 维沃移动通信有限公司 Data transmission method and mobile terminal
CN108390783A (en) * 2018-02-13 2018-08-10 广东嘉泰智能技术有限公司 A kind of configuration method and device of bluetooth equipment
CN112088505A (en) * 2018-05-22 2020-12-15 株式会社Ntt都科摩 Precoding method, decoding method, transmitting device and receiving device
CN114697924A (en) * 2020-12-29 2022-07-01 苏州三六零智能安全科技有限公司 BLE equipment information acquisition method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050086481A1 (en) * 2003-10-15 2005-04-21 Cisco Technology, Inc. Naming of 802.11 group keys to allow support of multiple broadcast and multicast domains
US8244881B2 (en) * 2010-08-06 2012-08-14 Palo Alto Research Center Incorporated Service virtualization over content-centric networks

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101536586A (en) * 2006-11-07 2009-09-16 诺基亚公司 Multiradio priority control based on modem buffer load
WO2013175414A1 (en) * 2012-05-24 2013-11-28 Renesas Mobile Corporation Methods, apparatus and computer programs for protecting transmitter|identification in transmissions
CN105554062A (en) * 2015-11-30 2016-05-04 东莞酷派软件技术有限公司 A file transfer method, related equipment and system
CN106788731A (en) * 2017-03-17 2017-05-31 维沃移动通信有限公司 Data transmission method and mobile terminal
CN108390783A (en) * 2018-02-13 2018-08-10 广东嘉泰智能技术有限公司 A kind of configuration method and device of bluetooth equipment
CN112088505A (en) * 2018-05-22 2020-12-15 株式会社Ntt都科摩 Precoding method, decoding method, transmitting device and receiving device
CN114697924A (en) * 2020-12-29 2022-07-01 苏州三六零智能安全科技有限公司 BLE equipment information acquisition method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115190535A (en) 2022-10-14

Similar Documents

Publication Publication Date Title
EP3637814B1 (en) Communication device, control method for communication device and program
US8463239B1 (en) Secure reconfiguration of wireless communication devices
EP2034659A2 (en) Apparatus and method for deriving keys for securing peer links
KR20190139203A (en) Method for managing communication between server and user equipment
CN109309650B (en) Method, terminal device and network device for processing data
EP2302832A2 (en) Apparatus and method for providing a security service in a user interface
US10791124B2 (en) Method and terminal device for encrypting message
CN105959281B (en) File encryption transmission method and device
EP3068091B1 (en) Network configuration method, and related device and system
CN109408015A (en) A kind of multimedia file processing method sends terminal and display terminal
CN111788836B (en) Data transmission method and BLE equipment
JP4204477B2 (en) Method and apparatus for sending access credential management message
CN105517102A (en) Method, device and equipment for enabling wireless network equipment to be connected with hot spot
CN113727058A (en) Multimedia conference data processing method, system, equipment and storage medium
CN118354147A (en) Data encryption method and device, storage medium and electronic equipment
US10237251B2 (en) Communication device and system, data processing method and method for securely exchanging data
EP3113528B1 (en) Wifi hotspot connection and selection method, communications terminal and system
CN111050321A (en) Data processing method, device and storage medium
CN112534790A (en) Encryption device, communication system and method for exchanging encrypted data in communication network
CN115190535B (en) Data transmission method and related equipment
CN115996141A (en) File access authentication method, device, equipment and storage medium
CN112565656A (en) Video call method, device, system, electronic equipment and storage medium
CN114978746B (en) Data encryption transmission method and device and electronic equipment
CN116709227A (en) Encryption call method, key management platform, equipment and medium
CN115208570A (en) Encryption method and device based on dynamic replacement of secret key

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