Networking method, readable medium, electronic equipment and program product

By judging the probability of pre-connection between the main device and the extended device and controlling the establishment of the pre-connection, the power consumption problem of the main device when the extended device function is not used under high-power connection is solved, and reasonable pre-connection management is realized in the bright screen state, reducing unnecessary power consumption.

CN120434830AActive Publication Date: 2025-08-05HONOR DEVICE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411313433.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-08-05
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

When the main device and the extension device are pre-established with the WLAN direct connection, although the device functions of the extension device are not used, the main device still consumes a large power, especially in the black screen state, which causes unnecessary power consumption.

Method used

By obtaining the probability of establishing a pre-connection between the main device and the extended device, determine whether it is greater than or equal to the probability threshold. If so, establish a pre-connection, otherwise it will not be established, especially when the screen is on or when the related application is started, avoiding pre-connection of high-power connection type.

Benefits of technology

It effectively reduces the power consumption of the main device when it does not require the use of extended device functions, especially in the black screen state, avoids unnecessary pre-connection power consumption, and improves the energy efficiency of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434830A_ABST
    Figure CN120434830A_ABST
Patent Text Reader

Abstract

The invention relates to the field of communication, and discloses a networking method, a readable medium, electronic equipment and a program product. According to the method, the use probability of pre-connection and interaction between a main device and an extension device based on a certain connection type is obtained, and whether the use probability is larger than or equal to a use probability threshold value or not is judged. If the use probability is greater than or equal to a use probability threshold, controlling the main equipment to establish pre-connection with the corresponding extension equipment through the corresponding connection type; and if the use probability is less than the use probability threshold, controlling the main equipment not to establish pre-connection with the corresponding extension equipment through the corresponding connection type. Therefore, when the use probability of the connection type does not meet the condition, the primary device does not establish the pre-connection based on the connection type; if the connection type is a connection type with relatively high power consumption, the main device can avoid pre-connection power consumption caused by the fact that the main device maintains a pre-connection state with the extension device through the connection type and does not interact with the extension device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and in particular, to a networking method, a readable medium, an electronic device, and a program product. Background Art

[0002] With the development of the Internet of Things (IoT) technology, a user can interconnect a master device with other extended devices and use the components (such as a display screen, etc.) of the extended devices as virtual components of the master device, so as to enable the sharing of component functions (such as display functions, etc.) between the master device and the extended devices.

[0003] In some solutions, the master device can establish connections with multiple extended devices in advance, so that when the master device determines to use the component function of a certain extended device, it does not need to wait for connection establishment, but can directly use the component function of the corresponding extended component, thereby saving the time for the master device to establish a connection with the extended device.

[0004] However, some connection types consume relatively high power during connection. For example, Wi-Fi Direct is a communication technology that allows electronic devices to directly communicate with each other through a WLAN network (such as a Wi-Fi network).

[0005] However, in the case where the master device has established connections with extended device a and extended device b in advance, and the connection type between the master device and extended device b is Wi-Fi Direct, if the master device does not use the component function of extended device b but uses the component function of extended device a, due to the relatively high power consumption of the Wi-Fi Direct connection established between the master device and extended device b, the power consumption of the master device will be relatively high. Summary of the Invention

[0006] To solve the above problems, embodiments of this application provide a networking method, a readable medium, an electronic device, and a program product.

[0007] In a first aspect, the present application provides a networking method, which is applied to an electronic device. The method includes: determining a first usage probability that the electronic device establishes a pre-connection with an extended device through a first connection type and interacts, based on historical data, where the historical data includes the interaction duration and the number of interactions between the electronic device and the extended device through the first connection type within a historical time period; determining whether the first usage probability is greater than or equal to a first usage probability threshold; corresponding to the first usage probability being greater than or equal to the first usage probability threshold, controlling the electronic device to establish a pre-connection with the extended device through the first connection type; corresponding to the first usage probability being less than the first usage probability threshold, controlling the electronic device not to establish a pre-connection with the extended device based on the first connection type.

[0008] In an embodiment of the present application, the electronic device may refer to the master device mentioned in the embodiment of the present application, and the extended device may refer to extended devices such as extended device a or extended device b mentioned in the embodiment of the present application, without specific limitation here. In addition, the historical time period may refer to the historical number of days N mentioned in the embodiment of the present application. N may be, for example, any positive integer, without specific limitation here.

[0009] In an embodiment of the present application, the first usage probability may refer to "intentProb" mentioned in the embodiment of the present application, and the first usage probabilities corresponding to different connection types may be different or the same, without specific limitation here.

[0010] In some other embodiments of the present application, if the first usage probability belongs to a first usage probability range, the electronic device may be controlled to establish a pre-connection with the extended device through the first connection type, where the first usage probability range may refer to "linkProb" mentioned in the embodiment of the present application. And the usage probability ranges corresponding to different configuration levels may be different, without specific limitation here.

[0011] Through the above method, when determining whether the master device is to establish a pre-connection with the extended device based on a certain connection type, it is necessary to determine that the usage probability corresponding to this connection type is greater than or equal to the usage probability threshold, and then the master device will establish a pre-connection with the extended device through the corresponding connection type. Thus, when the usage probability of the connection type does not meet the condition, the master device will not establish a pre-connection based on this connection type. If this connection type is a connection type with relatively high power consumption, the master device can avoid the pre-connection power consumption caused by maintaining the pre-connection state with the extended device through this connection type without interacting with the extended device.

[0012] In a possible implementation of the above first aspect, corresponding to the first usage probability being greater than or equal to the first usage probability threshold, controlling the electronic device and the extended device to establish a pre-connection through the first connection type further includes: determining whether the electronic device is in a screen-on state; corresponding to the electronic device being in a screen-on state, controlling the electronic device and the extended device to establish a pre-connection through the first connection type.

[0013] In the embodiment of the present application, when the electronic device is in a screen-on state and it is determined that the first usage probability is greater than or equal to the first usage probability threshold, the electronic device and the extended device can be controlled to establish a pre-connection through the first connection type, avoiding the high power consumption caused by establishing a pre-connection in the black screen scenario of the electronic device.

[0014] It can be understood that in some other embodiments, if it is detected that the master device is in a black screen state, it can indicate that the master device is currently in a non-usage state, which is not limited herein. Furthermore, the master device may not establish a pre-connection in the black screen display state, avoiding the connection power consumption caused by establishing a pre-connection in the black screen display state of the master device.

[0015] In a possible implementation of the above first aspect, corresponding to the first usage probability being greater than or equal to the first usage probability threshold, controlling the electronic device and the extended device to establish a pre-connection based on the first connection type further includes: obtaining a set of first application package names based on the first configuration information, and determining whether the electronic device starts the first application, where the first application is the application corresponding to the package name in the set of first application package names, and the first configuration information is the information used to guide the electronic device to establish a pre-connection; corresponding to the electronic device starting the first application and the first usage probability being greater than or equal to the first usage probability threshold, controlling the electronic device and the extended device to establish a pre-connection based on the first connection type.

[0016] In the embodiment of the present application, the first configuration information may refer to the information corresponding to different configuration levels in Table 1 mentioned in the embodiment of the present application. The set of first application package names may refer to applist mentioned in the embodiment of the present application.

[0017] It can be understood that the application corresponding to the package name in the set of first application package names may mean that when the master device uses this type of application, it can establish a pre-connection between the master device and the extended device and use the functions of the corresponding extended device to improve the device usage efficiency.

[0018] In an embodiment of the present application, when the electronic device enters a preset application, if it is determined that the first usage probability is greater than or equal to the first usage probability threshold, the electronic device can be controlled to establish a pre-connection with the extended device through the first connection type. That is, when the electronic device starts the preset application, the electronic device is further controlled to establish a pre-connection based on the corresponding connection type. In this way, the pre-connection is established only when the master device enters the preset application. It can be understood that the preset application can refer to an application that can use the corresponding functions in the extended device. If the application started by the master device is an application that does not require the use of the corresponding functions in the extended device, the master device will not be triggered to establish a pre-connection, that is, the power consumption caused by the master device establishing a pre-connection will not occur.

[0019] In a possible implementation of the above first aspect, based on the first configuration information, the first application package name set is obtained, and it is determined whether the electronic device starts the first application. It further includes: corresponding to the case where the electronic device does not start the first application, controlling the electronic device and the extended device not to establish a pre-connection based on the first connection type.

[0020] In an embodiment of the present application, if the electronic device does not enter the preset application, the electronic device can be directly controlled not to establish a pre-connection with the extended device based on the first connection type. In this way, it is possible to avoid the power consumption caused by the electronic device establishing a pre-connection and continuously remaining in the pre-connection state when using an application that does not require the use of the corresponding functions of the extended device.

[0021] In a possible implementation of the above first aspect, corresponding to the electronic device starting the first application and the first usage probability being greater than or equal to the first usage probability threshold, controlling the electronic device and the extended device to establish a pre-connection based on the first connection type further includes: determining whether the electronic device exits the first application; corresponding to the electronic device exiting the first application, the electronic device disconnects the pre-connection established with the extended device based on the first connection type.

