[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114844849A - Data transmission method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN114844849A
CN114844849A CN202210335407.4A CN202210335407A CN114844849A CN 114844849 A CN114844849 A CN 114844849A CN 202210335407 A CN202210335407 A CN 202210335407A CN 114844849 A CN114844849 A CN 114844849A
Authority
CN
China
Prior art keywords
terminal
sending
data
local area
network
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
CN202210335407.4A
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.)
Beijing Chengshi Wanglin Information Technology Co Ltd
Original Assignee
Beijing Chengshi Wanglin Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chengshi Wanglin Information Technology Co Ltd filed Critical Beijing Chengshi Wanglin Information Technology Co Ltd
Priority to CN202210335407.4A priority Critical patent/CN114844849A/en
Publication of CN114844849A publication Critical patent/CN114844849A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a data transmission method, a data transmission device, electronic equipment and a storage medium, wherein the method is applied to a sending terminal, the sending terminal can acquire the network information to which the sending terminal belongs currently, and respond to the data sharing instruction input by the user in the application program, searching a receiving terminal which belongs to a local area network with the sending terminal according to the network information, if the receiving terminal which belongs to the local area network with the sending terminal exists, the target data corresponding to the data sharing instruction may be determined, and the target data may be transmitted to the receiving terminal, so that when a user initiates data sharing in an application, a terminal can share data by looking up other terminals located in the same local area network, and sending the shared data to them, under the condition of running the same application program, the terminals based on the same local area network can avoid constructing a user relationship for data sharing, and effectively reduce the threshold of data sharing.

Description

