Message sending method, device and system, electronic equipment and medium
By obtaining network information on the receiving end and determining the appropriate message sending method, and combining multiple communication methods to synchronize messages, the stability and reliability problems of a single communication method during message synchronization are solved, and efficient and reliable message synchronization effect is achieved.
Patent Information
- Application Number
- CN202311446399.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-01
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, a single communication method has problems with the stability and reliability of message synchronization, especially when there are too many devices or the distance between devices is long, resulting in slow message transmission speed or inability to transmit.
By obtaining network information from multiple receiving ends, we determine the message sending method of each receiving end, including broadcast, LAN and Bluetooth, and synchronize messages in combination with various methods to improve stability and reliability.
Through the combination of multiple message sending methods, the stability and reliability of message synchronization are improved, the limitations of a single communication method are avoided, and the efficient synchronization of messages between multiple devices is ensured.
Smart Images

Figure CN119946562A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data synchronization, and in particular to a message sending method, device, system, electronic device and medium. Background Art
[0002] With the development of technology, more and more electronic devices are emerging in people's lives. Usually, a user may have more than one electronic device, for example, a mobile phone, a tablet computer, a smart watch, a TV, etc. When a user wants to synchronize messages between different electronic devices, he usually selects a communication method to establish a connection between the user's various electronic devices through this communication method to achieve message synchronization. However, the single communication method in the related technology may have some problems in stability and reliability during message synchronization. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a message sending method, device, system, electronic device and medium.
[0004] According to the first aspect of an embodiment of the present disclosure, a message sending method is provided, which is applied to a sending end, and the method includes: obtaining network information of each receiving end among multiple receiving ends; determining a message sending mode corresponding to each receiving end according to the network information of each receiving end; and sending a target message to each receiving end according to the message sending mode corresponding to each receiving end.
[0005] Optionally, the network information includes a network status, and determining the message sending mode corresponding to each receiving end based on the network information of each receiving end includes: when the network status of the receiving end indicates that the receiving end has not established a connection with the sending end, determining that the message sending mode corresponding to the receiving end is a broadcast mode.
[0006] Optionally, the network information includes a network status, and determining the message sending mode corresponding to each receiving end based on the network information of each receiving end includes: when the network status of the receiving end indicates that the receiving end has not established a connection with the sending end, obtaining the number of bytes of the target message; if the number of bytes is greater than a preset number of bytes, establishing a connection with the receiving end in a manner corresponding to the connection type; and determining that the message sending mode corresponding to the receiving end is a mode corresponding to the connection type.
[0007] Optionally, the network information includes a network status and a connection type, and determining the message sending mode corresponding to each receiving end based on the network information of each receiving end includes: when the network status of the receiving end indicates that the receiving end has established a connection with the sending end, determining that the message sending mode corresponding to the receiving end is a mode corresponding to the connection type.
[0008] Optionally, the connection type includes a local area network type and / or a Bluetooth type.
[0009] Optionally, determining that the message sending method corresponding to the receiving end is a method corresponding to the connection type includes: when the connection type is a local area network type, determining that the message sending method corresponding to the receiving end is a method through the local area network; when the connection type is a local area network type and a Bluetooth type, determining that the message sending method corresponding to the receiving end is a method through the local area network; when the connection type is a Bluetooth type, determining that the message sending method corresponding to the receiving end is a method through Bluetooth.
[0010] Optionally, the method further includes: acquiring device information of all devices under the same account as the sending end; and networking with receiving ends among all the devices according to the device information to build a target network.
[0011] Optionally, the method further includes: receiving a retransmission request, wherein the retransmission request is sent when the target message received by the receiving end is abnormal; and sending the target message to the receiving end in response to the retransmission request.
[0012] According to a second aspect of an embodiment of the present disclosure, a message sending method is provided, which is applied to a receiving end, and the method includes: receiving a target message sent by a sending end according to a message sending mode corresponding to the receiving end, wherein the message sending mode is determined by the sending end according to the network information of the receiving end.
[0013] Optionally, the method further includes: when the receiving end simultaneously receives target messages sent by two message sending modes, deleting one of the target messages and performing a message reminder through the other target message.
[0014] Optionally, the method further includes: when the target message is abnormal, sending a retransmission request to the sending end; and receiving the target message sent by the sending end in response to the retransmission request.
[0015] According to a third aspect of an embodiment of the present disclosure, a message sending device is provided, which is applied to a sending end, and the device includes: an acquisition module, which is used to acquire network information of each receiving end among multiple receiving ends; a determination module, which is used to determine the message sending mode corresponding to each receiving end according to the network information of each receiving end; and a transmission module, which is used to send a target message to each receiving end according to the message sending mode corresponding to each receiving end.
[0016] According to the fourth aspect of an embodiment of the present disclosure, a message sending device is provided, which is applied to a receiving end, and the device includes: a receiving module, which is used to receive a target message sent by a sending end according to a message sending mode corresponding to the receiving end, wherein the message sending mode is determined by the sending end according to the network information of the receiving end.
[0017] According to the fifth aspect of an embodiment of the present disclosure, a message sending system is provided, the system comprising a sending end and multiple receiving ends, the sending end being connected to each of the multiple receiving ends respectively; the sending end being used to obtain network information of each of the multiple receiving ends; the sending end being further used to determine a message sending mode corresponding to each receiving end according to the network information of each receiving end; the sending end being further used to send a target message to each receiving end according to the message sending mode corresponding to each receiving end.
[0018] According to a sixth aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the aforementioned method when executing the instructions.
[0019] According to a seventh aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which computer program instructions are stored, and the program instructions implement the steps of the aforementioned method when executed by a processor.
[0020] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: a sending end obtains network information of each of a plurality of receiving ends, and then determines a message sending mode corresponding to each receiving end based on the network information of each receiving end, and then sends a target message to each receiving end for synchronization based on the message sending mode corresponding to each receiving end. There is more than one sending mode corresponding to the plurality of receiving ends, and message synchronization is performed by combining a plurality of sending modes, thereby improving the stability and reliability of message synchronization.
[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] Figure 1 A network topology diagram of a target network is shown;
[0024] Figure 2 is a flow chart of a message sending method according to an exemplary embodiment;
[0025] Figure 3 Another network topology diagram of a target network is shown;
[0026] Figure 4 A structural block diagram of a message sending device is shown;
[0027] Figure 5 A structural block diagram of a message sending device is shown;
[0028] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0030] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0031] With the development of technology, more and more electronic devices have emerged in people's lives. Usually, a user may have more than one electronic device, for example, a mobile phone, a tablet computer, a smart watch, a TV, etc. When a user wants to synchronize messages between different electronic devices, he usually selects a communication method to establish a connection between the user's various electronic devices through this communication method to achieve message synchronization. However, the single communication method in the related art may have some problems in stability and reliability during message synchronization. For example, when the number of devices that need to synchronize messages is large, the bandwidth of the local area network may be limited, which slows down the message transmission speed through the bandwidth. Or, when the distance between devices is far, the transmission distance of Bluetooth is limited, and the transmission method of Bluetooth may cause the message to be unable to be transmitted.
[0032] Moreover, in the related art, when the sender needs to synchronize a message to the receiver, a connection is established between the receiver and the sender, and the connection is disconnected after the message synchronization is completed. When synchronizing the message again, the sender and the receiver need to re-handshake and authenticate to re-establish the connection. This process is time-consuming, has high latency, and results in a poor user experience.
[0033] In order to better understand a message sending method, device, system, electronic device and medium provided by the embodiments of the present disclosure, the following first describes the target network involved in the embodiments of the present disclosure. Figure 1 The target network 100 is composed of multiple devices, and the multiple devices can communicate with each other, for example, the multiple devices communicate with each other in the form of broadcasting, or the multiple devices communicate with each other through a pre-established connection. In the target network 100, the device with the target message to be synchronized is the sending end 110, and the other devices that need to receive the target message are the receiving end 120.
[0034] This disclosure provides a message sending method, see Figure 2 , the message sending method can be applied to Figure 1 The target network 100 shown, Figure 1 The transmitter 110 shown Figure 4 The message sending device 200 shown, Figure 6 The electronic device 400, processor 420 and computer readable storage medium shown in the figure. Figure 1 The sending end 110 shown in FIG. 1 is taken as an example, where the sending end 110 can be a mobile terminal, a tablet computer, a computer, a smart watch, a TV, etc. Figure 2 The process shown is described in detail, and the message sending method may specifically include the following steps:
[0035] Step S110: Acquire network information of each of the multiple receiving ends.
[0036] When the sender has a target message to be synchronized, the network information of each of the multiple receivers is obtained. The network information may include a connection status, wherein the connection status is used to indicate that the receiver is connected to the sender, or the connection status is used to indicate that the receiver is not connected to the sender. The network information may also include a connection type, which may be understood as the type of connection established between the sender and the receiver.
[0037] The receiving end is limited by its own hardware or software and other factors, and the communication methods between multiple receiving ends and the sending end may be different. Therefore, the network information of each of the multiple receiving ends is different.
[0038] Step S120: Determine a message sending mode corresponding to each receiving end according to the network information of each receiving end.
[0039] The network information of each receiving end among the multiple receiving ends is different, and the message sending mode corresponding to the receiving end is determined according to the network information of each receiving end. It can be understood that the message sending modes corresponding to the receiving ends with the same network information can be the same, and the message sending modes corresponding to the receiving ends with different network information can be different.
[0040] Step S130: Send a target message to each receiving end according to the message sending mode corresponding to each receiving end.
[0041] According to the message sending mode corresponding to each receiving end, the target message is sent to each receiving end to synchronize the target message to each receiving end.
[0042] The message sending method provided in this embodiment is that the sending end obtains the network information of each receiving end among multiple receiving ends, and then determines the message sending mode corresponding to each receiving end according to the network information of each receiving end, and then sends the target message to each receiving end for synchronization according to the message sending mode corresponding to each receiving end. There is more than one sending mode corresponding to multiple receiving ends, and message synchronization is performed by combining multiple sending modes, which improves the stability and reliability of message synchronization.
[0043] In one embodiment, the network information includes a network status, and the network status is used to indicate whether the receiving end and the sending end are connected. Step S120 may include the following method: when the network status of the receiving end indicates that the receiving end has not established a connection with the sending end, it means that the sending end cannot send the target message to the receiving end through the connection method, and therefore, it is determined that the message sending method corresponding to the receiving end is a broadcast method.
[0044] In this embodiment, the networking status indicates that the receiving end has not established a connection with the sending end, which may be the following: the receiving end has not established a connection with the sending end during the target network networking stage. Or, during the networking stage, the receiving end originally has established a connection with the sending end, but the connection between the receiving end and the sending end is disconnected during the subsequent use of the receiving end.
[0045] With respect to the receiving end in this implementation, the sending end sends the target message by broadcasting, and the receiving end receives the target message.
[0046] In another embodiment, the network information includes a connection status, and step S120 may include the following method: when the connection status of the receiving end indicates that the receiving end has not established a connection with the sending end, obtaining the number of bytes of the target message. If the number of bytes is greater than a preset number of bytes, establishing a connection with the receiving end in a manner corresponding to the connection type. Determining that the message sending method corresponding to the receiving end is a method corresponding to the connection type.
[0047] When the network status of the receiving end indicates that the receiving end has not established a connection with the sending end, since the receiving end and the sending end have not established a connection, the target message can be sent by broadcasting. However, the number of bytes of the message carried by the broadcasting method is limited. For example, the broadcasting method can carry a message of 1500 bytes at most. If the number of bytes of the target data is large, then the complete target message cannot be synchronized by broadcasting. In this case, the target data needs to be sent by another method. Therefore, when the receiving end and the sending end are not connected, the number of bytes of the target message needs to be obtained in order to determine the message sending method. For example, if the number of bytes is less than or equal to the preset number of bytes, it means that the complete target data can be synchronized by broadcasting. Therefore, the message sending method corresponding to the receiving end can be directly determined as the broadcasting method, so as to synchronize by broadcasting. Alternatively, if the number of bytes is greater than the preset number of bytes, it means that the complete target data cannot be synchronized by broadcasting. Therefore, the sending end can establish a connection with the receiving end, for example, establish a connection in a method corresponding to the connection type. Then determine that the message sending method corresponding to the receiving end is the method corresponding to the connection type.
[0048] The preset number of bytes may be the maximum number of bytes that can be transmitted by broadcasting, for example, the preset number of bytes is 1500 bytes. The number of bytes actually available for broadcasting may be slightly smaller than the maximum number of bytes due to the additional overhead of various network protocols, so the preset number of bytes may be smaller than the maximum number of bytes that can be transmitted by broadcasting, for example, the maximum number of bytes is 1500 bytes and the preset number of bytes is 1400 bytes.
[0049] For the receiving end in this embodiment, since the sending end and the receiving end establish a connection in a manner corresponding to the connection type, when the sending end synchronizes the target message to the receiving end, the target message is sent in a manner corresponding to the connection type.
[0050] In this embodiment, when the sending end and the receiving end are not connected, if the number of bytes of the target message is greater than the preset number of bytes, it means that the sending end cannot synchronize the complete target message to the receiving end through broadcasting. Therefore, a connection is established between the sending end and the receiving end, and the target message is synchronized to the receiving end through the connection, which further improves the stability and reliability of message synchronization.
[0051] In another embodiment, the network information includes a connection status and a connection type, and step S120 may include the following method: when the connection status of the receiving end indicates that the receiving end has established a connection with the sending end, determining that the message sending method corresponding to the receiving end is a method corresponding to the connection type.
[0052] In this embodiment, when the network status of the receiving end indicates that the receiving end has established a connection with the sending end, it means that the target message can be sent to the receiving end through the connection. Then, the message sending method corresponding to the receiving end is determined to be the method corresponding to the connection type. It is easy to understand that the target message is sent by establishing a connection with the receiving end, that is, the target message is sent to the receiving end in this way.
[0053] Optionally, the connection type includes a local area network type and / or a Bluetooth type.
[0054] Exemplarily, when the connection type is a local area network type, it is determined that the message sending method corresponding to the receiving end is a method through a local area network.
[0055] When the connection type is a Bluetooth type, it is determined that the message sending mode corresponding to the receiving end is via Bluetooth.
[0056] When the connection type is a LAN type and a Bluetooth type, compared with Bluetooth, the LAN has the advantages of faster transmission rate and larger coverage, etc., and it can be determined that the message sending method corresponding to the receiving end is through the LAN.
[0057] When the connection types are LAN type and Bluetooth type, compared with LAN, Bluetooth has the advantages of lower power consumption and flexibility, and it can be determined that the message sending method corresponding to the receiving end is through Bluetooth.
[0058] When the connection types are LAN type and Bluetooth type, since LAN and Bluetooth each have their own advantages, the sending end obtains the distance to the receiving end. If the distance is less than the preset distance, it means that stable transmission can also be achieved through Bluetooth, and it can be determined that the corresponding message sending method of the receiving end is through Bluetooth. Conversely, if the distance is greater than the preset distance, it means that the distance has affected the stability of Bluetooth transmission, and it is determined that the corresponding message sending method of the receiving end is through LAN.
[0059] It should be noted that the present disclosure determines the message sending mode corresponding to each receiving terminal according to the network information of each receiving terminal among multiple receiving terminals. Therefore, in the above-mentioned embodiment, it is not limited that all receiving terminals in the target network determine the message sending mode in the same manner as in the above-mentioned embodiment, but it is determined according to the actual situation of the network information of each receiving terminal. For example, for multiple receiving terminals, if there is a network status that represents that the receiving terminal has not established a connection with the transmitting terminal, then the message sending mode corresponding to the receiving terminal is determined to be a broadcast mode. For another example, when the network status represents that the receiving terminal is connected to the transmitting terminal, and the connection type is a local area network, then the message sending mode corresponding to the receiving terminal is determined to be through the local area network. For another example, when the network status represents that the receiving terminal is connected to the transmitting terminal, and the connection type is Bluetooth, then the message sending mode corresponding to the receiving terminal is determined to be through Bluetooth.
[0060] See also Figure 3 , the sending end 110 includes a distributor, a decision distribution center and a distribution executor. Figure 3 The distribution executor may include a local area network distribution executor, a Bluetooth distribution executor, and a broadcast distribution executor. The receiving end 120 includes a receiver and a receiving executor. Corresponding to the distribution executor, the receiving executor may include a local area network receiving executor, a Bluetooth receiving executor, and a broadcast receiving executor.
[0061] It should be noted that Figure 3 The distribution executor in is just an example, and more or fewer types of distribution executors can be included according to actual needs. Figure 3 The receiving executor in the example is just an example, and more or fewer types of receiving executors may be included according to actual needs.
[0062] The sending end 110 has software installed therein, for example, Figure 3In the publisher 1 and publisher 2, publisher 1 can publish message 1 and store message 1 in the message queue. Similarly, publisher 2 can publish message 2 and store message 2 in the message queue. The distributor of the sending end 110 reads the message from the message queue in a set manner, and the read message is the target message. For example, the target message can be message 1 or message 2, or message 1 and message 2. The distributor then sends the target message to the decision distribution center. The decision distribution center determines the message sending method corresponding to each receiving end based on the network information of each receiving end and sends it to the distributor. The distributor selects the corresponding distribution executor from the distribution executors according to the message sending method corresponding to each receiving end. Using the corresponding distribution executor, the target message is sent to the receiving executor corresponding to the receiving end 120 through the message sending method. The receiving executor sends the target message to the receiver, and the receiver sends the target message to the message queue of the receiving end 120. The subscriber corresponding to the target message obtains the message from the message queue for reminder, where the subscriber can be software or business. For example, when the target message is message 1, the subscriber is Figure 3 When the target message is message 2, the subscriber is Figure 3 Subscriber 2 in .
[0063] For ease of understanding, the following example is shown, where the target network includes a transmitter, a receiver A, a receiver B, and a receiver C. For receiver A, the corresponding message sending method is a broadcast method, and the transmitter 110 uses a broadcast distribution executor to send the target message to receiver A through a broadcast method. For receiver B, the corresponding message sending method is a local area network method, and the transmitter 110 uses a local area network distribution executor to send the target message to receiver B through a local area network method. For receiver C, the corresponding message sending method is a Bluetooth method, and the transmitter 110 uses a Bluetooth distribution executor to send the target message to receiver C through a Bluetooth method.
[0064] Among them, the number of receiving end A, receiving end B and receiving end C can be more than one.
[0065] Optionally, the publisher and the subscriber corresponding to the same message may be the same software or different software.
[0066] In this embodiment, the sending end and the receiving end can transmit the target message through a variety of methods such as LAN, Bluetooth, and broadcasting. The target message can be sent simultaneously through several transmission methods to improve the transmission rate, reliability, and stability of the target message. In addition, if the bandwidth of the LAN is limited or even the LAN fails, the target message can be sent through Bluetooth or broadcasting. If the distance between the sending end and the receiving end is too far, the target message can be sent through the LAN. In this embodiment, the stability and reliability of message synchronization are further improved through the combination of multiple message sending methods.
[0067] The message sending method provided by the present disclosure needs to build the target network in advance through networking before synchronizing the target message in the target network. Therefore, the message sending method also includes: the sending end obtains the device information of all devices under the same account as the sending end. Exemplarily, the sending end can obtain the device information from the server, and the device information can be the address of the device. Then, according to the device information, networking is performed with the receiving end of all the devices to build the target network. For example, the networking process includes, first, according to the device information, establishing a connection with the receiving end, and the connection can be a local area network connection, a Bluetooth connection, etc. If, according to the device information, all devices except the sending end are used as receiving ends, then the networking is completed and the target network has been built. If, according to the device information, it is determined that there are devices that have not established a connection in addition to the receiving end that has established a connection in the device, then the sending end broadcasts the broadcast information. If there is a device that has not established a connection, in response to the broadcast information, a feedback information carrying the address of the device is generated, and the feedback information is broadcast. The receiving end receives the feedback information and determines that the device corresponding to the device address in the feedback information is also the receiving end. Then, the device establishing the connection and the device broadcasting the feedback information are both receiving ends, and the receiving end and the sending end together form the target network.
[0068] The above networking process is before the target message is synchronized, which can be understood as the target network constructed in advance by the present disclosure. When the target message needs to be sent, the target message can be directly sent to the receiving end in the target network. Compared with the related art, when the target message needs to be sent, the connection is established, which will consume more time and delay the sending of the target message. However, the present disclosure can send the target message in time.
[0069] It should be noted that the devices in the target network may be all devices under the same account. The devices in the target network may also be some devices under the same account. For example, the target network may not include devices in standby or shutdown state. Alternatively, the devices in the target network may be some devices specified by the user from all devices.
[0070] It should also be noted that after the sender creates the target network, the information of the target network can be sent to each receiving end in the target network. When there are other devices in the target network with messages to be synchronized, the device can be used as a new sender, and the remaining devices in the target network can be used as receiving ends, and the new sender executes the above method to achieve message synchronization.
[0071] Optionally, the target network may be a local network, which may be a network established in the same area, the same building, the same home, or even the same room.
[0072] Optionally, a long connection is established between the receiving end and the sending end of the present invention. Compared with the method of disconnecting the connection after the message is sent in the related art, the present invention spends less time on establishing the connection and has low latency when sending messages, which can improve the user experience.
[0073] Optionally, the message sending method further includes: receiving a resend request, wherein the resend request is sent when the target message received by the receiving end is abnormal, and the target message abnormality may include garbled characters appearing in the target message, missing of the target message, etc. In response to the resend request, the target message is sent to the receiving end to synchronize the target message to the receiving end.
[0074] Optionally, the sending end has a message synchronization function, which can be turned on and off. In one embodiment, the message synchronization function on the sending end can be freely turned on and off by the user. For example, when the user turns on the message synchronization function, the aforementioned steps S110 to S130 are executed, that is, message synchronization is performed. When the user turns off the message synchronization function, the aforementioned steps S110 to S130 are not executed, that is, message synchronization is not performed.
[0075] In another embodiment, the message synchronization function of the sending end is automatically turned on and off. Exemplarily, when the sensor on the sending end detects that the user is using the sending end, for example, the pressure sensor on the sending end detects pressure, or detects that the screen of the sending end is touched, or detects that the screen of the sending end is in a bright screen state, indicating that the user is using the sending end, the sending end automatically turns off the message synchronization function, and does not execute the aforementioned steps S110 to S130, that is, message synchronization is not performed. Conversely, when the sensor on the sending end does not detect that the user is using the sending end, the sending end automatically turns on the message synchronization function and executes the aforementioned steps S110 to S130.
[0076] In one application scenario, the target software is installed on the sending end, but not on the receiving end. The target message is a message published on the target software. For example, the target software is an instant messaging software, and the target message is a message received by the instant messaging software or a message generated by the instant messaging software. When the sending end has the target message, the network information of each of the multiple receiving ends is obtained, and then the message sending mode corresponding to each receiving end is determined according to the network information of each receiving end. Then, according to the message sending mode corresponding to each receiving end, the target message is sent to each receiving end, so as to synchronize the target message to multiple receiving ends. Even when the user is not using the sending end, the target message can be received through any receiving end, so that the user can view it in time.
[0077] In another application scenario, the user performs a first operation on the sending end, and the sending end generates a target message based on the first operation, wherein the first operation may be a selection operation, a copy operation, etc. Then the sending end obtains network information of each receiving end among multiple receiving ends, determines the message sending mode corresponding to each receiving end according to the network information of each receiving end, and then sends the target message to each receiving end according to the message sending mode corresponding to each receiving end. The user may perform a second operation on any receiving end to display the target message on the operated receiving end, wherein the second operation may be a selection operation, a paste operation, etc.
[0078] For example, the first operation may be a copy operation of the wifi password stored on the sending end, and the second operation may be a paste operation of the wifi password, and the receiving end includes a television. For devices such as televisions that are inconvenient to input, the first and second operations described above can quickly input the wifi password of the television, thereby improving the connection speed of the television.
[0079] The present invention provides a message sending method, which can be applied to Figure 1 The receiving end 120 in the target network can be any receiving end in the target network, and can also be applied to Figure 5 The message sending device 300, Figure 6 The electronic device 400, processor 420 and computer-readable storage medium shown in the embodiment are applied to the receiving end 120 as an example, wherein the receiving end 120 can be a mobile terminal, a tablet computer, a computer, a smart watch, a television, etc. The message sending method includes: receiving a target message sent by a sending end according to a message sending mode corresponding to the receiving end, wherein the message sending mode is determined by the sending end according to the network information of the receiving end.
[0080] Optionally, the message sending method further includes: when the receiving end simultaneously receives target messages sent by two message sending methods, deleting one of the target messages and using the other target message to send a message reminder. This can be understood as deduplication of the target message to prevent two consecutive reminders on the same receiving end, thereby avoiding interference to the user.
[0081] Optionally, after receiving the target message on the receiving end, the target message can be displayed as a reminder. After that, if the same target message is received by other message sending methods, the later received target message can be deleted to prevent two reminders on the same receiving end, thereby avoiding interference to the user.
[0082] Optionally, the message sending method further includes: when the target message is abnormal, sending a resend request to the sending end; and receiving the target message sent by the sending end in response to the resend request.
[0083] The present disclosure provides a message sending system, the message sending system comprising a sending end and a plurality of receiving ends, the sending end being connected to each of the plurality of receiving ends respectively;
[0084] The transmitting end is used to obtain network information of each receiving end among the multiple receiving ends;
[0085] The sending end is further used to determine the message sending mode corresponding to each receiving end according to the network information of each receiving end;
[0086] The sending end is further used to send the target message to each receiving end according to the message sending mode corresponding to each receiving end.
[0087] Regarding the message sending system in the above embodiment, the specific manner in which each device (sending end and receiving end) performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0088] To implement the above method embodiment, the present disclosure provides a message sending device, which is applied to the sending end, see Figure 4 , the message sending device 200 comprises:
[0089] An acquisition module 210, configured to acquire network information of each of the plurality of receiving terminals;
[0090] A determination module 220, configured to determine a message sending mode corresponding to each receiving end according to the network information of each receiving end;
[0091] The transmitting module 230 is used to send a target message to each receiving end according to the message sending mode corresponding to each receiving end.
[0092] Optionally, the network information includes a network connection status, and the determination module 220 includes:
[0093] The broadcast module is used to determine that the message sending mode corresponding to the receiving end is a broadcast mode when the network status of the receiving end indicates that the receiving end has not established a connection with the sending end.
[0094] Optionally, the network information includes a network connection status, and the determination module 220 includes:
[0095] A byte number acquisition module, used for acquiring the byte number of the target message when the network status of the receiving end indicates that the receiving end has not established a connection with the sending end;
[0096] An establishing module, configured to establish a connection with the receiving end in a manner corresponding to the connection type if the number of bytes is greater than a preset number of bytes;
[0097] The first sending mode determining module is used to determine that the message sending mode corresponding to the receiving end is the mode corresponding to the connection type.
[0098] Optionally, the network information includes a network connection state and a connection type, and the determination module 220 includes:
[0099] The second sending mode determining module is used to determine that the message sending mode corresponding to the receiving end is a mode corresponding to the connection type when the networking state of the receiving end indicates that the receiving end has established a connection with the sending end.
[0100] Optionally, the connection type includes a local area network type and / or a Bluetooth type.
[0101] Optionally, the first sending mode determination module is used to:
[0102] When the connection type is a local area network type, determining that the message sending mode corresponding to the receiving end is a mode through a local area network;
[0103] When the connection type is a local area network type and a Bluetooth type, determining that the message sending mode corresponding to the receiving end is a mode through a local area network;
[0104] When the connection type is a Bluetooth type, it is determined that the message sending mode corresponding to the receiving end is via Bluetooth.
[0105] Optionally, the message sending device 200 further includes:
[0106] A device information acquisition module, used to acquire device information of all devices under the same account as the sending end;
[0107] The networking module is used to network with the receiving ends of all the devices according to the device information to build a target network.
[0108] Optionally, the message sending device 200 further includes:
[0109] A request receiving module, used to receive a resend request, wherein the resend request is sent when a target message received by a receiving end is abnormal;
[0110] The resending module is used to send the target message to the receiving end in response to the resending request.
[0111] The present disclosure also provides a message sending device, which is applied to a receiving end. Figure 5 , the message sending device 300 includes:
[0112] The receiving module 310 is used to receive a target message sent by a sending end according to a message sending mode corresponding to the receiving end, wherein the message sending mode is determined by the sending end according to the network information of the receiving end.
[0113] Optionally, the message sending device 300 further includes:
[0114] The deduplication module is used to delete one of the target messages when the receiving end receives target messages sent by two message sending methods at the same time, and to send a message reminder through the other target message.
[0115] Optionally, the message sending device 300 further includes:
[0116] An exception module, used for sending a resend request to a sending end when the target message is abnormal;
[0117] The re-receiving module is used to receive the target message sent by the sending end in response to the re-sending request.
[0118] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0119] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the message sending method provided by the present disclosure are implemented.
[0120] Figure 6 4 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0121] Reference Figure 6 , the electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output interface 412 , a sensor component 414 , and a communication component 416 .
[0122] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0123] The memory 404 is configured to store various types of data to support operations on the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0124] The power supply component 406 provides power to the various components of the electronic device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.
[0125] The multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0126] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0127] The input / output interface 412 provides an interface between the processing component 402 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0128] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of the components, such as the display and keypad of the electronic device 400, and the sensor assembly 414 can also detect the position change of the electronic device 400 or a component of the electronic device 400, the presence or absence of contact between the user and the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and the temperature change of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0129] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0130] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0131] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of an electronic device 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0132] In addition to being an independent electronic device, the above-mentioned electronic device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC, system on chip or system-level chip), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned message sending method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned message sending method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned message sending method.
[0133] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned message sending method when executed by the programmable device.
[0134] In summary, the message sending method, device, system, electronic device and medium provided by the present disclosure, the sending end obtains the network information of each of the multiple receiving ends, and then determines the message sending mode corresponding to each receiving end according to the network information of each receiving end, and then sends the target message to each receiving end for synchronization according to the message sending mode corresponding to each receiving end. There is more than one sending mode corresponding to multiple receiving ends, and message synchronization is performed by combining multiple sending modes, which improves the stability and reliability of message synchronization.
[0135] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0136] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A message sending method, characterized in that: Applied to the sending end, the method includes: Obtaining network information of each of the multiple receiving ends; Determining a message sending mode corresponding to each receiving end according to the network information of each receiving end; According to the message sending mode corresponding to each receiving end, a target message is sent to each receiving end.
2. The method according to claim 1, characterized in that The network information includes a network connection state, and determining the message sending mode corresponding to each receiving end according to the network information of each receiving end includes: When the network status of the receiving end indicates that the receiving end has not established a connection with the sending end, it is determined that the message sending mode corresponding to the receiving end is a broadcast mode.
3. The method according to claim 1, characterized in that The network information includes a network connection state, and determining the message sending mode corresponding to each receiving end according to the network information of each receiving end includes: When the network status of the receiving end indicates that the receiving end has not established a connection with the sending end, obtaining the number of bytes of the target message; If the number of bytes is greater than a preset number of bytes, establishing a connection with the receiving end in a manner corresponding to the connection type; Determine that the message sending mode corresponding to the receiving end is the mode corresponding to the connection type.
4. The method according to claim 1, characterized in that: The network information includes a network connection state and a connection type, and determining a message sending mode corresponding to each receiving end according to the network information of each receiving end includes: When the networking state of the receiving end indicates that the receiving end has established a connection with the sending end, it is determined that the message sending mode corresponding to the receiving end is a mode corresponding to the connection type.
5. The method according to claim 3 or 4, characterized in that: The connection type includes a local area network type and / or a Bluetooth type.
6. The method according to claim 5, characterized in that The determining that the message sending mode corresponding to the receiving end is a mode corresponding to the connection type includes: When the connection type is a local area network type, determining that the message sending mode corresponding to the receiving end is a mode through a local area network; When the connection type is a local area network type and a Bluetooth type, determining that the message sending mode corresponding to the receiving end is a mode through a local area network; When the connection type is a Bluetooth type, it is determined that the message sending mode corresponding to the receiving end is via Bluetooth.
7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Obtain device information of all devices under the same account as the sender; According to the device information, networking is performed with receiving ends in all the devices to build a target network.
8. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Receiving a resend request, wherein the resend request is sent when a target message received by a receiving end is abnormal; In response to the retransmission request, the target message is sent to the receiving end.
9. A message sending method, characterized in that: Applied to the receiving end, the method comprises: The target message sent by the sending end is received according to the message sending mode corresponding to the receiving end, wherein the message sending mode is determined by the sending end according to the network information of the receiving end.
10. The method according to claim 9, characterized in that The method further comprises: When the receiving end receives target messages sent by two message sending modes at the same time, it deletes one of the target messages and sends a message reminder through the other target message.
11. The method according to claim 9, characterized in that The method further comprises: When the target message is abnormal, sending a resend request to the sending end; A target message sent by the sending end in response to the resending request is received.
12. A message sending device, characterized in that: Applied to a transmitting end, the device comprises: An acquisition module, used for acquiring network information of each receiving end among multiple receiving ends; A determination module, used to determine the message sending mode corresponding to each receiving end according to the network information of each receiving end; The transmitting module is used to send the target message to each receiving end according to the message sending mode corresponding to each receiving end.
13. A message sending device, characterized in that: Applied to a receiving end, the device comprises: The receiving module is used to receive a target message sent by a sending end according to a message sending mode corresponding to the receiving end, wherein the message sending mode is determined by the sending end according to the network information of the receiving end.
14. A message sending system, characterized in that: The system comprises a transmitting end and a plurality of receiving ends, wherein the transmitting end is respectively connected to each of the plurality of receiving ends; The transmitting end is used to obtain network information of each receiving end among the multiple receiving ends; The sending end is further used to determine the message sending mode corresponding to each receiving end according to the network information of each receiving end; The sending end is further used to send the target message to each receiving end according to the message sending mode corresponding to each receiving end.
15. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the steps of the method described in any one of claims 1 to 11 when executing the instructions.
16. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.