Service connection method and device, equipment and storage medium

By outputting error codes and enabling the delay retry strategy based on the number of failures, the problem of insufficient business connection capabilities in weak signal scenarios is solved, and the connection success rate is improved.

CN119450804APending Publication Date: 2025-02-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411817902.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In weak signal scenarios, the service connection capability between devices is insufficient, resulting in frequent connection failures.

Method used

The reason for the failure of the service connection is determined by outputting the error code, and based on the statistical failures and the error code, decide whether to enable the delay retry policy, delay retrying the service connection with the second device.

Benefits of technology

It effectively avoids the number of invalid connections of the business and improves the success rate of the business connection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450804A_ABST
    Figure CN119450804A_ABST
Patent Text Reader

Abstract

The invention discloses a service connection method and device, equipment and a storage medium, the method is applied to first equipment, and the method comprises the steps that under the condition that service connection with second equipment fails, an error code is output, and the error code is used for indicating an original cause of service connection failure; determining whether to start a delay retry strategy or not based on the counted total number of times of service connection failures and / or error codes; and under the condition that the delayed retry strategy is enabled, the business connection with the second equipment is delayed to be retry based on the delayed retry strategy. Therefore, by delaying retry of the service connection with the second equipment, the invalid connection times of the service can be effectively avoided, and the success rate of the service connection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to communication technology, and in particular to a service connection method and apparatus, device, and storage medium. Background Art

[0002] Currently, after two devices achieve seamless connection via Bluetooth (BT) Serial Linear Emulation Protocol (Radio Frequency Communication, RFCOMM) based on PantaConnect (PTC), a peer-to-peer (P2P) service connection will be initiated. However, there is a problem of insufficient service connection capability in weak signal scenarios. Summary of the invention

[0003] The present application provides a service connection method, device, equipment, and storage medium.

[0004] The technical solution of this application is implemented as follows:

[0005] In a first aspect, a service connection method is provided, which is applied to a first device, and the method includes:

[0006] In the case where the service connection with the second device fails, outputting an error code, where the error code is used to indicate the reason for the service connection failure;

[0007] Determine whether to enable a delayed retry strategy based on the total number of service connection failures and / or the error code;

[0008] In case the delayed retry strategy is enabled, the service connection with the second device is retried with a delayed retry based on the delayed retry strategy.

[0009] In a second aspect, a service connection device is provided, which is applied to a first device, and the device includes:

[0010] A monitoring unit, configured to output an error code when the service connection with the second device fails, wherein the error code is used to indicate a reason for the service connection failure;

[0011] A processing unit, configured to determine whether to enable a delayed retry strategy based on the total number of service connection failures and / or the error code;

[0012] The processing unit is further configured to delay and retry the service connection with the second device based on the delayed retry strategy when the delayed retry strategy is enabled.

[0013] According to a third aspect, a first device is provided, comprising: a processor and a memory configured to store a computer program that can be executed on the processor, wherein the processor is configured to execute the steps of the method according to the first aspect when executing the computer program.

[0014] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program implements the steps of the method according to the first aspect when executed by a processor.

[0015] According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program implements the steps of the method according to the first aspect when executed by a processor.

[0016] The present application provides a service connection method and apparatus, device, and storage medium. When the service connection with the second device fails, an error code is output, and the error code is used to indicate the reason for the service connection failure; based on the total number of service connection failures and / or error codes, it is determined whether to enable a delayed retry strategy; when the delayed retry strategy is enabled, the service connection with the second device is delayed and retried based on the delayed retry strategy. In this way, by delaying and retrying the service connection with the second device, the number of invalid service connections can be effectively avoided, thereby improving the success rate of service connections. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 The process diagram of the service connection method in the embodiment of the present application is as follows Figure 1 ;

[0018] Figure 2 The process diagram of the service connection method in the embodiment of the present application is as follows Figure 2 ;

[0019] Figure 3 The process diagram of the service connection method in the embodiment of the present application is as follows Figure 3 ;

[0020] Figure 4 The process diagram of the service connection method in the embodiment of the present application is as follows Figure 4 ;

[0021] Figure 5 A schematic diagram of a wireless connection between a first device and a second device as exemplified in an embodiment of the present application;

[0022] Figure 6 The process diagram of the service connection method in the embodiment of the present application is as follows Figure 5 ;