Data transmission method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data transmission method, a data transmission apparatus, an electronic device, and a computer-readable storage medium.
Background
In the network era, resource sharing is a very important concept. Different devices, different user terminals, different applications and the like can share data through a network, through data sharing, the same user can share data among the different devices, and different users can share data among the different devices, so that the circulation of data is effectively promoted. In a related data transmission scenario, a user relationship needs to be established between a sender and a receiver of data, however, data sharing based on the user relationship limits data transmission of both parties of data sharing, and a data sharing threshold is greatly increased.
Disclosure of Invention
Embodiments of the present invention provide a data transmission method, an apparatus, an electronic device, and a computer-readable storage medium, so as to solve or partially solve the problems of user limitation and transmission threshold in a data sharing process.
The embodiment of the invention discloses a data transmission method, which is applied to a sending terminal and comprises the following steps:
acquiring network information of the sending terminal;
responding to a data sharing instruction in an application program, and searching a receiving terminal which belongs to the same local area network as the sending terminal according to the network information;
and if a receiving terminal which belongs to the same local area network as the sending terminal exists, determining target data corresponding to the data sharing instruction, and sending the target data to the receiving terminal.
Optionally, the searching for the receiving terminal that belongs to the same local area network as the sending terminal according to the network information at least includes:
and searching a receiving terminal which belongs to a local area network with the transmitting terminal by adopting the subnet mask.
Optionally, the network information further includes a first IP address of the sending terminal, and the searching for the receiving terminal that belongs to the same local area network as the sending terminal by using the subnet mask includes:
searching at least one target terminal which is the same as the subnet mask, and acquiring a second IP address of each target terminal;
calculating a first network address of the transmitting terminal by using the first IP address and the subnet mask, and calculating a second network address of the target terminal by using the second IP address and the first subnet mask;
and taking the target terminal corresponding to the second network address which is the same as the first network address as a receiving terminal which belongs to the same local area network with the sending terminal.
Optionally, the method further comprises:
and if the second network address which is the same as the first network address does not exist, displaying first prompt information aiming at the target terminal, wherein the first prompt information is information that each target terminal and the sending terminal are not in the same local area network.
Optionally, the sending the target data to the receiving terminal includes:
and sending the target data to a preset server, and sending the target data to the receiving terminal through the server so that the receiving terminal responds to a data receiving request and receives the target data.
Optionally, the method further comprises:
and if the receiving terminal which belongs to the same local area network as the sending terminal does not exist, displaying second prompt information aiming at the data sharing instruction, wherein the second prompt information is information that the terminal which belongs to the same local area network as the sending terminal does not exist.
Optionally, the target data includes at least one of a picture, audio, video, document, post.
The embodiment of the invention also discloses a data transmission device, which is applied to the sending terminal and comprises:
a network information acquisition module for acquiring the network information of the sending terminal;
the receiving terminal searching module is used for responding to a data sharing instruction in an application program and searching a receiving terminal which belongs to a local area network with the sending terminal according to the network information;
and the data sending module is used for determining target data corresponding to the data sharing instruction and sending the target data to the receiving terminal if the receiving terminal which belongs to the same local area network as the sending terminal exists.
Optionally, the network information at least includes a subnet mask of the sending terminal, and the receiving terminal searching module is specifically configured to:
and searching a receiving terminal which belongs to a local area network with the transmitting terminal by adopting the subnet mask.
Optionally, the network information further includes a first IP address of the sending terminal, and the receiving terminal searching module is specifically configured to:
searching at least one target terminal which is the same as the subnet mask, and acquiring a second IP address of each target terminal;
calculating a first network address of the transmitting terminal by using the first IP address and the subnet mask, and calculating a second network address of the target terminal by using the second IP address and the first subnet mask;
and taking the target terminal corresponding to the second network address which is the same as the first network address as a receiving terminal which belongs to the same local area network with the sending terminal.
Optionally, the method further comprises:
and the first prompt information display module is used for displaying first prompt information aiming at the target terminal if a second network address which is the same as the first network address does not exist, wherein the first prompt information is information that each target terminal and the sending terminal are not in the same local area network.
Optionally, the data sending module is specifically configured to:
and sending the target data to a preset server, and sending the target data to the receiving terminal through the server so that the receiving terminal responds to a data receiving request and receives the target data.
Optionally, the method further comprises:
and the second prompt information display module is used for displaying second prompt information aiming at the data sharing instruction if a receiving terminal which belongs to the same local area network as the sending terminal does not exist, wherein the second prompt information is information of a terminal which does not belong to the same local area network as the sending terminal.
Optionally, the target data includes at least one of a picture, audio, video, document, post.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Also disclosed is a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform a method according to an embodiment of the invention.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the method can be applied to a sending terminal, the sending terminal can acquire the current affiliated network information, respond to a data sharing instruction input by a user in an application program, search a receiving terminal which belongs to the same local area network as the sending terminal according to the network information, determine target data corresponding to the data sharing instruction and send the target data to the receiving terminal if the receiving terminal which belongs to the same local area network as the sending terminal exists, so that when the user initiates data sharing in the application program, the terminal can search other terminals located in the same local area network and send shared data to the other terminals, and under the condition of running the same application program, the terminals based on the same local area network can avoid constructing a user relationship to carry out data sharing, thereby effectively reducing the threshold of data sharing.
Drawings
Fig. 1 is a flowchart of steps of a data transmission method provided in an embodiment of the present invention;
FIG. 2 is a flow chart illustrating data sharing provided in an embodiment of the present invention;
fig. 3 is a block diagram of a data transmission apparatus provided in an embodiment of the present invention;
FIG. 4 is a block diagram of an electronic device provided in an embodiment of the invention;
fig. 5 is a schematic diagram of a computer-readable medium provided in an embodiment of the invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The local area network can be a network type, the coverage range of the local area network can be within thousands of square meters and thousands of round meters generally, and the local area network has the characteristics of convenience in installation, cost saving, convenience in expansion and the like, so that the local area network can be widely applied to various offices. The local area network can realize functions of file management, application software sharing, printer sharing and the like, and can effectively protect data security and ensure normal and stable operation of the local area network by maintaining the security of the local area network in the using process. Data sharing is to enable users who use different computers and different software in different places to read data of others and perform various operations, operations and analyses.
As an example, in the related art, people have an increasing demand for data sharing, but since no corresponding identity relationship is established between users, the way of data sharing transmission is complicated. For example, the sender and the receiver need to use login as a premise, and data sharing is realized by constructing a user relationship between the sender and the receiver and then sending a message by using an instant messaging function. Or jumping out of the current App, and using other Apps establishing the user relationship to carry out data transmission communication. Therefore, in the process, data transmission of both data sharing parties is limited by data sharing based on the user relationship, and the data sharing threshold is greatly increased.
In contrast, one of the core invention points is that, for a sending terminal, the sending terminal can respond to a data sharing instruction input by a user in an application program, and search for a receiving terminal belonging to the same local area network as the sending terminal according to current network information acquired after the user authorizes the receiving terminal, and if the receiving terminal belonging to the same local area network as the sending terminal exists, the sending terminal can determine target data corresponding to the data sharing instruction and send the target data to the receiving terminal, so that when the user initiates data sharing in the application program, the sending terminal can search for other terminals located in the same local area network and send shared data to the other terminals, and under the condition of running the same application program, the sending terminal based on the same local area network can avoid constructing a user relationship to perform data sharing, thereby effectively reducing the threshold of data sharing.
Specifically, referring to fig. 1, a flowchart of steps of a data transmission method provided in the embodiment of the present invention is shown, and is applied to a sending terminal, where the method specifically includes the following steps:
step 101, acquiring network information of the sending terminal;
for the sending terminal and the receiving terminal, the sending terminal and the receiving terminal may include a desktop computer, a notebook computer, a tablet computer, a mobile terminal and other user terminals, corresponding application programs may be run in the user terminals, and the application programs may include a life application program, an audio application program, a game application program, a job application program and the like.
In a specific implementation, the terminal may obtain the network information of the network to which the terminal belongs during the process of running the corresponding application program, so as to perform data sharing according to the network information. It should be noted that the action of acquiring the network information proposed in the embodiment of the present invention is performed under the premise of complying with the data protection regulation policy corresponding to the country of the location and obtaining the authorization given by the owner of the corresponding device.
Step 102, responding to a data sharing instruction in an application program, and searching a receiving terminal which belongs to a local area network with the sending terminal according to the network information;
in the process of running the application program, when a user needs to share data, the sending terminal can input a corresponding data sharing instruction into the application program, then the terminal can respond to the data sharing instruction in the application program, and according to the current network information which is acquired after the user authorizes, a receiving terminal which belongs to the same local area network as the sworn sending terminal is searched, so that the data can be sent to the receiving terminal.
The network information may include a subnet mask of the sending terminal, and the subnet mask may be used to indicate which bits of an IP address identify the subnet where the terminal is located and which bits identify the bit mask of the terminal, which may be combined with the IP address to determine the network address of the terminal. Alternatively, the subnet mask may be a 32-bit address used to mask a portion of the IP address to distinguish between the network identification and the terminal identification and to indicate whether the IP address is on the lan or wan.
In a specific implementation, in a process of processing related data, when the related data needs to be shared to another terminal, a user may share the data through a sharing path provided in an application program, and then a sending terminal may respond to a data sharing instruction in the application program, display a corresponding terminal search interface, and search, through a subnet mask of the sending terminal obtained in advance, for a receiving terminal that belongs to the same local area network as the sending terminal, so as to send the corresponding data to the receiving terminal.
Specifically, the network information may further include a first IP address of the sending terminal, the sending terminal may first search for at least one target terminal that is the same as the subnet mask of the sending terminal, and if at least one target terminal that is the same as the subnet mask is found, may further obtain a second IP address of each target terminal, and then the sending terminal may calculate the first network address of the sending terminal by using the first IP address and the subnet mask, and calculate a second network address of the target terminal by using the second IP address and the first subnet mask, and then compare the second network address of each target terminal with the first network address of the sending terminal, and use the target terminal corresponding to the second network address that is the same as the first network address as a receiving terminal belonging to the same local area network as the sending terminal.
In addition, if a second network address identical to the first network address does not exist, second prompt information aiming at the target terminal is displayed, and the second prompt information is information that each target terminal and the sending terminal are not in the same local area network.
Optionally, the subnet mask may be used to determine whether the IP addresses of different terminals are on the local area network or the wide area network, and the IP addresses may be used to represent unique addresses of the terminals, and then perform an and-operation through the subnet mask and the IP addresses to obtain network addresses of the terminals, and if the network addresses are the same, then represent that different terminals are located in the same local area network, so that the sending terminal may first search for a target terminal that is also located in the local area network through the subnet mask, then calculate network addresses of each terminal according to the and-operation of the subnet mask and the IP addresses, and further screen out a receiving terminal that is located in the same local area network as the sending terminal through a network address comparison manner to send corresponding target data to the receiving terminal, so that when a user initiates data sharing in an application program, the terminal may search for other terminals located in the same local area network and send shared data to the receiving terminal, under the condition of running the same application program, the terminals based on the same local area network can avoid constructing a user relationship for data sharing, and effectively reduce the threshold of data sharing.
In an optional embodiment, when the user inputs a corresponding data sharing instruction in the application program, the terminal may first detect whether the network is currently accessed, and execute the process of searching for the receiving terminal in the case of accessing the network; if the terminal does not access the network, the corresponding prompt information can be output to prompt the user to access the network first and then share the data.
And 103, if a receiving terminal which belongs to the same local area network as the sending terminal exists, determining target data corresponding to the data sharing instruction, and sending the target data to the receiving terminal.
In the embodiment of the present invention, when the sending terminal finds the receiving terminal belonging to the same local area network through its own IP address and subnet mask, the target data corresponding to the data sharing instruction may be determined, and then the target data is sent to the receiving terminal. The target data at least comprises one of pictures, audios, videos, documents and posts, so that when a user initiates data sharing in an application program, the terminal can search other terminals located in the same local area network and send shared data to the other terminals, and under the condition that the same application program is operated, the terminals based on the same local area network can avoid building a user relationship to carry out data sharing, so that the threshold of data sharing is effectively reduced, and meanwhile, data transmission is carried out in the same local area network, so that the stability and the transmission speed of data transmission can be effectively ensured.
In a specific implementation, after determining the target data corresponding to the data sharing instruction, the sending terminal may send the target data to the server, and send the target data to the receiving terminal through the server. Under the condition that the receiving terminal runs the same application program, after receiving a data sharing request sent by a server, the receiving terminal can execute corresponding data processing according to user operations (including operations of confirming sharing, refusing sharing and the like) of a user to which the receiving terminal belongs, and if the user confirms sharing, the receiving terminal can respond to the data receiving request, receive target data and then display the corresponding target data; if the user refuses to share, the server can obtain the response message sent by the receiving terminal and send the response message to the sending terminal, and the sending terminal displays the response message to inform the user that the data sharing is failed.
In addition, if the sending terminal does not find the receiving terminal which belongs to the same local area network as the sending terminal according to the IP address and the subnet mask of the sending terminal, the first prompt information aiming at the data sharing instruction can be displayed, and the first prompt information is the information that the terminal which belongs to the same local area network as the sending terminal does not exist so as to inform that no terminal which can perform data sharing exists nearby the belonging user.
It should be noted that the embodiment of the present invention includes but is not limited to the above examples, and it is understood that, under the guidance of the idea of the embodiment of the present invention, a person skilled in the art may also set the method according to actual requirements, and the present invention is not limited to this.
In the embodiment of the invention, the method can be applied to a sending terminal, the sending terminal can acquire the current affiliated network information, respond to a data sharing instruction input by a user in an application program, search a receiving terminal which belongs to the same local area network as the sending terminal according to the network information, determine target data corresponding to the data sharing instruction and send the target data to the receiving terminal if the receiving terminal which belongs to the same local area network as the sending terminal exists, so that when the user initiates data sharing in the application program, the terminal can search other terminals located in the same local area network and send shared data to the other terminals, and under the condition of running the same application program, the terminals based on the same local area network can avoid constructing a user relationship to carry out data sharing, thereby effectively reducing the threshold of data sharing.
In order to make the technical solutions of the embodiments of the present invention better understood by those skilled in the art, the following is an exemplary illustration by an example:
referring to fig. 2, which is a schematic diagram illustrating a data sharing process provided in an embodiment of the present invention, for a same application program run by a sending terminal and a receiving terminal, a network monitoring function may be configured in the application program, and after prompting and obtaining user authorization, the application program may monitor a network of the terminal through the network monitoring function in a foreground running process of the application program, so that when a user initiates data sharing in the application program, the user may search for a corresponding receiving terminal based on network information to perform data sharing. The specific process can comprise the following steps:
1. the application program can monitor the network of the terminal in real time, and upload the IP address of the current network and related data such as subnet mask to the server in real time when the network changes, so as to be used for later function verification.
2. When a user initiates a data sharing requirement (e.g., sharing a house source post):
the application program can firstly check whether the terminal is networked or not, and when the terminal is not networked currently, the application program can output corresponding prompt information to prompt the terminal to be networked and stop the data sharing process before the terminal is networked.
When the application program monitors that the terminal is connected with the network, the application program can judge according to the IP address and the subnet mask reported by the network monitoring, and search for the receiving terminal with the same subnet mask as the local terminal which initiates the shared data currently. For the searching process of the receiving terminal, the sending terminal can firstly search out a target terminal with the same subnet Mask, acquire the IP address of the target terminal, then respectively calculate the network address IP & Mask of each terminal (including the sending terminal and the target terminal), and then take the target terminal with the same IP & Mask as the sending terminal as the receiving terminal in the same local area network, thereby screening out the receiving terminal in the same local area network through twice filtering.
When the sharable terminal group is found, the related data such as the post ID of the current data (a post) is packaged and sent to the server, and the server can send the shared data content to the receiving terminal meeting the conditions after receiving the shared data content. The receiving terminal can confirm whether to receive data or not through the sharing request popped up in the application program, and receive the corresponding target data after the receiving is confirmed, so that when a user initiates data sharing in the application program, the terminal can search other terminals located in the same local area network and send shared data to the other terminals, and under the condition that the same application program is operated, the terminals based on the same local area network can avoid constructing a user relationship to carry out data sharing, and the threshold of data sharing is effectively reduced.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a data transmission apparatus provided in the embodiment of the present invention is shown, and specifically, the data transmission apparatus may include the following modules:
a network information obtaining module 301, configured to obtain network information of the sending terminal;
a receiving terminal searching module 302, configured to search, in response to a data sharing instruction in an application program, a receiving terminal that belongs to the same local area network as the sending terminal according to the network information;
a data sending module 303, configured to determine target data corresponding to the data sharing instruction if there is a receiving terminal that belongs to the same local area network as the sending terminal, and send the target data to the receiving terminal.
In an optional embodiment, the network information at least includes a subnet mask of the sending terminal, and the receiving terminal searching module 302 is specifically configured to:
and searching a receiving terminal which belongs to a local area network with the transmitting terminal by adopting the subnet mask.
In an optional embodiment, the network information further includes a first IP address of the sending terminal, and the receiving terminal searching module 302 is specifically configured to:
searching at least one target terminal which is the same as the subnet mask, and acquiring a second IP address of each target terminal;
calculating a first network address of the transmitting terminal by using the first IP address and the subnet mask, and calculating a second network address of the target terminal by using the second IP address and the first subnet mask;
and taking a target terminal corresponding to a second network address which is the same as the first network address as a receiving terminal of a local area network which belongs to the same local area network as the sending terminal.
In an alternative embodiment, further comprising:
and the first prompt information display module is used for displaying first prompt information aiming at the target terminal if a second network address which is the same as the first network address does not exist, wherein the first prompt information is information that each target terminal and the sending terminal are not in the same local area network.
In an optional embodiment, the data sending module 303 is specifically configured to:
and sending the target data to a preset server, and sending the target data to the receiving terminal through the server so that the receiving terminal responds to a data receiving request and receives the target data.
In an alternative embodiment, further comprising:
and the second prompt information display module is used for displaying second prompt information aiming at the data sharing instruction if a receiving terminal which belongs to the same local area network as the sending terminal does not exist, wherein the second prompt information is information of a terminal which does not belong to the same local area network as the sending terminal.
In an alternative embodiment, the target data includes at least one of a picture, audio, video, document, post.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In addition, an electronic device is further provided in the embodiments of the present invention, as shown in fig. 4, and includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
acquiring network information of the sending terminal;
responding to a data sharing instruction in an application program, and searching a receiving terminal which belongs to the same local area network as the sending terminal according to the network information;
and if a receiving terminal which belongs to the same local area network as the sending terminal exists, determining target data corresponding to the data sharing instruction, and sending the target data to the receiving terminal.
In an optional embodiment, the searching for the receiving terminal that belongs to the same local area network as the sending terminal according to the network information includes:
and searching a receiving terminal which belongs to a local area network with the transmitting terminal by adopting the subnet mask.
In an optional embodiment, the network information further includes a first IP address of the sending terminal, and the searching for the receiving terminal that belongs to the same local area network as the sending terminal using the subnet mask includes:
searching at least one target terminal which is the same as the subnet mask, and acquiring a second IP address of each target terminal;
calculating a first network address of the transmitting terminal by using the first IP address and the subnet mask, and calculating a second network address of the target terminal by using the second IP address and the first subnet mask;
and taking the target terminal corresponding to the second network address which is the same as the first network address as a receiving terminal which belongs to the same local area network with the sending terminal.
In an alternative embodiment, further comprising:
and if the second network address which is the same as the first network address does not exist, displaying first prompt information aiming at the target terminal, wherein the first prompt information is information that each target terminal and the sending terminal are not in the same local area network.
In an optional embodiment, the sending the target data to the receiving terminal includes:
and sending the target data to a preset server, and sending the target data to the receiving terminal through the server so that the receiving terminal responds to a data receiving request and receives the target data.
In an alternative embodiment, further comprising:
and if no receiving terminal which belongs to the same local area network as the sending terminal exists, displaying second prompt information aiming at the data sharing instruction, wherein the second prompt information is information of no terminal which belongs to the same local area network as the sending terminal.
In an alternative embodiment, the target data includes at least one of a picture, audio, video, document, post.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present invention, as shown in fig. 5, a computer-readable storage medium 501 is further provided, which stores instructions that, when executed on a computer, cause the computer to execute the data transmission method described in the above embodiment.
In yet another embodiment provided by the present invention, a computer program product containing instructions is also provided, which when run on a computer causes the computer to execute the data transmission method described in the above embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. 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 in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A data transmission method, applied to a transmitting terminal, the method comprising:
acquiring network information of the sending terminal;
responding to a data sharing instruction in an application program, and searching a receiving terminal which belongs to the same local area network as the sending terminal according to the network information;
and if a receiving terminal which belongs to the same local area network as the sending terminal exists, determining target data corresponding to the data sharing instruction, and sending the target data to the receiving terminal.
2. The method according to claim 1, wherein the network information at least includes a subnet mask of the sending terminal, and the searching for the receiving terminal belonging to the same local area network as the sending terminal according to the network information comprises:
and searching a receiving terminal which belongs to a local area network with the transmitting terminal by adopting the subnet mask.
3. The method of claim 2, wherein the network information further includes a first IP address of the sending terminal, and wherein the searching for the receiving terminal belonging to a local area network with the sending terminal using the subnet mask comprises:
searching at least one target terminal which is the same as the subnet mask, and acquiring a second IP address of each target terminal;
calculating a first network address of the transmitting terminal by using the first IP address and the subnet mask, and calculating a second network address of the target terminal by using the second IP address and the first subnet mask;
and taking the target terminal corresponding to the second network address which is the same as the first network address as a receiving terminal which belongs to the same local area network with the sending terminal.
4. The method of claim 3, further comprising:
and if the second network address which is the same as the first network address does not exist, displaying first prompt information aiming at the target terminal, wherein the first prompt information is information that each target terminal and the sending terminal are not in the same local area network.
5. The method according to any one of claims 1 to 3, wherein the sending the target data to the receiving terminal comprises:
and sending the target data to a preset server, and sending the target data to the receiving terminal through the server so that the receiving terminal responds to a data receiving request and receives the target data.
6. The method of claim 1, further comprising:
and if the receiving terminal which belongs to the same local area network as the sending terminal does not exist, displaying second prompt information aiming at the data sharing instruction, wherein the second prompt information is information that the terminal which belongs to the same local area network as the sending terminal does not exist.
7. The method of claim 1, wherein the target data comprises at least one of a picture, audio, video, document, post.
8. A data transmission apparatus, applied to a transmitting terminal, the apparatus comprising:
a network information acquisition module for acquiring the network information of the sending terminal;
the receiving terminal searching module is used for responding to a data sharing instruction in an application program and searching a receiving terminal which belongs to a local area network with the sending terminal according to the network information;
and the data sending module is used for determining target data corresponding to the data sharing instruction and sending the target data to the receiving terminal if the receiving terminal which belongs to the same local area network as the sending terminal exists.
9. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing a program stored on the memory, implementing the method of any of claims 1-7.
10. A computer-readable storage medium having stored thereon instructions, which when executed by one or more processors, cause the processors to perform the method of any one of claims 1-7.
CN202210335407.4A 2022-03-31 2022-03-31 Data transmission method and device, electronic equipment and storage medium Pending CN114844849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210335407.4A CN114844849A (en) 2022-03-31 2022-03-31 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210335407.4A CN114844849A (en) 2022-03-31 2022-03-31 Data transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114844849A true CN114844849A (en) 2022-08-02