[0022] It can be understood that in some scenarios, if the electronic device exits the preset application that requires the use of the corresponding functions of the extended device, it can indicate that the current electronic device does not need to establish a pre-connection with the extended device. Based on this, the electronic device can disconnect the pre-connection with the extended device. In this way, when the electronic device uses an application that does not require the use of the corresponding functions of the extended device, the electronic device does not establish a pre-connection, avoiding the power consumption caused by being in the pre-connection state for a long time.

[0023] In a possible implementation of the above first aspect, corresponding to the first usage probability being less than the first usage probability threshold, controlling the electronic device and the expansion device not to establish a pre-connection based on the first connection type further includes: obtaining the first duration for the electronic device and the expansion device to establish a pre-connection based on the first connection type, and determining whether the first duration is greater than the first pre-connection duration threshold; corresponding to the first duration being greater than the first pre-connection duration threshold, the electronic device disconnects the pre-connection established with the expansion device based on the first connection type.

[0024] In an embodiment of the present application, the first pre-connection duration threshold may refer to "keepDur" or "totalDur" mentioned in the embodiment of the present application. By setting the disconnection of the pre-connection when the connection duration exceeds the connection duration threshold, the power consumption of the master device in the pre-connection state for a long time can be effectively reduced.

[0025] In a possible implementation of the above first aspect, the method for determining the first usage probability threshold includes: receiving a first networking policy, where the first networking policy includes a first pre-connection probability, and the first pre-connection probability represents the probability that the electronic device establishes a pre-connection through the first connection type within the first period; obtaining first configuration information, where the first configuration information includes first matching information, and the first matching information is used to match the corresponding information in the first networking policy, and the first matching information includes a first pre-connection probability threshold; the first configuration information includes first control information, and the first control information includes a first usage probability threshold. Corresponding to the first pre-connection probability being greater than or equal to the first pre-connection probability threshold, the first usage probability threshold is determined based on the first control information.

[0026] In an embodiment of the present application, the first networking policy may refer to the information in Table 2 mentioned in the embodiment of the present application, etc., and no specific limitation is made here. The first pre-connection probability may refer to "timeProb" in the networking policy mentioned in the embodiment of the present application, the first matching information may refer to "scope" mentioned in the embodiment of the present application, and the first control information may refer to "ploy" mentioned in the embodiment of the present application.

[0027] In some other embodiments of the present application, the first matching information includes a first pre-connection probability range, and the first pre-connection probability range may refer to "timeProb" in the matching information "scope" mentioned in the embodiment of the present application. Corresponding to the first pre-connection probability belonging to the first pre-connection probability range, a first usage probability range "linkProb" can be determined based on the first control information.

[0028] In a possible implementation of the above first aspect, the method for determining the first usage probability threshold further includes: obtaining the first network formation day ratio, the first average network formation times, and the maximum value of the network formation day ratio in the first time period included in the first network formation policy for the first historical period, where the first historical period includes historical days; the first matching information further includes a first network formation day ratio threshold, a first average network formation times threshold, and a maximum value threshold of the network formation day ratio in the first time period; corresponding to satisfying any one or more of the first network formation day ratio being greater than or equal to the first network formation day ratio threshold, the first average network formation times being greater than or equal to the first average network formation times threshold, and the maximum value of the network formation day ratio in the first time period being less than or equal to the maximum value threshold of the network formation day ratio in the first time period, determining the first usage probability threshold based on the first configuration information.

[0029] In the embodiments of the present application, the first network formation day ratio may refer to "validDaysPercent" mentioned in the embodiments of the present application. The first average network formation times may refer to "validUseCnt" mentioned in the embodiments of the present application. The maximum value of the network formation day ratio in the first time period may refer to "maxSlotDaysPercent" mentioned in the embodiments of the present application.

[0030] In the embodiments of the present application, the first matching information further includes a first network formation day ratio range "dayProb", the first average network formation times threshold may refer to "avgTimes" mentioned in the embodiments of the present application, and the maximum value threshold of the network formation day ratio in the first time period may refer to "maxProb" mentioned in the embodiments of the present application.

[0031] In some other embodiments of the present application, corresponding to satisfying any one or more of the first network formation day ratio belonging to the first network formation day ratio range, the first average network formation times being greater than or equal to the first average network formation times threshold, and the maximum value of the network formation day ratio in the first time period being less than or equal to the maximum value threshold of the network formation day ratio in the first time period, determining a first usage probability range "linkProb" based on the first configuration information.

[0032] In a second aspect, an electronic device provided by an embodiment of the present application includes a memory for storing instructions; and a processor for executing the instructions to implement the network formation method provided by the above first aspect and various possible implementations of the first aspect.

[0033] In a third aspect, a readable storage medium provided by an embodiment of the present application has instructions stored thereon, and when the instructions are executed on an electronic device, the electronic device is caused to execute the network formation method provided by the above first aspect and various possible implementations of the first aspect.

[0034] Fourthly, an embodiment of the present application further provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the networking method provided in the above first aspect and various possible implementations of the first aspect.

[0035] For the beneficial effects of the above second aspect to fourth aspect, reference can be made to the relevant descriptions in the above first aspect and various possible implementations of the first aspect, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 According to the method provided by an embodiment of the present application, a schematic diagram of an application scenario of a networking method is shown;

[0037] Figure 2 According to the method provided by an embodiment of the present application, a flowchart of a networking method is shown;

[0038] Figure 3 According to the method provided by an embodiment of the present application, a specific flowchart of a networking method is shown;

[0039] Figure 4 According to the method provided by an embodiment of the present application, a schematic diagram of the software structure of an electronic device is shown;

[0040] Figure 5 According to the method provided by an embodiment of the present application, a schematic diagram of an interaction process in which a master device determines how to pre-connect based on configuration information and a networking policy is shown;

[0041] Figure 6 According to the method provided by an embodiment of the present application, a flowchart of a master device obtaining and updating configuration information is shown;

[0042] Figure 7 According to the method provided by an embodiment of the present application, a schematic diagram of the structure of an electronic device 100 is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] The illustrative embodiments of the present application include, but are not limited to, a networking method, a readable medium, an electronic device, and a program product.

[0044] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and elaborately described below with reference to the accompanying drawings.

[0045] It can be understood that multi-device networking refers to connecting multiple electronic devices together through wireless means or the like to form a network system. In multi-device networking, devices can share resources, transfer data, and cooperate with each other. Multiple electronic devices can be networked through wireless means or the like. For example, multi-device networking can use wireless technologies such as Bluetooth (BT), wireless fidelity (Wi-Fi), or ZigBee to connect multiple electronic devices.

[0046] Figure 1 An application scenario schematic diagram of a networking method is shown according to an embodiment of the present application.

[0047] As Figure 1 shown, the mobile phone 10 can form a device group with electronic devices such as the tablet computer 11, smart screen 12, TV 13, smart skipping rope 14, smart electronic scale 15, smart sphygmomanometer 16, fax machine 17, printer 18, air conditioner 19, refrigerator 20, etc. The electronic devices within this device group can communicate with each other. For example, each electronic device can be within the same local area network (LAN) and log in to the same account, and at this time, the electronic devices can communicate with each other.

[0048] It can be understood that in addition to the local area network, the above-mentioned electronic devices can also establish communication through wireless communication technologies such as Bluetooth (BT), Wi-Fi, Wi-Fi Direct, or ZigBee, etc., which is not limited herein.

[0049] It can be understood that the electronic devices in the embodiments of the present application can include: mobile phones, smart screens, wearable devices, tablet computers (Pads), computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc.

[0050] It can be understood that the technical solution provided by this application can be applied to various communication systems, such as: the fifth-generation (5G) mobile communication system or new radio access technology (NR), long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD), universal mobile telecommunication system (UMTS), etc. Moreover, the technical solution provided by this application can also be applied to future communication systems, such as the sixth-generation mobile communication system, etc.

[0051] In some embodiments, under the condition that user accounts have been logged in on both the master device and the extended device, and the privacy protocol for the intelligent interconnection function has been obtained and the intelligent networking recommendation function has been successfully subscribed, the master device can receive a networking policy, which is used to indicate which extended device the master device can establish a pre-connection with and what connection type.

[0052] It can be understood that the networking policy can be determined based on the system time of the master device, location, and historical interaction data between the master device and the extended device. The historical interaction data can include the historical interaction time, historical interaction location, historical connection type, etc. between the master device and the extended device. The networking policy can include information such as the device identifiers of one or more extended devices and the corresponding connection types. And, in some embodiments, the same extended device in the above networking policy can include different connection types.