[0023] Figure 7 This is a schematic diagram of the structure of the service connection device in the embodiment of the present application;

[0024] Figure 8 This is a schematic diagram of the structure of the first device in the embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this embodiment and are not intended to limit this application.

[0027] In the following description, references to “some embodiments,” “this embodiment,” “this embodiment,” and examples, etc., describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

[0028] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the present embodiment described here can be implemented in an order other than that illustrated or described here.

[0029] In this embodiment, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, object A and / or object B may represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0030] The present application embodiment provides a service connection method. Figure 1 The process diagram of the service connection method in the embodiment of the present application is as follows Figure 1 , applied to a first device, the first device includes but is not limited to a smart phone and a tablet. Figure 1 As shown, the service connection method includes the following steps S101 to S103:

[0031] Step S101: when the service connection with the second device fails, an error code is output, where the error code is used to indicate the reason for the service connection failure.

[0032] In an embodiment of the present application, when the service connection between the first device and the second device fails, an error code indicating the reason for the service connection failure is output and displayed through a display unit to help developers quickly locate and solve the problem.

[0033] Common reasons for service connection failure include, but are not limited to: network problems, signal interference problems, and the second device not turning on the Wireless Fidelity (Wi-Fi) technology.

[0034] Exemplarily, the service connection between the first device and the second device may be a peer-to-peer (P2P) service connection.

[0035] Step S102: Determine whether to enable a delayed retry strategy based on the total number of service connection failures and / or error codes that are counted.

[0036] In an embodiment of the present application, based on the total number of service connection failures, if it is determined that the number of service connection failures is too many, a delayed retry strategy is enabled, that is, the service connection with the second device is temporarily postponed and then retried, which helps to improve the success rate of the service connection and reduce resource consumption.

[0037] In an embodiment of the present application, based on the error code indicating the reason for the failure of the business connection, when it is determined that retrying the business connection with the second device may be successful, a delayed retry strategy is enabled, that is, the business connection with the second device is temporarily postponed and then retried. This helps to improve the success rate of the business connection and reduce resource consumption.

[0038] In the embodiment of the present application, the total number of service connection failures between the first device and the second device is counted. The total number is initially set to 0. If the service connection fails once, the total number is increased by 1, and 0 is updated to 1, so the total number is 1; if the service connection fails again, the total number is increased by 1, and 1 is updated to 2, so the total number is 2; and so on.

[0039] In some embodiments of the present application, the total number of service connection failures may be counted within a certain period of time (eg, 5 minutes), or the total number of service connection failures may be counted continuously.

[0040] Step S103: When the delayed retry strategy is enabled, retry the service connection with the second device based on the delayed retry strategy.

[0041] In the embodiment of the present application, the delayed retry strategy is enabled, which means that after a delay of a corresponding time, the first device retries the service connection with the second device.

[0042] In the embodiment of the present application, by delaying and retrying the service connection with the second device, the number of invalid service connections can be effectively avoided, thereby improving the success rate of the service connection.

[0043] In some embodiments of the present application, the delayed retry of the service connection with the second device based on the delayed retry strategy includes the following steps S201 to S203:

[0044] Step S201: Add the second device to the blacklist until the delay time included in the delayed retry strategy is reached, and then remove the second device from the blacklist.

[0045] In the embodiment of the present application, the blacklist includes devices that cannot perform service connection with the first device. Here, adding the second device to the blacklist indicates that the first device cannot perform service connection with the second device before the delay time included in the delay retry strategy is reached.

[0046] In an embodiment of the present application, when the delayed retry strategy is enabled, timing is started to determine whether the delay time included in the delayed retry strategy is reached. When the delay time included in the delayed retry strategy is reached, the second device is removed from the blacklist so that the second device can establish a service connection with the first device.

[0047] Step S202: In case of initiating a service connection intention based on the seamless connection channel established between the first device and the second device, determining whether the service connection condition is met based on the received signal strength indication and blacklist list of the acquired seamless connection channel.

[0048] In an embodiment of the present application, after the second device is added to the blacklist, when the first device initiates a service connection intention based on the seamless connection channel, the first device continuously obtains the received signal strength indication (RSSI) and the blacklist of the seamless connection channel, and then determines whether the service connection conditions are met based on the RSSI and the blacklist. If it is determined that the service connection conditions are met, the service connection with the second device is retried, that is, the first device sends a service connection request to the second device. If it is determined that the service connection conditions are not met, there is no need to retry the service connection with the second device. In this way, the number of service connection failures can be reduced, thereby improving the success rate of service connections.