Family

ID=82563861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210335407.4A Pending CN114844849A (en) 2022-03-31 2022-03-31 Data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114844849A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700846A (en) * 2016-03-18 2016-06-22 北京小米移动软件有限公司 File sharing method and device
CN106789470A (en) * 2016-12-23 2017-05-31 Tcl海外电子(惠州)有限公司 terminal resource sharing method, device and system
WO2017156934A1 (en) * 2016-03-14 2017-09-21 乐视控股(北京)有限公司 Intelligent interconnecting method, and intelligent terminal
CN109561124A (en) * 2017-09-27 2019-04-02 深圳市创易联合科技有限公司 A kind of method, system and the terminal device of file transmission
CN112752353A (en) * 2019-10-31 2021-05-04 中移物联网有限公司 Connection method and terminal equipment
CN113301135A (en) * 2021-05-14 2021-08-24 涂哲 Data sharing method
CN114051214A (en) * 2021-11-15 2022-02-15 杭州老板电器股份有限公司 Method, device and system for sharing terminal functions
EP3968670A1 (en) * 2019-06-28 2022-03-16 Huawei Technologies Co., Ltd. Bluetooth-based object searching method and electronic device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017156934A1 (en) * 2016-03-14 2017-09-21 乐视控股(北京)有限公司 Intelligent interconnecting method, and intelligent terminal
CN105700846A (en) * 2016-03-18 2016-06-22 北京小米移动软件有限公司 File sharing method and device
CN106789470A (en) * 2016-12-23 2017-05-31 Tcl海外电子(惠州)有限公司 terminal resource sharing method, device and system
CN109561124A (en) * 2017-09-27 2019-04-02 深圳市创易联合科技有限公司 A kind of method, system and the terminal device of file transmission
EP3968670A1 (en) * 2019-06-28 2022-03-16 Huawei Technologies Co., Ltd. Bluetooth-based object searching method and electronic device
CN112752353A (en) * 2019-10-31 2021-05-04 中移物联网有限公司 Connection method and terminal equipment
CN113301135A (en) * 2021-05-14 2021-08-24 涂哲 Data sharing method
CN114051214A (en) * 2021-11-15 2022-02-15 杭州老板电器股份有限公司 Method, device and system for sharing terminal functions

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张欣奇;: "Windows环境下的局域网共享", 信息与电脑(理论版), no. 10 *