[0053] For example, if the current system time of the master device is t1, the location of the master device is A1, the historical interaction time intervals between the master device and extended devices a and b both include t1, and the historical interaction locations between the master device and extended devices a and b both include A1, then it can be determined that the current master device meets the pre-connection condition. Further, it is determined that the historical connection type between the master device and extended device a is Bluetooth, and the historical connection type between the master device and extended device b is WLAN direct connection. Based on this, the networking policy can be determined, and the networking policy includes that the master device establishes a pre-connection with extended device a through Bluetooth, and the master device establishes a pre-connection with extended device b through WLAN direct connection.

[0054] As described above, after the master device establishes pre - connections with extension device a and extension device b respectively according to the networking policy, if the master device selects to use the device functions of extension device a but not those of control device b, the master device can directly use the device functions of control device a based on the pre - connection state with control device a. However, at the same time, the master device is also in a pre - connection state with extension device b, and the connection type is WLAN Direct with high power consumption. Keeping the pre - connection state between the master device and extension device b for a long time will cause high power consumption of the master device.

[0055] Therefore, to solve the above problems, the embodiment of the present application provides a networking method. This method obtains the usage probability of the master device establishing a pre - connection with an extension device and interacting based on a certain connection type, and determines whether the usage probability is greater than or equal to a probability threshold. Corresponding to the usage probability being greater than or equal to the probability threshold, it controls the master device to establish a pre - connection with the corresponding extension device through the corresponding connection type; corresponding to the usage probability being less than the probability threshold, it controls the master device not to establish a pre - connection with the corresponding extension device through the corresponding connection type. The above - mentioned usage probability can be determined by the interaction duration or the number of interactions of the master device establishing a pre - connection with an extension device through a certain connection type within a historical time period. The longer the interaction duration or the more the number of interactions within the historical time period, the higher the usage probability.

[0056] For example, the master device can obtain the first usage probability of the master device establishing a pre - connection with the first extension device and interacting through the first connection type through the networking policy. The first usage probability can be determined by the duration or the number of interactions of the master device after establishing a pre - connection with the first extension device through the first connection type within a historical time period. Among them, the longer the interaction duration or the more the number of interactions within the historical time period, the higher the above - mentioned first usage probability. Further, the master device can determine whether the first usage probability is greater than or equal to the first usage probability threshold. Corresponding to the first usage probability being greater than or equal to the first usage probability threshold, it controls the master device to establish a pre - connection with the first extension device through the first connection type; corresponding to the first usage probability being less than the first usage probability threshold, it controls the master device not to establish a pre - connection with the first extension device through the first connection type.

[0057] For another example, the master device can obtain the second usage probability that the master device establishes a pre-connection and interacts with the second extended device based on the second connection type through the networking policy. The second usage probability can be determined by the duration or number of times of interaction after the master device establishes a pre-connection with the second extended device through the second connection type within a historical time period. Further, the master device can determine whether the second usage probability is greater than or equal to the first usage probability threshold. Corresponding to the second usage probability being greater than or equal to the first usage probability threshold, control the master device to establish a pre-connection with the second extended device through the second connection type; corresponding to the second usage probability being less than the first usage probability threshold, control the master device not to establish a pre-connection with the second extended device through the second connection type.

[0058] In some embodiments of the present application, assume that the first connection type is Bluetooth, the first usage probability that the master device establishes a pre-connection and interacts with the first extended device through Bluetooth is x1, and the first usage probability threshold is x2, where x1 can be greater than or equal to x2, then the master device can be controlled to establish a pre-connection with the first extended device through Bluetooth.

[0059] In some embodiments of the present application, assume that the second connection type is WLAN direct connection, the second usage probability that the master device establishes a pre-connection and interacts with the second extended device through WLAN direct connection is x3, and the second probability threshold is x4, where x3 can be less than x4, then the master device can be controlled not to establish a pre-connection with the first extended device through WLAN direct connection.

[0060] As an example, Figure 2 According to an embodiment of the present application, a flowchart of a networking method is shown.

[0061] It can be understood that Figure 2 The execution subject of the shown process can be the master device, which can be an electronic device such as the mobile phone 10 in the scenario shown above. For the sake of simplicity of description, the execution subject will not be repeatedly described hereinafter when introducing Figure 1 the shown process. Figure 2 As shown, the process may include:

[0062] As Figure 2 shown, the process may include:

[0063] S201: Determine the first usage probability that the master device interacts with the first extended device through the first connection type according to historical data.

[0064] In some embodiments of the present application, the above historical data may include first historical data corresponding to the first expansion device. The first historical data may include: the total duration of interaction between the master device and the first expansion device through the first connection type within a historical time period, the total number of interactions between the master device and the first expansion device through the first connection type within the historical time period, and a first usage probability of the master device interacting with the first expansion device through the first connection type within the historical time period is determined based on the above total duration and / or total number of times.

[0065] It can be understood that the first usage probability can reflect the frequency of the master device and the first expansion device establishing a pre-connection and interacting within a historical time period.

[0066] It can be understood that if the total duration of interaction between the master device and the first expansion device through the first connection type within the historical time period is longer, or the total number of interactions between the master device and the first expansion device through the first connection type within the historical time period is larger, then the corresponding first usage probability of the master device and the first expansion device establishing a pre-connection and interacting through the first connection type is greater.

[0067] It can be understood that the usage probabilities of the master device and different expansion devices establishing pre-connections and interacting based on different connection types can be directly obtained based on a decision tree model. Specifically, historical interaction data between the master device and different expansion devices within a historical time period can be obtained, and this historical interaction data can be used as sample data to be input into the decision tree model for training. Furthermore, the usage probabilities corresponding to the master device and different expansion devices establishing pre-connections and interacting based on different connection types can be obtained. Among them, the decision tree model may include, but is not limited to, models such as ID3, C4.5, CART, random forest, GBDT, XGboost, LightGBM, LambdaMART, etc., and the present application does not limit this.

[0068] It can be understood that the historical time period may refer to the historical number of days N. N may for example be any positive integer, or may also be any positive integer greater than or equal to 7. For example, N may be 30, 60, 90, etc., and no specific limitation is made here.

[0069] It can be understood that the first connection type or the second connection type, etc. may include, without specific limitation, wireless communication types such as Wi-Fi connection, Wi-Fi P2P connection, Bluetooth connection, near field communication (NFC) connection, infrared (IR) connection, (ultrawideband, UWB) ultra-wideband connection, ZigBee connection, etc.

[0070] It can be understood that the above historical data may also include historical interaction data corresponding to other extended devices that have established a pre - connection with the master device and interacted, and specific limitations are not imposed here.

[0071] Correspondingly, the above first historical data may also include: at least one historical interaction time between the master device and the first extended device, at least one historical interaction location where the master device and the first extended device interacted, the historical connection type corresponding to the master device and the first extended device at each historical interaction time and / or each historical interaction location, etc., the device identifier of the first extended device, the name of the interaction event or the type of the interaction event, etc., and specific limitations are not imposed here.

[0072] It can be understood that within a period of historical interaction time, the master device and different extended devices may adopt one historical connection type or multiple historical connection types. At the same historical interaction location, the master device and different extended devices or the same extended device may adopt one historical connection type or multiple historical connection types, etc., and specific limitations are not imposed here.

[0073] S202: Determine whether the first usage probability is greater than or equal to the first usage probability threshold.

[0074] If the judgment result is yes, then proceed to S203 to control the master device and the first extended device to establish a pre - connection through the first connection type;

[0075] If the judgment result is no, then proceed to S204 to control the master device and the first extended device not to establish a pre - connection through the first connection type.

[0076] In some embodiments of the present application, after determining the first usage probability that the master device establishes a pre - connection and interacts with the first extended device through the first connection type, it can be further determined whether the first usage probability is greater than or equal to the first usage probability threshold.

[0077] In some other embodiments of the present application, after determining the first usage probability that the master device establishes a pre - connection and interacts with the first extended device through the first connection type, it can be further determined whether the first usage probability falls within the first usage probability range, and specific limitations are not imposed here.

[0078] S203: Control the master device and the first extended device to establish a pre - connection through the first connection type.

[0079] In some embodiments of the present application, after determining that the first usage probability is greater than or equal to the first usage probability threshold, the master device can establish a pre - connection with the first extended device through the first connection type.

[0080] In some other embodiments of the present application, when it is determined that the first usage probability is within the first usage probability range, the master device may establish a pre-connection with the first extended device through the first connection type.

[0081] S204: Control the master device and the first extended device not to establish a pre-connection through the first connection type.

[0082] In some embodiments of the present application, after it is determined that the first usage probability is less than the first usage probability threshold, the master device may not establish a pre-connection with the first extended device through the first connection type.

[0083] Through the above method, when determining whether the master device is to establish a pre-connection with the extended device based on a certain connection type, it is necessary to determine that the usage probability corresponding to the connection type is greater than or equal to the usage probability threshold, and then the master device will establish a pre-connection with the extended device through the corresponding connection type. Thus, when the usage probability of the connection type does not meet the conditions, the master device will not establish a pre-connection based on this connection type. If this connection type is a connection type with high power consumption, the master device can avoid the pre-connection power consumption caused by maintaining the pre-connection state with the corresponding extended device through this connection type without interacting with the extended device.