[0049] Step S203: If the service connection condition is met, retry the service connection with the second device.

[0050] In some embodiments of the present application, the retrying the service connection with the second device includes the following steps S301 to S302:

[0051] Step S301: monitoring connection information during the service connection process.

[0052] Step S302: Based on the connection information, determine whether the service connection with the second device is successful.

[0053] In the embodiment of the present application, if the connection information during the service connection process is normal connection information, it is determined that the service connection with the second device is successful. If the connection information during the service connection process is abnormal connection information, it is determined that the service connection with the second device has failed, and the reason for the failure of the service connection with the second device can be determined based on the abnormal connection information. The reasons for the service connection failure usually include but are not limited to: network problems, signal interference problems, and the second device does not turn on Wi-Fi.

[0054] In some embodiments of the present application, the service connection condition includes: the received signal strength indication is greater than or equal to a first threshold, and the second device does not exist in the blacklist.

[0055] In the embodiment of the present application, the first threshold is a lower limit value representing the strength of the signal of the insensitive connection channel.

[0056] In some embodiments of the present application, if the RSSI of the insensitive connection channel is less than the first threshold, or there is a second device in the blacklist, it is determined that the service connection condition is not met.

[0057] In some embodiments of the present application, the delayed retry strategy includes a correspondence between the number of retry connections and the delay time.

[0058] In some embodiments, the delay time in the corresponding relationship increases as the number of connection retries increases.

[0059] In the embodiment of the present application, the delay time in the corresponding relationship increases irregularly with the increase in the number of retry connections. The irregular increase in the delay time can be understood as a different value each time the increase is made and gradually increases. For example, when the number of retry connections is 1, the delay time is 5s; when the number of retry connections is 2, the delay time is 15s; when the number of retry connections is 3, the delay time is 30s; when the number of retry connections is 4, the delay time is 1min; and so on.

[0060] In the embodiment of the present application, the delay time in the corresponding relationship increases regularly with the increase in the number of retry connections. The regular increase in the delay time can be understood as the same value each time the increase is made. For example, when the number of retry connections is 1, the delay time is 5s; when the number of retry connections is 2, the delay time is 15s; when the number of retry connections is 3, the delay time is 25s; when the number of retry connections is 4, the delay time is 35s; and so on.

[0061] In other embodiments, the delay time in the corresponding relationship remains unchanged as the number of connection retries increases.

[0062] In the embodiment of the present application, the delay time in the corresponding relationship remains unchanged as the number of retry connections increases. For example, when the number of retry connections is 1, the delay time is 20s; when the number of retry connections is 2, the delay time is 20s; when the number of retry connections is 3, the delay time is 20s; when the number of retry connections is 4, the delay time is 20s; and so on.

[0063] Based on this, the delayed retrying of the service connection with the second device based on the delayed retry strategy includes the following steps S401 to S403:

[0064] Step S401: Determine the current number of retry connections.

[0065] In the embodiment of the present application, the current number of retry connections is counted. Initially, the number of retry connections is 0. When the service connection with the second device is retried once, the number of retry connections is increased by 1, and 0 is updated to 1, so the number of retry connections is 1; when the service connection with the second device is retried again, the number of retry connections is increased by 1, and 1 is updated to 2, so the number of retry connections is 2; and so on.

[0066] Step S402: Based on the correspondence between the number of connection retries and the delay time, determine the current delay time corresponding to the current number of connection retries.

[0067] Exemplarily, when the number of retry connections is 1, the delay time is 5s; when the number of retry connections is 2, the delay time is 15s; when the number of retry connections is 3, the delay time is 30s; when the number of retry connections is 4, the delay time is 1min; and so on.

[0068] Based on this, if the current number of retry connections is 4, the corresponding current delay time is determined to be 1 minute.

[0069] Step S403: based on the current delay time, retry the service connection with the second device.

[0070] Exemplarily, if the current delay time is 1 minute, it means that the service connection with the second device is retried after 1 minute.

[0071] In some embodiments of the present application, the determining whether to enable a delayed retry strategy based on the total number of service connection failures and / or the error code includes:

[0072] In a case where the error code is a preset error code, and / or the total number of times is greater than or equal to a preset number of connection failures, it is determined to enable the delayed retry strategy.

[0073] In a feasible implementation, if the error code is a preset error code, it indicates that there is a possibility of success in retrying the service connection with the second device, and therefore, it is determined to enable the delayed retry strategy.

[0074] In another feasible implementation, if the total number of business connection failures is greater than or equal to the preset number of connection failures, it means that the number of business connection failures is too many, so it is determined to enable the delayed retry strategy, which can improve the success rate of business connections. The preset number of connection failures is set by the developer through experiments or experience.

[0075] In another feasible implementation, when the error code is a preset error code and the total number is greater than or equal to the preset number of connection failures, it is determined to enable a delayed retry strategy, thereby achieving the purpose of improving the success rate of business connections by reducing the number of business connection failures.

[0076] In some embodiments of the present application, the total number of service connection failures may be counted within a certain period of time (eg, 5 minutes), or the total number of service connection failures may be counted continuously.

[0077] In some embodiments of the present application, the method further includes:

[0078] When the error code is not a preset error code, or the total number of times is less than a preset number of connection failures, it is determined not to enable the delayed retry strategy.

[0079] In the embodiment of the present application, if the error code is not a preset error code, it means that the service connection with the second device does not need to be retried, and therefore, it is determined not to enable the delayed retry strategy.

[0080] In the embodiment of the present application, if the total number is less than the preset number of connection failures, that is, the upper limit of the number of connection failures has not been reached, it is determined that the delayed retry strategy is not enabled.

[0081] Figure 5 A schematic diagram of a wireless connection between a first device and a second device according to an embodiment of the present application, combined with Figure 5 , the specific instructions are as follows:

[0082] The first device and the second device both have PantaConnect (PTC) applications installed, and the PTC applications of the first device and the second device are logged in to the same account.

[0083] Device and service discovery for PTC applications is a key feature that allows identification and connectivity between different devices under the same user account.

[0084] During the process of establishing a senseless connection between the first device and the second device using their respective PTC applications using a Bluetooth (BT) Serial Linear Emulation Protocol (Radio Frequency Communication, RFCOMM) or Bluetooth Low Energy (BLE), an automatic pairing mechanism is adopted. Once the devices are successfully paired, the PTC application will establish a secure communication channel between the two devices.

[0085] After establishing the seamless connection channel, the first device will initiate a P2P service connection to the second device (the P2P service connection requires both the first device and the second device to turn on Wi-Fi). However, the existing connection capability is insufficient in weak signal scenarios. Therefore, this application specifically proposes a service connection method, referring to Figure 6 , applied to the first device, the service connection method comprises the following steps:

[0086] Step S601: The BT channel is connected.

[0087] That is, the first device and the second device establish a seamless connection channel based on BT RFCOMM.

[0088] Step S602: Initiate a P2P service connection intention based on the BT channel.

[0089] Step S603: Is the second device not in the blacklist, and the RSSI of the BT channel obtained by the PTC application ≥ the first threshold?

[0090] If yes, execute step S604; if no, end.

[0091] Step S604: Send a P2P service connection request to the second device.

[0092] Step S605: Check whether the service connection is successful.

[0093] Here, the connection information during the service connection process is monitored. If the connection information is normal connection information, the service connection is successful; if the connection information is abnormal connection information, the service connection fails.

[0094] Step S606: The service connection is successful.

[0095] Step S607: Whether it is an error code added to the blacklist, and whether the upper limit of the number of connection failures within a preset time has been reached.

[0096] If yes, execute step S608; if no, end.

[0097] It should be noted that, in the event of a service connection failure, an error code representing the reason for the service connection failure will be output, and then it will be determined whether the error code is an error code added to the blacklist (i.e., the preset error code), and whether the total number of connection failures counted within the preset time has reached the upper limit of the number of connection failures (i.e., the preset number of connection failures). If all of these are met, the second device will be added to the blacklist and step S608 will be executed.

[0098] Step S608: Fault tolerance mechanism, the next connection delay is 5s / 15s / 30s / 1min / … / 10min.

