Communication methods, devices, electronic equipment, storage media and computer program products
By determining the communication quality of the second device within the electronic device and switching networks when preset conditions are not met, the problem of insufficient intelligence in the autonomous internet access mode switching of electronic devices is solved, resulting in a more stable and efficient communication experience.
Patent Information
- Application Number
- CN202510638599.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-11-17
AI Technical Summary
Existing electronic devices have low intelligence in switching between autonomous internet access mode and internet access mode based on other devices' networks, resulting in a poor user experience.
In response to the establishment of a communication connection between the first device and the second device, the communication quality of the second device based on the second communication network is determined, and when the preset quality conditions are not met, the first device is controlled to access the preset target network. The network switching decision is optimized by using communication index data for weighted summation and multiple evaluations.
It improves the communication stability and user experience of the first device, reduces data latency and service interruption caused by poor network quality, and enhances the intelligence and efficiency of communication.
Smart Images

Figure CN123124052A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a communication method, apparatus, electronic device, storage medium, and computer program product. Background Technology
[0002] With the rapid development of electronic devices, some devices can now access the internet independently or via networks connected to other devices. For example, smartwatches with integrated embedded Subscriber Identity Modules (eSIM) commonly employ a dual-mode architecture, combining Bluetooth and standalone modes. In Bluetooth mode, the watch relies on a Bluetooth connection with a smartphone, transmitting data via the phone's cellular network or Wi-Fi. In standalone mode, the watch directly connects to a base station for autonomous communication. However, currently, the switching between these modes—autonomous internet access and internet access via networks connected to other devices—is relatively unintelligent, resulting in a poor user experience. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a communication method, apparatus, electronic device, storage medium, and computer program product.
[0004] According to a first aspect of the present disclosure, a communication method is provided, the method comprising:
[0005] In response to the establishment of a communication connection between the first device and the second device based on the first communication network, a first communication quality of the second device communicating based on the second communication network is determined; wherein, the second communication network is used by the second device to acquire communication data and transmit it to the first device through the first communication network;
[0006] In response to the first communication quality not meeting the preset quality conditions, the first device is controlled to access the preset target network.
[0007] This method can improve the communication stability of the first device and enhance the user experience.
[0008] In some embodiments, determining the first communication quality of the second device based on the second communication network includes:
[0009] Obtain first communication indicator data of the second device based on the second communication network;
[0010] Based on the first communication index data, the first communication quality of the second device communicating on the second communication network is determined.
[0011] This method can improve the accuracy of determining the first communication quality.
[0012] In some embodiments, determining the first communication quality of the second device communicating over the second communication network based on the first communication indicator data includes:
[0013] Based on the first communication indicator data, a quality assessment value characterizing the communication quality is determined.
[0014] If the quality assessment value determined based on the first communication indicator data acquired in a single instance is lower than the first preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition.
[0015] In response to multiple consecutive quality assessment values falling between the first preset quality threshold and the second preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition; wherein, the multiple consecutive quality assessment values are determined based on multiple consecutive acquisitions of first communication indicator data, with one quality assessment value corresponding to one acquisition of first communication indicator data.
[0016] This method can improve the accuracy and reliability of determining whether the first communication quality meets the preset quality conditions.
[0017] In some embodiments, the first communication indicator data includes a plurality of first communication indicator values, and determining a quality assessment value characterizing communication quality based on the first communication indicator data includes:
[0018] Based on each first communication indicator value and the preset weight corresponding to each first communication indicator value, the multiple first communication indicator values are weighted and summed.
[0019] Based on the weighted summation, the quality assessment value characterizing the communication quality is determined.
[0020] This method can further improve the accuracy of the determined communication quality.
[0021] In some embodiments, the communication method is applied to the first device, and the step of obtaining first communication indicator data of the second device based on the second communication network includes:
[0022] Based on the first communication network, the system receives first communication indicator data sent by the second device, which is based on communication via the second communication network.
[0023] This method can reduce the computational burden on the second device and improve the real-time performance and accuracy of the data acquired by the first device.
[0024] In some embodiments, the method further includes:
[0025] In response to the first device accessing the target network, a second communication quality of the first device communicating based on the target network is determined, and a third communication quality of the second device communicating based on the second communication network is determined;
[0026] Based on the second communication quality and the third communication quality, the first device is controlled to maintain or disconnect its connection with the target network.
[0027] This method can further improve the stability of communication between the first device and the second device.
[0028] In some embodiments, controlling the first device to maintain or disconnect its connection with the target network based on the second communication quality and the third communication quality includes:
[0029] In response to the first device maintaining its connection with the target network within a first preset time period after the first device accesses the target network, if the second communication quality is higher than or equal to the third communication quality, the first device is controlled to maintain its connection with the target network.
[0030] If, within the first preset time period, the second communication quality is lower than the third communication quality, the first device is controlled to disconnect from the target network.
[0031] This method can further improve the communication quality of the first device while enhancing its communication stability, thereby improving the communication efficiency of the first device and demonstrating high intelligence.
[0032] In some embodiments, the method further includes:
[0033] The network connection status of the first device is maintained within a second preset time period following the first preset time period.
[0034] This method can reduce the possibility of communication interruption or instability of the first device due to frequent network switching.
[0035] According to a second aspect of the present disclosure, a communication device is provided, the device comprising:
[0036] The first determining module is configured to determine a first communication quality of the second device communicating via a second communication network in response to a communication connection established between the first device and the second device based on a first communication network; wherein the second communication network is used by the second device to acquire communication data and transmit it to the first device via the first communication network;
[0037] The first control module is configured to control the first device to access a preset target network in response to the first communication quality not meeting a preset quality condition.
[0038] In some embodiments, the first determining module is further configured to acquire first communication indicator data of the second device communicating based on the second communication network; and determine a first communication quality of the second device communicating based on the first communication indicator data.
[0039] In some embodiments, the first determining module is further configured to determine a quality assessment value characterizing communication quality based on the first communication indicator data; in response to a quality assessment value determined based on a single acquisition of the first communication indicator data being lower than a first preset quality threshold, determine that the first communication quality does not meet the preset quality condition; in response to multiple consecutive quality assessment values being between the first preset quality threshold and a second preset quality threshold, determine that the first communication quality does not meet the preset quality condition; wherein the multiple consecutive quality assessment values are determined based on multiple consecutive acquisitions of the first communication indicator data, and one quality assessment value corresponds to one acquisition of the first communication indicator data.
[0040] In some embodiments, the first communication indicator data includes a plurality of first communication indicator values, and the first determining module is further configured to perform a weighted summation of the plurality of first communication indicator values based on each first communication indicator value and a preset weight corresponding to each first communication indicator value; and to determine the quality assessment value characterizing the communication quality based on the value after weighted summation.
[0041] In some embodiments, the communication method is applied to the first device, and the first determining module is further configured to receive first communication indicator data sent by the second device based on the first communication network, which is based on the communication of the second device based on the second communication network.
[0042] In some embodiments, the apparatus further includes:
[0043] The second determining module is configured to, in response to the first device accessing the target network, determine a second communication quality of the first device communicating based on the target network, and determine a third communication quality of the second device communicating based on the second communication network;
[0044] The second control module is configured to control the first device to maintain or disconnect its connection with the target network based on the second communication quality and the third communication quality.
[0045] In some embodiments, the second control module is further configured to control the first device to maintain its connection with the target network in response to the second communication quality being higher than or equal to the third communication quality within a first preset time period after the first device accesses the target network; and to control the first device to disconnect from the target network in response to the second communication quality being lower than the third communication quality within the first preset time period.
[0046] In some embodiments, the apparatus further includes:
[0047] The status maintenance module is configured to maintain the network connection status of the first device for a second preset period of time after the first preset period of time.
[0048] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0049] processor;
[0050] Memory used to store computer programs or instructions;
[0051] The processor executes the computer program or instructions to implement the steps of the communication method described in the first aspect above.
[0052] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the storage medium storing a computer program or instructions which, when executed by a processor, implement the steps of the communication method described in the first aspect above.
[0053] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of the communication method described in the first aspect above.
[0054] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0055] In this embodiment, in response to the establishment of a communication connection between the first device and the second device based on the first communication network, a first communication quality of the second device communicating on the second communication network is determined. If the first communication quality does not meet a preset quality condition, the first device is controlled to access a preset target network. Since the second communication network is used by the second device to acquire communication data and transmit it to the first device through the first communication network, if the communication quality of the second device communicating on the second communication network is poor, there may be a delay in acquiring communication data, which in turn causes a delay in the first device receiving communication data. This can affect the first device's ability to respond to the user's real-time interaction needs or affect the normal execution of the first device's services, thus impacting the user experience. However, in this embodiment, when the first communication quality does not meet the preset quality condition, the first device is controlled to access a preset target network. In this case, the first device can acquire communication data based on the target network and respond to the user's real-time interaction needs in a timely manner. Therefore, the possibility of the first device being unable to acquire data in a timely manner due to poor first communication quality, thus preventing normal service execution, can be reduced. This improves the stability of the first device's communication and thereby enhances the user experience.
[0056] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0057] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0058] Figure 1 This is a flowchart illustrating a communication method according to an exemplary embodiment.
[0059] Figure 2 This is a flowchart illustrating a method for acquiring communication indicator data according to an exemplary embodiment.
[0060] Figure 3 This is a flowchart illustrating a communication method according to an exemplary embodiment.
[0061] Figure 4 This is a block diagram of a communication device according to an exemplary embodiment.
[0062] Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0063] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0064] Figure 1 This is a flowchart illustrating a communication method according to an exemplary embodiment. For example... Figure 1 As shown, the method mainly includes the following steps:
[0065] S11. In response to the establishment of a communication connection between the first device and the second device based on the first communication network, determine the first communication quality of the second device communicating based on the second communication network; wherein, the second communication network is used for the second device to acquire communication data and transmit it to the first device through the first communication network;
[0066] S12. In response to the first communication quality not meeting the preset quality conditions, control the first device to access the preset target network.
[0067] In this embodiment of the disclosure, the communication method can be applied to a first device or a second device, such as to a processor inside the first device or the second device. This embodiment of the disclosure takes an electronic device as the execution subject as an example for explanation. The electronic device can be the first device or the second device.
[0068] In this embodiment, the first device may include user equipment (UE), mobile device, user terminal, mobile phone, tablet computer, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc., and the second device may also include user equipment, mobile device, user terminal, mobile phone, tablet computer, PDA, handheld device, computing device, in-vehicle device, wearable device, etc. However, it should be noted that the first device can switch between modes of autonomously accessing the network to obtain communication data and receiving communication data transmitted by the second device. For example, the first device may be an eSIM smartwatch; the second device is a device capable of autonomously accessing the network to obtain communication data and transmitting the communication data to the first device through the first communication network, such as a mobile phone connected to the eSIM smartwatch.
[0069] In step S11, in response to the establishment of a communication connection between the first device and the second device based on the first communication network, the electronic device determines the first communication quality of the second device communicating based on the second communication network. The first communication network can be Bluetooth, WIFI Direct, Near Field Communication, Ultra Wide Band, etc.
[0070] In this embodiment of the disclosure, the second device obtains communication data through the second communication network and transmits it to the first device through the first communication network. In this case, the first device cannot obtain communication data from the network independently and needs to rely on the second device to obtain communication data. The second communication network is a network connecting the second device and the base station, such as a 5G network, a 4G network, a satellite communication network, a WIFI network, etc.
[0071] In this embodiment of the disclosure, the second device acquiring communication data through the second communication network and transmitting it to the first device through the first communication network can be achieved by the second device receiving a communication data acquisition request sent by the first device, acquiring communication data through the second communication network, and transmitting it to the first device through the first communication network. For example, in response to receiving a user's navigation request, the first device sends a navigation data acquisition request to the second device. After receiving the navigation data acquisition request sent by the first device, the second device acquires real-time navigation routes, traffic conditions, and other data from the cloud through the second communication network and transmits them to the first device through the first communication network. After receiving the navigation data such as navigation routes and traffic conditions transmitted by the second device, the first device displays and / or outputs voice data.
[0072] In this embodiment of the disclosure, the second device may acquire communication data through the second communication network and transmit it to the first device through the first communication network. Alternatively, the second device may receive communication data through the second communication network and transmit it to the first device through the first communication network. For example, the second device may receive SMS data or incoming call information through the second communication network and transmit the SMS data or incoming call information to the first device through the first communication network, so that the first device can perform display and / or voice output.
[0073] In this embodiment of the disclosure, the electronic device, in response to the establishment of a communication connection between the first device and the second device based on the first communication network, determines the first communication quality of the second device communicating based on the second communication network. When the first device is an eSIM smartwatch, the first communication network is a Bluetooth network, the second device is a mobile phone connected to the eSIM smartwatch via Bluetooth, and the second communication network is the cellular network corresponding to the SIM card in the mobile phone, the electronic device, in response to the establishment of a communication connection between the first device and the second device based on the first communication network, determines the first communication quality of the second device communicating based on the second communication network. Alternatively, the electronic device, in response to the connection between the eSIM smartwatch and the mobile phone via Bluetooth, and the eSIM smartwatch being in Bluetooth mode, determines the first communication quality of the mobile phone communicating based on the cellular network.
[0074] In this embodiment of the disclosure, if the communication method is applied to the first device, in some embodiments, the first device determines the first communication quality of the second device communicating based on the second communication network by receiving communication indicator data of the second device communicating based on the second communication network sent by the second device, and determines the first communication quality based on the communication indicator data; in other embodiments, the first device can also directly receive the first communication quality sent by the second device, such as the second device can monitor user voice commands, determine the first communication quality based on user voice commands and send it to the first device. For example, in response to the second device detecting that the user's voice commands include commands such as "poor network", "poor network", "stuttering", etc., it determines that the first communication quality is poor.
[0075] In this embodiment of the disclosure, if the communication method is applied to the second device, the second device can monitor the communication indicator data of the second device based on the second communication network, and determine the first communication quality based on the communication indicator data, and can also determine the first communication quality based on the user's voice command.
[0076] In step S12, in response to the first communication quality not meeting the preset quality condition, the electronic device controls the first device to access the preset target network. The preset quality condition can be a preset value. In some embodiments, data such as network signal strength, bit error rate, packet loss rate, and network latency can be used to characterize the first communication quality. The preset quality condition can be a threshold value for the corresponding data. Based on the relationship between the data characterizing the first communication quality and the corresponding data threshold, it is determined whether the first communication quality meets the preset quality condition. For example, the network signal strength can be used to characterize the first communication quality. The preset quality condition can be a preset signal strength threshold value. If the network signal strength value corresponding to the first communication quality is higher than the preset signal strength threshold value, it is determined that the first communication quality meets the preset quality condition. If the network signal strength value corresponding to the first communication quality is not higher than the preset signal strength threshold value, it is determined that the first communication quality does not meet the preset quality condition.
[0077] In this embodiment of the disclosure, the first communication quality not meeting the preset quality condition can also be that the detected user's voice command contains a target command. For example, if the second device detects that the user's voice command includes commands such as "poor network", "poor network", or "stuttering", it determines that the first communication quality does not meet the preset quality condition.
[0078] In this embodiment of the disclosure, in response to a first communication quality condition not meeting a preset quality requirement, the electronic device controls the first device to access a preset target network. The first device can connect to a base station based on the preset target network, thereby enabling autonomous internet access and autonomous acquisition of communication data. The preset target network is a network connecting the first device and the base station, such as a 5G network, 4G network, satellite communication network, or Wi-Fi network. For example, when the first device is an eSIM smartwatch, accessing the preset target network allows the eSIM smartwatch to enter independent mode.
[0079] It should be noted that in some embodiments, the preset target network can be a second communication network. For example, when the first device is an eSIM smartwatch and the second device is a mobile phone, and the eSIM smartwatch and the mobile phone achieve dual-terminal functionality with a single number, the preset target network is the second communication network. In other embodiments, the preset target network can also be a network other than the second communication network. For example, when the first device is an eSIM smartwatch and the second device is a mobile phone, and the operator corresponding to the number in the eSIM smartwatch is different from the operator corresponding to the SIM card in the mobile phone, the target network is a network other than the second communication network.
[0080] In some embodiments, the communication method can be applied to a first device, in which case the first device controls access to a preset target network in response to the first communication quality not meeting a preset quality condition; in other embodiments, the communication method can be applied to a second device, in which case the second device can send an instruction to the first device through the first communication network in response to the first communication quality not meeting the preset quality condition, so that the first device can access the target network after receiving the instruction.
[0081] In this embodiment, in response to the establishment of a communication connection between the first device and the second device based on the first communication network, a first communication quality of the second device communicating on the second communication network is determined. If the first communication quality does not meet a preset quality condition, the first device is controlled to access a preset target network. Since the second communication network is used by the second device to acquire communication data and transmit it to the first device through the first communication network, if the communication quality of the second device communicating on the second communication network is poor, there may be a delay in acquiring communication data, which in turn causes a delay in the first device receiving communication data. This can affect the first device's ability to respond to the user's real-time interaction needs or affect the normal execution of the first device's services, thus impacting the user experience. However, in this embodiment, when the first communication quality does not meet the preset quality condition, the first device is controlled to access a preset target network. In this case, the first device can acquire communication data based on the target network and respond to the user's real-time interaction needs in a timely manner. Therefore, the possibility of the first device being unable to acquire data in a timely manner due to poor first communication quality, thus preventing normal service execution, can be reduced. This improves the stability of the first device's communication and thereby enhances the user experience.
[0082] In some embodiments, determining the first communication quality of the second device based on the second communication network includes:
[0083] Obtain first communication indicator data of the second device based on the second communication network;
[0084] Based on the first communication index data, the first communication quality of the second device communicating on the second communication network is determined.
[0085] In some embodiments, the communication method can be applied to a second device. The second device can detect first communication index data based on the second communication network through a preset interface or preset testing tool. The first communication index data is data that can characterize the communication quality of the second device based on the second communication network. For example, the first communication index data can be data such as network signal strength value, bit error rate, packet loss rate, network latency, etc.
[0086] In this embodiment, after detecting the first communication indicator data, the second device determines the first communication quality of communication based on the second communication network. The second device may store corresponding communication indicator data thresholds. The second device can determine the first communication quality based on the first communication indicator data and the corresponding communication indicator data thresholds. For example, when the first communication indicator data is network signal strength, the second device can determine the first communication quality based on the relationship between the network signal strength and the corresponding network signal strength threshold. For instance, the network signal strength threshold may be -90dBm. When the network signal strength of communication based on the second communication network is greater than -90dBm... If the network signal strength of the second device is less than or equal to -90dBm, it is judged as having good communication quality. If the network signal strength of the second device based on the second communication network is less than or equal to -90dBm, it is judged as having poor communication quality. For example, the network signal strength threshold can be -90dBm and -50dBm. If the network signal strength of the second device based on the second communication network is less than or equal to -90dBm, it is judged as having poor communication quality. If the network signal strength of the second device based on the second communication network is between -90dBm and -50dBm, it is judged as having medium communication quality. If the network signal strength of the second device based on the second communication network is greater than -50dBm, it is judged as having good communication quality.
[0087] In this embodiment of the disclosure, a quality assessment value characterizing the communication quality may be determined based on the first communication indicator data, and the first communication quality may be determined based on the quality assessment value.
[0088] In this embodiment of the disclosure, the first communication indicator data may also include multiple data, such as network signal strength value, bit error rate, and packet loss rate. The second device stores network signal strength threshold, bit error rate threshold, and packet loss rate threshold. The second device can jointly determine the first communication quality based on the relationship between the network signal strength and the network signal strength threshold, the bit error rate and the bit error rate threshold, and the packet loss rate and the packet loss rate threshold of the second communication network.
[0089] In other embodiments, the communication method is applied to the first device, and the step of acquiring the first communication indicator data of the second device based on the second communication network includes:
[0090] Based on the first communication network, the system receives first communication indicator data sent by the second device, which is based on communication via the second communication network.
[0091] In this embodiment of the disclosure, the communication method is applied to a first device. The first device receives first communication index data sent by a second device based on a first communication network. As mentioned above, the second device can detect the first communication index data of the second device based on the second communication network through a preset interface or a preset testing tool. The first communication index data is data that can characterize the communication quality of the second device based on the second communication network. For example, the first communication index data can be data such as network signal strength value, bit error rate, packet loss rate, network latency, etc.
[0092] In this embodiment of the disclosure, after the second device detects the first communication index data, it transmits the first communication index data to the first device through the first communication network. After receiving the first communication index data sent by the second device based on the first communication network, the first device can determine the first communication quality based on the first communication index data. The method for determining the first communication quality based on the first communication index data is as described above.
[0093] In this embodiment of the disclosure, the communication method is applied to the first device. The way in which the first device receives the first communication index data sent by the second device enables the second device to determine the first communication quality without having to rely on the first communication index data, thereby reducing the computational burden on the second device. Furthermore, the second device sends the first communication index data through the first communication network, thus reusing the first communication network, which is highly intelligent and can also improve the real-time performance and accuracy of the data acquired by the first device.
[0094] According to the embodiments disclosed herein, communication indicator data is a specific quantitative basis for measuring communication quality. The method of obtaining first communication indicator data and determining first communication quality based on the first communication indicator data is simple, effective, and can improve the accuracy of first communication quality.
[0095] In some embodiments, determining the first communication quality of the second device communicating over the second communication network based on the first communication indicator data includes:
[0096] Based on the first communication indicator data, a quality assessment value characterizing the communication quality is determined.
[0097] If the quality assessment value determined based on the first communication indicator data acquired in a single instance is lower than the first preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition.
[0098] In response to multiple consecutive quality assessment values falling between the first preset quality threshold and the second preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition; wherein, the multiple consecutive quality assessment values are determined based on multiple consecutive acquisitions of first communication indicator data, with one quality assessment value corresponding to one acquisition of first communication indicator data.
[0099] In this embodiment of the disclosure, the electronic device determines a quality assessment value characterizing communication quality based on first communication indicator data. The electronic device may store a mapping relationship between the first communication indicator data and the quality assessment value. The electronic device can determine the quality assessment value characterizing communication quality based on the first communication indicator data and the mapping relationship. For example, the first communication indicator data may be network signal strength. The electronic device stores a mapping relationship between network signal strength and quality assessment value. For instance, a quality assessment value of 10 corresponds to a network signal strength less than or equal to -90dBm, a quality assessment value of 20 corresponds to a network signal strength between -90dBm and -50dBm, and a quality assessment value of 30 corresponds to a network signal strength greater than -50dBm. The electronic device can determine the quality assessment value based on the current network signal strength and the above mapping relationship. It should be noted that the quality assessment value is positively correlated with communication quality.
[0100] In this embodiment of the disclosure, the electronic device determines that the first communication quality does not meet the preset quality condition when the quality assessment value determined based on the first communication indicator data acquired in a single instance is lower than the first preset quality threshold. The first preset quality threshold can be a preset value. As mentioned above, when the possible values of the quality assessment value of the electronic device are 10, 20, and 30, the first preset quality threshold can be 11. It can be understood that since the quality assessment value is positively correlated with the communication quality, when the quality assessment value is lower than the first preset quality threshold, it indicates that the current communication quality is poor, and it can be determined that the first communication quality does not meet the preset quality condition.
[0101] In this embodiment of the disclosure, the electronic device can periodically acquire first communication indicator data. For example, the electronic device can acquire first communication indicator data every 5 seconds. Each acquisition of first communication indicator data represents the communication quality of the second device within that period. For example, after the first device and the second device are connected, the electronic device starts a timer. After the timer expires, it acquires first communication data and resets the timer. Each acquisition of first communication indicator data is the first communication indicator data within the corresponding timer period. For example, after the first device and the second device are connected, the electronic device starts a timer for 5 seconds. After the timer expires for the first time, it acquires first communication indicator data. This first communication indicator data is the first communication indicator data within 0 to 5 seconds after the first device and the second device are connected. The electronic device resets the timer while acquiring this first communication indicator data. When the timer expires again, it acquires first communication indicator data again. For example, when the timer expires for the second time, the first communication indicator data acquired is the first communication indicator data within 5 to 10 seconds after the first device and the second device are connected.
[0102] In this embodiment of the disclosure, in response to multiple consecutive quality assessment values being between a first preset quality threshold and a second preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition; wherein, the multiple consecutive quality assessment values are determined based on multiple consecutive acquisitions of first communication indicator data, and one quality assessment value corresponds to one acquisition of first communication indicator data, and the method for determining the corresponding quality assessment value based on each acquisition of first communication indicator data is as described above.
[0103] In this embodiment, the second preset quality threshold is a set value, which is higher than the first preset quality threshold. As mentioned above, when the possible values of the electronic device's quality assessment value are 10, 20, and 30, and the first preset quality threshold is 11, the second preset quality threshold can be 21. It is understood that since the quality assessment value is positively correlated with communication quality, a quality assessment value between the first and second preset quality thresholds indicates that the current communication quality is moderate. Because network quality may fluctuate, determining that the first communication quality does not meet the preset quality condition based solely on a single instance of moderate communication quality could lead to misjudgment, affecting the continuity and stability of communication. In this embodiment, in response to multiple consecutive quality assessment values falling between the first and second preset quality thresholds (i.e., multiple assessment results showing a moderate communication quality), the first communication quality is determined to not meet the preset quality condition. This method can reduce the risk of misjudgment caused by occasional network fluctuations and improve the reliability of the judgment.
[0104] In this embodiment of the disclosure, a quality assessment value characterizing communication quality is determined based on first communication indicator data. If the quality assessment value determined based on a single acquisition of the first communication indicator data is lower than a first preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition. If multiple consecutive quality assessment values are between the first preset quality threshold and a second preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition. This method improves the accuracy and reliability of determining whether the first communication quality meets the preset quality condition and demonstrates high intelligence.
[0105] In some embodiments, the first communication indicator data includes a plurality of first communication indicator values, and determining a quality assessment value characterizing communication quality based on the first communication indicator data includes:
[0106] Based on each first communication indicator value and the preset weight corresponding to each first communication indicator value, the multiple first communication indicator values are weighted and summed.
[0107] Based on the weighted summation, the quality assessment value characterizing the communication quality is determined.
[0108] In this embodiment of the disclosure, the first communication indicator data includes multiple first communication indicator values, each of which can characterize the communication quality. For example, the first communication indicator data may include network signal strength value, bit error rate, packet loss rate, and network latency.
[0109] In this embodiment of the disclosure, the electronic device may store the weight corresponding to each first communication indicator value. The weights corresponding to each first communication indicator value may be the same or different. This embodiment of the disclosure does not limit this. For example, when the first communication indicator data includes network signal strength value, bit error rate, packet loss rate, and network latency, the weight corresponding to the network signal strength value may be 20%, the weight corresponding to the bit error rate may be 30%, the weight corresponding to the packet loss rate may be 25%, and the weight corresponding to the network latency may be 25%.
[0110] In this embodiment of the present disclosure, the electronic device performs a weighted summation of multiple first communication indicator values based on each first communication indicator value and the preset weight corresponding to each first communication indicator value, and determines the quality assessment value representing the communication quality based on the weighted summation value. This method takes into account the different importance of different communication indicators in measuring communication quality, and reflects this difference through preset weights, so that the final quality assessment value can more comprehensively and accurately reflect the actual situation of communication quality, reducing the possibility of inaccurate evaluation of communication quality by using only a single indicator or simple average, thereby improving the accuracy of the determined communication quality.
[0111] In some embodiments, the method further includes:
[0112] In response to the first device accessing the target network, a second communication quality of the first device communicating based on the target network is determined, and a third communication quality of the second device communicating based on the second communication network is determined;
[0113] Based on the second communication quality and the third communication quality, the first device is controlled to maintain or disconnect its connection with the target network.
[0114] In this embodiment of the disclosure, in response to the first device accessing the target network, the electronic device determines the second communication quality of the first device based on the target network communication. The electronic device can acquire the second communication indicator data of the first device based on the target network communication and determine the second communication quality based on the second communication indicator data. The second communication indicator data may include data such as network signal strength value, bit error rate, packet loss rate, and network latency. The method of determining the second communication quality based on the second communication indicator data can be as described above for determining the first communication quality based on the first communication indicator data.
[0115] In this embodiment of the disclosure, in response to the first device accessing the target network, the electronic device further determines the third communication quality of the second device communicating based on the second communication network. The electronic device can acquire the third communication indicator data of the second device communicating based on the second communication network and determine the third communication quality based on the third communication indicator data. The third communication indicator data may include data such as network signal strength value, bit error rate, packet loss rate, and network latency. The method of determining the third communication quality based on the third communication indicator data can be the same as the method of determining the first communication quality based on the first communication indicator data described above.
[0116] In this embodiment of the disclosure, it should be noted that if the communication method is applied to the first device, then in response to the first device accessing the target network, the first device detects second communication indicator data of the first device communicating based on the target network, and determines a second communication quality based on the second communication indicator data; the first device also receives third communication indicator data of the second device communicating based on the second communication network sent by the second device through the first communication network, and determines a third communication quality based on the third communication indicator data. If the communication method is applied to the second device, then in response to the first device accessing the target network, the second device receives second communication indicator data of the first device communicating based on the target network sent by the first device through the first communication network, and determines a second communication quality based on the second communication indicator data; it also detects third communication indicator data of the second device communicating based on the second communication network, and determines a third communication quality based on the third communication indicator data.
[0117] In this embodiment of the disclosure, the electronic device controls the first device to maintain or disconnect its connection with the target network based on the second communication quality and the third communication quality. In some embodiments, the electronic device can control the first device to maintain or disconnect its connection with the target network based on the relationship between the second communication quality and the third communication quality within a preset time period. For example, if the second communication quality is higher than or equal to the third communication quality within the preset time period, the first device is controlled to maintain its connection with the target network; if the second communication quality is lower than the third communication quality within the preset time period, the first device is controlled to disconnect its connection with the target network.
[0118] In other embodiments, the electronic device may periodically acquire second communication index data of the first device communicating with the target network and third communication index data of the second device communicating with the second communication network, and determine the second communication quality based on the second communication index data and the third communication quality based on the third communication index data. If the second communication quality is higher than or equal to the third communication quality for multiple consecutive times, the first device is controlled to maintain the connection with the target network. If the second communication quality is lower than the third communication quality for multiple consecutive times, the first device is controlled to disconnect from the target network. It should be noted that the time period corresponding to the second communication index data and the third communication index data acquired each time is the same.
[0119] In this embodiment of the disclosure, after the first device accesses the target network, a second communication quality of the first device based on the target network and a third communication quality of the second device based on the second communication network are determined. Based on the second communication quality and the third communication quality, the method of controlling the first device to maintain or disconnect the connection with the target network is controlled, which can further improve the stability of the first device's communication.
[0120] In some embodiments, controlling the first device to maintain or disconnect its connection with the target network based on the second communication quality and the third communication quality includes:
[0121] In response to the first device maintaining its connection with the target network within a first preset time period after the first device accesses the target network, if the second communication quality is higher than or equal to the third communication quality, the first device is controlled to maintain its connection with the target network.
[0122] If, within the first preset time period, the second communication quality is lower than the third communication quality, the first device is controlled to disconnect from the target network.
[0123] In this embodiment of the disclosure, the first preset duration can be a preset value, such as 5 seconds. If the second communication quality is higher than or equal to the third communication quality within the first preset duration after the first device accesses the target network, the electronic device controls the first device to maintain the connection with the target network. At this time, the first device has just accessed the target network. If the second communication quality is higher than or equal to the third communication quality immediately after access, it indicates that the speed at which the first device obtains communication data based on the target network will be higher than the speed at which the first device receives communication data obtained by the second device based on the second communication network. At this time, controlling the first device to maintain the connection with the target network can improve the stability of the first device's communication.
[0124] In this embodiment of the disclosure, if the second communication quality is lower than the third communication quality within a first preset time period after the first device accesses the target network, the electronic device controls the first device to disconnect from the target network. At this time, the first device has just accessed the target network. If the second communication quality is lower than the third communication quality immediately after access, it indicates that the speed at which the first device acquires communication data based on the target network is lower than the speed at which the first device receives communication data acquired by the second device based on the second communication network. In this case, controlling the first device to disconnect from the target network enables the first device to receive communication data acquired by the second device based on the second communication network, thereby reducing the possibility of communication lag or interruption due to low communication quality and improving the communication stability of the first device.
[0125] The embodiments disclosed herein can further improve the communication quality of the first device on the basis of enhancing the communication stability of the first device, thereby improving the communication efficiency of the first device and exhibiting high intelligence.
[0126] In some embodiments, the method further includes:
[0127] The network connection status of the first device is maintained within a second preset time period following the first preset time period.
[0128] In this embodiment, the second preset duration can be a preset value, such as 10 seconds. Within the second preset duration following the first preset duration, the electronic device maintains the network connection of the first device. If, within the first preset duration, the second communication quality is higher than or equal to the third communication quality, the electronic device controls the first device to maintain its connection with the target network. Therefore, within the second preset duration following the first preset duration, the electronic device controls the first device to maintain its connection with the target network. It should be noted that after the second preset duration, the electronic device can determine the fourth communication quality of the first device based on the target network and the fifth communication quality of the second device based on the second communication network. Based on the fourth and fifth communication qualities, the electronic device controls the first device to maintain or disconnect its connection with the target network. The way the electronic device controls the first device to maintain or disconnect its connection with the target network based on the fourth and fifth communication qualities can be the same as the aforementioned method of controlling the first device to maintain or disconnect its connection with the target network based on the second and third communication qualities.
[0129] In this embodiment of the present disclosure, if the electronic device controls the first device to disconnect from the target network within a first preset time period if the second communication quality is lower than the third communication quality, then within a second preset time period after the first preset time period, the electronic device controls the first device to disconnect from the target network. It should be noted that after the second preset time period, the electronic device can determine the sixth communication quality of the second device based on the second communication network, and in response to the sixth communication quality not meeting the preset quality conditions, control the first device to access the target network.
[0130] The method of this embodiment can reduce the possibility of communication interruption or instability of the first device due to frequent network switching, and has a high degree of intelligence.
[0131] Figure 2 This is a flowchart illustrating communication indicator data acquisition according to an exemplary embodiment, wherein watch L21 is a first device, L22 is a mobile phone, and mobile phone L22 is a second device. The specific steps are as follows:
[0132] S201, Bluetooth connection complete.
[0133] In this embodiment of the disclosure, Bluetooth is taken as the first communication network. The Bluetooth module in the mobile phone L22 is a module in the mobile phone L22. The completion of Bluetooth connection indicates that the watch L21 and the mobile phone L22 establish a communication connection based on the first communication network.
[0134] S202, Bluetooth watch connection notification.
[0135] In this embodiment of the disclosure, the mobile phone signal information distribution module is a module within the mobile phone L22. The mobile phone Bluetooth sends a Bluetooth connection notification to the mobile phone signal information distribution module, informing the mobile phone signal information distribution module that the watch L21 and the mobile phone L22 have established a communication connection based on Bluetooth.
[0136] S203. Set the reporting threshold for each type of indicator.
[0137] In this embodiment of the disclosure, each indicator is a first communication indicator value, and each type of indicator is first communication indicator data. The reporting threshold of each type of indicator is set as the corresponding indicator threshold of each communication indicator value, which is used to determine the quality assessment value characterizing the communication quality.
[0138] S204. Set the reporting threshold for each type of indicator.
[0139] In this embodiment of the disclosure, the mobile communication module is a module within the L22 of the mobile phone, and the mobile baseband processor is a processor within the L22 of the mobile phone. The mobile communication module informs the mobile baseband processor of the reporting thresholds for various types of indicators.
[0140] S205. Collect various types of data.
[0141] In this embodiment of the disclosure, the mobile phone baseband processor collects various types of data, namely, it collects various first communication indicator values.
[0142] S206. Report indicator data.
[0143] In this embodiment of the disclosure, after the mobile phone baseband processor collects various types of data, it reports the data to the mobile phone communication module, that is, it sends the first communication indicator data to the mobile phone communication module.
[0144] S207, Report indicator data.
[0145] In this embodiment of the disclosure, after receiving the indicator data, the mobile communication module sends the indicator data to the mobile signal information distribution module.
[0146] S208, Notification Release Indicator Status.
[0147] In this embodiment of the disclosure, the mobile signal information distribution module notifies the mobile phone Bluetooth of the status of the indicator, which means sending indicator data to the mobile phone Bluetooth.
[0148] S209, Notification Release Indicator Status.
[0149] In this embodiment of the disclosure, the mobile phone notifying the watch L21 of the release of indicator status via Bluetooth is equivalent to sending indicator data to the watch L21, such as sending the first communication indicator data to the watch L21 in the previous embodiment.
[0150] Figure 3This is a flowchart illustrating a communication method according to an exemplary embodiment, where L31 is a watch, watch L31 is a first device, and mobile phone L32 is a second device. The specific steps are as follows:
[0151] S301, Notification of indicator data status.
[0152] In this embodiment of the disclosure, the watch Bluetooth is a module within the watch L31, and the mobile phone L32 notifies the watch Bluetooth of the indicator data status, that is, the mobile phone L32 sends the first communication indicator data to the watch Bluetooth.
[0153] S302, Notification of indicator data status.
[0154] In this embodiment of the disclosure, the watch mode switching decision module is a module inside the watch L31. The watch Bluetooth notifies the watch mode switching decision module of the indicator data status, that is, the watch Bluetooth sends the first communication indicator data to the watch mode switching decision module.
[0155] S303, Mode switching decision.
[0156] In this embodiment of the disclosure, the watch mode switching decision module determines whether the communication quality of the mobile network meets the preset quality conditions based on indicator data, that is, whether the first communication quality meets the preset quality conditions.
[0157] S304, Enable baseband processor and start independent mode.
[0158] In this embodiment of the disclosure, the watch communication module is a module inside the watch L31. If it is determined in step S303 that the communication quality of the mobile network does not meet the preset quality conditions, the baseband processor is turned on and the independent mode is started. It should be noted that turning on the baseband processor and starting the independent mode here means controlling the watch L31 to access the preset target network and obtain communication data based on the target network.
[0159] S305, Enable baseband processor.
[0160] In this embodiment of the disclosure, the watch baseband processor is the processor inside the watch L31. Enabling the baseband processor means controlling the watch L31 to access a preset target network and obtain communication data based on the target network.
[0161] S306, Notification of indicator data status.
[0162] In this embodiment of the disclosure, after the watch L31 starts the independent mode, the watch Bluetooth obtains the indicator data sent by the mobile phone L32. This indicator data can characterize the third communication quality of the mobile phone L32. It should be noted that the watch L31 also obtains the indicator data that can characterize the second communication quality of the watch L31.
[0163] S307, Notification of Indicator Data Status.
[0164] In this embodiment of the disclosure, the watch Bluetooth sends indicator data that can characterize the third communication quality of the mobile phone L32 and indicator data that can characterize the second communication quality of the watch L31 to the watch mode switching decision module.
[0165] S308, Notification of Indicator Data Status.
[0166] S309, Notification of Indicator Data Status.
[0167] In this embodiment of the present disclosure, the watch L31 periodically acquires index data that can characterize the third communication quality of the mobile phone L32 and index data that can characterize the second communication quality of the watch L31, and controls the watch L31 to maintain independent mode or switch to Bluetooth mode based on the second communication quality and the third communication quality.
[0168] S310, Start Timer.
[0169] In this embodiment, after activating independent mode, watch L31 periodically acquires third communication quality data characterizing phone L32 and second communication quality data characterizing watch L31 within a first preset time period. Based on the second and third communication quality, it controls watch L31 to maintain independent mode or switch to Bluetooth mode. After the first preset time period, a timer is started for a duration of the second preset time period. Before the timer expires, watch L31 maintains its independent mode.
[0170] S311, Timer timed out.
[0171] In this embodiment of the disclosure, after the timer expires, the watch L31 determines, based on the current mode, to acquire the fifth communication quality index data that can characterize the mobile phone L32, or simultaneously acquire the fifth communication quality index data that can characterize the mobile phone L32 and the fourth communication quality index data that can characterize the watch L31.
[0172] S312, Notification of indicator data status.
[0173] S313, Notification of indicator data status.
[0174] In this embodiment of the disclosure, the watch L31 acquires index data that can characterize the fifth communication quality of the mobile phone L32.
[0175] S314. Turn off the baseband processor and restore Bluetooth mode.
[0176] In this embodiment of the disclosure, if the watch L31 is in independent mode after the timer expires, and based on the acquired index data that can characterize the fifth communication quality of the mobile phone L32 and the index data that can characterize the fourth communication quality of the watch L31, it is determined that the fifth communication quality is higher than the fourth communication quality, then the baseband processor is turned off and the Bluetooth mode is restored. It should be noted that turning off the baseband processor and restoring the Bluetooth mode here means controlling the watch L31 to disconnect from the target network.
[0177] S315, disable the baseband processor.
[0178] In this embodiment of the disclosure, turning off the baseband processor means controlling the watch L31 to disconnect from the target network and obtain communication data based on the Bluetooth connection with the mobile phone L32.
[0179] Figure 4 This is a block diagram of a communication device 400 according to an exemplary embodiment. (See diagram below.) Figure 4 As shown, the device mainly includes:
[0180] The first determining module 401 is configured to determine the first communication quality of the second device communicating via the second communication network in response to a communication connection established between the first device and the second device based on the first communication network; wherein the second communication network is used by the second device to acquire communication data and transmit it to the first device through the first communication network;
[0181] The first control module 402 is configured to control the first device to access a preset target network in response to the first communication quality not meeting a preset quality condition.
[0182] In some embodiments, the first determining module 401 is further configured to acquire first communication indicator data of the second device communicating based on the second communication network; and determine first communication quality of the second device communicating based on the first communication indicator data.
[0183] In some embodiments, the first determining module 401 is further configured to determine a quality assessment value characterizing communication quality based on the first communication indicator data; in response to a quality assessment value determined based on a single acquisition of the first communication indicator data being lower than a first preset quality threshold, determine that the first communication quality does not meet the preset quality condition; in response to multiple consecutive quality assessment values being between the first preset quality threshold and a second preset quality threshold, determine that the first communication quality does not meet the preset quality condition; wherein the multiple consecutive quality assessment values are determined based on multiple consecutive acquisitions of the first communication indicator data, and one quality assessment value corresponds to one acquisition of the first communication indicator data.
[0184] In some embodiments, the first communication indicator data includes a plurality of first communication indicator values, and the first determining module 401 is further configured to perform a weighted summation of the plurality of first communication indicator values based on each first communication indicator value and a preset weight corresponding to each first communication indicator value; and determine the quality assessment value characterizing the communication quality based on the value after weighted summation.
[0185] In some embodiments, the communication method is applied to the first device, and the first determining module 401 is further configured to receive first communication indicator data sent by the second device based on the first communication network.
[0186] In some embodiments, the apparatus further includes:
[0187] The second determining module is configured to, in response to the first device accessing the target network, determine a second communication quality of the first device communicating based on the target network, and determine a third communication quality of the second device communicating based on the second communication network;
[0188] The second control module is configured to control the first device to maintain or disconnect its connection with the target network based on the second communication quality and the third communication quality.
[0189] In some embodiments, the second control module is further configured to control the first device to maintain its connection with the target network in response to the second communication quality being higher than or equal to the third communication quality within a first preset time period after the first device accesses the target network; and to control the first device to disconnect from the target network in response to the second communication quality being lower than the third communication quality within the first preset time period.
[0190] In some embodiments, the apparatus further includes:
[0191] The status maintenance module is configured to maintain the network connection status of the first device for a second preset period of time after the first preset period of time.
[0192] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0193] Figure 5 This is a structural block diagram illustrating an electronic device 500 according to an exemplary embodiment. For example, the electronic device 500 may be a mobile phone, computer, messaging device, tablet device, fitness equipment, personal digital assistant, wearable device, etc.
[0194] Reference Figure 5The electronic device 500 may include one or more of the following components: processing component 502, memory 504, power supply component 506, multimedia component 508, audio component 510, input / output (I / O) interface 512, sensor component 514, and communication component 516.
[0195] Processing component 502 typically controls the overall operation of electronic device 500, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0196] Memory 504 is configured to store various types of data to support operation on electronic device 500. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 500, contact data, phonebook data, messages, pictures, and videos. Memory 504 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 storage, flash memory, magnetic disk, or optical disk.
[0197] Power supply component 506 provides power to various components of electronic device 500. Power supply component 506 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 500.
[0198] Multimedia component 508 includes a screen that provides an output interface between electronic device 500 and 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 touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When electronic device 500 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0199] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when electronic device 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.
[0200] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0201] Sensor assembly 514 includes one or more sensors for providing state assessments of various aspects of electronic device 500. For example, sensor assembly 514 may detect the on / off state of electronic device 500, the relative positioning of components such as the display and keypad of electronic device 500, changes in position of electronic device 500 or one of its components, the presence or absence of user contact with electronic device 500, orientation or acceleration / deceleration of electronic device 500, and temperature changes of electronic device 500. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0202] Communication component 516 is configured to facilitate wired or wireless communication between electronic device 500 and other devices. Electronic device 500 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0203] In an exemplary embodiment, the electronic device 500 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.
[0204] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including executable instructions or a computer program, which can be executed by a processor 520 of an electronic device 500 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0205] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform any of the communication methods described in the embodiments of this disclosure. For example, the method includes:
[0206] In response to the establishment of a communication connection between the first device and the second device based on the first communication network, a first communication quality of the second device communicating based on the second communication network is determined; wherein, the second communication network is used by the second device to acquire communication data and transmit it to the first device through the first communication network;
[0207] In response to the first communication quality not meeting the preset quality conditions, the first device is controlled to access the preset target network.
[0208] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the communication methods described in this disclosure.
[0209] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0210] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A communication method characterized by comprising: The method includes: In response to the establishment of a communication connection between the first device and the second device based on the first communication network, a first communication quality of the second device communicating based on the second communication network is determined; wherein, the second communication network is used by the second device to acquire communication data and transmit it to the first device through the first communication network; In response to the first communication quality not meeting the preset quality conditions, the first device is controlled to access the preset target network.
2. The method of claim 1, wherein, Determining the first communication quality of the second device based on the second communication network includes: Obtain first communication indicator data of the second device based on the second communication network; Based on the first communication index data, the first communication quality of the second device communicating on the second communication network is determined.
3. The method of claim 2, wherein, Determining the first communication quality of the second device based on the first communication index data via the second communication network includes: Based on the first communication indicator data, a quality assessment value characterizing the communication quality is determined. If the quality assessment value determined based on the first communication indicator data acquired in a single instance is lower than the first preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition. In response to multiple consecutive quality assessment values falling between the first preset quality threshold and the second preset quality threshold, it is determined that the first communication quality does not meet the preset quality condition; wherein, the multiple consecutive quality assessment values are determined based on multiple consecutive acquisitions of first communication indicator data, with one quality assessment value corresponding to one acquisition of first communication indicator data.
4. The method of claim 3, wherein, The first communication indicator data includes multiple first communication indicator values. The step of determining a quality assessment value characterizing communication quality based on the first communication indicator data includes: Based on each first communication indicator value and the preset weight corresponding to each first communication indicator value, the multiple first communication indicator values are weighted and summed. Based on the weighted summation, the quality assessment value characterizing the communication quality is determined.
5. The method of claim 2, wherein, The communication method is applied to the first device, and the step of obtaining the first communication indicator data of the second device based on the second communication network includes: Based on the first communication network, the system receives first communication indicator data sent by the second device, which is based on communication via the second communication network.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: In response to the first device accessing the target network, a second communication quality of the first device communicating based on the target network is determined, and a third communication quality of the second device communicating based on the second communication network is determined; Based on the second communication quality and the third communication quality, the first device is controlled to maintain or disconnect its connection with the target network.
7. The method of claim 6, wherein, The step of controlling the first device to maintain or disconnect its connection with the target network based on the second communication quality and the third communication quality includes: In response to the first device maintaining its connection with the target network within a first preset time period after the first device accesses the target network, if the second communication quality is higher than or equal to the third communication quality, the first device is controlled to maintain its connection with the target network. If, within the first preset time period, the second communication quality is lower than the third communication quality, the first device is controlled to disconnect from the target network.
8. The method of claim 7, wherein, The method further includes: The network connection status of the first device is maintained within a second preset time period following the first preset time period.
9. A communications device, characterized by The device includes: The first determining module is configured to determine a first communication quality of the second device communicating via a second communication network in response to a communication connection established between the first device and the second device based on a first communication network; wherein the second communication network is used by the second device to acquire communication data and transmit it to the first device via the first communication network; The first control module is configured to control the first device to access a preset target network in response to the first communication quality not meeting a preset quality condition.
10. The apparatus according to claim 9, characterized in that, The first determining module is further configured to acquire first communication indicator data of the second device communicating based on the second communication network; and to determine the first communication quality of the second device communicating based on the first communication indicator data.
11. The apparatus according to claim 10, characterized in that, The communication method is applied to the first device, and the first determining module is further configured to receive first communication indicator data sent by the second device based on the first communication network.
12. The apparatus according to any one of claims 9 to 11, characterized in that, The device further includes: The second determining module is configured to, in response to the first device accessing the target network, determine a second communication quality of the first device communicating based on the target network, and determine a third communication quality of the second device communicating based on the second communication network; The second control module is configured to control the first device to maintain or disconnect its connection with the target network based on the second communication quality and the third communication quality.
13. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the communication method according to any one of claims 1 to 8.
14. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the communication method according to any one of claims 1 to 8 are implemented.
15. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the steps of the communication method according to any one of claims 1 to 8.