[0084] To better understand the technical solution of the embodiments of the present application, the following combines Figure 3 the shown flowchart to introduce in detail the process of the master device pre-establishing a communication connection with the extended device.

[0085] Figure 3 According to the embodiment of the present application, a specific flowchart of a networking method is shown. It can be understood that Figure 3 the execution subject of the shown process is the master device. For the sake of simplicity of description, the execution subject will not be repeatedly described hereinafter when introducing Figure 3 the shown process.

[0086] As Figure 3 shown, the process includes:

[0087] S301: Obtain configuration information.

[0088] In some embodiments of the present application, the master device may obtain configuration information through a cloud server, local storage, etc.

[0089] It can be understood that the configuration information can be used to indicate whether the master device is to establish a pre-connection according to the networking policy, and how the master device establishes a pre-connection.

[0090] It can be understood that the above configuration information may include different configuration levels that can be matched for different networking policies. The level of the configuration level can represent the frequency of networking. Each configuration level includes matching information and control information corresponding to the configuration level.

[0091] It can be understood that the matching information includes relevant parameters when the master device establishes a pre-connection in a historical period. The matching information is used to match with relevant information in the networking policy that can be matched with the matching information to determine the configuration level corresponding to the networking policy. The control information is used to indicate the conditions that need to be met when the master device establishes a pre-connection with the corresponding extended device.

[0092] For example, Table 1 shows a type of configuration information, which includes different matching information and different control information corresponding to different configuration levels.

[0093] Table 1

[0094]

[0095] Referring to Table 1, as an example, the configuration information may include configuration levels such as "L0" and "L1". Each configuration level may include matching information "scope" and control information "ploy". Among them, the matching information "scope" may include configuration items "dayProb", "avgTimes", "maxProb", "timeProb", and configuration values set for each configuration item.

[0096] Specifically, "dayProb" can represent the proportion of the number of days of networking within historical days, "avgTimes" can represent the average number of times of networking within historical days, "maxProb" can represent the maximum value of the proportion of the number of days of networking in the same period within historical days, and "timeProb" can represent the predicted probability of the networking period. The control information "ploy" may include "screen", "power", "applist", "linkProb", "keepDur". Specifically, "screen" can indicate that the master device needs to be in the screen-on state, "power:" can be used to indicate whether to accumulate the pre-connection duration of the master device, "applist" can represent the application package name, "linkProb" can represent the range of usage probabilities for pre-connection and interaction based on the corresponding connection type, and "keepDur" can represent the duration of a single pre-connection. It can be understood that in some other embodiments, if it is detected that the master device is in the black screen state, it can indicate that the master device is currently in a non-use state. Furthermore, the master device may not establish a pre-connection in the black screen display state, avoiding the connection power consumption caused by establishing a pre-connection in the black screen display state.

[0097] For example, in the matching information "scope" of the configuration level "L0":

[0098] The configured value of “dayProb” being [0.3, 1.0] can indicate that the proportion of days when the master device forms a network within the historical days needs to be within the range of [0.3, 1.0];

[0099] The configured value of “avgTimes” being 1 can indicate that the average number of times the master device forms a network within the historical days needs to be greater than or equal to 1;

[0100] The configured value of “maxProb” being 0.9 can indicate that the maximum proportion of days when the master device forms a network at the same time period within the historical days needs to be less than 0.9;

[0101] The configured value of “timeProb” being [0.60, 1] can indicate that the predicted probability of the network formation period corresponding to the master device needs to be within the range of [0.60, 1].

[0102] In addition, in the control information “ploy” of the configuration level “L0”:

[0103] The configured value of “screen” being 1 can indicate that the screen of the master device needs to be in the lit state when establishing a pre - connection;

[0104] The configured value of “power” being 2 can indicate that after the master device establishes a pre - connection, the pre - connection duration can be unrestricted by the maximum pre - connection duration. For example, if the maximum pre - connection duration is 360s, etc., the pre - connection duration can exceed 360s;

[0105] The configured value of “applist” being [“application package name”] can indicate that the master device can establish a pre - connection when entering the application corresponding to the package name in the application package name;

[0106] The configured value of “linkProb” being [0.5, 1] can indicate that the usage probability of the master device establishing a pre - connection and interacting with the extended device through a certain connection type needs to be within the range of [0.5, 1], or the usage probability needs to be greater than or equal to 0.5;

[0107] The configured value of “keepDur” being 360s can indicate the single - time pre - connection duration when the master device is in the pre - connection state.

[0108] For another example, in the matching information “scope” of the configuration level “L1”:

[0109] The configured value of “dayProb” being [0, 0.3] can indicate that the proportion of days when the master device forms a network within the historical days needs to be within the range of [0, 0.3];

[0110] The configured value of “avgTimes” being 1 can indicate that the average number of times the master device forms a network within the historical days needs to be greater than or equal to 1;

[0111] A configuration value of "maxProb" being 0.9 can indicate that the maximum proportion of networking days in the same period within the historical days for the master device needs to be less than 0.9;

[0112] A configuration value of "timeProb" being in the range of [0, 0.6] can indicate that the predicted probability of the networking period corresponding to the master device needs to be within the range of [0, 0.6].

[0113] In addition, in the control information "ploy" of the configuration level "L1":

[0114] A configuration value of "screen" being 1 can indicate that the screen of the master device needs to be in the lit state when establishing a pre - connection;

[0115] A configuration value of "power" being 1 can indicate that after the master device establishes a pre - connection, the pre - connection duration cannot be greater than the maximum pre - connection duration. For example, if the maximum pre - connection duration is 360s, etc., then the pre - connection duration cannot exceed 360s;

[0116] A configuration value of "applist" being ["application package name"] can indicate that the master device needs to establish a pre - connection when entering the application corresponding to the application package name;

[0117] A configuration value of "linkProb" being in the range of [0, 0.5] can indicate that the usage probability of the master device establishing a pre - connection and interacting with the extended device through a certain connection type needs to be within the range of [0, 0.5];

[0118] A configuration value of "keepDur" being 360s can indicate the single - time pre - connection duration when the master device is in the pre - connection state.

[0119] It can be understood that the values or ranges of the parameters in the matching information and control information in each of the above configuration levels are only exemplary descriptions. In some other embodiments, the parameters corresponding to the matching information and control information in different configuration levels can also be other values or ranges, which are not limited herein.

[0120] It can be understood that when defining the configuration information, "userGrade" can be used to represent the configuration information; when defining the maximum pre - connection duration, "totalDur" can be used to represent the maximum pre - connection duration, that is, the longest time for the master device and the extended device to maintain the pre - connection state. In addition, the naming or assignment of each parameter in the embodiments of the present application is only an exemplary description. In some other embodiments, the names or assignments of each parameter can also be other values, which are not specifically limited herein.

[0121] S302: Receive the networking policy, and match the networking policy with the corresponding information of the same type in the matching information and the matching information in the configuration information.

[0122] In some embodiments of the present application, the master device may receive a pre-networking notification, and the pre-networking notification may include a networking policy. When the master device receives the networking policy, it may match the networking policy with the matching information corresponding to different configuration levels in the configuration information in S301.

[0123] It can be understood that the networking policy may include: the percentage of days when the master device and the extended device successfully formed a network within a historical number of days "validDaysPercent", the average number of times the master device and the extended device formed a network within a historical number of days "validUseCnt", the maximum percentage of days when the master device and the extended device formed a network at the same time period within a historical number of days "maxSlotDaysPercent", the predicted probability of the networking time period between the master device and the extended device "timeProb", the usage probability "intentProb" of the extended device establishing a pre-connection with the master device through different connection types and interacting, etc. It can be understood that the networking policy may be provided to the master device in the form of a pre-networking notification, and no specific limitation is made here.

[0124] In some embodiments of the present application, the process of matching the networking policy with the matching information in the configuration information may include one or more of the following dimensions: determining whether the value corresponding to "validDaysPercent" in the networking policy is within the range of "dayProb" in the matching information, determining whether the value corresponding to "validUseCnt" in the networking policy is greater than or equal to "avgTimes" in the matching information, determining whether the value corresponding to "maxSlotDaysPercent" in the networking policy is less than or equal to "maxProb" in the matching information, determining whether the value corresponding to "timeProb" in the networking policy is within the range of "timeProb" in the matching information, etc., and no specific limitation is made here.

[0125] For example, Table 2 shows a pre-networking notification, and the pre-networking notification may include a networking policy.

[0126] Table 2

[0127]

[0128]