Similar Documents

Publication Publication Date Title
US10757102B2 (en) Methods, apparatus, and systems for identity authentication
US9787782B2 (en) System and method for managing events associated with the detection of wireless devices
RU2622876C2 (en) Method, device and electronic device for connection control
US9977911B2 (en) Methods and systems for managing permissions to access mobile device resources
US8713646B2 (en) Controlling access to resources on a network
EP3905671B1 (en) Method and device for processing request
US10050899B2 (en) Data processing method, apparatus, client, server and system
BR112015003089B1 (en) NETWORK CONNECTION METHOD AND APPLIANCES, AND COMPUTER READABLE MEDIA
CN111123388B (en) Detection method and device for room camera device and detection equipment
US9122910B2 (en) Method, apparatus, and system for friend recommendations
CN111159269B (en) Data processing method, device and system
US20160269380A1 (en) Vpn communication terminal compatible with captive portals, and communication control method and program therefor
CN104579830A (en) Service monitoring method and device
CN109688096B (en) IP address identification method, device, equipment and computer readable storage medium
US10819681B2 (en) Content filtering with temporary privilege escalation responsive to a predetermined environmental condition
CN106302519A (en) The method of a kind of internet security management and terminal
CN114448645A (en) Method, device, storage medium and program product for processing webpage access
CN112261651B (en) Terminal control method, device, terminal and storage medium
CN114844849A (en) Data transmission method and device, electronic equipment and storage medium
WO2017020551A1 (en) Method and device for managing wireless access point
WO2020238971A1 (en) File sharing method, apparatus and system, server, terminal, and storage medium
CN114222176A (en) Synchronous screen projection method, equipment and storage medium
CN113609516A (en) Information generation method and device based on abnormal user, electronic equipment and medium
CN113938317A (en) Network security monitoring method and computer equipment
CN112261051B (en) User registration method, device and system

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