[0099] Exemplarily, based on the fault-tolerant mechanism, in the case of the first delayed retry of the service connection with the second device, the delay time is 5s, then after 5s, the second device is removed from the blacklist. During this 5s period, since the second device is in the blacklist, S603 will be repeatedly executed and ended. Until 5s later, the second device is not in the blacklist, at this time, if RSSI ≥ the first threshold, then steps S604 and S605 are executed. If the service connection still fails during the first retry, then step S607 is executed. If the output error code is an error code added to the blacklist, and the total number of connection failures counted within the preset time reaches the upper limit of the number of connection failures, then based on the fault-tolerant mechanism, the service connection with the second device is delayed for the second time. In the case of the second delayed retry of the service connection with the second device, the delay time is 15s, then after 15s, the second device is removed from the blacklist. During this 15s period, since the second device is in the blacklist, S603 will be repeatedly executed and ended. After 15 seconds, the second device is no longer in the blacklist. If RSSI ≥ the first threshold, then steps S604 and S605 are performed, and so on, until the service connection is successful.

[0100] Based on this, the summary is as follows:

[0101] 1. After establishing the BT RFCOMM senseless connection channel, if the RSSI of the connected BT RFCOMM channel is greater than or equal to the first threshold, it means that the signal of the BT RFCOMM channel is strong. At this time, if the second device is not in the blacklist, it means that the first device can send a P2P service connection request to the second device, thereby reducing the number of invalid connections initiated by the P2P service in the weak signal scenario.

[0102] 2. Monitor abnormal information during the P2P service connection process. If several connections in a short period of time do not meet the requirements and the returned error code is an error code for adding to the blacklist, add the second device to the connection blacklist, perform connection management based on the fault tolerance mechanism, and initiate the P2P service connection again after the service connection conditions are met. Through effective control of the connection blacklist, the number of invalid connections in weak signal scenarios can be reduced, the power consumption caused by invalid connections can be reduced, and the success rate of service connections can be improved.

[0103] To implement the method of the embodiment of the present application, based on the same inventive concept, the embodiment of the present application also provides a service connection device. Figure 7 FIG. 1 is a schematic diagram of the structure of the service connection device in the embodiment of the present application. Figure 7 As shown, the service connection device 70 includes:

[0104] The monitoring unit 701 is configured to output an error code when the service connection with the second device fails, where the error code indicates a reason for the service connection failure;

[0105] A processing unit 702 is used to determine whether to enable a delayed retry strategy based on the total number of service connection failures and / or the error code;

[0106] The processing unit 702 is further configured to delay and retry the service connection with the second device based on the delayed retry strategy when the delayed retry strategy is enabled.

[0107] In the embodiment of the present application, by delaying and retrying the service connection with the second device, the number of invalid service connections can be effectively avoided, thereby improving the success rate of the service connection.

[0108] In some embodiments of the present application, the processing unit 702 is also used to add the second device to a blacklist until the delay time included in the delayed retry strategy is reached, and then the second device is removed from the blacklist; in the case of initiating a service connection intention based on a seamless connection channel established between the first device and the second device, determining whether the service connection conditions are met based on the acquired signal quality parameters of the seamless connection channel and the blacklist; and retrying the service connection with the second device when the service connection conditions are met.

[0109] In some embodiments of the present application, the processing unit 702 is further configured to monitor connection information during the service connection process; and determine whether the service connection with the second device is successful based on the connection information.

[0110] In some embodiments of the present application, the signal quality parameter includes at least one of the following: a received signal strength indication and a reference signal received power;

[0111] The service connection condition includes: the received signal strength indication is greater than or equal to a first threshold, and / or the reference signal received power is greater than or equal to a second threshold, and the second device does not exist in the blacklist.

[0112] In some embodiments of the present application, the delayed retry strategy includes a correspondence between the number of retry connection attempts and the delay time; the processing unit 702 is also used to determine the current number of retry connection attempts; based on the correspondence between the number of retry connection attempts and the delay time, determine the current delay time corresponding to the current number of retry connection attempts; based on the current delay time, retry the service connection with the second device.

[0113] In some embodiments of the present application, the delay time in the corresponding relationship increases as the number of connection retries increases; or, the delay time in the corresponding relationship remains unchanged as the number of connection retries increases.

[0114] In some embodiments of the present application, the processing unit 702 is further used to determine to enable the delayed retry strategy when the error code is a preset error code and / or the total number of times is greater than or equal to a preset number of connection failures.