[0129] Referring to Table 2, as an example, the pre-networking notice may include, for example, the notice type "action" of the pre-networking notice, the business area "business" corresponding to the notice, the version number "version" of the notice, and the networking policy for matching with the matching information in the configuration information: the percentage of days when the master device and the extended device are successfully networked within the historical days "validDaysPercent", the average number of networkings of the master device and the extended device within the historical days "validUseCnt", the maximum percentage of days when the master device and the extended device are networked at the same time period within the historical days "maxSlotDaysPercent", the predicted probability of the networking time period of the master device and the extended device "timeProb", the usage probability of the extended device establishing a pre-connection with the master device through different connection types and interacting "intentProb", etc.

[0130] In addition, the networking policy may further include the duration of the service "dura", the start time of the service "startTime", the end time of the service "endTime", the "intentProb" object is for the mobile device "devType", the identifier of the extended device "ID", the duration of a single pre-connection of the service "keepDura", the time to wait for the execution of the pre-connection service "waitDura", etc.

[0131] For example, in the pre-networking notice:

[0132] The field corresponding to "action" is AiRegularNetwork, which may indicate that this notice is related to the intelligent network service;

[0133] The field corresponding to "business" is AiNetworking, which may indicate that the business area corresponding to this notice is intelligent network management;

[0134] The field corresponding to "version" is 1, which may indicate the version number of this notice;

[0135] The field corresponding to "dura" is 10, which may indicate that the duration of the service in this notice is 10s;

[0136] The field corresponding to "startTime" is 14:00:00, which may indicate that the start time of the service is 14:00:00;

[0137] The field corresponding to "endTime" is 14:02:00, which may indicate that the end time of the service is 14:02:00;

[0138] The field corresponding to "ID" is 508B686875376D27, which can represent that the identifier of the extended device is 508B686875376D27;

[0139] The field corresponding to "devType" is PHONE, which can represent that the intentProb object is for a mobile device (PHONE);

[0140] The field corresponding to "keepDura" is 15, which can represent that the duration of the service in this notification is 15s;

[0141] The field corresponding to "waitDura" is 15, which can represent that the time to wait for the pre-connection service to execute in this notification is 15s;

[0142] The field corresponding to "validDaysPercent" is 0.5, which can represent that the proportion of the days of network formation within the historical days is 0.5;

[0143] The field corresponding to "validUseCnt" is 100, which can represent that the average number of network formation times "validUseCnt" within the historical days is 100 times;

[0144] The field corresponding to "maxSlotDaysPercent" is 0.6, which can represent that the maximum proportion of the days of network formation in the same time period within the historical days is 0.6;

[0145] The field corresponding to "timeProb" is 0.5, which can represent that the prediction probability of this network formation period is 0.5;

[0146] The field corresponding to "intentProb" is P2PINVALID: 0.0925, which can represent that the probability of failed pre-connection established through P2P is 0.0922;

[0147] The field corresponding to "intentProb" is P2P 2.4G: 0.0922, which can represent that the usage probability of establishing a pre-connection and interacting through P2P 2.4G is 0.0922;

[0148] The field corresponding to "intentProb" is WLAN 5G: 0.0918, which can represent that the probability of failed pre-connection established through WLAN 5G is 0.0918;

[0149] The field corresponding to "intentProb" is Bluetooth Low Energy (BLE): 0.921, which can represent that the probability of failed pre-connection established through BLE is 0.921;

[0150] The field corresponding to "intentProb" is WLAN 5G: 0.0919, which can represent that the probability of establishing a pre-connection via WLAN 5G fails is 0.0919;

[0151] The field corresponding to "intentProb" is WLAN 2.4G: 0.0919, which can represent that the probability of establishing a pre-connection via WLAN 2.4G fails is 0.0919;

[0152] The field corresponding to "intentProb" is BR: 0915, which can represent that the probability of establishing a pre-connection via BR fails is 0.0915;

[0153] It can be understood that the above pre-networking notification includes some content of the networking policy. The networking policy also includes other extended devices that can establish pre-connections with the master device and corresponding connection types, etc., which are not specifically limited here.

[0154] S303: Determine whether the matching information in the networking policy matches the configuration information.

[0155] If the judgment result is yes, go to S304 to determine whether to enter the target application;

[0156] If the judgment result is no, return to S302.

[0157] In some embodiments of the present application, after obtaining the networking policy, it can be determined whether the matching information in the networking policy matches the configuration information.

[0158] For example, the determination can be made based on one or more of the following dimensions: determine whether the value corresponding to "validDaysPercent" in the networking policy is within the range of "dayProb" in the matching information; or, determine whether the value corresponding to "validUseCnt" in the networking policy is greater than or equal to "avgTimes" in the matching information; or, determine whether the value corresponding to "maxSlotDaysPercent" in the networking policy is less than or equal to "maxProb" in the matching information; or, determine whether the value corresponding to "timeProb" in the networking policy is within the range of "timeProb" in the matching information, which is not specifically limited here.

[0159] S304: Determine whether to enter the target application.

[0160] If the judgment result is yes, go to S305 to determine whether to perform the pre-connection service based on the control information;

[0161] If the judgment result is no, end this process.

[0162] In some embodiments of the present application, before performing a pre-connection service based on the control information in the configuration information, it is necessary to determine whether the master device is running the target application. It can be understood that the target application is the application corresponding to the application package name in the "applist" in the control information of the configuration information. For example, the target application may include audio applications, document display applications, etc., which are not specifically limited herein.

[0163] It can be understood that the application corresponding to the application package name in the "applist" can use the corresponding functions of the extended device based on the pre-connection established between the master device and the extended device.

[0164] S305: Determine whether to perform a pre-connection service based on the control information.

[0165] If the judgment result is yes, go to S306 and establish a pre-connection based on the control information in the configuration information;

[0166] If the judgment result is no, end this process.

[0167] In some embodiments of the present application, it is possible to determine whether to perform a pre-connection service based on the control information in the configuration information. For example, based on "screen": 1 in the control message, it means that it is necessary to determine whether the screen state of the master device is the lit state; based on "linkProb": [0, 0.6] in the control message, it means that it is necessary to determine whether the usage probability of different connection types in the networking policy is within the current range, or determine a usage probability threshold and determine whether the usage probability of different connection types in the networking policy is greater than or equal to the usage probability threshold.

[0168] S306: Perform a pre-connection based on the control information in the configuration information.

[0169] In some embodiments of the present application, if it is determined that the screen state of the master device is the lit state, and there is a connection type in the networking policy whose usage probability is within the "linkProb" range or greater than or equal to the probability threshold, then a pre-connection can be established between the master device and the corresponding extended device.

[0170] In some embodiments of the present application, if it is determined that the networking policy matches the matching information in the configuration information. For example, "validDaysPercent": 0.5 in the networking policy is within the range of "dayProb": [0.3, 1.0] in the matching information; "validUseCnt": 100 in the networking policy is greater than "avgTimes": 1 in the matching information; "maxSlotDaysPercent": 0.6 in the networking policy is less than "maxProb": 0.9 in the matching information; "timeProb" in the networking policy is within the range of "timeProb": [0.60, 1] in the matching information. Based on this, it can be determined that the networking policy matches the matching information in the configuration information, and the configuration level corresponding to the networking policy is determined to be "L0".

[0171] Further, obtain the control information "ploy" in "L0", and prepare to perform a pre-connection service according to the control information "ploy" corresponding to "L0". Exemplarily, prepare to perform a pre-connection service according to "screen": 1, "power": 2, "linkProb": [0, 1], "keepDur": 360 in the control information "ploy" in "L0". That is to say, when the master device is in the screen-on state, control the master device and the corresponding extended device to establish a pre-connection through the first connection type, where the first usage probability corresponding to the first connection type needs to be within "linkProb": [0, 1]. In addition, after the master device and the corresponding extended device establish a pre-connection through the first connection type, the pre-connection duration can exceed the maximum pre-connection duration of 360s.

[0172] For example, the networking policy includes extended device a and extended device b that can currently establish a pre-connection with the master device. The connection type corresponding to extended device a is BLE and the corresponding usage probability is 0.921. The connection type corresponding to extended device b is WLAN direct connection (such as including P2P2.4G, P2P5G) and the corresponding usage probability is . Then, corresponding to BLE and the corresponding usage probability of 0.921 is within the range of "linkProb": [0.5, 1] or 0.921 is greater than the probability threshold of 0.5, then the master device can be controlled to establish a pre-connection with extended device a based on the connection type BLE. And, corresponding to WLAN direct connection (such as including P2P2.4G, P2P5G) with the corresponding usage probability of 0.0921 is not within the range of "linkProb": [0.5, 1] or 0.0921 is less than the probability threshold of 0.5, then control the master device not to establish a pre-connection with extended device b based on the connection type WLAN direct connection (such as including P2P2.4G, P2P5G).

[0173] S307: Determine whether the pre - connection duration is greater than the pre - connection duration threshold.

[0174] If the judgment result is yes, go to S308 to determine whether to exit the target application;

[0175] If the judgment result is no, continue to execute S307.

