WO2018223961A1 - 数据分享方法、终端及*** - Google Patents
数据分享方法、终端及*** Download PDFInfo
- Publication number
- WO2018223961A1 WO2018223961A1 PCT/CN2018/089965 CN2018089965W WO2018223961A1 WO 2018223961 A1 WO2018223961 A1 WO 2018223961A1 CN 2018089965 W CN2018089965 W CN 2018089965W WO 2018223961 A1 WO2018223961 A1 WO 2018223961A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- terminal
- data
- shared
- sharing
- receiving
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/005—Discovery of network devices, e.g. terminals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
Definitions
- the present disclosure relates to communication technologies, and in particular, to a data sharing method, terminal, and system.
- the existing data dissemination channels sometimes cannot cover many scenarios, and there are some shortcomings: on the one hand, the location where the mobile phone is located has no network signal, or the location of the mobile phone where the mobile phone is located is poor, or the mobile phone is in arrears, Quickly spread data such as short messages quickly; when the user is in an emergency, it is not convenient to make calls, send text messages, and use the instant chat tool, the help message cannot be sent quickly; and the location of the mobile phone has a network signal, but the data The content is large, and it takes a lot of mobile data traffic to spread data.
- the embodiments of the present disclosure provide a data sharing method, a terminal, and a system, which can quickly implement data sharing between terminals without consuming mobile data traffic.
- An embodiment of the present disclosure provides a data sharing method, including: a first terminal acquiring a sharing mode of data to be shared; a first terminal creating a first wireless local area network that is itself a wireless access point; and receiving, by the first terminal, a second terminal The first connection request; and the first terminal and the second terminal when the first terminal determines to allow the second terminal to receive the data to be shared based on the first connection request and/or the sharing mode Establishing a data communication connection, and transmitting the to-be-shared data and the sharing mode to the second terminal.
- An embodiment of the present disclosure provides a first terminal, including a first receiving unit, a first creating unit, a second receiving unit, a first processing unit, and a first sending unit, where the first receiving unit is configured to acquire Sharing a sharing mode of the data; the first creating unit is configured to create a first wireless local area network with the first terminal as a wireless access point; and the second receiving unit is configured to receive a first connection request sent by the second terminal.
- the first processing unit is configured to establish a data communication connection with the second terminal when the second terminal is allowed to receive the data to be shared based on the first connection request and/or the sharing mode determination;
- the first sending unit is configured to send the to-be-shared data and the sharing mode to the second terminal.
- An embodiment of the present disclosure provides a data sharing method, including: searching, by a second terminal, a first wireless local area network created by a first terminal, where the first terminal is a wireless access point; The first terminal sends a first connection request; when the first terminal determines that the second terminal is allowed to receive data to be shared, the second terminal establishes a data communication connection with the first terminal; and the second terminal receives the a sharing mode of the to-be-shared data and the to-be-shared data sent by the first terminal.
- An embodiment of the present disclosure provides a second terminal, including a second search unit, a second sending unit, a second processing unit, and a third receiving unit, where the searching unit is configured to search for a location created by the first terminal.
- the first terminal is a first wireless local area network of the wireless access point;
- the second sending unit is configured to send a first connection request to the searched first terminal;
- the second processing unit is configured to be in the first When the terminal determines that the second terminal is allowed to receive data to be shared, establishing a data communication connection with the first terminal;
- the third receiving unit is configured to receive the to-be-shared data and the Discuss the sharing mode of sharing data.
- An embodiment of the present disclosure provides a data sharing system, which may include a first terminal according to the present disclosure and a second terminal according to the present disclosure.
- Embodiments of the present disclosure provide a computer storage medium having program code stored thereon that is executed when the program code is executed by a processor, the processor executing a data sharing method according to the present disclosure.
- FIG. 1 is a schematic flow chart of a data sharing method according to an embodiment of the present disclosure
- FIG. 2 is a schematic structural diagram of a first terminal according to an embodiment of the present disclosure
- FIG. 3 is a schematic flow chart of a data sharing method according to an embodiment of the present disclosure.
- FIG. 4 is a schematic structural diagram of a second terminal according to an embodiment of the present disclosure.
- FIG. 5 is a schematic structural diagram of a data sharing system according to an embodiment of the present disclosure.
- FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
- FIG. 1 is a schematic flow chart of a data sharing method according to an embodiment of the present disclosure.
- the data sharing method according to the present embodiment includes steps 101 to 104.
- step 101 the first terminal acquires a sharing mode of the data to be shared.
- the first terminal may receive the setting instruction, and generate a sharing mode of the data to be shared according to the setting instruction, that is, acquire a sharing mode of the data to be shared.
- the setting instruction may be generated by the user performing setting by performing operations such as touch, input, etc. on the screen of the first terminal or the interface of the installed data sharing application, or may be generated by the third party terminal device according to the data sharing requirement, and passed An external interface (such as a universal serial bus interface) of the first terminal connected to the third-party terminal device is sent to the first terminal.
- the data to be shared may be data stored in the first terminal (such as a stored picture, a log, etc.), or may be data currently acquired by the first terminal in real time (such as a photo currently taken by the first terminal, an edited text file, and SMS messages, etc.). If the setting command is sent by the third-party terminal device to the first terminal, the data to be shared may also be included in the setting instruction.
- the setting instruction may further include an instruction specifying data to be shared, and the first terminal may specify the data to be shared according to the setting instruction.
- the data to be shared may also be data to be shared by the user of the first terminal before the first terminal receives the setting instruction.
- the setting instruction may include a sharing method for the data to be shared, and the first terminal may use the sharing method as a sharing mode for the data to be shared according to the setting instruction.
- the sharing model can include at least the mode of communication. Further, the sharing mode may further include receiving at least one of a terminal identification list and a propagation area.
- the mode of propagation is used to define how the data to be shared is allowed to propagate, and may include a first propagation mode, a second propagation mode, and the like.
- the first propagation mode can also be called a borrowing propagation mode, that is, when two people are far apart and cannot directly transmit data to be shared with each other, they can be indirectly propagated through an intermediate person in a walking state.
- the sender first shares the data to be shared to one or more intermediaries, and then shares the data to be shared with the destination recipient through one or more intermediaries to quickly complete the sharing of the data to be shared.
- the first propagation mode is that the transmitting terminal shares the data to be shared with the receiving terminal via the third party terminal.
- the shared data is encrypted in the data sharing process, so that the middleman cannot directly view the data to be shared in the process of propagating the data.
- the second propagation mode can also be called a multi-point retransmission mode, that is, there is only one data source that initially shares the data to be shared, and after one data transmission, the data source that can share the data to be shared becomes two. In this way, data sources that can share data to be shared can grow exponentially to achieve fast sharing of data to be shared. In short, the second propagation mode is that the receiving terminal continues to send the data to be shared to other receiving terminals after receiving the data to be shared.
- the receiving terminal identifier list is a list composed of identifiers of all terminals that can receive data to be shared and can directly view data to be shared.
- the receiving terminal identification list may include an identification of one or more terminals.
- the identifier of the terminal may be an International Mobile Subscriber Identity (IMSI) of the terminal, an International Mobile Equipment Identity (IMEI) of the terminal, a mobile phone number of the user of the terminal, or a number set in advance for the terminal.
- IMSI International Mobile Subscriber Identity
- IMEI International Mobile Equipment Identity
- the identifiers of the multiple terminals may be stored in the database of the first terminal as a group list in advance.
- the propagation area is used to define one or more set area ranges in which the data to be shared can be shared, for example, to allow data to be shared within 100 meters of a certain cell.
- the first terminal creates a first wireless local area network that is itself a wireless access point.
- the first wireless local area network may be created based on technologies such as Near Field Communication (NFC) or Bluetooth.
- NFC Near Field Communication
- the first access terminal may generate the access password of the wireless access point and the name of the wireless access point, or may not generate the access of the wireless access point.
- the password only generates the name of the wireless access point.
- the name of the wireless access point is used to distinguish different wireless access points, and can be generated according to parameters such as the model and performance of the first terminal.
- the access password of the wireless access point is used to verify whether the terminal other than the first terminal is allowed to access the wireless access point, and access is allowed only if the access password is correct.
- the access password of the wireless access point may be a randomly generated one or more random numbers, or may be a preset combination of numbers.
- the first wireless local area network is created as the sender, and then the first wireless local area network with the first terminal as the wireless access point can be periodically created and closed again to save the first terminal.
- the consumption of resources such as power and memory.
- the access password of each generated wireless access point may be the same.
- step 103 the first terminal receives the first connection request sent by the second terminal.
- the second terminal After the first terminal creates the first wireless local area network, the second terminal searches for the first wireless local area network created by the first terminal and uses the first terminal as the wireless access point, and sends the first connection request to the searched first terminal. To request to connect to the first wireless LAN.
- the first terminal may receive the first connection request sent by the second terminal.
- the first terminal may also receive the first connection request sent by the second terminal to the first terminal, that is, the first terminal may receive the first connection request sent by the multiple second terminals simultaneously or within a certain period of time.
- the first connection request may include the name of the wireless access point and/or the access password of the wireless access point and/or the identity of the second terminal.
- the connection request may be a Transmission Control Protocol (TCP) connection request.
- TCP Transmission Control Protocol
- step 104 when the first terminal determines to allow the second terminal to receive the data to be shared based on the first connection request and/or the sharing mode, the first terminal establishes a data communication connection with the second terminal, and the data to be shared and the sharing mode are The second terminal sends.
- the determining, by the first terminal, whether to allow the second terminal to receive the data to be shared based on the first connection request and/or the sharing mode may include at least the following four situations:
- Case 1 The first terminal determines whether to allow the second terminal to receive data to be shared based on the first connection request and the sharing mode, that is, the first terminal determines that the sharing mode includes the second propagation mode and the receiving terminal identification list, and the first connection request includes The identifier of the second terminal, and the identifier of the second terminal, when receiving the terminal identifier list, may allow the second terminal to receive data to be shared;
- the first terminal determines whether to allow the second terminal to receive the data to be shared based on the sharing mode, that is, when the first terminal determines that the sharing mode includes the second propagation mode, the second terminal may allow the second terminal to receive the data to be shared.
- Scenario 3 The first terminal determines whether to allow the second terminal to receive data to be shared based on the sharing mode, that is, when the first terminal determines that the sharing mode includes receiving the terminal identifier list and/or the first propagation mode, the second terminal may allow the second terminal to receive the to-be-shared. data;
- Case 4 The first terminal determines, according to the first connection request, whether the second terminal is allowed to receive the data to be shared, that is, when the first connection request includes the name of the wireless access point and the access password of the wireless access point, and the first terminal When the verification of the access password of the wireless access point in the first connection request is passed, the second terminal may be allowed to receive the data to be shared.
- the identifier of the second terminal belongs to the receiving terminal identifier list, indicating that the second terminal is the receiver of the data to be shared, and therefore, the first terminal can share the data to be shared to the second terminal.
- the second terminal After the second terminal receives the sharing mode of the data to be shared and the data to be shared sent by the first terminal, if the receiving terminal identifier list further includes a terminal identifier other than the identifier of the second terminal, the second terminal may create itself.
- the second wireless local area network of the wireless access point to continue sharing the data to be shared.
- the sharing mode does not limit the recipient of the data to be shared at this time, that is, the terminal other than the first terminal may acquire the data to be shared, and is suitable for propagating data within a certain range or region, for example, when an emergency notification needs to be issued to all personnel in a certain shopping mall, the sharing mode of the recipient who does not limit the emergency notification is adopted, so that the emergency notification can be quickly spread in the shopping mall.
- the identifier of the second terminal may belong to the receiving terminal identifier list or may not belong to the receiving terminal identifier list.
- the identifier of the second terminal belongs to the receiving terminal identifier list, indicating that the second terminal is the destination receiver of the data to be shared
- the identifier of the second terminal does not belong to the receiving terminal identifier list, indicating that the second terminal is an intermediary, instead of If the destination party is to share the data, the second terminal needs to continue to share the data to be shared, so that the destination recipient of the data to be shared can obtain the data as soon as possible.
- the first terminal verifies the access password of the wireless access point in the first connection request, it indicates that the second terminal is the destination receiver of the data to be shared because the access is at the wireless access point. If the password is only known to the user of the first terminal, the user of the second terminal can know the access password of the wireless access point only when notified by the user of the first terminal, indicating that the user of the first terminal is willing to share The data is shared to the user of the second terminal, that is, the first terminal can share the data to be shared to the second terminal.
- the determining, by the first terminal, the second terminal to allow the second terminal to receive the data to be shared based on the sharing mode includes: allowing the second terminal to receive the data to be shared via the at least one third terminal, the third terminal Connected between the first terminal and the second terminal; when the sharing mode is the second propagation mode, the step of determining, by the first terminal, the second terminal to allow the second terminal to receive the data to be shared based on the sharing mode comprises: allowing the second terminal to receive the first terminal to send When the first terminal sends the data to be shared to the other terminal, the second terminal sends the received data to be shared to the at least one third terminal.
- the first terminal, the second terminal, and the third terminal are only used herein to distinguish different terminals in order to more clearly illustrate the technical solution.
- the first terminal can be used as a transmitting terminal, a receiving terminal, and a transit terminal.
- the first wireless local area network created by the first terminal does not set an access password but only has a name.
- the second terminal can connect to the first wireless local area network according to the first connection request sent to the first terminal, and then the first terminal establishes a data communication connection with the second terminal, so that the first terminal and the second terminal can be configured. data transmission.
- the data communication connection can be a TCP connection, a Socket connection, or the like.
- the first terminal also needs to verify the access password of the wireless access point in the first connection request, and after the verification is passed, it can determine that the second terminal is allowed to receive the call. Share data.
- the data sharing method can save mobile data traffic of any terminal on both sides when sharing data between the first terminal and the second terminal, thereby achieving no network signal coverage or network signal quality. When it is poor, data sharing can still be performed between the first terminal and the second terminal.
- the method may further include: searching, by the first terminal, the second wireless local area network created by the fourth terminal and using the fourth terminal as the wireless access point, to obtain the fourth wireless terminal shared by the fourth terminal.
- Target data may be searched, by the first terminal, the second wireless local area network created by the fourth terminal and using the fourth terminal as the wireless access point, to obtain the fourth wireless terminal shared by the fourth terminal.
- the first terminal may also need to receive data shared by other terminals, after the first terminal creates a first wireless local area network with the wireless access point as the transmitting terminal for a period of time (for example, 10 minutes), the first terminal may As the receiving terminal, the wireless local area network created by other terminals (such as the fourth terminal) is automatically searched for the target data shared by other terminals. If the first terminal does not receive the connection request (ie, the receiving terminal is not found) within a certain period of time (for example, 20 minutes), or the first terminal does not search for the wireless local area network within a certain time (for example, 15 minutes) as the receiving terminal. (ie, no sending terminal is found), you can temporarily keep silent to turn off the switch such as WiFi or Bluetooth, and create a wireless LAN or search for wireless LAN again after a period of time, thus saving power consumption.
- the connection request ie, the receiving terminal is not found
- the first terminal does not search for the wireless local area network within a certain time (for example, 15 minutes) as the receiving terminal. (
- the fourth terminal may actually be any one of the second terminal and the third terminal in the foregoing embodiment.
- a preset algorithm may be used to control the switching of the first terminal between the sender and the receiver.
- the first terminal acquires the data to be shared or determines that data sharing is required, the first terminal can be automatically switched to the sender according to the preset algorithm, that is, the first terminal creates the first wireless local area network; when the first terminal shares the When the data is to be shared or no data is shared, the first terminal can be automatically switched to the receiver according to the preset algorithm, that is, the first terminal searches for the accessible wireless local area network to obtain the target data.
- the method may further include: when the first terminal acquires the current location of the first terminal, and determines that the current location of the terminal belongs to the pre-set propagation area, allowing the creation to be wirelessly connected by itself.
- the first wireless LAN of the entry point may further include: when the first terminal acquires the current location of the first terminal, and determines that the current location of the terminal belongs to the pre-set propagation area, allowing the creation to be wirelessly connected by itself.
- the first wireless LAN of the entry point may further include: when the first terminal acquires the current location of the first terminal, and determines that the current location of the terminal belongs to the pre-set propagation area, allowing the creation to be wirelessly connected by itself.
- the first wireless LAN of the entry point may further include: when the first terminal acquires the current location of the first terminal, and determines that the current location of the terminal belongs to the pre-set propagation area, allowing the creation to be wirelessly connected by itself.
- the first wireless LAN of the entry point may further include:
- the first terminal acquires the current location of the first terminal, and determines whether the current location of the first terminal belongs to the pre-set propagation area. If it is determined that the current location of the user belongs to the propagation area, the first terminal is allowed to create the first wireless local area network that is itself a wireless access point; if it is determined that the current location does not belong to the propagation area, the first terminal is not allowed to create The first wireless local area network that is itself a wireless access point.
- the propagation area can also be included in the sharing mode. Since the communication distance of the first wireless local area network created by the first terminal as the wireless access point is limited, the first terminal is allowed to be created by defining the propagation area and determining that the current location of the wireless access point belongs to the propagation area.
- the first wireless local area network which is itself a wireless access point, can better save resources and speed up data sharing efficiency.
- the sharing mode may further include a destruction condition to cause the second terminal to destroy the data to be shared when it is determined that the destruction condition is satisfied.
- Destruction conditions may include destruction time, destruction methods, and so on.
- the destruction time can be a specific time point (such as 10:20) or a time period (such as 30 minutes). For example, when the destruction time is one hour, if the second terminal receives the data to be shared for one hour, the second terminal is caused to destroy the received data to be shared.
- the second terminal that receives the data to be shared is automatically destroyed and received when the destruction condition is determined by setting the destruction condition in the sharing policy. Share data.
- the method further includes: the first terminal sending an encryption instruction to the second terminal, so that the second terminal encrypts the data to be shared according to the encryption instruction.
- the sharing mode includes receiving the terminal identification list and the first propagation mode, and the first terminal determines that the identifier of the second terminal does not belong to the receiving terminal identification list, the first terminal sends an encryption instruction to the second terminal, so that the second terminal is encrypted according to the second terminal.
- the instruction encrypts the shared data.
- the encryption instruction may include content such as an identifier of the first terminal, an encryption method, and the like.
- the sharing mode includes receiving the terminal identification list and the first propagation mode, and the first terminal determines that the identifier of the second terminal does not belong to the receiving terminal identification list, it is known that the second terminal is an intermediary rather than a destination recipient to share data. Therefore, the first terminal sends an encryption instruction to the second terminal, so that the second terminal encrypts the data to be shared according to the encryption instruction, so that the second terminal cannot directly view the data to be shared, thereby ensuring the security and privacy of the data to be shared.
- FIG. 2 is a schematic structural diagram of a first terminal according to an embodiment of the present disclosure.
- the first terminal 1 includes a first receiving unit 10, a first creating unit 11, a second receiving unit 12, a first processing unit 13, and a first transmitting unit 14.
- the first receiving unit 10 is configured to acquire a sharing mode of data to be shared.
- the first creation unit 11 is arranged to create a first wireless local area network with the first terminal as a wireless access point.
- the second receiving unit 12 is configured to receive the first connection request sent by the second terminal.
- the first processing unit 13 is configured to establish a data communication connection with the second terminal when the second terminal is allowed to receive the data to be shared based on the first connection request and/or the sharing mode.
- the first sending unit 14 is configured to send the data to be shared and the sharing mode to the second terminal.
- the first receiving unit 10 acquires the sharing mode of the data to be shared, the first creating unit 11 creates a first wireless local area network with the first terminal as the wireless access point, and the second receiving unit 12 receives the second wireless terminal. a method of connecting the request, the first processing unit determines a manner of allowing the second terminal to receive data to be shared, and a manner of establishing a data connection with the second terminal, and the first sending unit 14 sends the data to be shared and the sharing mode to the second terminal.
- the manners are substantially the same as the steps 101, 102, 103, and 104 described above with reference to FIG. 1, and are not described herein.
- the first terminal 1 may further include a first search unit 15 configured to search for a second wireless local area network created by the fourth terminal and having the fourth terminal as a wireless access point to obtain the fourth terminal sharing. Target data.
- first search unit 15 For the description of the first search unit 15, reference may be made to the steps of searching for the second wireless local area network performed after step 104 in the above embodiment, and details are not described herein.
- the first terminal 1 may further include a location acquisition unit 16 configured to acquire a current location of the first terminal.
- step obtaining the current location of the self which is performed before step 102 in the above embodiment, and details are not described herein.
- the first terminal according to the present embodiment may transmit a sharing mode including a destruction condition to the second terminal, and may also transmit an encryption instruction to the second terminal.
- a sharing mode including a destruction condition to the second terminal
- an encryption instruction to the second terminal.
- FIG. 3 is a schematic flow chart of a data sharing method according to an embodiment of the present disclosure.
- the data sharing method according to this embodiment includes steps 201 to 204.
- step 201 the second terminal searches for the first wireless local area network created by the first terminal and the first terminal is a wireless access point.
- the second terminal starts the wireless access point search function, and searches for the first wireless local area network created by the first terminal and the first terminal is the wireless access point.
- the second terminal enables the wireless access point search function to be that the second terminal turns on the WiFi.
- step 202 the second terminal sends a first connection request to the searched first terminal.
- the second terminal After the second terminal searches for the first wireless local area network created by the first terminal and the first terminal is the wireless access point, the second terminal sends a first connection request to the searched first terminal to request Connect to the first wireless LAN.
- the first connection request may include the name of the wireless access point and/or the access password of the wireless access point and/or the identity of the second terminal.
- the access password of the wireless access point in the first connection request may be set by the user of the second terminal.
- step 203 when the first terminal determines to allow the second terminal to receive data to be shared, the second terminal establishes a data communication connection with the first terminal.
- the second terminal When the first terminal determines to allow the second terminal to receive the data to be shared based on the first connection request and/or the sharing mode of the data to be shared, the second terminal establishes a data communication connection with the first terminal.
- the sharing mode of the data to be shared may be set by the first terminal according to the received setting instruction.
- the data communication connection can be a TCP connection, a Socket connection, or the like.
- the sharing strategy includes at least one mode of propagation, and may further include receiving at least one of a terminal identification list and a propagation area.
- step 204 the second terminal receives the sharing mode of the data to be shared and the data to be shared sent by the first terminal.
- the second terminal establishes a data communication connection with the first terminal in step 203, and receives and stores a sharing mode of the data to be shared and the data to be shared sent by the first terminal.
- the data sharing method of the present embodiment it is not necessary to consume mobile data traffic of any terminal of the two parties when sharing data between the first terminal and the second terminal, thereby achieving no network signal coverage or network signal quality. When it is poor, data sharing can still be performed between the first terminal and the second terminal.
- the method may further include: when the second terminal determines that the destruction condition is met, destroying the data to be shared.
- the method may further include The second terminal receives the encryption instruction sent by the first terminal, and encrypts the shared data according to the encryption instruction.
- the encryption instruction may include content such as an identifier of the first terminal, an encryption method, and the like.
- the second terminal encrypts the data to be shared according to the encryption instruction.
- the second terminal may encrypt according to the identifier of the first terminal, the encryption method, and the time when the data to be shared is received.
- the sharing mode includes receiving the terminal identification list and the first propagation mode, and the first terminal determines that the identifier of the second terminal does not belong to the receiving terminal identification list, it is known that the second terminal is an intermediary rather than a destination recipient to share data. Therefore, the second terminal encrypts the shared data according to the encryption instruction sent by the first terminal, so that the second terminal cannot directly view the data to be shared, thereby ensuring the security and privacy of the data to be shared.
- the method may further include: the second terminal creates a third wireless local area network that is itself a wireless access point; the second terminal receives the second connection request sent by the third terminal; and the second terminal determines the second connection request and/or the sharing mode based on the second connection request
- the second terminal When the third terminal is allowed to receive the data to be shared, the second terminal establishes a data communication connection with the third terminal, and sends the data to be shared and the sharing mode to the third terminal.
- the first connection request includes the identifier of the second terminal, and the identifier of the second terminal does not belong to the receiving terminal identifier list, indicating that the second terminal is not receiving the data to be shared. square. Therefore, the second terminal needs to continue to share the data to be shared, so that the destination recipient of the data to be shared obtains the data to be shared.
- the sharing mode includes the receiving terminal identifier list and the second propagation mode
- the first connection request includes the identifier of the second terminal, and the identifier of the second terminal belongs to the receiving terminal identifier list, indicating that the second terminal is a destination receiving of the data to be shared.
- the second terminal needs to continue to share the data to be shared, so that all destination recipients of the data to be shared obtain the data to be shared.
- the sharing mode includes the second propagation mode and does not include the receiving terminal identification list, indicating that the second terminal is a destination receiver of the data to be shared, therefore, the second terminal needs to continue sharing the data to be shared, so that as many terminals as possible Get the data to be shared.
- a preset algorithm can be used to control the handover of the second terminal between the sender and the receiver.
- the second terminal acquires the data to be shared or determines that data sharing is required, the second terminal can be automatically switched to the sender according to the preset algorithm, that is, the second terminal creates the second wireless local area network; when the second terminal shares the When the data is to be shared or not shared, the second terminal can be automatically switched to the receiver according to a preset algorithm, that is, the second terminal searches for the accessible wireless local area network to obtain the target data.
- the third party ie, the intermediary
- the third party can share the data to be shared with the destination recipient to be shared data, or through a purpose of the data to be shared.
- the receiving party shares the data to be shared with another destination recipient to achieve fast data sharing.
- FIG. 4 is a schematic structural diagram of a second terminal according to an embodiment of the present disclosure.
- the second terminal 2 includes a second search unit 20, a second transmitting unit 21, a second processing unit 22, and a third receiving unit 23.
- the second search unit 20 is configured to search for a first wireless local area network created by the first terminal with the first terminal as a wireless access point.
- the second transmitting unit 21 is arranged to send a first connection request to the searched first terminal.
- the second processing unit 22 is configured to establish a data communication connection with the first terminal when the first terminal determines to allow the second terminal to receive the data to be shared.
- the third receiving unit 23 is configured to receive a sharing mode of the data to be shared and the data to be shared sent by the first terminal.
- the second processing unit 22 when the sharing mode includes the destruction condition, destroys the data to be shared when it is determined that the destruction condition is satisfied.
- the third receiving unit 23 receives the encrypted instruction transmitted by the first terminal, and the second processing unit 22 encrypts the data to be shared according to the encrypted instruction.
- the second terminal 2 may further include a second creating unit 24, where the sharing mode includes receiving the terminal identification list and the first propagation mode, the first connection request includes the identifier of the second terminal, and the identifier of the second terminal When not belonging to the receiving terminal identification list, or when the sharing policy includes the second propagation mode, or when the sharing policy includes receiving the terminal identification list and the second propagation mode, the first connection request includes the identifier of the second terminal, and the second terminal When the identifier belongs to the receiving terminal identifier list, the second creating unit 24 creates a third wireless local area network with the second terminal as the wireless access point.
- the third receiving unit 23 receives the second connection request sent by the third terminal, and the second processing unit 22 determines, based on the second connection request and/or the sharing mode, that the third terminal is allowed to receive the data to be shared, and the third The terminal establishes a data communication connection, and the second transmitting unit 21 transmits the data to be shared and the sharing mode to the third terminal.
- FIG. 5 is a schematic structural diagram of a data sharing system according to an embodiment of the present disclosure.
- a data sharing system includes a first terminal 1 and a second terminal 2.
- the first terminal 1 is configured to acquire a sharing mode of data to be shared and create a first wireless local area network that is itself a wireless access point.
- the second terminal 2 is configured to search for the first wireless local area network created by the first terminal 1 with the first terminal 1 as a wireless access point, and send a first connection request to the searched first terminal 1.
- the first terminal 1 is further configured to receive the first connection request sent by the second terminal 2, and establish a data communication with the second terminal 2 when the second terminal 2 is allowed to receive the data to be shared based on the first connection request and/or the sharing mode. Connecting, and sending the data to be shared and sharing mode to the second terminal 2;
- the second terminal 2 is further configured to receive the sharing mode of the data to be shared and the data to be shared sent by the first terminal 1.
- the first terminal 1 may also receive a first connection request sent by one or more second terminals 2 to the first terminal 1, that is, the first terminal 1 may simultaneously or at a certain time.
- the first connection request sent by the plurality of second terminals 2 is received in the segment.
- the data sharing system provided in this embodiment can share mobile data traffic of any terminal on both sides when sharing data between the first terminal and the second terminal, thereby achieving no network signal coverage or network signal quality. When the difference is poor, data sharing can still be performed between the first terminal and the second terminal.
- the first terminal 1 may also acquire the current location of the user, and determine that the current location of the first terminal 1 belongs to the preset communication area, and allows the first terminal to create the first wireless local area network with itself as the wireless access point. .
- the first terminal 1 determines that there is data to be shared, the first terminal 1 acquires its current location, and determines whether its current location belongs to a preset propagation area, and if it determines that its current location belongs to the propagation area, The first terminal 1 is allowed to create a first wireless local area network that is itself a wireless access point; if it is determined that the current location is not in the propagation area, the first terminal 1 is not allowed to create the first one that is itself a wireless access point.
- Wireless LAN Wireless LAN.
- the first terminal 1 Since the communication distance of the first wireless local area network, which is created by the first terminal 1 and is itself a wireless access point, is limited, it is allowed by defining the propagation area so that the first terminal 1 determines that its current location belongs to the propagation area.
- the first terminal 1 creates a first wireless local area network with itself as a wireless access point to better save resources and speed up data sharing efficiency.
- the sharing mode may further include a destruction condition, and the second terminal 2 destroys the data to be shared when it is determined that the destruction condition is satisfied.
- the first terminal 1 transmits an encryption instruction to the second terminal 2, and the second terminal 2 receives the encryption instruction and encrypts the data to be shared according to the encryption instruction.
- the sharing mode includes receiving the terminal identification list and the first propagation mode, and the first terminal 1 determines that the identifier of the second terminal 2 does not belong to the receiving terminal identification list, the first terminal 1 transmits an encryption instruction to the second terminal 2.
- the second terminal 2 receives the encryption instruction sent by the first terminal 1, and encrypts the data to be shared according to the encryption instruction.
- the sharing mode includes receiving the terminal identification list and the first propagation mode
- the first terminal 1 determines that the identifier of the second terminal 2 does not belong to the receiving terminal identification list
- the second terminal 2 is an intermediary rather than receiving the data to be shared. square. Therefore, the first terminal 1 sends an encryption instruction to the second terminal 2, so that the second terminal 2 encrypts the data to be shared according to the encryption instruction, so that the second terminal 2 cannot directly view the data to be shared, thereby ensuring the security of the data to be shared. And privacy.
- the data sharing system may further include a third terminal 3.
- the sharing mode includes receiving the terminal identification list and the first propagation mode
- the first connection request includes the identifier of the second terminal, and the identifier of the second terminal does not belong to the receiving terminal identifier list; or, when the sharing mode includes the second propagation Or when the sharing mode includes the receiving terminal identifier list and the second propagation mode, where the first connection request includes the identifier of the second terminal, and the identifier of the second terminal belongs to the receiving terminal identifier list
- the second terminal 2 may Create a third wireless local area network that is itself a wireless access point.
- the third terminal 3 searches for the third wireless local area network created by the second terminal with the second terminal as the wireless access point, and sends a second connection request to the searched second terminal.
- the second terminal 2 receives the second connection request sent by the third terminal, determines, according to the second connection request and/or the sharing mode, that the third terminal is allowed to receive the data to be shared, establishes a data communication connection with the third terminal, and stores the data to be shared.
- sharing mode is sent to the third terminal.
- the third terminal 3 receives the data to be shared and the sharing mode.
- the second terminal is an intermediary rather than a destination receiver to share data
- the second terminal also needs to decrypt the encrypted data to be shared, and then send the data to be shared to the third terminal.
- the first terminal 1 can also function as a receiving terminal.
- the second wireless local area network with the fourth terminal being the wireless access point created by the fourth terminal (not shown in FIG. 5) may also be searched for acquiring the fourth terminal. Shared target data.
- the first terminal, the second terminal, and the third terminal are only for distinguishing different terminals, so as to more clearly illustrate the technical solution.
- the first terminal can be either a transmitting terminal, a receiving terminal, or a transit terminal
- the fourth terminal can also be a second terminal.
- FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
- the terminal includes a setting module 31, a WIFI module 32, a connection module 33, a saving module 34, and a viewing module 35.
- One of the functions of the setting module 31 may include setting a role conversion policy of the sender and the receiver on the mobile phone and setting a message propagation initiation policy, which are system level.
- the default startup policy may include: when the user sets the content to be shared, the role conversion policy will be tilted to the sender, and of course, the recipient will be appropriately switched to the receiver, because it is possible that other terminals have content to share; if there is no content at all Sharing, it is always on the receiving side.
- message-level settings such as setting the propagation area of the content to be broadcast, the time of propagation, the number of times of propagation, whether to allow automatic propagation, whether to allow multiple points to continue, and whether to allow borrowing to spread.
- Automatic transmission means that when the user sets up the group to which the content needs to be shared, the related content is automatically transmitted without the user having to operate again.
- Multi-point retransmission means that the information source has only one at the beginning, but after one transmission, the information source becomes two, and then the information source can grow exponentially, which can be quickly spread in the specified group. .
- force transmission means that two people are far apart and cannot be directly transmitted, and then content sharing can be completed through a mobile intermediary.
- Regional communication means that content can be confined to certain areas for dissemination and geographical location, so that the content is more accurate.
- the WIFI module 32 has two main functions, namely, as a hotspot provider or as a seeker for searching for hotspots.
- the positioning system requires at least two terminals to participate, one terminal as the hotspot provider (ie, the terminal being sought) and the other terminal as the seeker.
- the hotspot provider satisfies the pre-set conditions, it automatically starts a special hotspot and waits for the searcher to find it.
- the user when the user is looking for a hotspot, it can be activated as a seeker terminal, automatically search for hotspots that meet the needs, and automatically connect.
- the connection module 33 is mainly used to establish a handshake connection between two terminals. According to an embodiment of the present disclosure, various handshake protocols for connecting between two terminals can be supported.
- the saving module 34 is configured to save the received information in the receiving mode, and the received information may carry various control information (eg, a life cycle, a secret key, etc.).
- saved content can only be viewed through a specific viewing tool (for example, viewing module 35).
- View module 35 is used to view the saved content. Security is guaranteed because only the specific viewing tools can be used to view the saved content.
- a family of six (including grandfather, grandmother, father, mother, son, and daughter) is set up as a family group, and then the group can share content by: internal communication (no channel propagation), designated area communication (only Limited to a few places to spread), allow multiple points to continue (the recipient can also send the content again) and allow viewing.
- the father's cell phone determines the current location, and if the current zone does not belong to the sharing zone, the operation of sharing photos to the family group will not be initiated.
- Grandma took her daughter at home, took a few photos about her daughter with her mobile phone, and set up to share photos to this family group. Since the area where Grandma's mobile phone is located is an area that allows sharing, Grandma's mobile phone will switch between the sender and the recipient according to a certain frequency. In order to avoid power consumption, the handover may be temporarily stopped within a certain period of time (for example, ten minutes) without discovering other senders and/or receivers.
- Grandma's mobile phone When the mother returns home from work, when the mother's mobile phone detects that it has entered the communication area set for the family group, since there is no content to be shared on the mother's mobile phone, the receiving mode is automatically entered as the receiving party. Since Grandma's mobile phone has content to share, when Grandma's mobile phone enters the sending mode as the sender, Grandma's mobile phone can create a hotspot and wait for the mother's mobile phone to connect to the hotspot.
- the process of getting the shared content is basically the same as the process of getting the shared content from the mother's mobile phone from her grandmother's mobile phone.
- the father returns home, all the people have content to share, the content shared by the mother, grandmother, grandfather and son is the same, the handshake between them can know this information, so it will not be repeated.
- the father can act as the sender or the recipient, share the content with others, or obtain content from any other person, thus sharing the entire content.
- the father's mobile phone When the content of the members of the family group is agreed, the father's mobile phone will automatically stop sharing, and Grandma's mobile phone will stop sharing. When only one member has not successfully acquired the content or shared the time for more than a certain period of time, it may also prompt whether it is necessary to stop the sharing of the content.
- the sharing rules may include: allowing the borrowing to spread, the designated person can view, the viewing mode is to view and destroy, and the aging time is half a day (ie, the time for retaining the message on the middleman's mobile phone is half a day).
- the sending mode ie, as the sender
- A's classmate A's mobile phone has been set up to allow the use of the channel to spread, search for the hotspot established by A's mobile phone in a certain period of time, and then establish a connection with A's mobile phone, and successfully obtain the message shared by A. Since A is only an intermediary, it will generate a secret key based on some information of the original sender A (such as mobile phone model, mobile phone number and sending time, etc.) and encrypt the message received by A, and then save the encrypted message. To the phone, A can't view the message at this time.
- A goes to the playground and encounters B. Similar to the way A sends a message to A, A can pass the message shared by A to B. For example, A's mobile phone decrypts the encrypted saved message to restore it to the original message and then transmits it to B's mobile phone. Then, according to the original transmission party A and some information of A, a new secret key is generated and the message is encrypted, and the encrypted message is saved on the B mobile phone.
- B returns to the classroom. Since B and B are in the same class, and B is one of the target recipients, B's mobile phone establishes a hotspot. After waiting for B's mobile phone to connect to the hotspot, B can obtain a shared message from B's mobile phone. Message. Since B is one of the target recipients, the message sent through B's mobile phone is not encrypted, so that B can view the message.
- the third application scenario shopping malls
- Paid dissemination means that the intermediary who assists in the dissemination can receive compensation.
- Reputation communication means that if the reputation of the communicator is better, the probability that the transmitted information transmitted by it will be prioritized will be greater.
- B is near A, and B's mobile phone is allowed to accept the information of this mode of communication, and then B can spread the received message multiple times.
- the terminal for example, a mobile phone
- the content is propagated by setting up a local area network, and each terminal can be both a sender and a receiver, and at the same time, The frequency of switching between the party and the receiver is controlled.
- the terminal acts as the sender, a hotspot is created, and the terminal at the receiver automatically searches for hotspots and connects. After connecting to the hotspot, the communication connection can be completed through the TCP handshake and the content is transmitted through the Socket connection.
- the terminal performs data sharing according to the embodiment, it can avoid data sharing due to limitations such as no network signal or poor network signal quality, and can have automatic transmission, multi-point transmission, borrowing propagation, and regional communication. A variety of features have improved data sharing efficiency.
- the data sharing method, terminal and system provided by the embodiments of the present disclosure can quickly realize data sharing between terminals without consuming mobile data traffic, make up for the insufficiency of data sharing in related technologies, and enrich the manner of data sharing. .
- the data can be shared in the set sharing area or the shared crowd, and the third direction can also be The recipients share data, or share data with one recipient through one recipient, thereby speeding up data sharing efficiency.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
本公开提供了一种数据分享方法,包括:第一终端获取待分享数据的分享模式;第一终端创建以自身为无线接入点的第一无线局域网;第一终端接收第二终端发送的第一连接请求;第一终端基于所述第一连接请求和/或所述分享模式确定允许所述第二终端接收所述待分享数据时,所述第一终端与所述第二终端建立数据通信连接,并将所述待分享数据和所述分享模式向所述第二终端发送。同时,本公开还提供了一种数据分享方法、终端及***。
Description
本公开涉及通信技术,尤其涉及一种数据分享方法、终端及***。
在当今快节奏的工作与生活中,智能终端如手机对于人们而言已经成为一种必不可少的通信工具。此外,数据传播或分享的渠道也异常丰富,不仅有正式的各种书信,也有腾讯QQ、微信等即时通讯(Instant Messenger,IM)工具和社交平台,以及各种工具软件比如文件传输协议(File Transfer Protocol,FTP)、迅雷等。每种数据传播的渠道具有各自的优势,能够在各种场景下提供给用户多种选择。
现有数据传播的渠道有时也无法覆盖很多场景,存在一些不足之处:一方面,手机所处的位置没有网络信号、或者手机所处的位置网络信号质量较差、或者手机欠费时,无法快速将数据比如短消息迅速传播出去;当用户处在紧急情况下而不方便拨打电话、发送短信以及使用及时聊天工具时,无法快速发出求救消息;以及手机所处的位置有网络信号,但是数据所包含的内容较大,需要耗费大量移动数据流量进行数据传播;另一方面,无法将分享的数据限定在某个大区域、或某个群组、或某个时间段内传播,并快速实现预期效果,例如,在商场寻找走失儿童时,无法使求助信息限定处在商场内部的手机中第一时间进行流转;需要分享的数据无法通过一个接收方传播给另一个接收方,以迅速传播到位;以及无法实现通过第三方将分享的数据传播给接收方。
发明内容
本公开实施例提供了一种数据分享方法、终端及***,能够快速实现终端之间的数据分享且不需要消耗移动数据流量。
本公开实施例提供了一种数据分享方法,包括:第一终端获取待分享数据的分享模式;第一终端创建以自身为无线接入点的第一无线局域网;第一终端接收第二终端发送的第一连接请求;以及第一终端基于所述第一连接请求和/或所述分享模式确定允许所述第二终端接收所述待分享数据时,所述第一终端与所述第二终端建立数据通信连接,并将所述待分享数据和所述分享模式向所述第二终端发送。
本公开实施例提供了一种第一终端,包括第一接收单元、第一创建单元、第二接收单元、第一处理单元和第一发送单元,其中,所述第一接收单元设置为获取待分享数据的分享模式;所述第一创建单元设置为创建以所述第一终端为无线接入点的第一无线局域网;所述第二接收单元设置为接收第二终端发送的第一连接请求;所述第一处理单元设置为基于所述第一连接请求和/或所述分享模式确定允许所述第二终端接收所述待分享数据时,与所述第二终端建立数据通信连接;并且所述第一发送单元设置为将所述待分享数据和所述分享模式向所述第二终端发送。
本公开实施例提供了一种数据分享方法,包括:第二终端搜索由第一终端创建的以所述第一终端为无线接入点的第一无线局域网;第二终端向搜索到的所述第一终端发送第一连接请求;在所述第一终端确定允许所述第二终端接收待分享数据时,所述第二终端与所述第一终端建立数据通信连接;以及第二终端接收所述第一终端发送的所述待分享数据和所述待分享数据的分享模式。
本公开实施例提供了一种第二终端,包括第二搜索单元、第二发送单元、第二处理单元和第三接收单元,其中,所述搜索单元设置为搜索由第一终端创建的以所述第一终端为无线接入点的第一无线局域网;所述第二发送单元设置为向搜索到的所述第一终端发送第一连接请求;所述第二处理单元设置为在所述第一终端确定允许所述第二终端接收待分享数据时,与所述第一终端建立数据通信连接;并且所述第三接收单元设置为接收所述第一终端发送的所述待分享数据和所述待分享数据的分享模式。
本公开实施例提供了一种数据分享***,所述数据分享***可 以包括根据本公开的第一终端和根据本公开的第二终端。
本公开实施例提供了一种计算机存储介质,其上存储有程序代码,当所述程序代码被处理器运行时执,所述处理器执行根据本公开的数据分享方法。
此处所说明的附图用来提供对本公开的进一步理解,构成本申请的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1为根据本公开实施例的数据分享方法的流程示意图;
图2为根据本公开实施例的第一终端的结构示意图;
图3为根据本公开实施例的数据分享方法的流程示意图;
图4为根据本公开实施例的第二终端的结构示意图;
图5为根据本公开实施例的数据分享***的结构示意图;以及
图6为根据本公开实施例的终端的结构示意图。
图1为根据本公开实施例的数据分享方法的流程示意图。
如图1所示,根据本实施例的数据分享方法包括步骤101至步骤104。
在步骤101,第一终端获取待分享数据的分享模式。
第一终端可以接收设置指令,并根据设置指令生成待分享数据的分享模式,即,获取待分享数据的分享模式。
设置指令可以是用户通过在第一终端的屏幕上或安装的数据分享应用的界面上执行触摸、输入等操作进行设置而生成的,也可以是第三方终端设备根据数据分享要求所生成,并通过与第三方终端设备相连的第一终端的外部接口(比如通用串行总线接口)向第一终端发送的。待分享数据可以是第一终端中已存储的数据(比如已存储的图片、日志等),也可以是第一终端当前实时获取的数据(比如第一终端当前拍摄的照片、编辑的文本文件和短信消息等)。若设置指令是 由第三方终端设备发送给第一终端的,则待分享数据还可以包含于设置指令中。此外,设置指令还可包含指定待分享的数据的指令,第一终端可根据设置指令来指定待分享数据。待分享数据也可以是第一终端在接收到设置指令之前,第一终端的用户已确定的待分享的数据。
设置指令可以包含对于待分享数据的分享方法,第一终端根据设置指令可将分享方法作为对于待分享数据的分享模式。分享模式可以至少包括传播方式。此外,分享模式还可包括接收终端标识列表和传播区域中的至少之一。
传播方式用于限定允许待分享数据以何种方式进行传播,并且可包括第一传播模式、第二传播模式等。
第一传播模式也可称为借力传播模式,即,当两个人之间相隔较远而无法相互直接传播待分享数据时,可以通过处于行走状态的中间者进行间接传播。在第一传播模式下,先由发送方将待分享数据分享给一个或一个以上中间者,再通过一个或一个以上中间者将待分享数据分享给目的接收方,以快速完成待分享数据的分享。简而言之,第一传播模式为发送终端将待分享数据经由第三方终端分享给接收终端。在第一传播模式中,会在数据分享过程中对待分享数据进行加密,以使中间者在传播数据的过程中无法直接查看待分享数据。
第二传播模式也可称为多点续传模式,即,在最开始分享待分享数据的数据源只有一个,经过一次数据传播后,可分享待分享数据的数据源就变成了两个。以此方式,可分享待分享数据的数据源可以呈指数级增长,以实现快速分享待分享数据。简而言之,第二传播模式为接收终端接收到待分享数据后继续向其他接收终端发送待分享数据。
接收终端标识列表为可接收待分享数据、且可直接查看待分享数据的所有终端的标识所组成的列表。接收终端标识列表可包含一个或一个以上终端的标识。终端的标识可以是终端的国际移动用户识别码(IMSI)、终端的国际移动设备身份码(IMEI)、终端的用户的手机号码,也可以是预先为终端设置的编号等。在实际应用中,可预先将多个终端的标识作为一个群组列表存入第一终端的数据库中。
传播区域用于限定待分享数据能够进行分享的某一个或多个设定的区域范围,比如,允许在某一个小区附近100米范围内分享数据。
在步骤102,第一终端创建以自身为无线接入点的第一无线局域网。
第一无线局域网可以是基于近场通信(Near Field Communication,NFC)或蓝牙等技术创建的。第一终端在创建以第一终端为无线接入点的第一无线局域网时,可以生成无线接入点的接入密码和无线接入点的名称,也可以不生成无线接入点的接入密码而仅生成无线接入点的名称。无线接入点的名称用于区分不同的无线接入点,并且可以根据第一终端的型号、性能等参数生成。无线接入点的接入密码用于验证是否允许除第一终端以外的终端接入该无线接入点,并且只有在接入密码正确的情况下,才允许接入。无线接入点的接入密码可以是随机产生的一位或一位以上的随机数,也可以是预先设置的一个数字组合。当第一终端确定有数据需要进行分享时,作为发送方创建第一无线局域网,然后可周期性的再次创建和关闭以第一终端为无线接入点的第一无线局域网,以节省第一终端的电源、内存等资源的消耗。此外,当第一终端多次创建以自身为无线接入点的第一无线局域网时,每次生成的无线接入点的接入密码可相同。
在步骤103,第一终端接收第二终端发送的第一连接请求。
当第一终端创建了第一无线局域网后,第二终端搜索由第一终端创建的以第一终端为无线接入点的第一无线局域网,并向搜索到的第一终端发送第一连接请求,以请求连接第一无线局域网。第一终端可以接收第二终端发送的第一连接请求。
第一终端也可以接收一个以上第二终端向第一终端发送的第一连接请求,也就是说第一终端可以同时或在一定时间段内接收由多个第二终端发送的第一连接请求。第一连接请求中可包含无线接入点的名称和/或无线接入点的接入密码和/或第二终端的标识。连接请求可以是传输控制协议(Transmission Control Protocol,TCP)连接请求。
在步骤104,第一终端基于第一连接请求和/或分享模式确定允 许第二终端接收待分享数据时,第一终端与第二终端建立数据通信连接,并将待分享数据和分享模式向第二终端发送。
第一终端基于第一连接请求和/或分享模式确定是否允许第二终端接收待分享数据至少可包括以下四种情形:
情形一、第一终端基于第一连接请求和分享模式确定是否允许第二终端接收待分享数据,即,第一终端确定分享模式包括第二传播模式和接收终端标识列表,并且第一连接请求包括第二终端的标识且第二终端的标识包括在接收终端标识列表时,可以允许第二终端接收待分享数据;
情形二、第一终端基于分享模式确定是否允许第二终端接收待分享数据,即,第一终端确定分享模式包括第二传播模式时,可以允许第二终端接收待分享数据;
情形三、第一终端基于分享模式确定是否允许第二终端接收待分享数据,即,第一终端确定分享模式包括接收终端标识列表和/或第一传播模式时,可以允许第二终端接收待分享数据;
情形四、第一终端基于第一连接请求确定是否允许第二终端接收待分享数据,即,当第一连接请求包括无线接入点的名称和无线接入点的接入密码,并且第一终端对第一连接请求中的无线接入点的接入密码的验证通过时,可以允许第二终端接收待分享数据。
对于情形一,由于第二终端的标识属于接收终端标识列表,表明第二终端是待分享数据的接收方,因此,第一终端可将待分享数据分享给第二终端。当第二终端接收到第一终端发送的待分享数据和待分享数据的分享模式后,若接收终端标识列表中还包含除第二终端的标识以外的终端标识,则第二终端可创建以自身为无线接入点的第二无线局域网,以继续分享待分享数据。
对于情形二,此时分享模式未限定待分享数据的接收方,即,除第一终端以外的终端都有可能获取到待分享数据,并且适用于在一定范围或区域内传播数据,例如,当需要对某一商场内的所有人员发布紧急通知时,采用不限定紧急通知的接收方的分享模式,从而能够实现快速在商场内传播该紧急通知。
对于情形三,此时第二终端的标识可属于接收终端标识列表,也可不属于接收终端标识列表。当第二终端的标识属于接收终端标识列表时,表明第二终端是待分享数据的目的接收方,当第二终端的标识不属于接收终端标识列表时,表明第二终端是中间者,而不是待分享数据的目的接收方,则第二终端需要继续分享待分享数据,以使待分享数据的目的接收方能够尽快获取到。
对于情形四,当第一终端对第一连接请求中的无线接入点的接入密码的验证通过时,表明第二终端是待分享数据的目的接收方,因为在无线接入点的接入密码只有第一终端的用户知悉的情况下,第二终端的用户只有在被第一终端的用户告知的情况下才能知道无线接入点的接入密码,说明第一终端的用户愿意将待分享数据分享给第二终端的用户,即,第一终端可将待分享数据分享给第二终端。
综上,当分享模式为第一传播模式时,第一终端基于分享模式确定允许第二终端接收待分享数据的步骤包括:允许第二终端经由至少一个第三终端接收待分享数据,第三终端连接于第一终端和第二终端之间;当分享模式为第二传播模式时,第一终端基于分享模式确定允许第二终端接收待分享数据的步骤包括:允许第二终端接收第一终端发送的待分享数据,并在第一终端向另一第二终端发送待分享数据时,由各第二终端将接收到的待分享数据发送给至少一个第三终端。
第一终端、第二终端、第三终端在这里只是为了区分不同的终端,以便更清楚的说明技术方案。在实际应用中,第一终端既可以做发送终端,也可以做接收终端,还可以做中转终端。
对于上述情形一、情形二和情形三而言,第一终端创建的第一无线局域网没有设置接入密码而仅设置有名称。此时,第二终端根据发送给第一终端的第一连接请求可连接第一无线局域网,随后第一终端与第二终端建立数据通信连接,以使第一终端与第二终端之间能够进行数据传输。数据通信连接可以是TCP连接、Socket连接等。另一方面,对于上述情形一、情形二和情形三而言,如果第一终端创建的第一无线局域网设置有无线接入点的接入密码和无线接入点的名称,则在满足上述情形一、或情形二、或情形三的情况下,第一终端 还需要对第一连接请求中的无线接入点的接入密码进行验证,并且在验证通过后,才能确定允许第二终端接收待分享数据。
综上所述,根据本公开实施例的数据分享方法能够在第一终端与第二终端之间分享数据时不需要耗费双方任何终端的移动数据流量,从而实现在没有网络信号覆盖或网络信号质量较差时,第一终端与第二终端之间仍可进行数据分享。
根据本公开实施例,在上述步骤104之后,该方法还可包括:第一终端搜索由第四终端创建的以第四终端为无线接入点的第二无线局域网,以获取第四终端分享的目标数据。
由于第一终端也可能需要接收其它终端所分享的数据,因此在第一终端作为发送终端创建以自身为无线接入点的第一无线局域网的一段时间(比如10分钟)之后,第一终端可以作为接收终端自动搜索由其它终端(比如第四终端)创建的无线局域网以获取其它终端分享的目标数据。如果第一终端作为发送方在一定时间(比如20分钟)内没有接收到连接请求(即没有发现接收终端),或者第一终端作为接收终端在一定时间(比如15分钟)内没有搜索到无线局域网(即没有发现发送终端),则可暂时保持静默,以关闭WiFi或蓝牙等开关,并在一段时间后再次创建无线局域网或搜索无线局域网,从而节约电源消耗。
上述第四终端实际上也可以是前述实施例中的第二终端、第三终端中的任何一个。此外,可以预设算法控制第一终端在发送方与接收方之间的切换。当第一终端获取到待分享数据或确定需要进行数据分享时,根据预设算法可自动将第一终端切换为发送方,即,使第一终端创建第一无线局域网;当第一终端分享完待分享数据或者无数据分享时,根据预设算法可自动将第一终端切换为接收方,即,使第一终端搜索可接入的无线局域网,以获取目标数据。
根据本公开实施例,在上述步骤102之前,该方法还可包括:第一终端获取自身当前所处位置,并且确定自身当前所处位置属于预先设置的传播区域时,允许创建以自身为无线接入点的第一无线局域网。
当第一终端确定有数据需要进行分享时,第一终端获取自身当前所处位置,并判断自身当前所处位置是否属于预先设置的传播区域。若确定自身当前所处位置属于传播区域,则允许第一终端创建以自身为无线接入点的第一无线局域网;若确定自身当前所处位置不属于传播区域,则不允许第一终端创建以自身为无线接入点的第一无线局域网。
传播区域也可包含于分享模式中。由于第一终端创建的以自身为无线接入点的第一无线局域网的通信距离是有限的,因此通过限定传播区域,在确定自身当前所处位置属于传播区域时,才允许第一终端创建以自身为无线接入点的第一无线局域网,可以更好地节省资源并加快数据分享效率。
述分享模式还可以包括销毁条件,以使第二终端在确定满足销毁条件时销毁待分享数据。
销毁条件可以包括销毁时间、销毁方式等内容。销毁时间可以是一个具体的时间点(比如十点二十分),也可以是一个时间段(比如三十分钟)。例如,当销毁时间为一个小时时,若第二终端接收到待分享数据达到了一个小时,则使第二终端销毁接收到的待分享数据。
为了保证待分享数据的安全性和私密性以及减少终端中内存的消耗,通过在分享策略中设置销毁条件,使接收到待分享数据的第二终端在确定达到销毁条件时,自动销毁接收到待分享数据。
根据本公开实施例,该方法还包括:第一终端向第二终端发送加密指令,以使第二终端根据加密指令对待分享数据进行加密。
当分享模式包括接收终端标识列表和第一传播模式,且第一终端确定第二终端的标识不属于接收终端标识列表时,第一终端向第二终端发送加密指令,以使第二终端根据加密指令对待分享数据进行加密。
加密指令可以包含第一终端的标识、加密方法等内容。当分享模式包括接收终端标识列表和第一传播模式,且第一终端确定第二终端的标识不属于接收终端标识列表时,可知第二终端是中间者而不是待分享数据的目的接收方。因此,第一终端向第二终端发送加密指令, 以使第二终端根据加密指令对待分享数据进行加密,使第二终端无法直接查看待分享数据,从而保证待分享数据的安全性和私密性。
图2为根据本公开实施例的第一终端的结构示意图。
如图2所示,根据本公开实施例的第一终端1包括第一接收单元10、第一创建单元11、第二接收单元12、第一处理单元13和第一发送单元14。
第一接收单元10设置为获取待分享数据的分享模式。第一创建单元11设置为创建以第一终端为无线接入点的第一无线局域网。第二接收单元12设置为接收第二终端发送的第一连接请求。第一处理单元13设置为基于第一连接请求和/或分享模式确定允许第二终端接收待分享数据时,与第二终端建立数据通信连接。第一发送单元14设置为将待分享数据和分享模式向第二终端发送。
第一接收单元10获取待分享数据的分享模式的方式、第一创建单元11创建以第一终端为无线接入点的第一无线局域网的方式、第二接收单元12接收第二终端发送的第一连接请求的方式、第一处理单元确定允许第二终端接收待分享数据的方式和与第二终端建立数据连接的方式、以及第一发送单元14将待分享数据和分享模式向第二终端发送的方式,分别与上述参考图1描述的步骤101、步骤102、步骤103和步骤104实质上相同,这里不作赘述。
根据本公开实施例,第一终端1还可包括第一搜索单元15,其设置为搜索由第四终端创建的以第四终端为无线接入点的第二无线局域网,以获取第四终端分享的目标数据。
关于第一搜索单元15的描述可以参考上述实施例中在步骤104之后执行的搜索第二无线局域网的步骤,这里不作赘述。
根据本公开实施例,第一终端1还可包括位置获取单元16,其设置为获取第一终端当前所处位置。
关于位置获取单元16的描述可以参考上述实施例中在步骤102之前执行的获取自身当前所处位置的步骤,这里不作赘述。
此外,根据本实施例的第一终端可以向第二终端发送包括销毁条件的分享模式,并且还可以向第二终端发送加密指令。关于销毁条 件和加密指令的描述可以参考上述实施例中的相关描述,这里不作赘述。
图3为根据本公开实施例的数据分享方法的流程示意图。
如图3所示,根据本实施例的数据分享方法包括步骤201至步骤204。
在步骤201,第二终端搜索由第一终端创建的以第一终端为无线接入点的第一无线局域网。
当需要进行数据分享时,第二终端开启无线接入点搜索功能,搜索由第一终端创建的以第一终端为无线接入点的第一无线局域网。第二终端开启无线接入点搜索功能可以是第二终端开启WiFi。
在步骤202,第二终端向搜索到的第一终端发送第一连接请求。
当在步骤201中第二终端搜索到由第一终端创建的以第一终端为无线接入点的第一无线局域网后,第二终端向搜索到的第一终端发送第一连接请求,以请求连接第一无线局域网。
第一连接请求中可包含无线接入点的名称和/或无线接入点的接入密码和/或第二终端的标识。第一连接请求中的无线接入点的接入密码可由第二终端的用户进行设置。
在步骤203,在第一终端确定允许第二终端接收待分享数据时,第二终端与第一终端建立数据通信连接。
在第一终端基于第一连接请求和/或待分享数据的分享模式确定允许第二终端接收待分享数据时,第二终端与第一终端建立数据通信连接。
待分享数据的分享模式可由第一终端根据接收到的设置指令进行设置。数据通信连接可以是TCP连接、Socket连接等。分享策略至少包括传播方式,还可包括接收终端标识列表和传播区域中的至少之一。
关于传播方式和接收终端标识列表的描述可以参考上述结合图1描述的实施例,这里不作赘述。
在步骤204,第二终端接收第一终端发送的待分享数据和待分享数据的分享模式。
第二终端基于步骤203中与第一终端建立数据通信连接,接收并存储第一终端发送的待分享数据和待分享数据的分享模式。
综上所述,根据本实施例的数据分享方法,能够在第一终端与第二终端之间分享数据时不需要耗费双方任何终端的移动数据流量,从而实现在没有网络信号覆盖或网络信号质量较差时,第一终端与第二终端之间仍可进行数据分享。
根据本公开实施例,当分享模式还包括销毁条件时,该方法还可以包括:第二终端确定满足销毁条件时,销毁待分享数据。
关于销毁条件的描述可以参考上述结合图1描述的实施例,这里不作赘述。
根据本公开实施例,当分享模式包括第一传播模式和接收终端标识列表,第一连接请求包括第二终端的标识,且第二终端的标识不属于接收终端标识列表时,该方法还可以包括:第二终端接收第一终端发送的加密指令,并根据加密指令对待分享数据进行加密。
加密指令可以包含第一终端的标识、加密方法等内容。第二终端根据加密指令对待分享数据进行加密可以是第二终端根据第一终端的标识、加密方法、接收到待分享数据的时间等信息进行加密。当分享模式包括接收终端标识列表和第一传播模式,且第一终端确定第二终端的标识不属于接收终端标识列表时,可知第二终端是中间者而不是待分享数据的目的接收方。因此,第二终端根据第一终端发送的加密指令对待分享数据进行加密,使第二终端无法直接查看待分享数据,从而保证待分享数据的安全性和私密性。
根据本公开实施例,当分享模式包括接收终端标识列表和第一传播模式,第一连接请求包括第二终端的标识,且第二终端的标识不属于接收终端标识列表时;或者,当分享模式包括允许第二传播模式时;或者,当分享模式包括接收终端标识列表和第二传播模式,第一连接请求包括第二终端的标识,且第二终端的标识属于接收终端标识列表时,该方法还可以包括:第二终端创建以自身为无线接入点的第三无线局域网;第二终端接收第三终端发送的第二连接请求;以及第二终端基于第二连接请求和/或分享模式确定允许第三终端接收待分 享数据时,第二终端与第三终端建立数据通信连接,并将待分享数据和分享模式向第三终端发送。
当分享模式包括接收终端标识列表和第一传播模式,第一连接请求包括第二终端的标识,且第二终端的标识不属于接收终端标识列表时,表明第二终端不是待分享数据的目的接收方。因此,第二终端需要继续分享待分享数据,以使待分享数据的目的接收方获取到待分享数据。当分享模式包括接收终端标识列表和第二传播模式,第一连接请求包括第二终端的标识,且第二终端的标识属于接收终端标识列表时,表明第二终端是待分享数据的一个目的接收方,因为接收终端标识列表中可能不仅仅包含第二终端的标识,因此,第二终端需要继续分享待分享数据,以使待分享数据的所有目的接收方都获取到待分享数据。当分享模式包括第二传播模式而不包括接收终端标识列表时,表明第二终端是待分享数据的一个目的接收方,因此,第二终端需要继续分享待分享数据,以使尽可能多的终端获取到待分享数据。
第二终端基于第二连接请求和/或分享模式确定是否允许第三终端接收待分享数据的情形与第一终端基于第一连接请求和/或分享模式确定是否允许第二终端接收待分享数据的情形相类似,这里不作赘述。
与第一终端类似,可以预设算法控制第二终端在发送方与接收方之间的切换。当第二终端获取到待分享数据或确定需要进行数据分享时,根据预设算法可自动将第二终端切换为发送方,即,使第二终端创建第二无线局域网;当第二终端分享完待分享数据或者无数据分享时,根据预设算法可自动将第二终端切换为接收方,即,使第二终端搜索可接入的无线局域网,以获取目标数据。
如此,不仅可使待分享数据在设定的分享人群中进行分享,并且还可通过第三方(即中间者)向待分享数据的目的接收方分享待分享数据,或者通过待分享数据的一个目的接收方向另一个目的接收方分享待分享数据,实现数据的快速分享。
图4为根据本公开实施例的第二终端的结构示意图。
如图4所示,根据本公开实施例的第二终端2包括第二搜索单 元20、第二发送单元21、第二处理单元22和第三接收单元23。
第二搜索单元20设置为搜索由第一终端创建的以第一终端为无线接入点的第一无线局域网。第二发送单元21设置为向搜索到的第一终端发送第一连接请求。第二处理单元22设置为在第一终端确定允许第二终端接收待分享数据时,与第一终端建立数据通信连接。第三接收单元23设置为接收第一终端发送的待分享数据和待分享数据的分享模式。
根据本公开实施例,当分享模式包括销毁条件时,第二处理单元22在确定满足销毁条件时,销毁待分享数据。
根据本公开实施例,第三接收单元23接收第一终端发送的加密指令,并且第二处理单元22根据加密指令对待分享数据进行加密。
根据本公开实施例,第二终端2还可以包括第二创建单元24,当分享模式包括接收终端标识列表和第一传播模式,第一连接请求包括第二终端的标识,且第二终端的标识不属于接收终端标识列表时,或者当分享策略包括第二传播模式时,或者当分享策略包括接收终端标识列表和第二传播模式,第一连接请求包括第二终端的标识,且第二终端的标识属于接收终端标识列表时,第二创建单元24创建以第二终端为无线接入点的第三无线局域网。在此情况下,第三接收单元23接收第三终端发送的第二连接请求,第二处理单元22基于第二连接请求和/或分享模式确定允许第三终端接收待分享数据时,与第三终端建立数据通信连接,并且第二发送单元21将待分享数据和分享模式向第三终端发送。
图5为根据本公开实施例的数据分享***的结构示意图。
如图5所示,根据本公开实施例的数据分享***包括第一终端1和第二终端2。
第一终端1设置为获取待分享数据的分享模式并且创建以自身为无线接入点的第一无线局域网。
第二终端2设置为搜索由第一终端1创建的以第一终端1为无线接入点的第一无线局域网,并向搜索到的第一终端1发送第一连接请求。
第一终端1还设置为接收第二终端2发送的第一连接请求,并且基于第一连接请求和/或分享模式确定允许第二终端2接收待分享数据时,与第二终端2建立数据通信连接,并将待分享数据和分享模式向第二终端2发送;
第二终端2还设置为接收第一终端1发送的待分享数据和待分享数据的分享模式。
虽然只示出了一个第二终端2,但是第一终端1也可以接收一个以上第二终端2向第一终端1发送的第一连接请求,也就是说第一终端1可以同时或在一定时间段内接收多个第二终端2发送的第一连接请求。
综上所述,本实施例提供的数据分享***能够在第一终端与第二终端之间分享数据时不需要耗费双方任何终端的移动数据流量,从而实现在没有网络信号覆盖或网络信号质量较差时,第一终端与第二终端之间仍可进行数据分享。
根据本公开实施例,第一终端1还可以获取自身当前所处位置,确定自身当前所处位置属于预先设置的传播区域时,允许第一终端创建以自身为无线接入点的第一无线局域网。
当第一终端1确定有数据需要进行分享时,第一终端1获取自身当前所处位置,并判断自身当前所处位置是否属于预先设置的传播区域,若确定自身当前所处位置属于传播区域,则允许第一终端1创建以自身为无线接入点的第一无线局域网;若确定自身当前所处位置不属于传播区域,则不允许第一终端1创建以自身为无线接入点的第一无线局域网。
由于第一终端1创建的以自身为无线接入点的第一无线局域网的通信距离是有限的,因此通过限定传播区域以使第一终端1确定自身当前所处位置属于传播区域时,才允许第一终端1创建以自身为无线接入点的第一无线局域网,以更好的节省资源并加快数据分享效率。
根据本公开实施例,分享模式还可以包括销毁条件,并且第二终端2在确定满足销毁条件时,销毁待分享数据。
根据本公开实施例,第一终端1向第二终端2发送加密指令, 并且第二终端2接收加密指令,并根据加密指令对待分享数据进行加密。
当分享模式包括接收终端标识列表和第一传播模式,且第一终端1确定第二终端2的标识不属于接收终端标识列表时,第一终端1向第二终端2发送加密指令。第二终端2接收第一终端1发送的加密指令,并根据加密指令对待分享数据进行加密。
当分享模式包括接收终端标识列表和第一传播模式,且第一终端1确定第二终端2的标识不属于接收终端标识列表时,可知第二终端2是中间者而不是待分享数据的目的接收方。因此,第一终端1向第二终端2发送加密指令,以使第二终端2根据加密指令对待分享数据进行加密,使第二终端2无法直接查看待分享数据,从而保证待分享数据的安全性和私密性。
根据本公开实施例的数据分享***还可以包括第三终端3。当分享模式包括接收终端标识列表和第一传播模式,第一连接请求包括第二终端的标识,且第二终端的标识不属于所述接收终端标识列表时;或者,当分享模式包括第二传播模式时;或者,当分享模式包括接收终端标识列表和第二传播模式,第一连接请求包括第二终端的标识,且第二终端的标识属于所述接收终端标识列表时,第二终端2可以创建以自身为无线接入点的第三无线局域网。在此情况下,第三终端3搜索由第二终端创建的以第二终端为无线接入点的第三无线局域网,并向搜索到的第二终端发送第二连接请求。第二终端2接收第三终端发送的第二连接请求,基于第二连接请求和/或分享模式确定允许第三终端接收待分享数据时,与第三终端建立数据通信连接,并将待分享数据和分享模式向所述第三终端发送。第三终端3接收待分享数据和分享模式。
如果第二终端是中间者而不是待分享数据的目的接收方,则第二终端还需先对已加密后的待分享数据进行解密,然后再将待分享数据发送给第三终端。
此外,第一终端1还可作为接收终端。当第一终端1作为接收终端时,还可搜索由第四终端(未在图5中示出)创建的以第四终端 为无线接入点的第二无线局域网,以获取所述第四终端分享的目标数据。
第一终端、第二终端、第三终端只是为了区分不同的终端,以便更清楚的说明技术方案。在实际应用中,第一终端既可以做发送终端,也可以做接收终端,还可以做中转终端,并且第四终端实际上也可以是第二终端。
图6为根据本公开实施例的终端的结构示意图。
如图6所示,根据本公开实施例的终端包括设置模块31、WIFI模块32、连接模块33、保存模块34和查看模块35。
设置模块31的功能之一可以包括设置手机上发送方和接受方的角色转化策略以及设置消息传播启动策略,这两方面的设置是***层面的。默认的启动策略可以包括:当用户设置了要分享的内容后,角色转化策略会向发送方倾斜,当然也会适当切换到接收方,因为有可能其他终端有内容要分享;如果完全没有内容要分享,则一直处于接收方。此外,还有消息层面的设置,例如,设置传播内容的传播区域、传播时间、传播次数、是否允许自动传播、是否允许多点续传以及是否允许借力传播等。
自动传播指的是当用户设置好了需要将内容分享到的群组后,无需用户再次操作,相关的内容就会自动传输出去。
多点续传指的是信息源在最开始只有一个,但是经过一次传输后,信息源就变成了两个,然后信息源就可以呈指数级增长,可以达到迅速在指定的群组里面传播。
借力传播指的是两个人之间相隔较远,无法直接传播,然后可以通过流动的中间者,完成内容分享。
区域传播指的是内容可以限定在某些区域进行传播,通过地理位置限定,这样传播内容更加精准。
WIFI模块32主要有两个方面的作用,即,作为热点提供方或者作为对热点进行搜索的寻找方。定位***需要至少两个终端参与,一个终端作为热点提供方(即,被寻找的终端),另外一个终端作为寻找方。热点提供方在满足预先设置的条件时,自动启动特殊的热点, 并等待寻找方来寻找。另一方面,当用户寻找热点时,可以启动作为寻找方终端,自动搜索符合需要的热点,并自动连接。
连接模块33主要用于建立两个终端之间的握手连接。根据本公开实施例,可以支持各种用于在两个终端之间进行连接的握手协议。
保存模块34用于在接收模式下,将接收到的信息保存,接收到的信息可以携带各种控制信息(比如,生命周期、秘钥等)。此外,保存的内容只能通过特定的查看工具(例如,查看模块35)才能查看。
查看模块35用于查看保存的内容。由于只能利用特定的查看工具来查看保存的内容,从而保证了安全性。
下面通过三个具体的应用场景来说明利用根据本公开实施例的终端进行数据分享的过程。
第一应用场景:家人之间分享照片
一家六口人(包括爷爷、奶奶、父亲、母亲、儿子和女儿)设置为一个家庭群组,然后该群组分享内容的方式可以包括:内部传播(不借道传播)、指定区域传播(仅限指定的几个地方传播)、允许多点续传(接受方也可以再次将内容发送出去)以及允许查看。
父亲出去旅游,用手机拍摄了若干照片,并且设置将照片分享到这个家庭群组,然后就不用再进行操作了。
父亲的手机判断当前所处区域,如果当前区域不属于分享区域,则不会启动将照片分享至家庭群组的操作。
奶奶在家带女儿,用手机拍了几张关于女儿的照片,并且设置将照片分享到这个家庭群组。由于奶奶的手机所处的区域属于允许分享的区域,奶奶的手机会按照一定的频率在发送方和接受方进行切换。为了避免耗电,可以在一定时间内(例如,十分钟)在没有发现其他的发送方和/或接收方的情况下,暂时停止切换。
当妈妈下班回家后,妈妈的手机检测到进入为家庭群组设置的传播区域时,由于妈妈的手机上没有要分享的内容,则会自动进入接收模式作为接收方。由于奶奶的手机上有内容要分享,当奶奶的手机进入发送模式作为发送方时,奶奶的手机可以创建热点,并等待妈妈 的手机连接至该热点。
妈妈的手机和奶奶的手机自动进行连接,随后奶奶的手机上设置的分享内容自动传输给妈妈。
随后,儿子和爷爷又一起回家,他们可以分别从奶奶的手机和妈妈的手机上获取分享的内容。获取分享内容的过程与妈妈的手机从奶奶的手机上获取分享内容的过程基本上一致。
然后父亲回到家,所有的人都有内容要分享,母亲、奶奶、爷爷和儿子所分享的内容是一致的,在他们之间握手的可以知道这个信息,因而不会重复获取。父亲可以作为发送方也可作为接受方,将内容分享给其他人,也可以从其他任何一个人获取内容,从而全部内容的分享。
如果有邻居过来,由于邻居不在家庭群组内,因此分享的内容不会传播给他。
当家庭群组内成员的内容都达成一致后,父亲的手机会自动停止分享,奶奶的手机也会停止分享。当仅差一个成员没有成功获取内容或者是共享的时间超过一定的时长后,也可以提示是否需要停止内容的分享。
第二应用场景:好友之间分享消息
假设甲、乙、丙、丁四个人好友同在一个学校,并且分别在不同的班级,他们成为一个好友群组。分享规则可以包括:允许借力传播、指定人可以查看、查看方式是查看后销毁并且时效是半天(即,在中间者的手机上保留消息的时间为半天)。
甲分享一个消息到好友群组,此时甲的手机进入发送模式(即,作为发送方),并创建热点,等待中间者或者是目标人的连接至该热点。
甲的同学A的手机设置了允许借道传播,在某个时间周期搜索到甲的手机建立的热点,随后与甲的手机建立连接,并成功获取到甲分享的消息。由于A只是一个中间者,因此会根据原始发送者甲的一些信息(比如手机型号、手机号码和发送时间等)生成一个秘钥并对A接受到的消息进行加密,然后将加密后的消息保存到手机中,此时 A不能查看该消息。
A到操场运动并遇到B。类似于甲将消息传递给A的方式,A可以将甲分享的消息传递给B,例如,A的手机通过对加密的保存消息进行解密,以还原成原始消息后传输给B的手机。然后,根据原始传输方甲以及A的一些信息生成一个新的秘钥并对消息进行加密,加密后的消息后保存B的手机上。
B回到教室,由于B和乙在同一个班级,并且乙为目标接受者之一,因此B的手机建立热点,等待乙的手机连上该热点后,乙可以从B的手机获取甲分享的消息。由于乙是目标接受者之一,因此不对通过B的手机发送的消息进行加密,使得乙可以查看消息。
经过了半天时间,A和B(以及其可能的中间者)的手机上保存的加密后的消息被销毁,以保证安全性。
第三应用场景:商场寻人
假设甲在某商场丢失了小孩,并迅速通过手机发送了一条求助信息并附带了一张小孩的照片,同时还可指定有偿传播和/或信誉传播。有偿传播是指协助传播的中间者可以得到报偿。信誉传播是指,如果传播者的信誉越好,其发送的传播信息被优先处理的可能性就越大。
乙就在甲附近,并且乙的手机允许接受这种传播方式的信息,然后乙可以将收到的消息多次传播出去。
以此方式,可以将丢失孩子的消息以及孩子的照片迅速地传播给商场内的很人,以便有助于快速找到丢失的孩子。协助传递的中间者可以获得相应的奖励。
综上所述,根据本实施例提供的终端(例如手机)进行数据分享时,内容的传播是通过组建局域网方式进行的,每个终端既可以做发送方又可以做接收方,同时对于在发送方和接收方之间进行切换的频率进行控制。当终端作为发送方时会创建热点,而处于接收方的终端会自动搜索热点并进行连接。在连接上热点后,可以通过TCP握手完成通信连接,并通过Socket连接传输内容。根据本实施例的终端进行数据分享时,可以避免因无网络信号或网络信号质量较差等限制 条件造成的无法进行数据分享,并且可以具有自动传播、多点续传、借力传播、区域传播等多种特性,提高了数据分享效率。
本公开实施例提供的数据分享方法、终端及***,能够快速实现终端之间的数据分享且不需要消耗移动数据流量,弥补了相关技术中数据分享的不足之处,并丰富了数据分享的方式。
此外,能够实现在终端没有网络信号覆盖或网络信号质量较差时,终端之间仍可进行数据分享;能够使数据在设定的分享区域或分享人群中进行分享,并且还可通过第三方向接收方分享数据、或通过一个接收方向另一个接收方分享数据,从而加快数据分享效率。
以上公开的内容仅为本公开的实施例,而并非用于限定本公开的保护范围。凡在本公开的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本公开的保护范围之内。
Claims (19)
- 一种数据分享方法,包括:第一终端获取待分享数据的分享模式;第一终端创建以自身为无线接入点的第一无线局域网;第一终端接收第二终端发送的第一连接请求;以及第一终端基于所述第一连接请求和/或所述分享模式确定允许所述第二终端接收所述待分享数据时,所述第一终端与所述第二终端建立数据通信连接,并将所述待分享数据和所述分享模式向所述第二终端发送。
- 根据权利要求1所述的方法,其中,所述分享模式为第一传播模式,所述第一传播模式为发送终端将待分享数据经由第三方终端分享给接收终端,并且其中,所述第一终端基于所述第一连接请求和/或所述分享模式确定允许所述第二终端接收所述待分享数据的步骤包括:允许所述第二终端经由至少一个第三终端接收所述待分享数据,所述第三终端连接于第一终端和第二终端之间。
- 根据权利要求1所述的方法,其中,所述分享模式为第二传播模式,所述第二传播模式为接收终端接收到待分享数据后继续向其他接收终端发送所述待分享数据,并且其中,所述第一终端基于所述第一连接请求和/或所述分享模式确定允许所述第二终端接收所述待分享数据的步骤包括:允许所述第二终端接收所述第一终端发送的所述待分享数据,并在所述第一终端向另一第二终端发送所述待分享数据时,由各第二终端将接收到的所述待分享数据发送给至少一个第三终端。
- 根据权利要求1所述的方法,其中,在所述将所述待分享数据和所述分享模式向所述第二终端发送的步骤之后,所述方法还包括:第一终端搜索由第四终端创建的以所述第四终端为无线接入点的第二无线局域网,以获取所述第四终端分享的目标数据。
- 根据权利要求1至4任一项所述的方法,其中,在所述第一终端创建以自身为无线接入点的第一无线局域网的步骤之前,所述方法还包括:第一终端获取自身当前所处位置,并且确定所述自身当前所处位置属于预先设置的传播区域时,允许所述第一终端创建以自身为无线接入点的第一无线局域网。
- 一种第一终端,包括第一接收单元、第一创建单元、第二接收单元、第一处理单元和第一发送单元,其中,所述第一接收单元设置为获取待分享数据的分享模式;所述第一创建单元设置为创建以所述第一终端为无线接入点的第一无线局域网;所述第二接收单元设置为接收第二终端发送的第一连接请求;所述第一处理单元设置为基于所述第一连接请求和/或所述分享模式确定允许所述第二终端接收所述待分享数据时,与所述第二终端建立数据通信连接;并且所述第一发送单元设置为将所述待分享数据和所述分享模式向所述第二终端发送。
- 根据权利要求6所述的第一终端,其中,所述分享模式为第一传播模式,所述第一传播模式为发送终端将待分享数据经由第三方终端分享给接收终端,并且其中,所述第一处理单元设置为允许所述第二终端经由至少一个第三终端接收所述待分享数据,所述第三终端连接于第一终端和第二终端之间。
- 根据权利要求6所述的第一终端,其中,所述分享模式为第 二传播模式,所述第二传播模式为接收终端接收到待分享数据后继续向其他接收终端发送所述待分享数据,并且其中,所述第一处理单元设置为允许所述第二终端接收所述第一发送单元发送的所述待分享数据,并在第一发送单元向另一第二终端发送所述待分享数据时,由各第二终端将接收到的所述待分享数据发送给至少一个第三终端。
- 根据权利要求6所述的第一终端,还包括:第一搜索单元,其设置为搜索由第四终端创建的以所述第四终端为无线接入点的第二无线局域网,以获取所述第四终端分享的目标数据。
- 根据权利要求6至9任一项所述的第一终端,还包括:位置获取单元,其设置为获取所述第一终端当前所处位置;并且其中,所述第一处理单元,还设置为确定所述第一终端当前所处位置属于预先设置的传播区域时,允许所述第一创建单元创建以所述第一终端为无线接入点的第一无线局域网。
- 一种数据分享方法,包括:第二终端搜索由第一终端创建的以所述第一终端为无线接入点的第一无线局域网;第二终端向搜索到的所述第一终端发送第一连接请求;在所述第一终端确定允许所述第二终端接收待分享数据时,所述第二终端与所述第一终端建立数据通信连接;以及第二终端接收所述第一终端发送的所述待分享数据和所述待分享数据的分享模式。
- 根据权利要求11所述的方法,其中,当所述分享模式为第一传播模式时,所述第一传播模式为发送终端将待分享数据经由第三 方终端分享给接收终端,所述方法还包括:允许所述第二终端经由至少一个第三终端接收所述待分享数据,所述第三终端连接于第一终端和第二终端之间。
- 根据权利要求11所述的方法,其中,当所述分享模式为第二传播模式时,所述第二传播模式为接收终端接收到待分享数据后继续向其他接收终端发送所述待分享数据,所述方法还包括:第二终端创建以自身为无线接入点的第三无线局域网;第二终端接收第三终端发送的第二连接请求;第二终端基于所述第二连接请求和/或所述分享模式确定允许所述第三终端接收所述待分享数据时,所述第二终端与所述第三终端建立数据通信连接,并将所述待分享数据和所述分享模式向所述第三终端发送。
- 一种第二终端,包括第二搜索单元、第二发送单元、第二处理单元和第三接收单元,其中,所述搜索单元设置为搜索由第一终端创建的以所述第一终端为无线接入点的第一无线局域网;所述第二发送单元设置为向搜索到的所述第一终端发送第一连接请求;所述第二处理单元设置为在所述第一终端确定允许所述第二终端接收待分享数据时,与所述第一终端建立数据通信连接;并且所述第三接收单元设置为接收所述第一终端发送的所述待分享数据和所述待分享数据的分享模式。
- 根据权利要求14所述的第二终端,其中,当所述分享模式为第一传播模式时,所述第一传播模式为发送终端将待分享数据经由第三方终端分享给接收终端,所述第三接收单元经由至少一个第三终端接收所述待分享数据,所述第三终端连接于第一终端和第二终端之间。
- 根据权利要求14所述的第二终端,还包括第二创建单元,其中,当所述分享模式为第二传播模式时,所述第二传播模式为接收终端接收到待分享数据后继续向其他接收终端发送所述待分享数据时,所述第二创建单元设置为创建以所述第二终端为无线接入点的第三无线局域网,并且其中所述第三接收单元还设置为接收第三终端发送的第二连接请求;所述第二处理单元还设置为基于所述第二连接请求和/或所述分享模式确定允许所述第三终端接收所述待分享数据时,与所述第三终端建立数据通信连接;并且所述第二发送单元还设置为将所述待分享数据和所述分享模式向所述第三终端发送。
- 一种数据分享***,包括如权利要求6至10中任一项所述的第一终端和如权利要求14至16中任一项所述的第二终端。
- 一种计算机存储介质,其上存储有程序代码,当所述程序代码被处理器运行时执,所述处理器执行根据权利要求1至5中任一项所述的数据分享方法。
- 一种计算机存储介质,其上存储有程序代码,当所述程序代码被处理器运行时执,所述处理器执行根据权利要求11至13中任一项所述的数据分享方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710414809.2A CN109246657B (zh) | 2017-06-05 | 2017-06-05 | 数据分享方法、第一终端、第二终端及*** |
CN201710414809.2 | 2017-06-05 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018223961A1 true WO2018223961A1 (zh) | 2018-12-13 |
Family
ID=64566820
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/089965 WO2018223961A1 (zh) | 2017-06-05 | 2018-06-05 | 数据分享方法、终端及*** |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109246657B (zh) |
WO (1) | WO2018223961A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112351133B (zh) * | 2019-08-07 | 2022-02-25 | 华为技术有限公司 | 媒体数据的分享方法及终端 |
CN110995816B (zh) * | 2019-11-27 | 2022-08-02 | 维沃移动通信有限公司 | 分享方法及电子设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110010180A1 (en) * | 2009-07-09 | 2011-01-13 | International Business Machines Corporation | Speech Enabled Media Sharing In A Multimodal Application |
CN102882938A (zh) * | 2012-09-10 | 2013-01-16 | 广东欧珀移动通信有限公司 | 一种数据共享方法及移动终端 |
CN104202396A (zh) * | 2014-09-02 | 2014-12-10 | 重庆邮电大学 | 一种信息分享方法、装置、服务器、终端设备及*** |
CN106506550A (zh) * | 2016-12-27 | 2017-03-15 | Tcl集团股份有限公司 | 一种智能设备控制权限共享的方法和装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100754433B1 (ko) * | 2006-08-18 | 2007-08-31 | 삼성전자주식회사 | 근거리 무선통신을 이용하여 휴대단말기의 정보를 공유하는방법 |
KR101419984B1 (ko) * | 2011-08-26 | 2014-07-15 | 주식회사 팬택 | 클라우드 환경에서 nfc를 이용한 콘텐츠 공유 시스템 및 방법 |
CN103648180A (zh) * | 2013-12-04 | 2014-03-19 | 北京奇虎科技有限公司 | 一种终端设备之间分享文件的方法及装置 |
CN105100163A (zh) * | 2014-05-19 | 2015-11-25 | 中兴通讯股份有限公司 | 文件的共享方法及装置 |
-
2017
- 2017-06-05 CN CN201710414809.2A patent/CN109246657B/zh active Active
-
2018
- 2018-06-05 WO PCT/CN2018/089965 patent/WO2018223961A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110010180A1 (en) * | 2009-07-09 | 2011-01-13 | International Business Machines Corporation | Speech Enabled Media Sharing In A Multimodal Application |
CN102882938A (zh) * | 2012-09-10 | 2013-01-16 | 广东欧珀移动通信有限公司 | 一种数据共享方法及移动终端 |
CN104202396A (zh) * | 2014-09-02 | 2014-12-10 | 重庆邮电大学 | 一种信息分享方法、装置、服务器、终端设备及*** |
CN106506550A (zh) * | 2016-12-27 | 2017-03-15 | Tcl集团股份有限公司 | 一种智能设备控制权限共享的方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN109246657A (zh) | 2019-01-18 |
CN109246657B (zh) | 2022-07-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6066538B1 (ja) | ピアベースの認証 | |
JP6479092B2 (ja) | 3gpp lteにおける通信移動体デバイス間の近接発見、認証、およびリンク確立 | |
EP3058693B1 (en) | Selection and use of a security agent for device-to-device (d2d) wireless communications | |
TW201639408A (zh) | 參與nan資料連結的設備之間的排程選擇和連接設立(二) | |
Aditya et al. | Encore: Private, context-based communication for mobile social apps | |
CN102739642A (zh) | 许可访问网络 | |
JP2023539174A (ja) | スライシングされたセルラーネットワークにおけるリレー選択のプライバシー | |
US10425812B2 (en) | Method and apparatus for establishment of private communication between devices | |
EP4030802A1 (en) | Method and apparatus for managing subscription data | |
WO2018223961A1 (zh) | 数据分享方法、终端及*** | |
US9210578B2 (en) | Methods and apparatus for authentication | |
US10771957B2 (en) | Wireless communication apparatus, communication system and wireless communication apparatus control method to exchange services | |
WO2018000844A1 (zh) | 接入网络的方法及装置 | |
US20230096372A1 (en) | Localized authorization for secure communication | |
CN115836539A (zh) | 通信方法、装置及*** | |
JP5804952B2 (ja) | 無線lan接続システム | |
WO2022127808A1 (zh) | 授信中继通信方法、装置、终端及网络侧设备 | |
CN109155913A (zh) | 网络连接方法、安全节点的确定方法及装置 | |
CN117597963A (zh) | 一种中继通信方法、通信装置及通信设备 | |
KR101508073B1 (ko) | 지그비 네트워크에서 단말의 액세스 방법 및 장치 | |
Vataja | Social Application Privacy in Mobile Ad Hoc Networks | |
WO2016183943A1 (zh) | 一种无线局域网接入方法、终端及*** | |
Mao | Achieving efficient communication for mobile devices in the new era |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18812631 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18812631 Country of ref document: EP Kind code of ref document: A1 |