[0115] The embodiment of the present application also provides another first device, Figure 8 Schematic diagram of the structure of the first device in the embodiment of the present application. Figure 8 As shown, the first device 80 includes: a processor 801 and a memory 802 configured to store a computer program that can be run on the processor;

[0116] The processor 801 is configured to execute the method steps in the aforementioned embodiment when running a computer program.

[0117] Of course, in practical applications, Figure 8 As shown, the various components in the first device 80 are coupled together via a bus system 803. It is understood that the bus system 803 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 803 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as bus system 803.

[0118] In practical applications, the processor may be at least one of an application-specific integrated circuit (ASIC), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the functions of the processor may also be other, and the embodiments of the present application do not specifically limit this.

[0119] The above-mentioned memory can be a volatile memory (volatile memory), such as a random access memory (RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above-mentioned types of memory, and provide instructions and data to the processor.

[0120] In an exemplary embodiment, the present application also provides a computer-readable storage medium for storing a computer program.

[0121] Optionally, the computer-readable storage medium can be applied to any one of the methods in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the processor in each method in the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0122] Illustratively, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by a processor of an electronic device to complete the steps of any of the aforementioned methods.

[0123] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0124] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0125] In addition, all functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units. A person of ordinary skill in the art may understand that all or part of the steps of implementing the above method embodiments may be completed by hardware related to program instructions, and the above program may be stored in a computer-readable storage medium, which, when executed, executes the steps of the above method embodiments; and the above storage medium includes various media that can store program codes, such as mobile storage devices, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0126] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0127] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0128] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0129] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A service connection method, characterized in that: Applied to a first device, the method includes: In the case where the service connection with the second device fails, outputting an error code, where the error code is used to indicate the reason for the service connection failure; Determine whether to enable a delayed retry strategy based on the total number of service connection failures and / or the error code; In case the delayed retry strategy is enabled, the service connection with the second device is retried with a delayed retry based on the delayed retry strategy.

2. The method according to claim 1, characterized in that: The delaying and retrying the service connection with the second device based on the delay retry strategy includes: Add the second device to a blacklist until a delay time included in the delayed retry strategy is reached, and then remove the second device from the blacklist; In the case of initiating a service connection intention based on the seamless connection channel established between the first device and the second device, determining whether a service connection condition is met based on the obtained received signal strength indication of the seamless connection channel and the blacklist; If the service connection condition is met, retry the service connection with the second device.

3. The method according to claim 2, characterized in that The retrying the service connection with the second device includes: Monitor the connection information during the service connection process; Based on the connection information, determine whether the service connection with the second device is successful.

4. The method according to claim 2, characterized in that: The service connection conditions include: The received signal strength indication is greater than or equal to a first threshold, and the second device does not exist in the blacklist.

5. The method according to any one of claims 1 to 4, characterized in that: The delayed retry strategy includes a corresponding relationship between the number of retry connections and the delay time; The delaying and retrying the service connection with the second device based on the delay retry strategy includes: Determine the current number of retry connections; Based on the corresponding relationship between the number of connection retries and the delay time, determine the current delay time corresponding to the current number of connection retries; Based on the current delay time, retry the service connection with the second device.

6. The method according to claim 5, characterized in that The delay time in the corresponding relationship increases as the number of connection retries increases; Alternatively, the delay time in the corresponding relationship remains unchanged as the number of connection retries increases.

7. The method according to any one of claims 1 to 4, characterized in that: The determining whether to enable the delayed retry strategy based on the total number of service connection failures and / or the error code includes: In a case where the error code is a preset error code, and / or the total number of times is greater than or equal to a preset number of connection failures, it is determined to enable the delayed retry strategy.

8. A service connection device, characterized in that: Applied to a first device, the apparatus comprises: A monitoring unit, configured to output an error code when the service connection with the second device fails, wherein the error code is used to indicate a reason for the service connection failure; A processing unit, configured to determine whether to enable a delayed retry strategy based on the total number of service connection failures and / or the error code; The processing unit is further configured to delay and retry the service connection with the second device based on the delayed retry strategy when the delayed retry strategy is enabled.

9. A first device, characterized in that: The first device comprises: a processor and a memory configured to store a computer program that can be run on the processor, Wherein, the processor is configured to execute the steps of the method according to any one of claims 1 to 7 when running the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.