[0176] In some embodiments of the present application, when the pre - connection between the master device and the extended device a is established, timing starts. If the pre - connection duration between the master device and the extended device a exceeds the pre - connection duration threshold "keepDur", for example, 360s. In some embodiments, the pre - connection duration threshold can be determined according to the maximum value of the pre - connection durations within the historical time period (i.e., the maximum pre - connection duration). In addition, in addition to judging whether the pre - connection duration is greater than the pre - connection duration threshold "keepDur", in some other embodiments, it can also be judged whether the pre - connection duration is greater than the maximum pre - connection duration "totalDur".

[0177] S308: Determine whether to exit the target application.

[0178] If the judgment result is yes, go to S309 to disconnect the pre - connection;

[0179] If the judgment result is no, continue to execute S308.

[0180] In some other embodiments of the present application, when the pre - connection between the master device and the extended device a is established, it can be detected in real - time whether the master device exits the target application. If the master device exits the target application.

[0181] It can be understood that the judgment order of S307 and S308 can be changed. For example, S308 can be executed before S307, or the judgment processes of S307 and S308 can also be executed synchronously, which is not specifically limited herein.

[0182] S309: Disconnect the pre - connection.

[0183] In some embodiments of the present application, when it is determined that the pre - connection duration for the master device and the extended device to maintain the pre - connection state is greater than the maximum pre - connection duration, and the master device and the corresponding extended device do not interact, the pre - connection between the master device and the corresponding extended device can be disconnected to reduce the connection power consumption of the master device.

[0184] In some embodiments of the present application, when it is determined that the master device exits the target application, the master device can be controlled to disconnect the pre - connection with the corresponding extended device to reduce the connection power consumption of the master device.

[0185] Based on this, it can be ensured that only when the usage probability of establishing a pre-connection and interacting with the first connection type by the master device and the extended device is greater than or equal to the probability threshold, will the master device establish a pre-connection with the extended device based on the corresponding connection type. When the usage probability of the connection type does not meet the condition, the master device will not establish a pre-connection based on this connection type. If this connection type is a connection type with relatively high power consumption, the master device can avoid the pre-connection power consumption caused by maintaining the pre-connection state with the corresponding extended device through this connection type without interacting with the extended device.

[0186] It can be understood that if the master device exits the target application, or the pre-connection duration between the master device and the corresponding extended device is greater than the maximum pre-connection duration and the master device and the corresponding extended device do not interact, the pre-connection between the master device and the extended device can be disconnected to reduce the connection power consumption of the master device.

[0187] The following introduces the software architecture of the electronic device in the embodiments of the present application with reference to the accompanying drawings. It can be understood that the electronic device can be an electronic device within a device group, that is, it can be a master device or an extended device.

[0188] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device.

[0189] Figure 4 According to the embodiments of the present application, a schematic diagram of the software structure of an electronic device is shown. The electronic device can refer to the master device mobile phone 10 etc. in the embodiments of the present application, and no specific limitation is made here.

[0190] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android TM system is divided into four layers, from top to bottom are the application layer, the application framework layer, the Android runtime, and the system library, and the kernel layer.

[0191] As Figure 4 shown, the application layer can include a series of application packages. The application packages can include applications such as a camera, a gallery, a calendar, a call, a map, a meeting, a WLAN, a Bluetooth, music, a video, an instant messaging, etc.

[0192] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.

[0193] As Figure 4 shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, system settings 41, system bluetooth 42, an interconnection module 43, a smart module 44, etc.

[0194] The system settings 41 can be used to monitor the user's operations and send system broadcasts to the smart module 44 and the interconnection module 43 to notify the smart module 44 and the interconnection module 43 to trigger events. For example, the trigger events may include entering a certain target application, etc.

[0195] The system bluetooth 42 can be used to discover extended devices.

[0196] It can be understood that in the android system, the system settings 41 and the system bluetooth 42 can be regarded as services of the application layer, also known as system services. The system settings 41 and the system bluetooth 42 can be used to configure and adjust various options and parameters of the electronic device. That is to say, these services can refer to the interfaces provided by the framework layer to the application layer for accessing and operating lower-level system functions. In the embodiments of the present application, the system settings 41 and the system bluetooth 42 can be used to implement functions such as event monitoring and broadcasting.

[0197] The smart module 44 can be used to obtain historical interaction data and determine a networking profile based on the historical interaction data. The smart module 44 can also be used to transmit a networking policy to the interconnection module 43 when the pre-connection condition is met.

[0198] It can be understood that the networking policy is a policy for instructing the master device to establish a pre-connection with an extended device based on a certain connection type.

[0199] The interconnection module 43 can be used to discover extended devices and complete device authentication, and establish a pre-connection with the extended device based on the networking policy. In addition, the interconnection module 43 can also be used to collect historical interaction data and transmit it to the smart module 44.

[0200] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0201] The content provider is used to store and obtain data and make these data accessible to application programs. These data may include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.

[0202] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.

[0203] The phone manager is used to provide the communication function of the electronic device. For example, the management of call status (including connection, hanging up, etc.).

[0204] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0205] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that the download is completed, message reminder, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as the notification of a background-running application, and can also be a notification that appears on the screen in the form of a dialogue window. For example, prompt text information in the status bar, emit a prompt sound, the electronic device vibrates, the indicator light flashes, etc.

[0206] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for the scheduling and management of the Android system.

[0207] The core libraries contain two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android.

[0208] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as the management of object life cycles, stack management, thread management, security and exception management, and garbage collection.

[0209] The system libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (such as: OpenGL ES), etc.

[0210] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0211] The media library supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0212] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, layer processing, etc.

[0213] The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.

[0214] Figure 5 According to an embodiment of the present application, a schematic diagram of an interaction process in which a master device determines how to pre-connect based on configuration information and networking policies is shown.

[0215] As Figure 5 shown, the process includes but is not limited to the following steps:

[0216] S501: The intelligent module 44 sends a networking policy to the interconnection module 43 to determine the start of the prediction period.

[0217] In some embodiments of the present application, after the intelligent module 44 detects that the master device meets the pre-connection conditions, it can send a networking policy to the interconnection module 43. For example, the networking policy can be the networking policy in S302 above.

[0218] It can be understood that the prediction period refers to the period during which the master device may establish a pre-connection. For example, if "startTime": "14:00:00" and "endTime": "14:02:00" in the networking policy, then this interval can represent the prediction period.

[0219] S502: The interconnection module 43 matches the networking policy with the configuration information to determine the connection policy for the master device to establish a pre-connection.

[0220] In some embodiments of the present application, the process of the interconnection module 43 matching based on the networking policy and the configuration information may include: obtaining "validDaysPercent", "validUseCnt", "maxSlotDaysPercent", and "timeProb" in the networking policy. Further, it is determined whether the value corresponding to "validDaysPercent" in the networking policy is within the range of "dayProb" in the matching information corresponding in the configuration information; it is determined whether the value corresponding to "validUseCnt" in the networking policy is greater than or equal to "avgTimes" in the matching information corresponding in the configuration information; it is determined whether the value corresponding to "maxSlotDaysPercent" in the networking policy is less than or equal to "maxProb" in the matching information; it is determined whether the value corresponding to "timeProb" in the networking policy is within the range to which "timeProb" in the matching information belongs. If one or more of them can be matched, the corresponding configuration level of the networking policy in the configuration information is determined.

[0221] For example, "validDaysPercent": 0.5 in the networking policy is within the range of "dayProb": [0.3, 1.0] in the matching information; "validUseCnt": 100 in the networking policy is greater than "avgTimes": 1 in the matching information; "maxSlotDaysPercent": 0.6 in the networking policy is less than "maxProb": 0.9 in the matching information; "timeProb" in the networking policy is within the range of "timeProb": [0.60, 1] in the matching information. Based on this, it can be determined that the networking policy matches the matching information in the configuration information, and the configuration level corresponding to the networking policy in the configuration information is determined to be "L0".

[0222] Further, the process by which the interconnection module 43 determines the connection policy for the master device to establish a pre-connection may include: according to the configuration level corresponding to the networking policy in the configuration information being "L0", obtaining the control information "ploy" in the configuration level "L0". Further, the connection policy for establishing the pre-connection is determined based on the control information in the configuration information. For example, based on "screen": 1, "power": 2, "linkProb": [0, 1], and "keepDur": 360 in the control information "ploy" in "L0", the connection policy for the master device to establish a pre-connection is determined as follows: the display screen of the master device needs to be in the on-screen state; the pre-connection duration of the master device is not limited by the maximum pre-connection duration "totalDur" and can exceed the maximum pre-connection duration "totalDur", such as 360 s; the usage probability of the connection type for the master device to establish a pre-connection needs to be within [0, 1].

[0223] S503: The interconnection module 43 sends a notification for monitoring the target application program to the system settings 41.

[0224] In some embodiments of the present application, after the interconnection module 43 matches based on the networking policy and the configuration information and determines the connection policy for establishing a pre-connection with the master device. Further, the interconnection module 43 may send a notification for monitoring the target application program to the system settings 41. The target application program may refer to the application program corresponding to the "applist": ["application package name"] in the configuration information. Monitoring the target application program refers to monitoring the startup and exit of the target application program, as well as the execution of the business of the target application program, etc., which is not specifically limited herein.

[0225] S504: The system settings 41 returns a notification that the target application program has been started to the interconnection module 43.

[0226] In some embodiments of the present application, when the system settings 41 monitors the startup of the target application program, it may send a notification that the target application program has been started to the interconnection module 43.

[0227] S505: The interconnection module 43 performs a pre-connection based on the corresponding control information in the configuration information.

[0228] In some embodiments of the present application, according to the notification that the target application program has been started returned by the system settings 41 in S504, the interconnection module 43 may establish a pre-connection between the master device and the corresponding extended device based on the corresponding connection type according to the control information corresponding to the configuration level "L0" determined in S502.

[0229] S506: The system settings 41 sends a notification to the interconnection module 43 that the target application program uses the service based on the P2P connection type.

[0230] In some embodiments of the present application, after the master device establishes a pre-connection with the corresponding extended device based on the corresponding connection type, the system settings 41 detects that the target application program uses the service based on the P2P connection type.

[0231] For example, the target application program in the master device is started, and the master device establishes a pre-connection with the extended device a through Bluetooth. Further, the master device executes the service corresponding to the target application program through the extended device a. Then the system settings 41 may detect that the master device performs the corresponding service of the target application program on the extended device a through Bluetooth. And the system settings 41 may send a notification to the interconnection module 43 that the target application program uses the service based on the P2P connection type.

[0232] S507: The interconnection module 43 increments the number of pre-connections established based on the P2P connection type by 1.

[0233] In some embodiments of the present application, based on detecting that the master device and the expansion device a establish a pre-connection via Bluetooth and there is service interaction based on the target application in S506, the interconnection module 43 can record that the number of successful pre-connections established by the master device with the corresponding expansion device based on the P2P connection type is incremented by 1.

[0234] S508: The system settings 41 send a notification to the interconnection module 43 that the target application has exited.

[0235] In some embodiments of the present application, when the system settings 41 detect that the target application in the master device has exited, the system settings 41 can send a notification that the target application has been closed to the interconnection module 43.

[0236] S509: The interconnection module 43 disconnects the pre-connection.

[0237] In some embodiments of the present application, when the interconnection module 43 receives the notification from the system settings 41 that the target application in the master device has exited, the interconnection module 43 can control to disconnect the pre-connection established by the master device with the expansion device a via BLE.

[0238] Thus, based on the fact that the target application in the master device has exited, it can be indicated that the need of the master device to use the expansion device a through the pre-connection to complete the service corresponding to the target application has ended, and then the pre-connection with the expansion device a can be timely disconnected to reduce the connection power consumption brought by the pre-connection.

[0239] S510: The interconnection module 43 detects the end of the prediction period, and for the P2P connection type for which the pre-connection has not been successfully established, increments the number of failed pre-connection attempts by 1.

[0240] In some embodiments of the present application, if the interconnection module 43 detects the end of the prediction period and the number of times the master device has not established a pre-connection with the corresponding expansion device based on the corresponding P2P connection type during the prediction period, then the number of failed pre-connection attempts based on the corresponding P2P connection type is incremented by 1.

[0241] Figure 6 An embodiment of the present application shows a schematic flow diagram of a master device obtaining and updating configuration information.

[0242] As Figure 6 shown, this process may include but is not limited to the following steps:

[0243] S601: The intelligent module 44 sends configuration information and networking policies to the interconnection module 43.

[0244] In some embodiments of the present application, when the master device is started, the intelligent module 44 can send a networking policy and configuration information to the interconnection module 43. The configuration information can be the configuration information in S301 above, etc., and the networking policy can be the networking policy in S302 above, etc., which are not specifically limited herein.

[0245] It can be understood that the configuration information provided by the intelligent module 44 to the interconnection module 43 can be the configuration information with the largest scope. The configuration information with the largest scope means that the configuration information includes multiple configuration levels, and different networking policies can match the corresponding configuration levels in this configuration information.

[0246] S602: The interconnection module 43 performs a pre-connection according to the networking policy and the configuration information, and determines the pre-connection result.

[0247] In some embodiments of the present application, the process of performing a pre-connection according to the networking policy and the configuration information and determining the pre-connection result can refer to S301 to S309 above, which will not be elaborated herein.

[0248] For example, the pre-connection result can be: The master device matches the corresponding level "L0" in the configuration information through the networking policy, and based on the control information corresponding to "L0", successfully establishes a pre-connection with the corresponding extended device a via Bluetooth at time t1 and location A1.

[0249] For another example, the pre-connection result can be: The master device matches the corresponding configuration level "L1" in the configuration information through the networking policy, but based on the control information corresponding to the configuration level "L1", fails to establish a pre-connection with the extended device b via Wi-Fi direct connection at time t1 and location A1.

[0250] It can be understood that the pre-connection result can include the configuration level matched by the master device through the networking policy, and whether the master device successfully establishes a pre-connection with the corresponding extended device based on the control information corresponding to the matched configuration level, etc.

[0251] It can be understood that the pre-connection result can correspondingly include a successful pre-connection or a failed pre-connection.

[0252] S603: The interconnection module 43 sends the pre-connection result to the intelligent module 44.

[0253] In some embodiments of the present application, based on the pre-connection result obtained by the interconnection module 43 in S602, the interconnection module 43 can send the pre-connection result to the intelligent module 44.

[0254] S604: The intelligent module 44 adjusts the configuration information according to the pre-connection result.

[0255] In some embodiments of the present application, after the intelligent module 44 receives the pre-connection result sent by the interconnection module 43, the intelligent module 44 can count the success rate of the current pre-connection and the historical pre-connection success rate of the same connection type. For example, calculate the sum of the number of successful pre-connections established via Bluetooth this time and the number of successful pre-connections established via Bluetooth historically, divided by the total number of pre-connections established via Bluetooth, to obtain the success rate of establishing a pre-connection via Bluetooth.

[0256] Furthermore, it can be determined whether the success rate of establishing a pre-connection based on Bluetooth reaches the expected success rate threshold (such as 90% etc.). If not, the range of each configuration item in the matching information corresponding to the configuration level in the configuration information can be reduced. For example, reduce the configuration value of the configuration item "dayProb" in the matching information of the configuration level "L0" from [0.3, 1.0] to [0.3, 0.6], or reduce the configuration value of "maxProb" from 0.9 to 0.5, or reduce the configuration value of "timeProb" from [0, 0.60] to [0, 0.5], etc., without specific limitations here.

[0257] In some other embodiments of the present application, after the intelligent module 44 obtains the pre-connection result, it can also determine whether the power consumption increment generated when establishing a pre-connection based on the control information corresponding to the configuration level in the configuration information for different connection types exceeds the preset power consumption increment threshold.

[0258] For example, if the main device establishes a pre-connection with the corresponding extended device via Bluetooth according to the control information corresponding to the configuration level "L0", and the corresponding power consumption increment exceeds the preset power consumption increment threshold, the range of each configuration item in the matching information corresponding to the configuration level in the configuration information can be reduced. For example, reduce the configuration value of the configuration item "dayProb" in the matching information "scope" of the configuration level "L0" from [0.3, 1.0] to [0.3, 0.6], or reduce the configuration value of "maxProb" from 0.9 to 0.5, or reduce the configuration value of "timeProb" from [0, 0.60] to [0, 0.5], etc., without specific limitations here.

[0259] It can be understood that the above process of adjusting the configuration information by taking the matching information corresponding to the configuration level "L0" as an example is only an illustrative description. In some other embodiments, for the scenario of establishing a pre-connection with the control information corresponding to other configuration levels corresponding to the pre-connection result, the range of the configuration items in the matching information of other configuration levels can be adjusted accordingly, without specific limitations here.

[0260] It can be understood that if there are significant differences in the pre - connection success rates of different connection types, the range of control items in the control information "ploy" in the corresponding configuration level can be modified. For example, if the success rate of establishing a pre - connection via Bluetooth based on the control information corresponding to the configuration level "L0" is much higher than that of establishing a pre - connection via Wi - Fi Direct based on the control information corresponding to the configuration level "L0", then the range of control items in the control information "ploy" corresponding to "L0" can be reduced.

[0261] S605: The intelligent module 44 sends the adjusted configuration information to the interconnection module 43.

[0262] In some embodiments of the present application, the intelligent module 44 can send the adjusted configuration information to the interconnection module 43. Thus, when the master device next determines the configuration level corresponding to the networking policy in the configuration information, the interconnection module 43 can determine the configuration level corresponding to the networking policy based on the adjusted configuration information, and then establish a pre - connection through the control information corresponding to the matched configuration level.

[0263] Exemplarily, Figure 7 According to an embodiment of the present application, a schematic structural diagram of an electronic device 100 is shown.

[0264] As Figure 7 shown, the electronic device 100 may include a processor 110, a memory 120, an interface module 130, a power module 140, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a key 190, a camera 191, a display screen 192, etc.

[0265] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.

[0266] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0267] In some embodiments, the processor 110 may be used to execute the networking method provided in the embodiments of this application.

[0268] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0269] The interface module 130 may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0270] The power module 140 is connected to the processor 110 to supply power to the processor 110, the memory 120, the camera 191, the display screen 192, the mobile communication module 150, etc.

[0271] The wireless communication function of the electronic device 100 can be implemented by the mobile communication module 150, the wireless communication module 160, antennas, modulation and demodulation processors, baseband processors, etc.

[0272] The wireless communication module 160 can provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (such as Wi-Fi networks), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology, etc.

[0273] In some embodiments, the wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TDSCDMA), LTE, NR, BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0274] In some embodiments, the master device and the expansion device can establish a communication connection through wireless communication technologies.

[0275] The mobile communication module 150 can provide solutions for wireless communications applied to the electronic device 100, including 2G / 3G / 4G / 5G, etc. In some embodiments, the master device and the expansion device can also establish a communication connection through mobile communication technologies.

[0276] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals.

[0277] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0278] The electronic device 100 implements a display function through a GPU, a display screen 192, an application processor, etc.

[0279] The display screen 192 is used to display images, videos, etc. The display screen 192 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-Led, a Micro-Led, a Micro-Oled, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 192, where N is a positive integer greater than 1.

[0280] The electronic device 100 can implement a shooting function through an ISP, a camera 191, a video codec, a GPU, a display screen 192, an application processor, etc.

[0281] The camera 191 is used to capture a static image or video.

[0282] The memory 120 can be used to store computer-executable program codes, and the executable program codes include instructions. The memory 120 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.). In addition, the memory 120 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the memory 120 and / or the instructions stored in the memory provided in the processor.

[0283] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys or touch keys.

[0284] In some embodiments, a computer-readable storage medium is also provided. At least one instruction, at least one segment of program, a code set or an instruction set is stored in the computer-readable storage medium. The at least one instruction, at least one segment of program, code set or instruction set is loaded and executed by a processor to implement the networking method provided in each of the above method embodiments.

[0285] In some embodiments, a program product is also provided. The program product includes instructions, and when the instructions are executed by an electronic device, the electronic device can implement the networking method provided in the embodiments of the present application.

[0286] The embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system. The programmable system includes at least one processor, a storage system (including volatile and non-volatile memories and / or storage elements), at least one input device, and at least one output device.

[0287] The program code can be applied to input instructions to execute the various functions described in the present application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purpose of the present application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0288] The program code can be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system. When needed, the program code can also be implemented in an assembly language or a machine language. In fact, the mechanisms described in this application are not limited to the scope of any specific programming language. In any case, the language can be a compiled language or an interpreted language.

[0289] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried or stored on one or more transient or non-transient machine-readable (e.g., computer-readable) storage media, which can be read and executed by one or more processors. For example, the instructions can be distributed via a network or via other computer-readable media. Thus, machine-readable media can include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to, floppy disks, optical disks, optical discs, CD-ROMs, magneto-optical disks, read only memory (ROM), random access memory (RAM), erasable programmable read only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic or optical cards, flash memory, or tangible machine-readable memories for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) in electrical, optical, acoustic, or other forms via the Internet. Thus, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0290] In the drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and / or order than shown in the illustrative drawings. Additionally, including a structural or method feature in a particular figure does not imply that such a feature is required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0291] It should be noted that each unit / module mentioned in the embodiments of the present application is a logical unit / module. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or can be implemented by a combination of multiple physical units / module. The physical implementation manner of these logical units / modules itself is not the most important. The combination of the functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application. This does not mean that there are no other units / modules in the above device embodiments.

[0292] It should be noted that in the examples and the description of this patent, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising one" does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0293] Although the present application has been illustrated and described by referring to some preferred embodiments of the present application, those of ordinary skill in the art should understand that various changes can be made in form and detail without departing from the spirit and scope of the present application.

Claims

1. A networking method, characterized in that: Applied to electronic equipment, the method includes: Determining a first usage probability of the electronic device establishing a pre-connection and interacting with the extension device through the first connection type based on historical data, wherein the historical data includes an interaction duration and a number of interactions between the electronic device and the extension device through the first connection type within a historical time period; determining whether the first usage probability is greater than or equal to a first usage probability threshold; corresponding to the first usage probability being greater than or equal to a first usage probability threshold, controlling the electronic device to establish a pre-connection with the extension device through a first connection type; Corresponding to the first usage probability being less than a first usage probability threshold, controlling the electronic device and the extension device not to establish a pre-connection based on the first connection type.

2. The method according to claim 1, characterized in that The step of controlling the electronic device to establish a pre-connection with the extension device through a first connection type corresponding to the first usage probability being greater than or equal to a first usage probability threshold further includes: Determining whether the electronic device is in a screen-on state; Corresponding to the electronic device being in a screen-on state, controlling the electronic device to establish a pre-connection with the extension device through a first connection type.

3. The method according to claim 1, characterized in that The step of controlling the electronic device to establish a pre-connection with the extension device based on a first connection type corresponding to the first usage probability being greater than or equal to a first usage probability threshold further includes: Obtaining a first application package name set based on first configuration information, and determining whether the electronic device starts the first application, wherein the first application is an application corresponding to a package name in the first application package name set, and the first configuration information is information for guiding the electronic device to establish a pre-connection; In response to the electronic device launching the first application and the first usage probability being greater than or equal to a first usage probability threshold, the electronic device is controlled to establish a pre-connection with the extension device based on a first connection type.

4. The method according to claim 3, characterized in that The acquiring of a first application package name set based on the first configuration information and determining whether the electronic device starts the first application further includes: Corresponding to the electronic device not starting the first application, the electronic device and the extension device are controlled not to establish a pre-connection based on the first connection type.

5. The method according to claim 3, characterized in that The step of controlling the electronic device to establish a pre-connection with the extension device based on a first connection type in response to the electronic device launching the first application and the first usage probability being greater than or equal to a first usage probability threshold further includes: Determining whether the electronic device exits the first application; In response to the electronic device exiting the first application, the electronic device disconnects the pre-connection established with the extension device based on the first connection type.

6. The method according to claim 5, characterized in that The step of controlling the electronic device and the extension device not to establish a pre-connection based on the first connection type corresponding to the first usage probability being less than a first usage probability threshold further includes: Obtaining a first duration for establishing a pre-connection between the electronic device and the extension device based on the first connection type, and determining whether the first duration is greater than a first pre-connection duration threshold; Corresponding to the first duration being greater than a first pre-connection duration threshold, the electronic device disconnects the pre-connection established with the extension device based on the first connection type.

7. The method according to claim 1, characterized in that The method for determining the first usage probability threshold includes: Receiving a first networking strategy, wherein the first networking strategy includes a first pre-connection probability, the first pre-connection probability indicating a probability of the electronic device establishing a pre-connection through a first connection type within a first time period; Obtaining first configuration information, wherein the first configuration information includes first matching information, the first matching information is used to match corresponding information in the first networking policy, and the first matching information includes a first pre-connection probability threshold; The first configuration information includes first control information, the first control information includes a first usage probability threshold, corresponding to the first pre-connection probability being greater than or equal to the first pre-connection probability threshold, and the first usage probability threshold is determined based on the first control information.

8. The method according to claim 7, characterized in that The method for determining the first usage probability threshold further includes: Obtaining the first networking days ratio, the first average networking times, and the maximum value of the networking days ratio in the first period for the first historical period included in the first networking strategy, wherein the first historical period includes historical days; The first matching information further includes a first networking days proportion threshold, a first average networking times threshold, and a first time period networking days proportion maximum threshold; Corresponding to any one or more of the following conditions: the proportion of the first networking days is greater than or equal to the first networking days proportion threshold, the first average networking times is greater than or equal to the first average networking times threshold, and the maximum proportion of the networking days in the first time period is less than or equal to the maximum proportion of the networking days in the first time period threshold, the first usage probability threshold is determined based on the first configuration information.

9. An electronic device, characterized in that: include: A processor and a memory, the memory including physical memory and external memory, for storing instructions executed by one or more processors of the electronic device; And, a processor, configured to execute the instructions so that the electronic device implements the networking method according to any one of claims 1 to 8.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a terminal device, the terminal device implements the networking method according to any one of claims 1 to 8.

11. A computer program product, characterized in that The computer program comprises a computer program / instruction. When the computer program product is run on an electronic device, the electronic device implements the networking method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for selecting network connection and data processing system

    CN101212381A

  • Control method of rapid connection and data transmission among devices

    CN104680213A

  • Establishment method and device for wireless communication connection

    CN107484169A

  • Mobile communication method and device, terminal and storage medium

    CN111479219A

  • Healthy cabin, network selection method and device thereof and storage medium

    CN113225233A