[go: up one dir, main page]

WO2024140122A1 - Connection management method, apparatus, and system for electronic device - Google Patents

Connection management method, apparatus, and system for electronic device Download PDF

Info

Publication number
WO2024140122A1
WO2024140122A1 PCT/CN2023/137532 CN2023137532W WO2024140122A1 WO 2024140122 A1 WO2024140122 A1 WO 2024140122A1 CN 2023137532 W CN2023137532 W CN 2023137532W WO 2024140122 A1 WO2024140122 A1 WO 2024140122A1
Authority
WO
WIPO (PCT)
Prior art keywords
wireless communication
communication connection
electronic device
partition
connection
Prior art date
Application number
PCT/CN2023/137532
Other languages
French (fr)
Chinese (zh)
Inventor
张亮
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024140122A1 publication Critical patent/WO2024140122A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release
    • H04W76/34Selective release of ongoing connections
    • H04W76/36Selective release of ongoing connections for reassigning the resources associated with the released connections

Definitions

  • the life cycle of the first wireless communication connection is about to expire, so the first wireless communication connection is disconnected, which will not affect the service transmission of the third electronic device. It can also ensure that electronic devices in need can establish wireless communication connections, ensure service transmission, and improve resource utilization.
  • the attribute of the first wireless communication connection includes a remaining duration of a life cycle of the first wireless communication connection, and the remaining duration of the life cycle of the first wireless communication connection is less than a remaining duration of a life cycle of any other wireless communication connection in the established wireless communication connections; or,
  • the attributes of the first wireless communication connection include that the first wireless communication connection belongs to a cold partition, a frequency of transmission data of the wireless communication connection located in the cold partition is less than a frequency of transmission data of the wireless communication connection located outside the cold partition, and/or The duration of non-transmitted data of the wireless communication connection in the cold partition is longer than the duration of non-transmitted data of the wireless communication connection outside the cold partition.
  • the information of the first wireless communication connection is deleted from the cold partition, and the information of the second wireless communication connection is added to the cold partition.
  • the information of the first wireless communication connection is deleted from the cold partition, and the information of the second wireless communication connection is added to the cold partition, including: deleting the information of the first wireless communication connection from the tail node of the cold partition, and adding the information of the second wireless communication connection to the head node of the cold partition.
  • the method further includes:
  • the method further includes:
  • the remaining duration of the life cycle of the fourth wireless communication connection is increased by the second duration threshold; when the fourth wireless communication connection located in the cold partition performs data transmission for the i+1-th time within its life cycle, the remaining duration of the life cycle of the fourth wireless communication connection is increased by the third duration threshold; the third duration threshold is greater than the second duration threshold;
  • the first electronic device When the third electronic device requests to establish a wireless communication connection with the first electronic device, the first electronic device establishes the first wireless communication connection with the third electronic device according to the saved connection parameters of the first wireless communication connection.
  • connection parameters of the forced disconnection are saved, and when needed later, the connection parameters can be used to quickly establish a connection, reducing the connection establishment process and improving processing efficiency.
  • a computer-readable storage medium which stores a computer program (also referred to as code, or instruction) which, when executed on a computer, enables the computer to execute a method in any possible design of the second aspect.
  • a computer program also referred to as code, or instruction
  • a computer program product comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible design of the second aspect.
  • a computer program also referred to as code, or instruction
  • the present application also provides a chip, which is used to read a computer program stored in a memory and execute any of the above aspects and possible methods for designing electronic devices to execute.
  • the present application further provides a chip system, which includes a processor for supporting a computer device to implement any of the above aspects and possible methods for designing electronic devices to execute.
  • the chip system also includes a memory, which is used to store programs and data necessary for the computer device.
  • the chip system can be composed of a chip, or it can include a chip and other discrete devices.
  • FIG1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application.
  • FIG2 is a software structure block diagram of an electronic device provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of the structure of a connection management system provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of a possible scenario provided by an embodiment of the present application.
  • FIG5 is a schematic diagram of hot and cold zones provided in an embodiment of the present application.
  • FIG6B is another schematic diagram of hot and cold zones provided in an embodiment of the present application.
  • FIG6C is another schematic diagram of hot and cold zones provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of changes in hot and cold zones in the third embodiment of the present application.
  • FIG11 is a schematic diagram of changes in hot and cold zones in the fourth embodiment of the present application.
  • FIG12 is a schematic diagram of hot and cold partitions in a linked list manner provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of the change of hot and cold partitions in a linked list manner provided in an embodiment of the present application.
  • FIG. 15 is a schematic diagram of the structure of a first electronic device 1500 provided in an embodiment of the present application.
  • FIG16 is a schematic diagram of a service execution process provided in an embodiment of the present application.
  • the electronic devices involved in this application may be mobile phones, tablet computers, wearable devices (e.g., watches, bracelets, smart helmets, smart glasses, etc.), vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), smart fitness equipment, etc. Smart fitness equipment, such as treadmills, rowing machines, etc.
  • the electronic devices involved in this application may also be smart home appliances, such as televisions, printers, sweeping robots, smart curtains, speakers, digital players, air conditioners, refrigerators, smart ovens, smart microwave ovens, smart washing machines, set-top boxes, TV shells, game consoles, portable cameras, electronic photo frames, smart cameras, etc.
  • the electronic devices involved in this application may also be smart medical devices, such as blood pressure monitors, smart thermometers, navigation equipment, entertainment equipment, etc.
  • Exemplary embodiments of electronic devices include but are not limited to Harmony Or electronic devices with other operating systems.
  • the electronic devices involved in this application have the ability to establish connections with other electronic devices, such as Bluetooth communication connection, short-range wireless communication connection, wireless communication connection, etc.
  • the wireless communication connection may be, for example, a WLAN connection or an Ethernet (Ethernet, Eth) connection.
  • FIG1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • a memory may also be set in the processor 110 for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation system
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as pictures and videos are saved in the external memory card.
  • the sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C, etc.
  • the application layer may include a series of application packages. As shown in FIG2 , the application layer may include a camera, settings, a skin module, a user interface (UI), a third-party application, etc. Among them, the third-party application may include a gallery, a calendar, calls, maps, navigation, WLAN, Bluetooth, music, video, short messages, etc. In an embodiment of the present application, the application layer may include a target installation package of a target application that the electronic device requests to download from a server, and the function files and layout files in the target installation package are adapted to the electronic device.
  • UI user interface
  • the third-party application may include a gallery, a calendar, calls, maps, navigation, WLAN, Bluetooth, music, video, short messages, etc.
  • the application layer may include a target installation package of a target application that the electronic device requests to download from a server, and the function files and layout files in the target installation package are adapted to the electronic device.
  • the application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer.
  • the application framework layer may include some predefined functions. As shown in FIG2 , the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • 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 screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying images, etc.
  • the view system can be used to build applications.
  • a display interface can be composed of one or more views.
  • a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
  • the notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, 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 notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • an embodiment of the present application provides a connection management method for an electronic device.
  • the method is applicable to a system including multiple electronic devices. See Figure 3, which is a schematic diagram of the structure of a connection management system provided in an embodiment of the present application.
  • the connection management system includes a first electronic device 300 and m second electronic devices 400 that can establish a wireless communication connection with the first electronic device.
  • the m second electronic devices are respectively referred to as second electronic devices 4001-second electronic devices 400m, as shown in Figure 3.
  • m is a positive integer.
  • a second electronic device that can establish a wireless communication connection with the first electronic device 300 may be a second electronic device located within the communication range of the first electronic device 300.
  • the one with the shortest remaining life cycle may be selected.
  • the life cycle may be that each wireless communication connection has a life cycle.
  • the life cycle may also be extended after each transmission task is executed.
  • the number of wireless communication connections that the first electronic device 300 has established with other electronic devices reaches the maximum threshold of the wireless communication connection that the first electronic device supports to establish, and the first electronic device 300 can disconnect the wireless communication connection with one of the second electronic devices 4001 to 4004. Then the first electronic device 300 can establish a wireless communication connection with the second electronic device 4005. For example, the first electronic device 300 disconnects the wireless communication connection 3 with the second electronic device 4003.
  • the first electronic device 300 can also select other wireless communication methods for the second electronic device 4003 to establish a connection according to the wireless communication capabilities supported by the second electronic device 4003.
  • the wireless communication connection with the longest idle time in the hot partition may be moved from the hot partition to the cold partition.
  • FIG6C is another schematic diagram of hot and cold partitions provided for an embodiment of the present application.
  • the cold partition includes wireless communication connection 1-wireless communication connection 2.
  • the hot partition includes wireless communication connection 3-wireless communication connection 5.
  • the idle time of the wireless communication connection 5 of the hot partition reaches the second set time, and the wireless communication connection 5 is moved from the hot partition to the cold partition, as shown in FIG6C .
  • the number of times the wireless communication connection 1 of the cold partition performs the transmission task within the third set time is 2 times (or 1 time), and the wireless communication connection 1 can be moved from the cold partition to the hot partition, as shown in FIG6C .
  • the third set time is less than or equal to the second set time.
  • the wireless communication connection belonging to the cold partition and the hot partition can be determined according to the number of transmission tasks of the wireless communication connection within a set time period and the time period without data transmission.
  • ⁇ t2 2 ⁇ t1
  • ⁇ t3 3 ⁇ t1
  • connection of a hot partition is changed to a cold partition and the connection of a cold partition is changed to a hot partition can adopt the above-mentioned method three or method four, and the details are not repeated here.
  • connection parameters of the disconnected wireless communication connection 5 can be cached, as shown in Figure 14.
  • the second electronic device 4005 needs to transmit data with the first electronic device 300, and the first electronic device can quickly establish a wireless communication connection 5 with the second electronic device 4005 according to the saved connection parameters.
  • the manner in which the agent module 1503 disconnects the wireless communication connection is as described above, which will not be described in detail here.
  • the cold partition and the hot partition mentioned above are managed by the agent module 1503 .
  • a connection management method for an electronic device provided in an embodiment of the present application is applied to a first electronic device.
  • the method includes:
  • the established wireless communication connections include a first wireless communication connection established between the first electronic device and a third electronic device, and the first request is a request for a second electronic device to establish a second wireless communication connection with the first electronic device or a request for the second electronic device to transmit business data with the first electronic device using the second wireless communication connection.
  • the first electronic device disconnects the first wireless communication connection with the third electronic device, and establishes a second wireless communication connection with the second electronic device.
  • the attribute of the first wireless communication connection includes a duration of no data transmission for the first wireless communication connection, and the duration of no data transmission for the first wireless communication connection is greater than a duration of no data transmission for any other wireless communication connection in the established wireless communication connection.
  • the attribute of the first wireless communication connection includes that the first wireless communication connection belongs to a cold partition.
  • the frequency of transmitted data of the wireless communication connection located in the cold partition is less than the frequency of transmitted data of the wireless communication connection located outside the cold partition, and/or the duration of non-transmitted data of the wireless communication connection located in the cold partition is greater than the duration of non-transmitted data of the wireless communication connection located outside the cold partition.
  • the present application also provides an electronic device, which includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes the functions performed by the electronic device in each method described in the embodiments of the present application.
  • the present application also provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which enables a computer to execute the methods described in the embodiments of the present application when the computer program is executed.
  • a computer program also referred to as code, or instructions
  • the present application further provides a computer-readable storage medium, in which a computer program is stored.
  • a computer program is stored.
  • the computer program executes the methods described in the embodiments of the present application.
  • the present application provides a chip system, which includes a processor for supporting a computer device to implement the methods described in the embodiments of the present application.
  • the chip system also includes a memory, which is used to store the necessary programs and data for the computer device.
  • the chip system can be composed of a chip, or it can include a chip and other discrete devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A connection management method, apparatus, and system for an electronic device, which relate to the technical field of smart terminals and enable the connection requirements of other electronic devices to be met when the number of wireless communication connections allowed to be established by an electronic device is limited. When a certain electronic device must establish a wireless communication connection with a first electronic device, if the number of wireless communication connections of the first electronic device has reached a threshold, the first electronic device may, according to an attribute of an established wireless communication connection, for example, the duration of non-transmitted data, the frequency of transmission data or the like, select an electronic device to be disconnected, and then establish a connection with the required electronic device. The resource utilization rate is further improved when multi-connection requirements of a service of the electronic device is met. In addition, according to the present application, cold and heat management for wireless communication connections is further proposed, dynamic wireless connection management capabilities are provided, and an idle connection is accurately found to be disconnected when required.

Description

一种电子设备的连接管理方法、装置及系统A method, device and system for connection management of electronic equipment
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求在2022年12月26日提交中华人民共和国知识产权局、申请号为202211673033.3、发明名称为“一种电子设备的连接管理方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the Intellectual Property Office of the People's Republic of China on December 26, 2022, with application number 202211673033.3 and invention name "A connection management method, device and system for electronic devices", the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及智能终端技术领域,特别涉及一种电子设备的连接管理方法、装置及系统。The present application relates to the field of intelligent terminal technology, and in particular to a connection management method, device and system for electronic devices.
背景技术Background technique
随着分布式业务的演进,对多个电子设备互联的诉求越来越强烈。比如,手机通过蓝牙、无线保真(wireless fidelity,Wi-Fi)等连接多台音箱,组成分布式立体声,以形成更丰富的影音娱乐体验。再比如,手机通过多个摄像头采集的图像显示在一个屏幕上等等。With the evolution of distributed services, the demand for interconnection of multiple electronic devices is becoming stronger and stronger. For example, a mobile phone can connect to multiple speakers through Bluetooth, wireless fidelity (Wi-Fi), etc. to form a distributed stereo to create a richer audio and video entertainment experience. Another example is that the images collected by multiple cameras on a mobile phone are displayed on one screen, etc.
多个电子设备之间可以通过分布式软总线来建立会话连接,建立会话连接后,可以通过分布式软总线来传输分布式的业务数据。但是目前一个电子设备允许连接的其它电子设备的数量的限制,导致有需求的电子设备无法再与该电子设备连接,使得无法满足业务对多连接的诉求。Multiple electronic devices can establish a session connection through a distributed soft bus. After the session connection is established, distributed business data can be transmitted through the distributed soft bus. However, the current limit on the number of other electronic devices that an electronic device can connect to means that electronic devices with demand cannot connect to the electronic device, making it impossible to meet the business demand for multiple connections.
发明内容Summary of the invention
本申请实施例提供一种电子设备的连接管理方法、装置及系统,在电子设备允许建立的无线通信连接有数量限制的情况下,来满足其它电子设备的连接需求,使得满足业务对多连接的需求。The embodiments of the present application provide a connection management method, device and system for an electronic device, which can meet the connection requirements of other electronic devices when the number of wireless communication connections allowed to be established by the electronic device is limited, so as to meet the business requirements for multiple connections.
第一方面,本申请实施例提供一种连接管理系统,包括第一电子设备、第二电子设备以及已与所述第一电子设备建立无线通信连接的多个其它电子设备;所述多个其它电子设备包括第三电子设备,所述第一电子设备与所述第三电子设备建立有第一无线通信连接;所述第一电子设备,用于:响应于第一请求,确定所述第一电子设备上已建立的无线通信连接的数量达到阈值,所述第一请求为第二电子设备与所述第一电子设备建立第二无线通信连接的请求或者所述第二电子设备与所述第一电子设备利用所述第二无线通信连接进行业务数据传输的请求;根据所述第一无线通信连接的属性,断开与所述第三电子设备之间的所述第一无线通信连接,并建立与所述第二电子设备之间的第二无线通信连接;所述第二电子设备,用于与所述第一电子设备建立所述第二无线通信连接。In a first aspect, an embodiment of the present application provides a connection management system, comprising a first electronic device, a second electronic device, and a plurality of other electronic devices that have established a wireless communication connection with the first electronic device; the plurality of other electronic devices comprises a third electronic device, the first electronic device having established a first wireless communication connection with the third electronic device; the first electronic device is used to: in response to a first request, determine that the number of established wireless communication connections on the first electronic device has reached a threshold, the first request being a request for the second electronic device to establish a second wireless communication connection with the first electronic device or a request for the second electronic device to use the second wireless communication connection to transmit business data with the first electronic device; according to the attributes of the first wireless communication connection, disconnect the first wireless communication connection with the third electronic device, and establish a second wireless communication connection with the second electronic device; the second electronic device is used to establish the second wireless communication connection with the first electronic device.
本申请实施例提供的方案中,在某个电子设备需要与第一电子设备建立无线通信连接的情况下,如果该第一电子设备的无线通信连接的数量已经达到阈值时,第一电子设备可以根据已建立的无线通信连接的数量,来选择一个电子设备断开连接,进而与该有需求的电子设备建立连接,保证该电子设备的业务需求。In the solution provided by the embodiment of the present application, when an electronic device needs to establish a wireless communication connection with a first electronic device, if the number of wireless communication connections of the first electronic device has reached a threshold, the first electronic device can select an electronic device to disconnect based on the number of established wireless communication connections, and then establish a connection with the electronic device in need, so as to ensure the business needs of the electronic device.
在一种可能的设计中,第一请求可以第二电子设备请求与第一电子设备建立无线通信连接时发送给第一电子设备。第一请求也可以是第二电子设备请求向第一电子设备进行业务数据传输时发出的。In a possible design, the first request may be sent to the first electronic device when the second electronic device requests to establish a wireless communication connection with the first electronic device. The first request may also be sent when the second electronic device requests to transmit business data to the first electronic device.
第一请求也可以是用户在第一电子设备执行操作,以请求与第二电子设备建立无线通信连接时产生的。第一请求也可以是用户在第一电子设备执行操作,以请求向第二电子设备传输业务数据时产生的。The first request may also be generated when the user performs an operation on the first electronic device to request to establish a wireless communication connection with the second electronic device. The first request may also be generated when the user performs an operation on the first electronic device to request to transmit service data to the second electronic device.
例如,业务可以包括分布式剪切板、调试监控服务系统(dalvik debug monitor server,DDMS)同步、分享(share)、超级桌面、无线投屏、分布式剪切板、生产力桌面或者系统服务同步等等。For example, services may include distributed clipboard, dalvik debug monitor server (DDMS) synchronization, Sharing, super desktop, wireless screen projection, distributed clipboard, productivity desktop or system service synchronization, etc.
在一种可能的设计中,所述第一无线通信连接的属性包括所述第一无线通信连接的未传输数据的时长,所述第一无线通信连接的未传输数据的时长大于所述已建立的无线通信连接中其它任一无线通信连接的未传输数据的时长。In one possible design, the attributes of the first wireless communication connection include a duration of no data transmission for the first wireless communication connection, and the duration of no data transmission for the first wireless communication connection is greater than a duration of no data transmission for any other wireless communication connection in the established wireless communication connection.
上述设计中,第一无线通信连接空转的时间较长,即第一无线通信连接无数据传输,从而选择该第一无线通信连接断开连接,对不会对该第三电子设备产生业务传输影响。并且能够保障有需要的电子设备能够建立无线通信连接,保障业务传输,提高了资源利用率。In the above design, the first wireless communication connection idles for a long time, that is, the first wireless communication connection has no data transmission, so the first wireless communication connection is disconnected, which will not affect the service transmission of the third electronic device. And it can ensure that the electronic devices in need can establish wireless communication connections, ensure service transmission, and improve resource utilization.
在一种可能的设计中,所述第一无线通信连接的属性包括所述第一无线通信连接在设定时长内传输 数据的频率,且所述第一无线通信连接传输数据的频率小于所述已建立的无线通信连接中其它任一无线通信连接传输数据的频率。In one possible design, the attribute of the first wireless communication connection includes that the first wireless communication connection transmits within a set time period. The frequency of data transmission by the first wireless communication connection is smaller than the frequency of data transmission by any other wireless communication connection in the established wireless communication connections.
上述设计中,第一无线通信连接的使用频率较低,从而选择该第一无线通信连接断开连接,对不会对该第三电子设备产生业务传输影响。并且能够保障有需要的电子设备能够建立无线通信连接,保障业务传输,提高了资源利用率。In the above design, the frequency of use of the first wireless communication connection is low, so the first wireless communication connection is disconnected, which will not affect the service transmission of the third electronic device. It can also ensure that electronic devices in need can establish wireless communication connections, ensure service transmission, and improve resource utilization.
在一种可能的设计中,所述第一无线通信连接的属性包括所述第一无线通信连接的生命周期的剩余时长,所述第一无线通信连接的生命周期的剩余时长小于所述已建立的无线通信连接中其它任一无线通信连接的生命周期的剩余时长。In one possible design, the attributes of the first wireless communication connection include a remaining duration of a life cycle of the first wireless communication connection, and the remaining duration of the life cycle of the first wireless communication connection is less than the remaining duration of the life cycle of any other wireless communication connection in the established wireless communication connections.
上述设计中,第一无线通信连接的生命周期快到期,从而选择该第一无线通信连接断开连接,对不会对该第三电子设备产生业务传输影响。并且能够保障有需要的电子设备能够建立无线通信连接,保障业务传输,提高了资源利用率。In the above design, the life cycle of the first wireless communication connection is about to expire, so the first wireless communication connection is disconnected, which will not affect the service transmission of the third electronic device. It can also ensure that electronic devices in need can establish wireless communication connections, ensure service transmission, and improve resource utilization.
在一种可能的设计中,所述第一无线通信连接的属性包括所述第一无线通信连接属于冷分区,位于所述冷分区中的无线通信连接的传输数据的频率小于位于所述冷分区之外的无线通信连接的传输数据的频率,和/或,位于所述冷分区中的无线通信连接的未传输数据的时长大于位于所述冷分区之外的无线通信连接的未传输数据的时长。In one possible design, the attributes of the first wireless communication connection include that the first wireless communication connection belongs to a cold partition, the frequency of transmitted data of the wireless communication connection located in the cold partition is less than the frequency of transmitted data of the wireless communication connection located outside the cold partition, and/or the duration of non-transmitted data of the wireless communication connection located in the cold partition is greater than the duration of non-transmitted data of the wireless communication connection located outside the cold partition.
在一种可能的设计中,所述已建立的无线通信连接的类型与所述第二无线通信连接的类型相同,或者,所述第一电子设备上已建立的无线通信连接的类型包括所述业务数据的传输所支持的无线通信连接的类型。In one possible design, the type of the established wireless communication connection is the same as the type of the second wireless communication connection, or the type of the wireless communication connection established on the first electronic device includes the type of wireless communication connection supported by the transmission of the business data.
上述设计中,第二电子设备所请求类型的无线通信连接达到数量阈值时,第一电子设备从已建立的该类型的无线通信连接中选择一个断开,从而满足第二电子设备的连接需求,提高了资源利用率。上设计中,业务数据的传输可以支持一个或者多种类型的连接,从而在第一电子设备上这些连接的数量达到阈值时,可以选择一个无线通信连接断开,从而满足第二电子设备的连接需求,提高了资源利用率。In the above design, when the number of wireless communication connections of the type requested by the second electronic device reaches a threshold, the first electronic device selects one of the established wireless communication connections of the type to disconnect, thereby meeting the connection requirements of the second electronic device and improving resource utilization. In the above design, the transmission of business data can support one or more types of connections, so that when the number of these connections on the first electronic device reaches a threshold, a wireless communication connection can be selected to disconnect, thereby meeting the connection requirements of the second electronic device and improving resource utilization.
第二方面,本申请实施例提供一种电子设备的连接管理方法,应用于第一电子设备,所述方法包括:响应于第一请求,确定所述第一电子设备上已建立的无线通信连接的数量达到阈值,其中,所述已建立的无线通信连接包括所述第一电子设备与第三电子设备之间已建立的第一无线通信连接,所述第一请求为第二电子设备与所述第一电子设备建立第二无线通信连接的请求或者所述第二电子设备与所述第一电子设备利用所述第二无线通信连接进行业务数据传输的请求;根据所述第一无线通信连接的属性,所述第一电子设备断开与所述第三电子设备之间的所述第一无线通信连接,并建立与所述第二电子设备之间的第二无线通信连接。In a second aspect, an embodiment of the present application provides a connection management method for an electronic device, which is applied to a first electronic device, and the method includes: in response to a first request, determining that the number of established wireless communication connections on the first electronic device has reached a threshold, wherein the established wireless communication connection includes a first wireless communication connection established between the first electronic device and a third electronic device, and the first request is a request for a second electronic device to establish a second wireless communication connection with the first electronic device or a request for the second electronic device to use the second wireless communication connection to transmit business data with the first electronic device; according to the attributes of the first wireless communication connection, the first electronic device disconnects the first wireless communication connection with the third electronic device, and establishes a second wireless communication connection with the second electronic device.
有益效果参见第一方面的描述,此处不再赘述。The beneficial effects are described in the first aspect and will not be repeated here.
在一种可能的设计中,所述已建立的无线通信连接的类型与所述第二无线通信连接的类型相同,或者,所述第一电子设备上已建立的无线通信连接的类型包括所述业务数据的传输所支持的无线通信连接的类型。In one possible design, the type of the established wireless communication connection is the same as the type of the second wireless communication connection, or the type of the wireless communication connection established on the first electronic device includes the type of wireless communication connection supported by the transmission of the business data.
上述设计中,第二电子设备所请求类型的无线通信连接达到数量阈值时,第一电子设备从已建立的该类型的无线通信连接中选择一个断开,从而满足第二电子设备的连接需求,提高了资源利用率。上设计中,业务数据的传输可以支持一个或者多种类型的连接,从而在第一电子设备上这些连接的数量达到阈值时,可以选择一个无线通信连接断开,从而满足第二电子设备的连接需求,提高了资源利用率。In the above design, when the number of wireless communication connections of the type requested by the second electronic device reaches a threshold, the first electronic device selects one of the established wireless communication connections of the type to disconnect, thereby meeting the connection requirements of the second electronic device and improving resource utilization. In the above design, the transmission of business data can support one or more types of connections, so that when the number of these connections on the first electronic device reaches a threshold, a wireless communication connection can be selected to disconnect, thereby meeting the connection requirements of the second electronic device and improving resource utilization.
在一种可能的设计中,所述第一无线通信连接的属性包括所述第一无线通信连接的未传输数据的时长,所述第一无线通信连接的未传输数据的时长大于所述已建立的无线通信连接中其它任一无线通信连接的未传输数据的时长;或者,In one possible design, the attribute of the first wireless communication connection includes a duration of non-transmitted data of the first wireless communication connection, and the duration of non-transmitted data of the first wireless communication connection is greater than a duration of non-transmitted data of any other wireless communication connection in the established wireless communication connection; or,
所述第一无线通信连接的属性包括所述第一无线通信连接在设定时长内传输数据的频率,所述第一无线通信连接传输数据的频率小于所述已建立的无线通信连接中其它任一无线通信连接传输数据的频率;或者,The attribute of the first wireless communication connection includes a frequency of data transmission by the first wireless communication connection within a set duration, and the frequency of data transmission by the first wireless communication connection is less than a frequency of data transmission by any other wireless communication connection in the established wireless communication connection; or
所述第一无线通信连接的属性包括所述第一无线通信连接的生命周期的剩余时长,所述第一无线通信连接的生命周期的剩余时长小于所述已建立的无线通信连接中其它任一无线通信连接的生命周期的剩余时长;或者,The attribute of the first wireless communication connection includes a remaining duration of a life cycle of the first wireless communication connection, and the remaining duration of the life cycle of the first wireless communication connection is less than a remaining duration of a life cycle of any other wireless communication connection in the established wireless communication connections; or,
所述第一无线通信连接的属性包括所述第一无线通信连接属于冷分区,位于所述冷分区中的无线通信连接的传输数据的频率小于位于所述冷分区之外的无线通信连接的传输数据的频率,和/或,位于所 述冷分区中的无线通信连接的未传输数据的时长大于位于所述冷分区之外的无线通信连接的未传输数据的时长。The attributes of the first wireless communication connection include that the first wireless communication connection belongs to a cold partition, a frequency of transmission data of the wireless communication connection located in the cold partition is less than a frequency of transmission data of the wireless communication connection located outside the cold partition, and/or The duration of non-transmitted data of the wireless communication connection in the cold partition is longer than the duration of non-transmitted data of the wireless communication connection outside the cold partition.
有益效果参见第一方面的描述,此处不再赘述。The beneficial effects are described in the first aspect and will not be repeated here.
在一种可能的设计中,所述第一电子设备上已建立N个无线通信连接,其中,所述N个无线通信连接包括L个位于冷分区的无线通信连接和M个位于热分区的无线通信连接;In one possible design, N wireless communication connections have been established on the first electronic device, wherein the N wireless communication connections include L wireless communication connections located in a cold partition and M wireless communication connections located in a hot partition;
所述M个位于热分区的无线通信连接中的任一无线通信连接未传输数据的时长小于所述L个位于冷分区的无线通信连接中的任一无线通信连接未传输数据的时长,和/或,位于所述冷分区中的无线通信连接的传输数据的频率小于位于所述冷分区之外的无线通信连接的传输数据的频率。The duration during which any of the M wireless communication connections located in the hot partition does not transmit data is shorter than the duration during which any of the L wireless communication connections located in the cold partition does not transmit data, and/or the frequency of data transmission of the wireless communication connections located in the cold partition is lower than the frequency of data transmission of the wireless communication connections located outside the cold partition.
一种示例中,N=L+M。上述设计中,针对已建立的无线通信连接,划分到冷热分区中,从而在有需求时,可以选择冷分区的无线通信连接来断开。通过冷热分离方案,实现精准识别空转的连接,从而在有需求时直接选择一个来断开,可以提高处理效率,并且提高资源利用率。In one example, N = L + M. In the above design, the established wireless communication connections are divided into hot and cold partitions, so that when there is a need, the wireless communication connection of the cold partition can be selected to be disconnected. Through the hot and cold separation solution, the idle connection can be accurately identified, so that when there is a need, one can be directly selected to be disconnected, which can improve processing efficiency and resource utilization.
在一种可能的设计中,当所述第一电子设备断开与所述第三电子设备之间的第一无线通信连接,并建立与所述第二电子设备之间的第二无线通信连接后,所述方法还包括:In a possible design, after the first electronic device disconnects the first wireless communication connection with the third electronic device and establishes a second wireless communication connection with the second electronic device, the method further includes:
将所述第一无线通信连接的信息从所述冷分区中删除,并将所述第二无线通信连接的信息添加在所述冷分区中。The information of the first wireless communication connection is deleted from the cold partition, and the information of the second wireless communication connection is added to the cold partition.
在一种可能的设计中,所述冷分区和所述热分区采用链表存储无线通信连接的信息,其中,所述第一无线通信连接的信息位于所述冷分区的尾节点。In a possible design, the cold partition and the hot partition use a linked list to store information of wireless communication connections, wherein the information of the first wireless communication connection is located at the tail node of the cold partition.
在一种可能的设计中,将所述第一无线通信连接的信息从所述冷分区中删除,将所述第二无线通信连接的信息添加在所述冷分区,包括:将所述第一无线通信连接的信息从所述冷分区的尾节点中删除,并将所述第二无线通信连接的信息添加在所述冷分区的头节点。In one possible design, the information of the first wireless communication connection is deleted from the cold partition, and the information of the second wireless communication connection is added to the cold partition, including: deleting the information of the first wireless communication connection from the tail node of the cold partition, and adding the information of the second wireless communication connection to the head node of the cold partition.
上述设计中,通过维护冷热分区,从而在有需求时,可以选择冷分区尾部的无线通信连接来断开。通过冷热分离方案,实现精准识别空转的连接,从而在有需求时直接选择一个来断开,可以提高处理效率,并且提高资源利用率。In the above design, by maintaining hot and cold partitions, the wireless communication connection at the end of the cold partition can be selected to be disconnected when needed. Through the hot and cold separation solution, the idle connection can be accurately identified, so that one can be directly selected to be disconnected when needed, which can improve processing efficiency and resource utilization.
在一种可能的设计中,所述方法还包括:In one possible design, the method further includes:
当位于所述热分区中的第三无线通信连接在生命周期内执行数据传输的次数小于第一次数阈值时,将所述第三无线通信连接的信息从所述热分区移到所述冷分区;或者,When the number of data transmissions performed by the third wireless communication connection in the hot partition during its life cycle is less than a first number threshold, moving information of the third wireless communication connection from the hot partition to the cold partition; or,
当位于所述热分区中的第三无线通信连接的生命周期到期时,将所述第三无线通信连接的信息从所述热分区移到所述冷分区。When the life cycle of the third wireless communication connection in the hot zone expires, information of the third wireless communication connection is moved from the hot zone to the cold zone.
在一种可能的设计中,所述方法还包括:当位于所述冷分区中的第四无线通信连接在生命周期内执行数据传输的次数达到第二次数阈值时,将所述第四无线通信连接的信息从所述冷分区移到所述热分区。In one possible design, the method further includes: when a fourth wireless communication connection located in the cold partition performs data transmission a number of times within a life cycle that reaches a second number threshold, moving information of the fourth wireless communication connection from the cold partition to the hot partition.
在一种可能的设计中,所述方法还包括:In one possible design, the method further includes:
位于所述冷分区的第四无线通信连接在生命周期内每执行一次数据传输,将所述第四无线通信连接的生命周期的剩余时长增加第一时长阈值,当所述第四无线通信连接的生命周期达到设定时长时,将所述第四无线通信连接的信息从所述冷分区移到所述热分区。Each time the fourth wireless communication connection located in the cold partition performs data transmission within its life cycle, the remaining duration of the life cycle of the fourth wireless communication connection is increased by a first duration threshold; when the life cycle of the fourth wireless communication connection reaches the set duration, the information of the fourth wireless communication connection is moved from the cold partition to the hot partition.
在一种可能的设计中,所述方法还包括:In one possible design, the method further includes:
位于所述冷分区的第四无线通信连接在生命周期内第i次执行数据传输时,将所述第四无线通信连接的生命周期的剩余时长增加第二时长阈值,位于所述冷分区的第四无线通信连接在生命周期内第i+1次执行数据传输时,将所述第四无线通信连接的生命周期的剩余时长增加第三时长阈值;所述第三时长阈值大于所述第二时长阈值;When the fourth wireless communication connection located in the cold partition performs data transmission for the i-th time within its life cycle, the remaining duration of the life cycle of the fourth wireless communication connection is increased by the second duration threshold; when the fourth wireless communication connection located in the cold partition performs data transmission for the i+1-th time within its life cycle, the remaining duration of the life cycle of the fourth wireless communication connection is increased by the third duration threshold; the third duration threshold is greater than the second duration threshold;
当所述第四无线通信连接的生命周期达到设定时长时,将所述第四无线通信连接的信息从所述冷分区移到所述热分区。When the life cycle of the fourth wireless communication connection reaches a set duration, information of the fourth wireless communication connection is moved from the cold partition to the hot partition.
在一种可能的设计中,所述第一电子设备断开与所述第三电子设备之间的所述第一无线通信连接后,所述方法还包括:In a possible design, after the first electronic device disconnects the first wireless communication connection with the third electronic device, the method further includes:
将所述第一无线通信连接的连接参数保存;Saving connection parameters of the first wireless communication connection;
当所述第三电子设备请求与所述第一电子设备建立无线通信连接时,所述第一电子设备根据保存的所述第一无线通信连接的连接参数与所述第三电子设备建立所述第一无线通信连接。When the third electronic device requests to establish a wireless communication connection with the first electronic device, the first electronic device establishes the first wireless communication connection with the third electronic device according to the saved connection parameters of the first wireless communication connection.
上述设计中,强制断开连接的连接参数保存,后续在有需求时,能够使用连接参数快速建立连接,减少建联的流程,提高处理效率。 In the above design, the connection parameters of the forced disconnection are saved, and when needed later, the connection parameters can be used to quickly establish a connection, reducing the connection establishment process and improving processing efficiency.
第三方面,本申请实施例还提供一种电子设备,所述电子设备包括存储器和一个或多个处理器;其中,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述计算机指令被所述处理器执行时,使得所述电子设备执行上述第二方面中任一种可能设计中的方法。In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory and one or more processors; wherein the memory is used to store computer program code, and the computer program code comprises computer instructions; when the computer instructions are executed by the processor, the electronic device executes a method in any possible design in the above-mentioned second aspect.
第四方面,本申请实施例还提供一种电子设备,包括执行上述第一方面中任一种可能设计中的方法的模块/单元。这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。例如,所述模块/单元至少可以执行如下步骤:响应于第一请求,确定所述第一电子设备上已建立的无线通信连接的数量达到阈值,其中,所述已建立的无线通信连接包括所述第一电子设备与第三电子设备之间已建立的第一无线通信连接,所述第一请求为第二电子设备与所述第一电子设备建立第二无线通信连接的请求或者所述第二电子设备与所述第一电子设备利用所述第二无线通信连接进行业务数据传输的请求;根据所述第一无线通信连接的属性,所述第一电子设备断开与所述第三电子设备之间的所述第一无线通信连接,并建立与所述第二电子设备之间的第二无线通信连接。In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a module/unit for executing a method in any possible design in the first aspect above. These modules/units may be implemented by hardware, or by executing corresponding software implementations by hardware. For example, the module/unit may at least perform the following steps: in response to a first request, determining that the number of established wireless communication connections on the first electronic device reaches a threshold, wherein the established wireless communication connection includes a first wireless communication connection established between the first electronic device and a third electronic device, and the first request is a request for a second electronic device to establish a second wireless communication connection with the first electronic device or a request for the second electronic device to use the second wireless communication connection with the first electronic device for business data transmission; according to the attributes of the first wireless communication connection, the first electronic device disconnects the first wireless communication connection with the third electronic device, and establishes a second wireless communication connection with the second electronic device.
第五方面,提供了一种计算机可读存储介质,计算机可读介质存储有计算机程序(也可以称为代码,或指令)当其在计算机上运行时,使得计算机执行上述第二方面中任一种可能设计中的方法。In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instruction) which, when executed on a computer, enables the computer to execute a method in any possible design of the second aspect.
第六方面,提供了一种计算机程序产品,计算机程序产品包括:计算机程序(也可以称为代码,或指令),当计算机程序被运行时,使得计算机执行上述第二方面中任一种可能设计中的方法。In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible design of the second aspect.
第七方面,本申请还提供一种芯片,所述芯片用于读取存储器中存储的计算机程序,执行上述任一方面及其各可能的设计电子设备执行的方法。In a seventh aspect, the present application also provides a chip, which is used to read a computer program stored in a memory and execute any of the above aspects and possible methods for designing electronic devices to execute.
第八方面,本申请还提供一种芯片系统,该芯片系统包括处理器,用于支持计算机装置实现上述任一方面及其各可能的设计电子设备执行的方法。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。In an eighth aspect, the present application further provides a chip system, which includes a processor for supporting a computer device to implement any of the above aspects and possible methods for designing electronic devices to execute. In one possible design, the chip system also includes a memory, which is used to store programs and data necessary for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.
本申请在上述各方面提供的实现的基础上,还可以进行进一步组合以提供更多实现。Based on the implementations provided in the above aspects, the present application can also be further combined to provide more implementations.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种电子设备100的结构示意图;FIG1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application;
图2为本申请实施例提供的一种电子设备的软件结构框图;FIG2 is a software structure block diagram of an electronic device provided in an embodiment of the present application;
图3为本申请实施例提供的连接管理系统结构示意图;FIG3 is a schematic diagram of the structure of a connection management system provided in an embodiment of the present application;
图4为本申请实施例提供的一种可能的场景示意图;FIG4 is a schematic diagram of a possible scenario provided by an embodiment of the present application;
图5为本申请实施例提供的冷热分区示意图;FIG5 is a schematic diagram of hot and cold zones provided in an embodiment of the present application;
图6A为本申请实施例提供的冷热分区的示意图;FIG6A is a schematic diagram of hot and cold zones provided in an embodiment of the present application;
图6B为本申请实施例提供的冷热分区的另一示意图;FIG6B is another schematic diagram of hot and cold zones provided in an embodiment of the present application;
图6C为本申请实施例提供的冷热分区的又一示意图;FIG6C is another schematic diagram of hot and cold zones provided in an embodiment of the present application;
图7为本申请实施例提供的冷热分区的变化示意图;FIG7 is a schematic diagram of changes in hot and cold zones provided in an embodiment of the present application;
图8为本申请实施例提供的方式三中冷热分区的示意图;FIG8 is a schematic diagram of hot and cold zones in the third embodiment of the present application;
图9为本申请实施例提供的方式三中冷热分区的变化示意图;FIG9 is a schematic diagram of changes in hot and cold zones in the third embodiment of the present application;
图10为本申请实施例提供的方式四中冷热分区的示意图;FIG10 is a schematic diagram of hot and cold zones in a fourth embodiment of the present application;
图11为本申请实施例提供的方式四中冷热分区的变化示意图;FIG11 is a schematic diagram of changes in hot and cold zones in the fourth embodiment of the present application;
图12为本申请实施例提供的链表方式的冷热分区示意图;FIG12 is a schematic diagram of hot and cold partitions in a linked list manner provided in an embodiment of the present application;
图13为本申请实施例提供的链表方式的冷热分区变化示意图;FIG13 is a schematic diagram of the change of hot and cold partitions in a linked list manner provided in an embodiment of the present application;
图14为本申请实施例提供的冷热分区变化的另一示意图;FIG14 is another schematic diagram of the change of hot and cold zones provided in an embodiment of the present application;
图15为本申请实施例提供的第一电子设备1500的结构示意图;FIG. 15 is a schematic diagram of the structure of a first electronic device 1500 provided in an embodiment of the present application;
图16为本申请实施例提供的业务执行流程示意图;FIG16 is a schematic diagram of a service execution process provided in an embodiment of the present application;
图17为本申请实施例提供的连接管理方法流程图。FIG. 17 is a flow chart of a connection management method provided in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
本申请实施例涉及的至少一个,包括一个或者多个;其中,多个是指大于或者等于两个。另外,需 要理解的是,在本说明书的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为明示或暗示相对重要性,也不能理解为明示或暗示顺序。例如,第一设备和第二设备并不代表二者的重要程度或者代表二者的顺序,仅仅是为了区分描述。在本申请实施例中,“和/或”,仅仅是描述关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The at least one involved in the embodiments of the present application includes one or more; wherein more means greater than or equal to two. It should be understood that in the description of this specification, the words "first", "second", etc. are only used for the purpose of distinguishing descriptions, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying an order. For example, the first device and the second device do not represent the importance of the two or the order of the two, but are only used to distinguish the description. In the embodiments of the present application, "and/or" is only used to describe the association relationship, indicating that there may be three relationships. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this article generally indicates that the objects associated before and after are in an "or" relationship.
本申请实施例涉及的方位用语,例如,“上”、“下”、“左”、“右”、“内”、“外”等,仅是参考附图的方向,因此,使用的方位用语是为了更好、更清楚地说明及理解本申请实施例,而不是指示或暗指所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请实施例的限制。The directional terms involved in the embodiments of the present application, such as "up", "down", "left", "right", "inside", "outside", etc., are only references to the directions of the drawings. Therefore, the directional terms used are for better and clearer explanation and understanding of the embodiments of the present application, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本说明书的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the specification. Thus, the phrases "in one embodiment", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
本申请涉及的分布式软总线是指不同电子设备之间通过统一近场通信实现的软件连接方式。分布式软总线是多种电子设备的统一基座,为电子设备之间的互联互通提供了统一的分布式通信能力(包括但不限于中央处理单元(central processing unit,CPU)/图形处理器(graphics processing unit,GPU)能力,屏幕能力,存储能力,麦克风能力,传感能力,摄像能力,键盘、鼠标、手写笔输入能力,扬声器能力),能够快速发现并连接电子设备,高效地分发任务和传输数据。The distributed soft bus involved in this application refers to a software connection method between different electronic devices through unified near-field communication. The distributed soft bus is a unified base for a variety of electronic devices, providing a unified distributed communication capability for the interconnection between electronic devices (including but not limited to central processing unit (CPU)/graphics processing unit (GPU) capabilities, screen capabilities, storage capabilities, microphone capabilities, sensor capabilities, camera capabilities, keyboard, mouse, stylus input capabilities, speaker capabilities), which can quickly discover and connect electronic devices, and efficiently distribute tasks and transmit data.
本申请涉及的电子设备可以为手机、平板电脑、可穿戴设备(例如,手表、手环、智能头盔,智能眼镜等)、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、智能健身器材等。智能健身器材,比如是跑步机、划船机等。本申请涉及的电子设备也可以是智能家电设备,比如电视、打印机、扫地机器人、智能窗帘、音箱、数字播放机、空调、冰箱、智能烤箱、智能微波炉、智能洗衣机、机顶盒、电视壳子、游戏机、便携摄像机、电子相框、智能照相机等等电。本申请涉及的电子设备还可以智能医疗设备,比如血压计、智能温度计,导航设备、娱乐设备等等。The electronic devices involved in this application may be mobile phones, tablet computers, wearable devices (e.g., watches, bracelets, smart helmets, smart glasses, etc.), vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), smart fitness equipment, etc. Smart fitness equipment, such as treadmills, rowing machines, etc. The electronic devices involved in this application may also be smart home appliances, such as televisions, printers, sweeping robots, smart curtains, speakers, digital players, air conditioners, refrigerators, smart ovens, smart microwave ovens, smart washing machines, set-top boxes, TV shells, game consoles, portable cameras, electronic photo frames, smart cameras, etc. The electronic devices involved in this application may also be smart medical devices, such as blood pressure monitors, smart thermometers, navigation equipment, entertainment equipment, etc.
电子设备的示例性实施例包括但不限于搭载Harmony或者其它操作系统的电子设备。本申请涉及的电子设备具备与其它电子设备建立连接的能力,比如蓝牙通信连接、短距离无线通信连接、无线通信连接等等。Exemplary embodiments of electronic devices include but are not limited to Harmony Or electronic devices with other operating systems. The electronic devices involved in this application have the ability to establish connections with other electronic devices, such as Bluetooth communication connection, short-range wireless communication connection, wireless communication connection, etc.
蓝牙通信连接是一种支持设备短距离通信的无线电技术,能在包括移动电话、无线耳机、笔记本电脑、相关外设等众多设备之间进行无线信息交换。利用“蓝牙”技术,能够有效地简化电子设备之间的通信,也能够成功地简化设备与因特网之间的通信,从而使得数据传输变得更加迅速高效,为无线通信拓宽道路。蓝牙通信连接,比如可以采用蓝牙低能耗(bluetooth low energe,BLE)技术,也可以采用蓝牙基本速率(basic rate,BR)技术等等。Bluetooth communication connection is a radio technology that supports short-range communication between devices. It can exchange wireless information between many devices including mobile phones, wireless headphones, laptops, and related peripherals. The use of "Bluetooth" technology can effectively simplify the communication between electronic devices, and can also successfully simplify the communication between devices and the Internet, making data transmission faster and more efficient, and broadening the road for wireless communication. Bluetooth communication connection, for example, can use Bluetooth low energy (bluetooth low energy, BLE) technology, can also use Bluetooth basic rate (basic rate, BR) technology and so on.
短距离无线通信连接,比如可以是无线保真点对点(wireless fidelity-peer to peer,Wi-Fi P2P)。Wi-Fi P2P又称为无线局域网(wireless local area networks,WLAN)直连或Wi-Fi Direct,是Wi-Fi协议簇中的一个,使设备之间能够轻松连接彼此而不再需要中介性质的无线接入点。其使用范围从网页浏览到文件传输,以及同时与多个设备进行通信,能够充分发挥Wi-Fi的速度优势。符合此标准的设备即使来自不同的生产厂商,亦可实现轻松互联。A short-range wireless communication connection, such as wireless fidelity-peer to peer (Wi-Fi P2P). Wi-Fi P2P, also known as wireless local area networks (WLAN) direct or Wi-Fi Direct, is a member of the Wi-Fi protocol family that enables devices to easily connect to each other without the need for an intermediary wireless access point. Its uses range from web browsing to file transfers, as well as communicating with multiple devices at the same time, taking advantage of Wi-Fi's speed. Devices that meet this standard can easily connect to each other even if they are from different manufacturers.
无线通信连接,比如可以是WLAN连接,或者以太网(ethernet,Eth)连接等。The wireless communication connection may be, for example, a WLAN connection or an Ethernet (Ethernet, Eth) connection.
图1为本申请实施例提供的一种电子设备100的结构示意图。如图1所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。FIG1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. As shown in FIG1 , the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image  signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。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 processor (GPU), an image signal processor (ISPA), and a display processor. The processor 110 may include an image signal processor (ISP), a controller, a memory, 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. Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be arranged in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be arranged in the same device as at least some of the modules of the processor 110.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering processing, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify the signal, and convert it into electromagnetic waves for radiation through the antenna 2.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology 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 (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
显示屏194用于显示应用的显示界面,例如显示电子设备100上安装的应用的显示页面等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display the display interface of the application, such as displaying the display page of the application installed on the electronic device 100. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以 是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object is projected onto the photosensitive element through the lens to generate an optical image. The photosensitive element can It is a charge coupled device (CCD) or complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,以及至少一个应用程序的软件代码等。存储数据区可存储电子设备100使用过程中所产生的数据(例如拍摄的图像、录制的视频等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application program, etc. The data storage area can store data generated during the use of the electronic device 100 (such as captured images, recorded videos, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将图片,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as pictures and videos are saved in the external memory card.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
其中,传感器模块180可以包括压力传感器180A,加速度传感器180B,触摸传感器180C等。Among them, the sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C, etc.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
触摸传感器180C,也称“触控面板”。触摸传感器180C可以设置于显示屏194,由触摸传感器180C与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180C用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180C也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180C is also called a "touch panel". The touch sensor 180C can be set on the display screen 194, and the touch sensor 180C and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180C is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180C can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现与电子设备100的接触和分离。The button 190 includes a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device 100 can receive the button input and generate a key signal input related to the user settings and function control of the electronic device 100. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 195, or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
可以理解的是,图1所示的部件并不构成对电子设备100的具体限定,电子设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。此外,图1中的部件之间的组合/连接关系也是可以调整修改的。It is understood that the components shown in FIG1 do not constitute a specific limitation on the electronic device 100. The electronic device may also include more or fewer components than shown, or combine some components, or split some components, or arrange the components differently. In addition, the combination/connection relationship between the components in FIG1 may also be adjusted and modified.
图2为本申请实施例提供的一种电子设备的软件结构框图。如图2所示,电子设备的软件结构可以是分层架构,例如可以将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将操作系统分为四层,从上至下分别为应用程序层,应用程序框架层(framework,FWK),运行时(runtime)和系统库,以及内核层。FIG2 is a block diagram of the software structure of an electronic device provided in an embodiment of the present application. As shown in FIG2, the software structure of the electronic device can be a layered architecture, for example, the software can be divided into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer (framework, FWK), the runtime (runtime) and the system library, and the kernel layer.
应用程序层可以包括一系列应用程序包(application package)。如图2所示,应用程序层可以包括相机、设置、皮肤模块、用户界面(user interface,UI)、三方应用程序等。其中,三方应用程序可以包括图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等。在本申请实施例中,应用程序层可以包括电子设备从服务器请求下载的目标应用的目标安装包,该目标安装包中的功能文件和布局文件适配于电子设备。The application layer may include a series of application packages. As shown in FIG2 , the application layer may include a camera, settings, a skin module, a user interface (UI), a third-party application, etc. Among them, the third-party application may include a gallery, a calendar, calls, maps, navigation, WLAN, Bluetooth, music, video, short messages, etc. In an embodiment of the present application, the application layer may include a target installation package of a target application that the electronic device requests to download from a server, and the function files and layout files in the target installation package are adapted to the electronic device.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层可以包括一些预先定义的函数。如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器。The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer may include some predefined functions. As shown in FIG2 , the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕, 截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。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 screen, etc. Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions for electronic devices, such as management of call status (including answering, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, 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 notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
运行时包括核心库和虚拟机。运行时负责操作系统的调度和管理。The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是操作系统的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The core library consists of two parts: one is the function that the Java language needs to call, and the other is the core library of the operating system. 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 object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)、图像处理库等。The system library can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), image processing library, etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
硬件层可以包括各类传感器,例如加速度传感器、陀螺仪传感器、触摸传感器等。The hardware layer can include various types of sensors, such as accelerometers, gyroscopes, touch sensors, etc.
需要说明的是,图1和图2所示的结构仅作为本申请实施例提供的电子设备的一种示例,并不能对本申请实施例提供的电子设备进行任何限定,具体实施中,电子设备可以具有比图1或图2所示的结构中更多或更少的器件或模块。It should be noted that the structure shown in Figures 1 and 2 is only an example of the electronic device provided in the embodiment of the present application, and cannot be used to limit the electronic device provided in the embodiment of the present application. In a specific implementation, the electronic device may have more or fewer devices or modules than those in the structure shown in Figures 1 or 2.
为了便于理解,下面结合附图介绍本申请实施例提供的技术方案。To facilitate understanding, the technical solution provided by the embodiments of the present application is introduced below in conjunction with the accompanying drawings.
电子设备在执行不同的分布式业务时,需要与其它不同的电子设备建立无线通信连接,比如蓝牙通信连接。例如,分布式业务可以包括分布式剪切板、调试监控服务系统(dalvik debug monitor server,DDMS)同步、分享(share)、超级桌面、无线投屏、分布式剪切板、生产力桌面或者系统服务同步等等。When executing different distributed services, electronic devices need to establish wireless communication connections with other different electronic devices, such as Bluetooth communication connections. For example, distributed services may include distributed clipboard, dalvik debug monitor server (DDMS) synchronization, Sharing, super desktop, wireless screen projection, distributed clipboard, productivity desktop or system service synchronization, etc.
目前电子设备对建立的通信连接的数量有限制,以蓝牙连接为例,受蓝牙芯片物理链路(asynchronous connectionless,ACL)链路上限的影响,一般最多同时建立7路蓝牙连接。以Wi-Fi P2P为例,当前电子设备的移动高清链路接口(mobile high-definition link,MHL)最多支持4路连接。比如手机通过蓝牙、Wi-Fi等连接多台音箱,组成分布式立体声业务场景,再比如手机通过多个摄像头采集的图像显示在多个电子设备的屏幕上场景,可能会由于通信连接的剩余连接数量不满足要求,而导致业务无法实现。Currently, electronic devices have a limit on the number of communication connections that can be established. Taking Bluetooth connection as an example, due to the upper limit of the Bluetooth chip physical link (asynchronous connectionless, ACL) link, generally at most 7 Bluetooth connections can be established at the same time. Taking Wi-Fi P2P as an example, the mobile high-definition link interface (mobile high-definition link, MHL) of current electronic devices supports at most 4 connections. For example, a mobile phone connects to multiple speakers through Bluetooth, Wi-Fi, etc. to form a distributed stereo service scenario. For example, the images collected by the mobile phone through multiple cameras are displayed on the screens of multiple electronic devices. The service may not be realized because the number of remaining connections of the communication connection does not meet the requirements.
为了满足分布式业务对多连接的需求,本申请实施例提供一种电子设备的连接管理方法。该方法适用于包括多个电子设备的系统。参见图3所示,为本申请实施例提供的连接管理系统结构示意图。连接管理系统包括第一电子设备300以及可与第一电子设备建立无线通信连接的m个第二电子设备400。为了便于区分m个第二电子设备400,将m个第二电子设备分别称为第二电子设备4001-第二电子设备400m,参见图3所示。m为正整数。示例性地,可与第一电子设备300建立无线通信连接的第二电子设备,可以是位于第一电子设备300的通信范围内第二电子设备。In order to meet the demand for multiple connections of distributed services, an embodiment of the present application provides a connection management method for an electronic device. The method is applicable to a system including multiple electronic devices. See Figure 3, which is a schematic diagram of the structure of a connection management system provided in an embodiment of the present application. The connection management system includes a first electronic device 300 and m second electronic devices 400 that can establish a wireless communication connection with the first electronic device. In order to facilitate the distinction between the m second electronic devices 400, the m second electronic devices are respectively referred to as second electronic devices 4001-second electronic devices 400m, as shown in Figure 3. m is a positive integer. Exemplarily, a second electronic device that can establish a wireless communication connection with the first electronic device 300 may be a second electronic device located within the communication range of the first electronic device 300.
以蓝牙通信为例,第一电子设备300和第二电子设备400分别通过广播的方式交互设备信息,从而 第一电子设备300和第二电子设备400分别能够被搜索发现,以实现第一电子设备300与第二电子设备400之间建立蓝牙通信连接。需要说明的是,本申请中并不限于广播形式,例如可以通过单播、组播、广播的形式与其它的电子设备交互信息。一些实施例中,当第一电子设备300打开BT时,可扫描发现周边已经打开BT的设备,并在第一电子设备300上显示可连接的BT设备列表。比如BT设备列表中包括第二电子设备400,从而响应于用户触发的与第二电子设备400建立连接的操作,以完成在第一电子设备300与第二电子设备400之间建立蓝牙通信连接。Taking Bluetooth communication as an example, the first electronic device 300 and the second electronic device 400 exchange device information by broadcasting, thereby The first electronic device 300 and the second electronic device 400 can be searched and discovered respectively, so as to establish a Bluetooth communication connection between the first electronic device 300 and the second electronic device 400. It should be noted that the present application is not limited to the broadcast form, for example, information can be exchanged with other electronic devices in the form of unicast, multicast, and broadcast. In some embodiments, when the first electronic device 300 turns on BT, it can scan and discover the surrounding devices that have turned on BT, and display a list of connectable BT devices on the first electronic device 300. For example, the second electronic device 400 is included in the BT device list, so as to respond to the operation of establishing a connection with the second electronic device 400 triggered by the user, so as to complete the establishment of a Bluetooth communication connection between the first electronic device 300 and the second electronic device 400.
参见图4所示,为本申请实施例提供的一种可能的场景的示意图。第一电子设备300已经与N个第二电子设备400建立无线通信连接,并且该第一电子设备300仅支持同时与N个第二电子设备400建立该无线通信连接。图4中以N=4为例,第一电子设备300分别与第二电子设备4001~第二电子设备4004建立有无线通信连接。在该情况下,第一电子设备300已经与其它电子设备建立的无线通信连接数量达到第一电子设备支持建立的无线通信连接的最大阈值。当另外一个第二电子设备4005需要与第一电子设备300建立连接的情况下,第一电子设备300可以断开与第二电子设备4001~第二电子设备4004中的一个第二电子设备的通信连接。进而第一电子设备300可以与第二电子设备4005建立无线通信连接。Referring to FIG. 4 , a schematic diagram of a possible scenario provided in an embodiment of the present application is shown. The first electronic device 300 has established wireless communication connections with N second electronic devices 400, and the first electronic device 300 only supports establishing the wireless communication connection with N second electronic devices 400 at the same time. Taking N=4 as an example in FIG. 4 , the first electronic device 300 has established wireless communication connections with second electronic devices 4001 to 4004, respectively. In this case, the number of wireless communication connections that the first electronic device 300 has established with other electronic devices reaches the maximum threshold of wireless communication connections that the first electronic device supports to establish. When another second electronic device 4005 needs to establish a connection with the first electronic device 300, the first electronic device 300 can disconnect the communication connection with one of the second electronic devices 4001 to 4004. Then the first electronic device 300 can establish a wireless communication connection with the second electronic device 4005.
需要说明的是,本申请所涉及的无线通信连接是指电子设备针对连接数量受限的无线通信连接,比如蓝牙连接、Wi-Fi P2P连接等。It should be noted that the wireless communication connection involved in this application refers to the wireless communication connection of electronic devices with limited number of connections, such as Bluetooth connection, Wi-Fi P2P connection, etc.
第一电子设备300与N个第二电子设备400建立的N个无线通信连接可以是指相同类型的无线通信连接,也可以是N个无线通信连接的类型不完全相同。比如,第一电子设备300与N个第二电子设备400建立的无线通信连接均为蓝牙连接。再比如,第一电子设备300与N个第二电子设备400建立的无线通信连接均为Wi-Fi P2P连接。再比如,N个无线通信连接中一部分无线通信连接的类型为蓝牙连接,另一部分无线通信连接的类型为Wi-Fi P2P连接。The N wireless communication connections established between the first electronic device 300 and the N second electronic devices 400 may refer to the same type of wireless communication connections, or the types of the N wireless communication connections may be different. For example, the wireless communication connections established between the first electronic device 300 and the N second electronic devices 400 are all Bluetooth connections. For another example, the wireless communication connections established between the first electronic device 300 and the N second electronic devices 400 are all Wi-Fi P2P connections. For another example, some of the N wireless communication connections are Bluetooth connections, and the other parts are Wi-Fi P2P connections.
一些可能的场景中,需要与第一电子设备300建立无线通信连接的第二电子设备4005既可以采用Wi-Fi P2P连接也可以采用蓝牙连接。例如,所述第一电子设备响应于第二电子设备4005进行业务数据传输的操作。该业务数据传输可以采用Wi-Fi P2P连接也可以采用蓝牙连接。比如,第一电子设备300与第二电子设备4001~第二电子设备4002建立的无线通信连接为蓝牙连接,与第二电子设备4003~第二电子设备4004建立的无线通信连接为Wi-Fi P2P连接。第二电子设备4005既支持采用Wi-Fi P2P连接也支持采用蓝牙连接。当另外一个第二电子设备4005需要与第一电子设备300建立连接的情况下,第一电子设备300可以断开与第二电子设备4001~第二电子设备4004中的一个第二电子设备的通信连接。进而第一电子设备300可以与第二电子设备4005建立无线通信连接。In some possible scenarios, the second electronic device 4005 that needs to establish a wireless communication connection with the first electronic device 300 can use both Wi-Fi P2P connection and Bluetooth connection. For example, the first electronic device responds to the second electronic device 4005 performing a business data transmission operation. The business data transmission can use Wi-Fi P2P connection or Bluetooth connection. For example, the wireless communication connection established by the first electronic device 300 with the second electronic devices 4001 to 4002 is a Bluetooth connection, and the wireless communication connection established with the second electronic devices 4003 to 4004 is a Wi-Fi P2P connection. The second electronic device 4005 supports both Wi-Fi P2P connection and Bluetooth connection. When another second electronic device 4005 needs to establish a connection with the first electronic device 300, the first electronic device 300 can disconnect the communication connection with one of the second electronic devices 4001 to 4004. Then the first electronic device 300 can establish a wireless communication connection with the second electronic device 4005.
一些可能的场景中,需要与第一电子设备300建立无线通信连接的第二电子设备4005仅可以采用蓝牙连接。例如,第一电子设备响应于第二电子设备4005进行业务数据传输的操作。该业务数据传输仅也可以采用蓝牙连接。再例如,第一电子设备响应于请求与第二电子设备建立蓝牙连接的操作。则第一电子设备300从已建立的多个蓝牙连接中选择一个蓝牙连接断开。第一电子设备300与第二电子设备4001~第二电子设备4004建立的无线通信连接为蓝牙连接。当另外一个第二电子设备4005需要与第一电子设备300建立无线通信连接(蓝牙连接)的情况下,第一电子设备300可以断开与第二电子设备4001~第二电子设备4004中的一个第二电子设备的通信连接。进而第一电子设备300可以与第二电子设备4005建立无线通信连接。In some possible scenarios, the second electronic device 4005 that needs to establish a wireless communication connection with the first electronic device 300 can only use Bluetooth connection. For example, the first electronic device responds to the operation of the second electronic device 4005 to perform business data transmission. The business data transmission can also only use Bluetooth connection. For another example, the first electronic device responds to the operation of requesting to establish a Bluetooth connection with the second electronic device. Then the first electronic device 300 selects a Bluetooth connection from the multiple established Bluetooth connections to disconnect. The wireless communication connection established by the first electronic device 300 and the second electronic devices 4001 to 4004 is a Bluetooth connection. When another second electronic device 4005 needs to establish a wireless communication connection (Bluetooth connection) with the first electronic device 300, the first electronic device 300 can disconnect the communication connection with one of the second electronic devices 4001 to 4004. Then the first electronic device 300 can establish a wireless communication connection with the second electronic device 4005.
在一种可能的实施方式中,在选择断开的无线通信连接时,可以根据各个无线通信连接的属性来选择,比如未传输数据的时长、在设定时长内传输数据的频率、生命周期的剩余时长、或者是否属于冷分区等等。关于冷分区后续会详细说明,此处不再赘述。In a possible implementation, when selecting a wireless communication connection to disconnect, the selection may be made based on the attributes of each wireless communication connection, such as the duration of no data transmission, the frequency of data transmission within a set duration, the remaining duration of the life cycle, or whether it belongs to a cold partition, etc. The cold partition will be described in detail later and will not be described here.
在一种可能的示例中,在第二电子设备4005请求与第一电子设备300建立无线通信连接时,如果第一电子设备300的无线通信连接数量达到了最大阈值,第一电子设备300可以从第二电子设备4001~第二电子设备4004中选择在第一设定时长内未与第一电子设备300进行数据交互的第二电子设备断开连接,进而与第二电子设备4005建立无线通信连接。In a possible example, when the second electronic device 4005 requests to establish a wireless communication connection with the first electronic device 300, if the number of wireless communication connections of the first electronic device 300 reaches a maximum threshold, the first electronic device 300 may select a second electronic device from second electronic devices 4001 to 4004 that has not interacted with the first electronic device 300 within a first set time period to disconnect, and then establish a wireless communication connection with the second electronic device 4005.
其中,一个第二电子设备的未交互时长(未传输数据的时长)为Δt=t-ti,t表示当前时刻,ti表示在当前时刻之前,该第二电子设备与第一电子设备300最后一次交互的时间。The non-interaction duration (non-data transmission duration) of a second electronic device is Δt= tti , where t represents the current time, and ti represents the last interaction time between the second electronic device and the first electronic device 300 before the current time.
一些可能的场景中,第二电子设备4001~第二电子设备4004中不包括在第一设定时长内未与第一电子设备300进行数据交互的第二电子设备,在该情况下,第一电子设备300无法与第二电子设备4005 建立无线通信连接,即连接失败。In some possible scenarios, the second electronic devices 4001 to 4004 do not include a second electronic device that has not exchanged data with the first electronic device 300 within the first set time period. In this case, the first electronic device 300 cannot communicate with the second electronic device 4005. Establishing a wireless communication connection, that is, the connection failed.
在另一种可能的示例中,在第二电子设备4005请求与第一电子设备300建立无线通信连接时,如果第一电子设备300的无线通信连接数量达到了最大阈值,第一电子设备300可以从第二电子设备4001~第二电子设备4004中确定未与第一电子设备300进行数据交互的第二电子设备的未交互时长,从这些未与第一电子设备300进行数据交互的第二电子设备中选择未交互时长最长的第二电子设备断开连接。In another possible example, when the second electronic device 4005 requests to establish a wireless communication connection with the first electronic device 300, if the number of wireless communication connections of the first electronic device 300 has reached a maximum threshold, the first electronic device 300 may determine the non-interaction time of second electronic devices that have not interacted with data with the first electronic device 300 from the second electronic devices 4001 to 4004, and select the second electronic device with the longest non-interaction time from these second electronic devices that have not interacted with data with the first electronic device 300 to disconnect.
在又一可能的示例中,选择断开的无线通信连接时,可以选择在设定时长内传输数据频率最低的无线通信连接。In yet another possible example, when selecting a disconnected wireless communication connection, a wireless communication connection with the lowest frequency of data transmission within a set time period may be selected.
在又一可能的示例中,选择断开的无线通信连接时,可以选择在生命周期的剩余时长最短的。生命周期可以是每个无线通信连接都有生命周期。生命周期也可以在每次执行传输任务后时长被延长。In another possible example, when selecting a disconnected wireless communication connection, the one with the shortest remaining life cycle may be selected. The life cycle may be that each wireless communication connection has a life cycle. The life cycle may also be extended after each transmission task is executed.
在一种可选的实施方式中,第一电子设备300与第二电子设备400建立无线通信连接后,会在第一电子设备300上保存第一电子设备与第二电子设备400之间的连接参数。In an optional implementation, after the first electronic device 300 establishes a wireless communication connection with the second electronic device 400 , the connection parameters between the first electronic device and the second electronic device 400 are saved on the first electronic device 300 .
示例性地,无线通信连接为WIFI P2P连接时,连接参数可以包括服务集标识(service Set identifier,SSID)、基本服务集标识符(basic Service Set Identifier,BSSID),连接认证方式、连接密码串或者其他连接过程中需建立的参数等。无线通信连接为蓝牙连接时,连接参数可以包括:连接间隔(Connection Interval),最大连接间隔(Interval Max),最小连接隔间隔(Interval Min),从设备延迟(Slave Latency)等中的一项或者多项。Exemplarily, when the wireless communication connection is a WIFI P2P connection, the connection parameters may include a service set identifier (SSID), a basic service set identifier (BSSID), a connection authentication method, a connection password string or other parameters to be established during the connection process. When the wireless communication connection is a Bluetooth connection, the connection parameters may include one or more of: a connection interval (Connection Interval), a maximum connection interval (Interval Max), a minimum connection interval (Interval Min), a slave device delay (Slave Latency), etc.
在第二电子设备4005请求与第一电子设备300建立无线通信连接时,第一电子设备300的无线通信连接数量达到了最大阈值,第一电子设备300断开与第二电子设备4001~第二电子设备4004中的一个第二电子设备的通信连接的情况下,第一电子设备可以不删除第一电子设备300与该断开连接的第二电子设备的连接参数。作为一种举例,第一电子设备300断开与第二电子设备4001的无线通信连接,但不删除第一电子设备300与该第二电子设备4001的连接参数。一些场景中,在第一电子设备300与第二电子设备4001断开后的一定时长内,第二电子设备4001需要与第一电子设备300传输数据,第一电子设备可以根据保存的连接参数与第二电子设备4001重新建立通信连接。When the second electronic device 4005 requests to establish a wireless communication connection with the first electronic device 300, the number of wireless communication connections of the first electronic device 300 reaches the maximum threshold, and the first electronic device 300 disconnects the communication connection with one of the second electronic devices 4001 to 4004, the first electronic device may not delete the connection parameters between the first electronic device 300 and the disconnected second electronic device. As an example, the first electronic device 300 disconnects the wireless communication connection with the second electronic device 4001, but does not delete the connection parameters between the first electronic device 300 and the second electronic device 4001. In some scenarios, within a certain period of time after the first electronic device 300 is disconnected from the second electronic device 4001, the second electronic device 4001 needs to transmit data with the first electronic device 300, and the first electronic device can re-establish the communication connection with the second electronic device 4001 according to the saved connection parameters.
在一些可能的场景中,上述由于第一电子设备的无线通信连接的最大数量的限制,而被迫断开与其中一个第二电子设备的场景中,也可以不再保存第一电子设备与该第二电子设备的连接参数。In some possible scenarios, in the scenario where the first electronic device is forced to disconnect from one of the second electronic devices due to the limitation on the maximum number of wireless communication connections of the first electronic device, the connection parameters between the first electronic device and the second electronic device may no longer be saved.
在一些可能的场景中,第一电子设备300与某个第二电子设备已建立无线通信连接,比如第二电子设备4002。响应于用户断开第一电子设备300与第二电子设备4002的操作,第一电子设备300释放与第二电子设备4002的无线通信连接。第一电子设备300释放与第二电子设备4002的无线通信连接的情况下,不再保存第一电子设备300与第二电子设备4002的连接参数。In some possible scenarios, the first electronic device 300 has established a wireless communication connection with a second electronic device, such as the second electronic device 4002. In response to the user's operation of disconnecting the first electronic device 300 from the second electronic device 4002, the first electronic device 300 releases the wireless communication connection with the second electronic device 4002. When the first electronic device 300 releases the wireless communication connection with the second electronic device 4002, the connection parameters between the first electronic device 300 and the second electronic device 4002 are no longer saved.
在一些可能的场景中,当一个第二电子设备4005需要与第一电子设备300建立连接的情况下,第一电子设备300已经与其它电子设备建立的无线通信连接数量达到第一电子设备支持建立的无线通信连接的最大阈值,第一电子设备300可以断开与第二电子设备4001~第二电子设备4004中的一个第二电子设备的无线通信连接。进而第一电子设备300可以与第二电子设备4005建立无线通信连接。比如第一电子设备300与第二电子设备4003断开无线通信连接3。第一电子设备300还可以根据第二电子设备4003支持的无线通信能力,为第二电子设备4003选择其它的无线通信方式来建立连接。例如,第二电子设备4005请求建立的无线通信连接为蓝牙连接,第二电子设备4003不仅可以采用蓝牙连接,还可以采用Wi-Fi P2P,第二电子设备4001~第二电子设备4004与第一电子设备300建立的均为蓝牙连接。第一电子设备300断开与第二电子设备4003的蓝牙连接后,还可以建立第一电子设备300与第二电子设备4003的Wi-Fi P2P连接。一些场景中,如果第一电子设备上Wi-Fi P2P连接的数量也达到第一电子设备300支持建立的Wi-Fi P2P连接数量的最大阈值时,可以保持第一电子设备300与第二电子设备4003的断开。再例如,第二电子设备4005请求建立的无线通信连接可以为蓝牙连接也可以为Wi-Fi P2P连接,第一电子设备300与第二电子设备4001~第二电子设备4002建立的无线通信连接为蓝牙连接,与第二电子设备4003~第二电子设备4004建立的无线通信连接为Wi-Fi P2P连接。第二电子设备4003的执行任务不仅可以采用蓝牙连接,还可以采用Eth连接,第一电子设备300断开与第二电子设备4003的蓝牙连接后,还可以建立第一电子设备300与第二电子设备4003的Eth连接。In some possible scenarios, when a second electronic device 4005 needs to establish a connection with the first electronic device 300, the number of wireless communication connections that the first electronic device 300 has established with other electronic devices reaches the maximum threshold of the wireless communication connection that the first electronic device supports to establish, and the first electronic device 300 can disconnect the wireless communication connection with one of the second electronic devices 4001 to 4004. Then the first electronic device 300 can establish a wireless communication connection with the second electronic device 4005. For example, the first electronic device 300 disconnects the wireless communication connection 3 with the second electronic device 4003. The first electronic device 300 can also select other wireless communication methods for the second electronic device 4003 to establish a connection according to the wireless communication capabilities supported by the second electronic device 4003. For example, the wireless communication connection requested to be established by the second electronic device 4005 is a Bluetooth connection, and the second electronic device 4003 can not only use Bluetooth connection, but also use Wi-Fi P2P, and the second electronic devices 4001 to 4004 are all connected to the first electronic device 300 through Bluetooth. After the first electronic device 300 disconnects the Bluetooth connection with the second electronic device 4003, a Wi-Fi P2P connection between the first electronic device 300 and the second electronic device 4003 can be established. In some scenarios, if the number of Wi-Fi P2P connections on the first electronic device also reaches the maximum threshold of the number of Wi-Fi P2P connections supported by the first electronic device 300, the first electronic device 300 and the second electronic device 4003 can be kept disconnected. For another example, the wireless communication connection requested to be established by the second electronic device 4005 can be a Bluetooth connection or a Wi-Fi P2P connection. The wireless communication connection established by the first electronic device 300 with the second electronic devices 4001 to 4002 is a Bluetooth connection, and the wireless communication connection established with the second electronic devices 4003 to 4004 is a Wi-Fi P2P connection. The execution task of the second electronic device 4003 can adopt not only a Bluetooth connection but also an Eth connection. After the first electronic device 300 disconnects the Bluetooth connection with the second electronic device 4003, an Eth connection between the first electronic device 300 and the second electronic device 4003 can be established.
本申请实施例中的一种可能的实现方式中,可以针对已经建立的无线通信连接进行冷热管理。一些 实施例中,可以仅区分冷分区。即区分为冷分区内和冷分区外。另一些实施例中,可以区分冷分区和热分区。例如,针对已经建立的无线通信连接划分为冷分区的连接和热分区的连接。参见图5所示。第一电子设备300已经与N个第二电子设备建立无线通信连接,并且该第一电子设备300仅支持同时与N个第二电子设备建立该无线通信连接。以N=4为例。4个第二电子设备分别为第二电子设备4001-第二电子设备4004。为了便于描述,将第一电子设备与第二电子设备400i建立的连接称为无线通信连接i。基于此,第一电子设备300与第二电子设备4001-4004分别建立的无线通信连接1-无线通信连接4。以无线通信连接1-无线通信连接2属于冷分区的连接,无线通信连接3-无线通信连接4属于热分区的连接。需要说明的是,本申请实施例对划分后的冷分区包括的无线通信连接的数量以及热分区包括的无线通信连接的数量不作具体限定。比如,可以根据电子设备所支持的最大连接数量来确定冷分区连接的数量以及热分区连接的数量。In a possible implementation of the embodiment of the present application, hot and cold management can be performed for the established wireless communication connection. In an embodiment, only cold partitions can be distinguished. That is, they are divided into cold partitions and cold partitions. In other embodiments, cold partitions and hot partitions can be distinguished. For example, the established wireless communication connections are divided into cold partition connections and hot partition connections. See Figure 5. The first electronic device 300 has established wireless communication connections with N second electronic devices, and the first electronic device 300 only supports establishing the wireless communication connection with N second electronic devices at the same time. Take N=4 as an example. The four second electronic devices are second electronic devices 4001-second electronic devices 4004. For ease of description, the connection established between the first electronic device and the second electronic device 400i is referred to as wireless communication connection i. Based on this, the wireless communication connections 1-wireless communication connection 4 established by the first electronic device 300 and the second electronic devices 4001-4004 respectively. Wireless communication connection 1-wireless communication connection 2 belong to the connection of the cold partition, and wireless communication connection 3-wireless communication connection 4 belong to the connection of the hot partition. It should be noted that the embodiment of the present application does not specifically limit the number of wireless communication connections included in the cold partition after division and the number of wireless communication connections included in the hot partition. For example, the number of cold partition connections and the number of hot partition connections may be determined according to the maximum number of connections supported by the electronic device.
示例性地,冷分区和热分区可以为两个缓存空间,冷分区用于存储属于冷分区的无线通信连接的相关信息,比如连接标识。热分区用于存储属于热分区的无线通信连接的相关信息,比如连接标识。Exemplarily, the cold partition and the hot partition may be two cache spaces, the cold partition is used to store relevant information of wireless communication connections belonging to the cold partition, such as connection identifiers, and the hot partition is used to store relevant information of wireless communication connections belonging to the hot partition, such as connection identifiers.
第二电子设备4005位于第一电子设备的设定范围内。第一电子设备300响应于与第二电子设备4005建立无线通信连接的操作,确定第一电子设备300已经与其它电子设备建立的无线通信连接数量达到第一电子设备支持建立的无线通信连接的最大阈值的情况下,第一电子设备300从冷分区连接选择一个无线通信连接来断开,比如选择无线通信连接1,则第一电子设备300断开与第二电子设备4001的无线通信连接1。进而第一电子设备300与第二电子设备4005建立无线通信连接5。The second electronic device 4005 is located within the set range of the first electronic device. In response to the operation of establishing a wireless communication connection with the second electronic device 4005, when the first electronic device 300 determines that the number of wireless communication connections that the first electronic device 300 has established with other electronic devices has reached the maximum threshold of the wireless communication connections that the first electronic device supports to establish, the first electronic device 300 selects a wireless communication connection from the cold partition connection to disconnect, for example, selecting wireless communication connection 1, the first electronic device 300 disconnects the wireless communication connection 1 with the second electronic device 4001. Then the first electronic device 300 establishes wireless communication connection 5 with the second electronic device 4005.
一些实施例中,对冷热区和热分区进行划分时,本申请示例性的提供几种方式。In some embodiments, when dividing the cold and hot zones and the hot zones, the present application exemplarily provides several methods.
方式一,可以基于该无线通信连接上无数据传输的时长来划分。Method one may divide the data based on the duration of time when no data is transmitted on the wireless communication connection.
位于热分区的连接对应的无数据传输的时长短于位于冷分区的连接对应的无数据传输的时长。应理解的是,某个无线通信连接上无数据传输的时长,可以理解为,一个电子设备与另一个电子设备之间建立有该无线通信连接,该第一电子设备与另一个电子设备之间无数据交互的时长。一个无线通信连接上无数据传输的时长,也可以描述为该无线通信连接空转的时长。The duration of no data transmission corresponding to the connection in the hot partition is shorter than the duration of no data transmission corresponding to the connection in the cold partition. It should be understood that the duration of no data transmission on a wireless communication connection can be understood as the duration of no data interaction between the first electronic device and the other electronic device when the wireless communication connection is established between the first electronic device and the other electronic device. The duration of no data transmission on a wireless communication connection can also be described as the duration of the idling of the wireless communication connection.
一种可能的示例中,当无线通信连接建立时,该新建立的无线通信连接添加到热分区中。In a possible example, when a wireless communication connection is established, the newly established wireless communication connection is added to a hot zone.
热分区的连接移到冷区的方式可以为:将该热分区中空转时长达到设定阈值的无线通信连接从热分区移到冷分区。示例性地,可以将该热分区中空转时长达到设定阈值的无线通信连接的相关信息从热分区迁移到冷分区。The hot zone connection may be moved to the cold zone by moving the wireless communication connection whose idle time in the hot zone reaches a set threshold from the hot zone to the cold zone. Exemplarily, the relevant information of the wireless communication connection whose idle time in the hot zone reaches a set threshold may be migrated from the hot zone to the cold zone.
一些场景中,热分区的无线通信连接的数量达到热分区数量阈值,可以将该热分区中空转时长最长的无线通信连接从热分区移到冷分区。In some scenarios, when the number of wireless communication connections in a hot partition reaches a hot partition number threshold, the wireless communication connection with the longest idle time in the hot partition may be moved from the hot partition to the cold partition.
作为一种举例,参见图6A所示,为本申请实施例提供的冷热分区的示意图。例如,在t1时刻,冷分区包括无线通信连接1-无线通信连接2。热分区包括无线通信连接3-无线通信连接5。在t2时刻,热分区的无线通信连接5空转的时长达到第二设定时长,则将该无线通信连接5从热分区移动到冷分区,参见图6A所示。As an example, see FIG6A, which is a schematic diagram of hot and cold partitions provided in an embodiment of the present application. For example, at time t1, the cold partition includes wireless communication connection 1-wireless communication connection 2. The hot partition includes wireless communication connection 3-wireless communication connection 5. At time t2, if the idle time of the wireless communication connection 5 of the hot partition reaches the second set time, the wireless communication connection 5 is moved from the hot partition to the cold partition, as shown in FIG6A.
冷分区的连接移到热分区的方式可以为:冷分区中某个无线通信连接执行传输任务时,可以将该无线通信连接从冷分区转移到热分区。The way of moving the connection of the cold partition to the hot partition may be: when a wireless communication connection in the cold partition performs a transmission task, the wireless communication connection may be transferred from the cold partition to the hot partition.
作为一种举例,参见图6B所示,为本申请实施例提供的冷热分区的另一示意图。例如,在t1时刻,热分区包括无线通信连接1-无线通信连接2。冷分区包括无线通信连接3-无线通信连接5。在t2时刻,冷分区的无线通信连接3在第三设定时长内执行传输任务的次数为2次(或者1次),可以将该无线通信连接3从冷分区移到热分区,参见图6B所示。As an example, see FIG6B , which is another schematic diagram of hot and cold partitions provided in an embodiment of the present application. For example, at time t1, the hot partition includes wireless communication connection 1-wireless communication connection 2. The cold partition includes wireless communication connection 3-wireless communication connection 5. At time t2, the number of times the wireless communication connection 3 of the cold partition performs the transmission task within the third set time length is 2 times (or 1 time), and the wireless communication connection 3 can be moved from the cold partition to the hot partition, as shown in FIG6B .
作为又一种举例,参见图6C所示,为本申请实施例提供的冷热分区的又一示意图。例如,在t1时刻,冷分区包括无线通信连接1-无线通信连接2。热分区包括无线通信连接3-无线通信连接5。在t2时刻,热分区的无线通信连接5空转的时长达到第二设定时长,则将该无线通信连接5从热分区移动到冷分区,参见图6C所示。在t3时刻,冷分区的无线通信连接1在第三设定时长内执行传输任务的次数为2次(或者1次),可以将该无线通信连接1从冷分区移到热分区,参见图6C所示。第三设定时长小于或者等于第二设定时长。As another example, see FIG6C , which is another schematic diagram of hot and cold partitions provided for an embodiment of the present application. For example, at time t1, the cold partition includes wireless communication connection 1-wireless communication connection 2. The hot partition includes wireless communication connection 3-wireless communication connection 5. At time t2, the idle time of the wireless communication connection 5 of the hot partition reaches the second set time, and the wireless communication connection 5 is moved from the hot partition to the cold partition, as shown in FIG6C . At time t3, the number of times the wireless communication connection 1 of the cold partition performs the transmission task within the third set time is 2 times (or 1 time), and the wireless communication connection 1 can be moved from the cold partition to the hot partition, as shown in FIG6C . The third set time is less than or equal to the second set time.
接着图6C的举例,参见图7所示。第一电子设备300已经与5个第二电子设备建立无线通信连接,并且该第一电子设备300仅支持同时与5个第二电子设备建立该无线通信连接。5个第二电子设备分别为第二电子设备4001-第二电子设备4005。第一电子设备300与第二电子设备4001-4005分别建立的无 线通信连接1-无线通信连接5。比如,在t4时刻,有第二电子设备4006需要与第一电子设备300建立无线通信连接时,第一电子设备300可以从冷分区中选择一个无线通信连接断开。比如选择进入冷分区时间最长的无线通信连接来断开,比如进入冷分区最长的无线通信连接为无线通信连接2,则将该无线通信连接2断开,然后第一电子设备300建立第一电子设备300与第二电子设备4006之间的无线通信连接6。进一步地,可以将新建立连接的无线通信连接6保存在热分区中。6C, see FIG7. The first electronic device 300 has established wireless communication connections with five second electronic devices, and the first electronic device 300 only supports establishing the wireless communication connections with five second electronic devices at the same time. The five second electronic devices are second electronic devices 4001 to second electronic devices 4005. The wireless connections established by the first electronic device 300 and the second electronic devices 4001 to 4005 are respectively For example, at time t4, when a second electronic device 4006 needs to establish a wireless communication connection with the first electronic device 300, the first electronic device 300 can select a wireless communication connection from the cold partition to disconnect. For example, the wireless communication connection that has entered the cold partition the longest time is selected to disconnect. For example, if the wireless communication connection that has entered the cold partition the longest time is wireless communication connection 2, then the wireless communication connection 2 is disconnected, and then the first electronic device 300 establishes a wireless communication connection 6 between the first electronic device 300 and the second electronic device 4006. Furthermore, the newly established wireless communication connection 6 can be saved in the hot partition.
方式二,可以根据无线通信连接在设定时长内传输任务的次数以及无数据传输的时长,来确定属于冷分区和热分区的无线通信连接。In a second method, the wireless communication connection belonging to the cold partition and the hot partition can be determined according to the number of transmission tasks of the wireless communication connection within a set time period and the time period without data transmission.
一种可能的示例中,当无线通信连接建立时,该新建立的无线通信连接添加到热分区中。In a possible example, when a wireless communication connection is established, the newly established wireless communication connection is added to a hot zone.
热分区的连接移到冷区的方式可以为:将该热分区中空转时长达到设定阈值的无线通信连接从热分区移到冷分区。The way of moving the connection of the hot zone to the cold zone may be: the wireless communication connection whose idle time in the hot zone reaches a set threshold is moved from the hot zone to the cold zone.
冷分区的连接移到热分区的方式可以为:冷分区中无线通信连接执行传输任务的次数达到设定阈值时(比如2次),可以将该无线通信连接从冷分区转移到热分区。The connection of the cold partition may be moved to the hot partition in the following manner: when the number of transmission tasks performed by the wireless communication connection in the cold partition reaches a set threshold (eg, 2 times), the wireless communication connection may be transferred from the cold partition to the hot partition.
方式三,可以根据无线通信连接在设定时长内传输任务的次数来划分。Method three can be divided according to the number of times the wireless communication connection transmits tasks within a set time period.
位于热分区的连接在第四设定时长内执行传输任务的次数多于位于冷分区的连接在第四设定时长内执行传输任务的次数。The number of times that the connection located in the hot partition executes the transmission task within the fourth set time period is greater than the number of times that the connection located in the cold partition executes the transmission task within the fourth set time period.
一种可能的示例中,当无线通信连接建立时,该新建立的无线通信连接添加到冷分区中。In a possible example, when a wireless communication connection is established, the newly established wireless communication connection is added to the cold partition.
冷分区的连接移到热分区的方式可以为:冷分区中某个无线通信连接在第四设定时长内执行传输任务的次数达到设定阈值时,比如次数达到2次,可以将该无线通信连接从冷分区转移到热分区。The method of moving the connection of the cold partition to the hot partition can be: when the number of times a wireless communication connection in the cold partition executes a transmission task within a fourth set time reaches a set threshold, for example, the number reaches 2 times, the wireless communication connection can be transferred from the cold partition to the hot partition.
热分区的连接移到冷区的方式可以为:冷分区中某个无线通信连接在第四设定时长内执行传输任务的次数小于设定阈值时,可以将该无线通信连接从热分区转移到冷分区。The way to move the connection of the hot zone to the cold zone can be: when the number of times a wireless communication connection in the cold zone executes a transmission task within a fourth set time period is less than a set threshold, the wireless communication connection can be transferred from the hot zone to the cold zone.
作为一种举例,参见图8所示,为本申请实施例提供的冷热分区的示意图。例如,在t1时刻,冷分区包括无线通信连接1-无线通信连接2。热分区包括无线通信连接3-无线通信连接5。在t1时刻到t2时刻的第四设定时长内,无线通信连接4未执行任何传输任务,则将该无线通信连接4从热分区移动到冷分区,参见图8所示。再比如,在t2时刻到t3时刻的设定时长1(设定时长1小于或者等于第四设定时长)内,冷分区的无线通信连接2在设定时长1内执行传输任务的次数为2次,可以将该无线通信连接2从冷分区移到热分区,参见图8所示。As an example, see FIG8 , which is a schematic diagram of hot and cold partitions provided in an embodiment of the present application. For example, at time t1, the cold partition includes wireless communication connection 1-wireless communication connection 2. The hot partition includes wireless communication connection 3-wireless communication connection 5. During the fourth set time period from time t1 to time t2, the wireless communication connection 4 does not perform any transmission task, then the wireless communication connection 4 is moved from the hot partition to the cold partition, as shown in FIG8 . For another example, during the set time period 1 from time t2 to time t3 (the set time period 1 is less than or equal to the fourth set time period), the wireless communication connection 2 of the cold partition performs the transmission task twice within the set time period 1, and the wireless communication connection 2 can be moved from the cold partition to the hot partition, as shown in FIG8 .
接着图8的举例,参见图9所示。第一电子设备300已经与5个第二电子设备建立无线通信连接,并且该第一电子设备300仅支持同时与5个第二电子设备建立该无线通信连接。5个第二电子设备分别为第二电子设备4001-第二电子设备4005。第一电子设备300与第二电子设备4001-4005分别建立的无线通信连接1-无线通信连接5。比如,在t4时刻,有第二电子设备4006需要与第一电子设备300建立无线通信连接时,第一电子设备300可以从冷分区中选择一个无线通信连接断开。比如选择进入冷分区时间最长的无线通信连接来断开,比如进入冷分区最长的无线通信连接为无线通信连接1,则将该无线通信连接1断开,然后第一电子设备300建立第一电子设备300与第二电子设备4006之间的无线通信连接6。进一步地,可以将无线通信连接6保存在冷分区中。Following the example of FIG8, see FIG9. The first electronic device 300 has established wireless communication connections with five second electronic devices, and the first electronic device 300 only supports establishing the wireless communication connection with five second electronic devices at the same time. The five second electronic devices are respectively the second electronic device 4001-the second electronic device 4005. The first electronic device 300 and the second electronic devices 4001-4005 respectively establish wireless communication connections 1-wireless communication connections 5. For example, at time t4, when a second electronic device 4006 needs to establish a wireless communication connection with the first electronic device 300, the first electronic device 300 can select a wireless communication connection from the cold partition to disconnect. For example, the wireless communication connection that has entered the cold partition for the longest time is selected to disconnect. For example, if the wireless communication connection that has entered the cold partition for the longest time is wireless communication connection 1, the wireless communication connection 1 is disconnected, and then the first electronic device 300 establishes a wireless communication connection 6 between the first electronic device 300 and the second electronic device 4006. Further, the wireless communication connection 6 can be saved in the cold partition.
方式四,可以设置每个无线通信连接的生命周期,并根据该生命周期来确定属于冷分区和热分区的无线通信连接。In a fourth approach, a life cycle of each wireless communication connection may be set, and the wireless communication connections belonging to the cold partition and the hot partition may be determined according to the life cycle.
一种可能的示例中,当无线通信连接建立时,该新建立的无线通信连接添加到冷分区中。冷分区中的无线通信连接在满足条件一或者条件二时可以从冷分区移到热分区。In a possible example, when a wireless communication connection is established, the newly established wireless communication connection is added to the cold partition. The wireless communication connection in the cold partition can be moved from the cold partition to the hot partition when the first condition or the second condition is met.
条件一,基于执行传输任务的次数,来针对无线通信连接的生命周期的剩余时长进行增加,当生命周期的剩余时长达到第五设定时长时,将该无线通信连接从冷分区移到热分区。Condition 1: Based on the number of times the transmission task is executed, the remaining duration of the life cycle of the wireless communication connection is increased. When the remaining duration of the life cycle reaches the fifth set duration, the wireless communication connection is moved from the cold partition to the hot partition.
示例性地,在无线通信连接进入冷分区时,生命周期的剩余时长可以为0。每执行一次传输任务,可以将生命周期的剩余时长增加一定时长。Exemplarily, when the wireless communication connection enters the cold partition, the remaining duration of the life cycle may be 0. Each time a transmission task is executed, the remaining duration of the life cycle may be increased by a certain duration.
作为一种举例,每执行一次传输任务增加时间Δt1。当生命周期的剩余时长达到第五设定时长时,将该无线通信连接从冷分区移动到热分区。需要说明的是,生命周期的剩余时长在无传输任务时会随时间推移而减少的。比如,某个无线通信连接执行一次传输任务后,生命周期的剩余时长为Δt1。在Δt1的时长内,该无线通信连接未执行其它传输任务,则该无线通信连接的生命周期到期,即剩余时长为0。后续再有执行任务,会在剩余时长0的基础上增加时间Δt1。As an example, each time a transmission task is executed, the time Δt1 is increased. When the remaining duration of the life cycle reaches the fifth set duration, the wireless communication connection is moved from the cold partition to the hot partition. It should be noted that the remaining duration of the life cycle will decrease over time when there is no transmission task. For example, after a wireless communication connection executes a transmission task, the remaining duration of the life cycle is Δt1. Within the duration of Δt1, if the wireless communication connection does not execute other transmission tasks, the life cycle of the wireless communication connection expires, that is, the remaining duration is 0. If there is a subsequent task to be executed, the time Δt1 will be added to the remaining duration of 0.
作为另一种举例,在生命周期内,执行传输任务的次数越多,则随着执行任务次数的增加,在生命 周期的剩余时长的基础上增加的时长越长。或者说,冷分区中生命周期的剩余时长与生命周期内执行传输任务的次数正相关。比如第一次执行传输任务,增加时间Δt1,第二次执行传输任务,增加时间Δt2。Δt2>Δt1。第三次执行传输任务,增加时间Δt3。Δt3>Δt2。以此类推。在一种可能的实现方式中,Δt2=2Δt1,Δt3=3Δt1,以此类推,Δti=i*Δt1。比如,某无线通信连接对应的传输任务的执行数量为3次,则增加的时长=Δt1+Δt2+Δt3。As another example, during the life cycle, the more times the transmission task is executed, the more time the task is executed. The longer the added time is based on the remaining time of the cycle. In other words, the remaining time of the life cycle in the cold partition is positively correlated with the number of times the transmission task is executed in the life cycle. For example, the first time a transmission task is executed, the time Δt1 is added, and the second time a transmission task is executed, the time Δt2 is added. Δt2>Δt1. The third time a transmission task is executed, the time Δt3 is added. Δt3>Δt2. And so on. In one possible implementation, Δt2=2Δt1, Δt3=3Δt1, and so on, Δti=i*Δt1. For example, if the number of executions of a transmission task corresponding to a wireless communication connection is 3 times, the added time = Δt1+Δt2+Δt3.
条件二,位于冷分区的无线通信连接在生命周期内,执行传输任务的次数达到设定阈值,比如达到两次,可以将该冷分区的无线通信连接从冷分区移到热分区。Condition 2: If the number of transmission tasks performed by the wireless communication connection in the cold partition reaches a set threshold, such as twice, during its life cycle, the wireless communication connection in the cold partition can be moved from the cold partition to the hot partition.
示例性地,热分区中的无线通信连接在满足条件三或者条件四时可以从热分区移到冷分区。Exemplarily, the wireless communication connection in the hot zone may be moved from the hot zone to the cold zone when condition three or condition four is met.
条件三,位于热分区的无线通信连接在生命周期内执行传输任务的次数小于次数阈值。例如,次数阈值为2。再比如,次数阈值为1。Condition three: the number of times that the wireless communication connection in the hot zone performs the transmission task in the life cycle is less than the number threshold. For example, the number threshold is 2. For another example, the number threshold is 1.
条件四,位于热分区的无线通信连接的生命周期到期。Condition 4: The life cycle of the wireless communication connection located in the hot zone expires.
一些实施例中,生命周期的剩余时长可以根据执行传输任务的次数来增加。另一些实施例中,在热分区的无线通信连接的生命周期,也可以依据执行传输任务的次数增加。In some embodiments, the remaining time of the life cycle can be increased according to the number of times the transmission task is executed. In other embodiments, the life cycle of the wireless communication connection in the hot partition can also be increased according to the number of times the transmission task is executed.
作为一种举例,参见图10所示,为本申请实施例提供的冷热分区的示意图。例如,在t1时刻,冷分区包括无线通信连接1-无线通信连接2。热分区包括无线通信连接3-无线通信连接5。在t1时刻到t2时刻的第四设定时长内,无线通信连接5未执行任何传输任务,则将该无线通信连接5从热分区移动到冷分区,参见图8所示。再比如,在t2时刻到t3时刻的生命周期的时长内,冷分区的无线通信连接1执行多次传输任务,确定的可移动时长达到第五设定时长,可以将该无线通信连接1从冷分区移到热分区,参见图10所示。As an example, see FIG10, which is a schematic diagram of hot and cold partitions provided in an embodiment of the present application. For example, at time t1, the cold partition includes wireless communication connection 1-wireless communication connection 2. The hot partition includes wireless communication connection 3-wireless communication connection 5. During the fourth set time period from time t1 to time t2, the wireless communication connection 5 has not performed any transmission task, then the wireless communication connection 5 is moved from the hot partition to the cold partition, as shown in FIG8. For another example, during the life cycle from time t2 to time t3, the wireless communication connection 1 of the cold partition performs multiple transmission tasks, and the determined movable time period reaches the fifth set time period, the wireless communication connection 1 can be moved from the cold partition to the hot partition, as shown in FIG10.
接着图10的举例,参见图11所示。第一电子设备300已经与5个第二电子设备建立无线通信连接,并且该第一电子设备300仅支持同时与5个第二电子设备建立该无线通信连接。5个第二电子设备分别为第二电子设备4001-第二电子设备4005。第一电子设备300与第二电子设备4001-4005分别建立的无线通信连接1-无线通信连接5。比如,在t4时刻,有第二电子设备4006需要与第一电子设备300建立无线通信连接时,第一电子设备300可以从冷分区中选择一个无线通信连接断开。比如选择进入冷分区时间最长的无线通信连接来断开,比如进入冷分区最长的无线通信连接为无线通信连接2,则将该无线通信连接2断开,然后第一电子设备300建立第一电子设备300与第二电子设备4006之间的无线通信连接6。进一步地,可以将无线通信连接6保存在冷分区中。Following the example of FIG. 10, see FIG. 11. The first electronic device 300 has established wireless communication connections with five second electronic devices, and the first electronic device 300 only supports establishing the wireless communication connection with five second electronic devices at the same time. The five second electronic devices are respectively the second electronic device 4001-the second electronic device 4005. The first electronic device 300 and the second electronic devices 4001-4005 respectively establish wireless communication connections 1-wireless communication connections 5. For example, at time t4, when a second electronic device 4006 needs to establish a wireless communication connection with the first electronic device 300, the first electronic device 300 can select a wireless communication connection from the cold partition to disconnect. For example, the wireless communication connection that has entered the cold partition for the longest time is selected to disconnect. For example, the wireless communication connection that has entered the cold partition for the longest time is wireless communication connection 2, then the wireless communication connection 2 is disconnected, and then the first electronic device 300 establishes a wireless communication connection 6 between the first electronic device 300 and the second electronic device 4006. Further, the wireless communication connection 6 can be saved in the cold partition.
在一种可能的实施方式中,针对热分区和冷分区可以采用链表的方式存储。当然也可以采用其他的存储方式来存储。如下以链表方式存储为例。In a possible implementation, hot partitions and cold partitions may be stored in a linked list. Of course, other storage methods may also be used. The following takes linked list storage as an example.
在一些实施例中,如果在热分区中有新增加的无线通信连接,则将新增加的无线通信连接放到热分区的链表头。如果在冷分区中有新增加的无线通信连接,则将新增加的无线通信连接放到冷分区的链表头。链表通过关键字Key来进行索引。Key所指向的地址用于存储无线通信连接的相关信息,比如连接标识。相关信息还可以包括:连接的连接时间、执行传输的次数等等。In some embodiments, if there is a newly added wireless communication connection in the hot partition, the newly added wireless communication connection is placed at the head of the linked list of the hot partition. If there is a newly added wireless communication connection in the cold partition, the newly added wireless communication connection is placed at the head of the linked list of the cold partition. The linked list is indexed by the keyword Key. The address pointed to by the Key is used to store relevant information of the wireless communication connection, such as the connection identifier. The relevant information may also include: the connection time of the connection, the number of times the transmission is performed, etc.
以第一电子设备300已经与5个第二电子设备建立无线通信连接,并且该第一电子设备300仅支持同时与5个第二电子设备建立该无线通信连接。5个第二电子设备分别为第二电子设备4001-第二电子设备4005。第一电子设备300与第二电子设备4001-4005分别建立的无线通信连接1-无线通信连接5。参见图12所示,以热分区包括无线通信连接1-无线通信连接2,索引关键字分别是key1和key2。冷分区包括无线通信连接3-无线通信连接5,索引关键字分别是key3-key5。第一电子设备300支持的无线通信连接的数量为5个为例。例如,以无线通信连接为BLE、BR和Wi-Fi P2P(简称P2P)为例。Assume that the first electronic device 300 has established wireless communication connections with five second electronic devices, and the first electronic device 300 only supports establishing the wireless communication connection with five second electronic devices at the same time. The five second electronic devices are respectively the second electronic device 4001-the second electronic device 4005. The first electronic device 300 establishes wireless communication connections 1-wireless communication connections 5 with the second electronic devices 4001-4005 respectively. As shown in FIG12, the hot partition includes wireless communication connection 1-wireless communication connection 2, and the index keywords are key1 and key2 respectively. The cold partition includes wireless communication connection 3-wireless communication connection 5, and the index keywords are key3-key5 respectively. Take the example that the number of wireless communication connections supported by the first electronic device 300 is 5. For example, take the wireless communication connections as BLE, BR and Wi-Fi P2P (P2P for short).
比如,有第二电子设备4006需要与第一电子设备300建立无线通信连接时,第一电子设备300可以从冷分区中选择一个无线通信连接断开。比如选择位于冷分区中尾节点来断开,参见图13所示,则将该无线通信连接5断开,然后第一电子设备300建立第一电子设备300与第二电子设备4006之间的无线通信连接6。进一步地,可以将无线通信连接6保存在冷分区的头节点中。For example, when a second electronic device 4006 needs to establish a wireless communication connection with the first electronic device 300, the first electronic device 300 can select a wireless communication connection from the cold partition to disconnect. For example, the tail node in the cold partition is selected to disconnect, as shown in FIG. 13, the wireless communication connection 5 is disconnected, and then the first electronic device 300 establishes a wireless communication connection 6 between the first electronic device 300 and the second electronic device 4006. Further, the wireless communication connection 6 can be stored in the head node of the cold partition.
一些场景中,冷分区和热分区可以是相对分区。比如设定数量的热分区的数量是固定的。例如,冷分区最多包括2个无线通信连接,热分区最多包括2个无线通信连接。当前时刻冷分区有2个无线通信连接,热分区有2个无线通信连接。当热分区中某个无线通信连接满足进入冷分区的条件时,则确定该无线通信连接属于冷分区。同样,当冷分区中某个无线通信连接满足进入热分区的条件时,则确定该无线通信连接属于热分区。 In some scenarios, cold partitions and hot partitions can be relative partitions. For example, the number of hot partitions is fixed. For example, the cold partition includes at most 2 wireless communication connections, and the hot partition includes at most 2 wireless communication connections. At the current moment, the cold partition has 2 wireless communication connections, and the hot partition has 2 wireless communication connections. When a wireless communication connection in the hot partition meets the conditions for entering the cold partition, it is determined that the wireless communication connection belongs to the cold partition. Similarly, when a wireless communication connection in the cold partition meets the conditions for entering the hot partition, it is determined that the wireless communication connection belongs to the hot partition.
作为一种举例,热分区的连接进入冷分区的方式可以为:将该热分区中空转时长达到设定阈值的无线通信连接从属于热分区变更为属于冷分区。冷分区的连接变更到热分区的方式可以为:冷分区中某个无线通信连接执行传输任务或者执行传输任务次数达到次数阈值时,可以确定该无线通信连接从属于冷分区变更为属于热分区。As an example, a hot partition connection may enter a cold partition in a manner that: a wireless communication connection whose idle time in the hot partition reaches a set threshold is changed from belonging to the hot partition to belonging to the cold partition. A cold partition connection may be changed to a hot partition in a manner that: when a wireless communication connection in the cold partition executes a transmission task or the number of transmission tasks executed reaches a threshold, it may be determined that the wireless communication connection is changed from belonging to the cold partition to belonging to the hot partition.
一些场景中,当热分区中存在空转时长达到设定阈值的无线通信连接,并且冷分区中无线通信连接的数量达到数量阈值(冷分区对应的数量阈值)时,可以先不执行将热分区中空转时长达到设定阈值的无线通信连接变更到冷分区。另一些场景中,如果冷分区中某个无线通信连接执行传输任务或者执行传输任务次数达到次数阈值,并且热分区中无线通信连接的数量达到数量阈值(热分区对应的数量阈值)时,可以先将热分区中空转时间最长的无线通信连接变更到冷分区,然后再将该冷分区中执行传输任务或者执行传输任务次数达到次数阈值的无线通信连接变更到热分区。In some scenarios, when there is a wireless communication connection in the hot partition whose idle time reaches a set threshold, and the number of wireless communication connections in the cold partition reaches a quantity threshold (the quantity threshold corresponding to the cold partition), the wireless communication connection in the hot partition whose idle time reaches the set threshold can be changed to the cold partition without executing it first. In other scenarios, if a wireless communication connection in the cold partition executes a transmission task or executes a transmission task a number of times that reaches a number threshold, and the number of wireless communication connections in the hot partition reaches a number threshold (the number threshold corresponding to the hot partition), the wireless communication connection with the longest idle time in the hot partition can be changed to the cold partition first, and then the wireless communication connection in the cold partition that executes a transmission task or executes a transmission task a number of times that reaches a number threshold can be changed to the hot partition.
作为另一种举例,热分区的连接变更为冷分区的方式和冷分区的连接变更为热分区的方式可以采用上述方式三或者方式四的方式,具体此处不再赘述。As another example, the connection of a hot partition is changed to a cold partition and the connection of a cold partition is changed to a hot partition can adopt the above-mentioned method three or method four, and the details are not repeated here.
在一些实施例中,可以将断开连接的无线通信连接5的连接参数缓存,参见图14所示。一些场景中,在第一电子设备300与第二电子设备4005的无线通信连接5断开后的一定时长内,第二电子设备4005需要与第一电子设备300传输数据,第一电子设备可以根据保存的连接参数快速与第二电子设备4005建立无线通信连接5。In some embodiments, the connection parameters of the disconnected wireless communication connection 5 can be cached, as shown in Figure 14. In some scenarios, within a certain period of time after the wireless communication connection 5 between the first electronic device 300 and the second electronic device 4005 is disconnected, the second electronic device 4005 needs to transmit data with the first electronic device 300, and the first electronic device can quickly establish a wireless communication connection 5 with the second electronic device 4005 according to the saved connection parameters.
基于相同的构思,本申请实施例还提供一种第一电子设备1500的结构示意图。参见图15所示,第一电子设备1500包括业务服务模块1501、连接会话模块1502、代理模块1503、协议层连接资源模块1504。业务服务模块1501用于对分布式业务进行管理。连接会话模块1502用于创建业务对应的会话。代理模块1503用于对无线通信连接进行选择和控制。协议层连接资源模块1504用于对无线通信连接的连接资源进行管理。Based on the same concept, the embodiment of the present application also provides a structural schematic diagram of a first electronic device 1500. As shown in FIG15, the first electronic device 1500 includes a business service module 1501, a connection session module 1502, an agent module 1503, and a protocol layer connection resource module 1504. The business service module 1501 is used to manage distributed services. The connection session module 1502 is used to create a session corresponding to the service. The agent module 1503 is used to select and control wireless communication connections. The protocol layer connection resource module 1504 is used to manage connection resources for wireless communication connections.
业务服务模块1501响应于业务触发的操作,向连接会话模块1502指示为该业务创建会话。比如,第一电子设备1500执行无线投屏的业务,参见图16所示,连接会话模块1502请求代理模块为该会话分配连接资源。代理模块1503如果确定电子设备1500的无线通信连接数量达到了最大阈值,第一电子设备1500可以从已存在的无线通信连接中选择一个无线通信连接,确定选择的该无线通信连接所使用的资源。进一步地,第一电子设备1500的代理模块1503指示协议层连接资源模块1504释放该第二电子设备所使用的资源。The business service module 1501 responds to the business-triggered operation and instructs the connection session module 1502 to create a session for the business. For example, the first electronic device 1500 performs a wireless screen projection service. As shown in FIG16 , the connection session module 1502 requests the proxy module to allocate connection resources for the session. If the proxy module 1503 determines that the number of wireless communication connections of the electronic device 1500 has reached the maximum threshold, the first electronic device 1500 may select a wireless communication connection from the existing wireless communication connections and determine the resources used by the selected wireless communication connection. Furthermore, the proxy module 1503 of the first electronic device 1500 instructs the protocol layer connection resource module 1504 to release the resources used by the second electronic device.
具体地,代理模块1503选择的断开的无线通信连接的方式,如前所述,此处不再赘述。比如,前述所提及的冷分区和热分区由代理模块1503来管理。Specifically, the manner in which the agent module 1503 disconnects the wireless communication connection is as described above, which will not be described in detail here. For example, the cold partition and the hot partition mentioned above are managed by the agent module 1503 .
参见图17所示,为本申请实施例提供的一种电子设备的连接管理方法,应用于第一电子设备,所述方法包括:Referring to FIG. 17 , a connection management method for an electronic device provided in an embodiment of the present application is applied to a first electronic device. The method includes:
1701,响应于第一请求,确定第一电子设备上已建立的无线通信连接的数量达到阈值,其中,已建立的无线通信连接包括第一电子设备与第三电子设备之间已建立的第一无线通信连接,第一请求为第二电子设备与第一电子设备建立第二无线通信连接的请求或者第二电子设备与第一电子设备利用第二无线通信连接进行业务数据传输的请求。1701. In response to a first request, determining that the number of established wireless communication connections on the first electronic device has reached a threshold, wherein the established wireless communication connections include a first wireless communication connection established between the first electronic device and a third electronic device, and the first request is a request for a second electronic device to establish a second wireless communication connection with the first electronic device or a request for the second electronic device to transmit business data with the first electronic device using the second wireless communication connection.
1702,根据第一无线通信连接的属性,第一电子设备断开与第三电子设备之间的第一无线通信连接,并建立与第二电子设备之间的第二无线通信连接。1702: According to the attribute of the first wireless communication connection, the first electronic device disconnects the first wireless communication connection with the third electronic device, and establishes a second wireless communication connection with the second electronic device.
在一种可能的实现方式中,所述第一无线通信连接的属性包括所述第一无线通信连接的未传输数据的时长,所述第一无线通信连接的未传输数据的时长大于所述已建立的无线通信连接中其它任一无线通信连接的未传输数据的时长。In a possible implementation, the attribute of the first wireless communication connection includes a duration of no data transmission for the first wireless communication connection, and the duration of no data transmission for the first wireless communication connection is greater than a duration of no data transmission for any other wireless communication connection in the established wireless communication connection.
在一种可能的实现方式中,所述第一无线通信连接的属性包括所述第一无线通信连接在设定时长内传输数据的频率,且述第一无线通信连接传输数据的频率小于所述已建立的无线通信连接中其它任一无线通信连接传输数据的频率。In one possible implementation, the attributes of the first wireless communication connection include the frequency of data transmission by the first wireless communication connection within a set duration, and the frequency of data transmission by the first wireless communication connection is less than the frequency of data transmission by any other wireless communication connection in the established wireless communication connection.
在一种可能的实现方式中,所述第一无线通信连接的属性包括所述第一无线通信连接的生命周期的剩余时长,所述第一无线通信连接的生命周期的剩余时长小于所述已建立的无线通信连接中其它任一无线通信连接的生命周期的剩余时长。 In a possible implementation, the attributes of the first wireless communication connection include a remaining duration of a life cycle of the first wireless communication connection, and the remaining duration of the life cycle of the first wireless communication connection is less than the remaining duration of the life cycle of any other wireless communication connection in the established wireless communication connections.
在一种可能的实现方式中,所述第一无线通信连接的属性包括所述第一无线通信连接属于冷分区。In a possible implementation manner, the attribute of the first wireless communication connection includes that the first wireless communication connection belongs to a cold partition.
位于所述冷分区中的无线通信连接的传输数据的频率小于位于所述冷分区之外的无线通信连接的传输数据的频率,和/或,位于所述冷分区中的无线通信连接的未传输数据的时长大于位于所述冷分区之外的无线通信连接的未传输数据的时长。The frequency of transmitted data of the wireless communication connection located in the cold partition is less than the frequency of transmitted data of the wireless communication connection located outside the cold partition, and/or the duration of non-transmitted data of the wireless communication connection located in the cold partition is greater than the duration of non-transmitted data of the wireless communication connection located outside the cold partition.
基于以上实施例,本申请还提供一种电子设备,该电子设备包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述电子设备运行时,所述至少一个处理器执行本申请实施例所描述的各方法中电子设备所执行的功能。Based on the above embodiments, the present application also provides an electronic device, which includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions, and when the electronic device is running, the at least one processor executes the functions performed by the electronic device in each method described in the embodiments of the present application.
基于以上实施例,本申请还提供一种计算机程序产品,计算机程序产品包括:计算机程序(也可以称为代码,或指令),当计算机程序被运行时,使得计算机执行本申请实施例所描述的各方法。Based on the above embodiments, the present application also provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which enables a computer to execute the methods described in the embodiments of the present application when the computer program is executed.
基于以上实施例,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行本申请实施例所描述的各方法。Based on the above embodiments, the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the methods described in the embodiments of the present application.
基于以上实施例,本申请还提供了一种芯片,所述芯片用于读取存储器中存储的计算机程序,实现本申请实施例所描述的各方法。Based on the above embodiments, the present application further provides a chip, which is used to read a computer program stored in a memory to implement the methods described in the embodiments of the present application.
基于以上实施例,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持计算机装置实现本申请实施例所描述的各方法。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。Based on the above embodiments, the present application provides a chip system, which includes a processor for supporting a computer device to implement the methods described in the embodiments of the present application. In one possible design, the chip system also includes a memory, which is used to store the necessary programs and data for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to the flowchart and/or block diagram of the method, device (system), and computer program product according to the present application. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of the process and/or box in the flowchart and/or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。 Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the protection scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (18)

  1. 一种连接管理系统,其特征在于,包括第一电子设备、第二电子设备以及已与所述第一电子设备建立无线通信连接的多个其它电子设备;所述多个其它电子设备包括第三电子设备,所述第一电子设备与所述第三电子设备建立有第一无线通信连接;A connection management system, characterized in that it includes a first electronic device, a second electronic device, and a plurality of other electronic devices that have established a wireless communication connection with the first electronic device; the plurality of other electronic devices include a third electronic device, and the first electronic device and the third electronic device have established a first wireless communication connection;
    所述第一电子设备,用于:The first electronic device is used for:
    响应于第一请求,确定所述第一电子设备上已建立的无线通信连接的数量达到阈值,所述第一请求为第二电子设备与所述第一电子设备建立第二无线通信连接的请求或者所述第二电子设备与所述第一电子设备利用所述第二无线通信连接进行业务数据传输的请求;In response to a first request, determining that the number of established wireless communication connections on the first electronic device has reached a threshold, wherein the first request is a request for a second electronic device to establish a second wireless communication connection with the first electronic device or a request for the second electronic device to perform service data transmission with the first electronic device using the second wireless communication connection;
    根据所述第一无线通信连接的属性,断开与所述第三电子设备之间的所述第一无线通信连接,并建立与所述第二电子设备之间的第二无线通信连接;According to the attribute of the first wireless communication connection, disconnect the first wireless communication connection with the third electronic device, and establish a second wireless communication connection with the second electronic device;
    所述第二电子设备,用于与所述第一电子设备建立所述第二无线通信连接。The second electronic device is used to establish the second wireless communication connection with the first electronic device.
  2. 如权利要求1所述的系统,其特征在于,所述第二电子设备,还用于向所述第一电子设备发送所述第一请求。The system as claimed in claim 1 is characterized in that the second electronic device is also used to send the first request to the first electronic device.
  3. 如权利要求1或2所述的系统,其特征在于,所述第一无线通信连接的属性包括所述第一无线通信连接的未传输数据的时长,所述第一无线通信连接的未传输数据的时长大于所述已建立的无线通信连接中其它任一无线通信连接的未传输数据的时长;或者,The system according to claim 1 or 2, characterized in that the attribute of the first wireless communication connection includes a duration of non-transmitted data of the first wireless communication connection, and the duration of non-transmitted data of the first wireless communication connection is greater than the duration of non-transmitted data of any other wireless communication connection in the established wireless communication connection; or
    所述第一无线通信连接的属性包括所述第一无线通信连接在设定时长内传输数据的频率,所述第一无线通信连接传输数据的频率小于所述已建立的无线通信连接中其它任一无线通信连接传输数据的频率;或者,The attribute of the first wireless communication connection includes a frequency of data transmission by the first wireless communication connection within a set duration, and the frequency of data transmission by the first wireless communication connection is less than a frequency of data transmission by any other wireless communication connection in the established wireless communication connection; or
    所述第一无线通信连接的属性包括所述第一无线通信连接的生命周期的剩余时长,所述第一无线通信连接的生命周期的剩余时长小于所述已建立的无线通信连接中其它任一无线通信连接的生命周期的剩余时长;或者,The attribute of the first wireless communication connection includes a remaining duration of a life cycle of the first wireless communication connection, and the remaining duration of the life cycle of the first wireless communication connection is less than a remaining duration of a life cycle of any other wireless communication connection in the established wireless communication connections; or,
    所述第一无线通信连接的属性包括所述第一无线通信连接属于冷分区,位于所述冷分区中的无线通信连接的传输数据的频率小于位于所述冷分区之外的无线通信连接的传输数据的频率,和/或,位于所述冷分区中的无线通信连接的未传输数据的时长大于位于所述冷分区之外的无线通信连接的未传输数据的时长。The attributes of the first wireless communication connection include that the first wireless communication connection belongs to a cold partition, the frequency of transmission data of the wireless communication connection located in the cold partition is less than the frequency of transmission data of the wireless communication connection located outside the cold partition, and/or the duration of non-transmission data of the wireless communication connection located in the cold partition is greater than the duration of non-transmission data of the wireless communication connection located outside the cold partition.
  4. 一种电子设备的连接管理方法,其特征在于,应用于第一电子设备,所述方法包括:A connection management method for an electronic device, characterized in that it is applied to a first electronic device, and the method comprises:
    响应于第一请求,确定所述第一电子设备上已建立的无线通信连接的数量达到阈值,其中,所述已建立的无线通信连接包括所述第一电子设备与第三电子设备之间已建立的第一无线通信连接,所述第一请求为第二电子设备与所述第一电子设备建立第二无线通信连接的请求或者所述第二电子设备与所述第一电子设备利用所述第二无线通信连接进行业务数据传输的请求;In response to a first request, determining that the number of established wireless communication connections on the first electronic device reaches a threshold, wherein the established wireless communication connection includes a first wireless communication connection established between the first electronic device and a third electronic device, and the first request is a request for a second electronic device to establish a second wireless communication connection with the first electronic device or a request for the second electronic device to perform service data transmission with the first electronic device using the second wireless communication connection;
    根据所述第一无线通信连接的属性,所述第一电子设备断开与所述第三电子设备之间的所述第一无线通信连接,并建立与所述第二电子设备之间的第二无线通信连接。According to the attribute of the first wireless communication connection, the first electronic device disconnects the first wireless communication connection with the third electronic device and establishes a second wireless communication connection with the second electronic device.
  5. 如权利要求4所述的方法,其特征在于,所述已建立的无线通信连接的类型与所述第二无线通信连接的类型相同,或者,所述第一电子设备上已建立的无线通信连接的类型包括所述业务数据的传输所支持的无线通信连接的类型。The method as claimed in claim 4 is characterized in that the type of the established wireless communication connection is the same as the type of the second wireless communication connection, or the type of the wireless communication connection established on the first electronic device includes the type of wireless communication connection supported by the transmission of the business data.
  6. 如权利要求4或5所述的方法,其特征在于,所述第一无线通信连接的属性包括所述第一无线通信连接的未传输数据的时长,所述第一无线通信连接的未传输数据的时长大于所述已建立的无线通信连接中其它任一无线通信连接的未传输数据的时长;或者,The method according to claim 4 or 5, characterized in that the attribute of the first wireless communication connection includes a duration of non-transmitted data of the first wireless communication connection, and the duration of non-transmitted data of the first wireless communication connection is greater than the duration of non-transmitted data of any other wireless communication connection in the established wireless communication connection; or
    所述第一无线通信连接的属性包括所述第一无线通信连接在设定时长内传输数据的频率,所述第一无线通信连接传输数据的频率小于所述已建立的无线通信连接中其它任一无线通信连接传输数据的频率;或者,The attribute of the first wireless communication connection includes a frequency of data transmission by the first wireless communication connection within a set duration, and the frequency of data transmission by the first wireless communication connection is less than a frequency of data transmission by any other wireless communication connection in the established wireless communication connection; or
    所述第一无线通信连接的属性包括所述第一无线通信连接的生命周期的剩余时长,所述第一无线通信连接的生命周期的剩余时长小于所述已建立的无线通信连接中其它任一无线通信连接的生命周期的剩余时长;或者,The attribute of the first wireless communication connection includes a remaining duration of a life cycle of the first wireless communication connection, and the remaining duration of the life cycle of the first wireless communication connection is less than a remaining duration of a life cycle of any other wireless communication connection in the established wireless communication connections; or,
    所述第一无线通信连接的属性包括所述第一无线通信连接属于冷分区,位于所述冷分区中的无线通信连接的传输数据的频率小于位于所述冷分区之外的无线通信连接的传输数据的频率,和/或,位于所 述冷分区中的无线通信连接的未传输数据的时长大于位于所述冷分区之外的无线通信连接的未传输数据的时长。The attributes of the first wireless communication connection include that the first wireless communication connection belongs to a cold partition, a frequency of transmission data of the wireless communication connection located in the cold partition is less than a frequency of transmission data of the wireless communication connection located outside the cold partition, and/or The duration of non-transmitted data of the wireless communication connection in the cold partition is longer than the duration of non-transmitted data of the wireless communication connection outside the cold partition.
  7. 如权利要求6所述的方法,其特征在于,所述第一电子设备上已建立N个无线通信连接,其中,所述N个无线通信连接包括L个位于冷分区的无线通信连接和M个位于热分区的无线通信连接;The method according to claim 6, characterized in that N wireless communication connections have been established on the first electronic device, wherein the N wireless communication connections include L wireless communication connections located in the cold partition and M wireless communication connections located in the hot partition;
    所述M个位于热分区的无线通信连接中的任一无线通信连接未传输数据的时长小于所述L个位于冷分区的无线通信连接中的任一无线通信连接未传输数据的时长,和/或,位于所述冷分区中的无线通信连接的传输数据的频率小于位于所述冷分区之外的无线通信连接的传输数据的频率。The duration during which any of the M wireless communication connections located in the hot partition does not transmit data is shorter than the duration during which any of the L wireless communication connections located in the cold partition does not transmit data, and/or the frequency of data transmission of the wireless communication connections located in the cold partition is lower than the frequency of data transmission of the wireless communication connections located outside the cold partition.
  8. 如权利要求7所述的方法,其特征在于,当所述第一电子设备断开与所述第三电子设备之间的第一无线通信连接,并建立与所述第二电子设备之间的第二无线通信连接后,所述方法还包括:The method according to claim 7, characterized in that, after the first electronic device disconnects the first wireless communication connection with the third electronic device and establishes the second wireless communication connection with the second electronic device, the method further comprises:
    将所述第一无线通信连接的信息从所述冷分区中删除,并将所述第二无线通信连接的信息添加在所述冷分区中。The information of the first wireless communication connection is deleted from the cold partition, and the information of the second wireless communication connection is added to the cold partition.
  9. 如权利要求8所述的方法,其特征在于,所述冷分区和所述热分区采用链表存储无线通信连接的信息,其中,所述第一无线通信连接的信息位于所述冷分区的尾节点。The method as claimed in claim 8 is characterized in that the cold partition and the hot partition use a linked list to store information of wireless communication connections, wherein the information of the first wireless communication connection is located at the tail node of the cold partition.
  10. 如权利要求9所述的方法,其特征在于,将所述第一无线通信连接的信息从所述冷分区中删除,将所述第二无线通信连接的信息添加在所述冷分区,包括:The method according to claim 9, wherein deleting the information of the first wireless communication connection from the cold partition and adding the information of the second wireless communication connection to the cold partition comprises:
    将所述第一无线通信连接的信息从所述冷分区的尾节点中删除,并将所述第二无线通信连接的信息添加在所述冷分区的头节点。The information of the first wireless communication connection is deleted from the tail node of the cold partition, and the information of the second wireless communication connection is added to the head node of the cold partition.
  11. 如权利要求7-10任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 10, characterized in that the method further comprises:
    当位于所述热分区中的第三无线通信连接在生命周期内执行数据传输的次数小于第一次数阈值时,将所述第三无线通信连接的信息从所述热分区移到所述冷分区;或者,When the number of data transmissions performed by the third wireless communication connection in the hot partition during its life cycle is less than a first number threshold, moving information of the third wireless communication connection from the hot partition to the cold partition; or,
    当位于所述热分区中的第三无线通信连接的生命周期到期时,将所述第三无线通信连接的信息从所述热分区移到所述冷分区。When the life cycle of the third wireless communication connection in the hot zone expires, information of the third wireless communication connection is moved from the hot zone to the cold zone.
  12. 如权利要求7-11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 11, characterized in that the method further comprises:
    当位于所述冷分区中的第四无线通信连接在生命周期内执行数据传输的次数达到第二次数阈值时,将所述第四无线通信连接的信息从所述冷分区移到所述热分区。When the number of times a fourth wireless communication connection located in the cold partition performs data transmission within a life cycle reaches a second number threshold, information of the fourth wireless communication connection is moved from the cold partition to the hot partition.
  13. 如权利要求7-11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 11, characterized in that the method further comprises:
    位于所述冷分区的第四无线通信连接在生命周期内每执行一次数据传输,将所述第四无线通信连接的生命周期的剩余时长增加第一时长阈值,当所述第四无线通信连接的生命周期达到设定时长时,将所述第四无线通信连接的信息从所述冷分区移到所述热分区。Each time the fourth wireless communication connection located in the cold partition performs data transmission within its life cycle, the remaining duration of the life cycle of the fourth wireless communication connection is increased by a first duration threshold; when the life cycle of the fourth wireless communication connection reaches the set duration, the information of the fourth wireless communication connection is moved from the cold partition to the hot partition.
  14. 如权利要求7-11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 11, characterized in that the method further comprises:
    位于所述冷分区的第四无线通信连接在生命周期内第i次执行数据传输时,将所述第四无线通信连接的生命周期的剩余时长增加第二时长阈值,位于所述冷分区的第四无线通信连接在生命周期内第i+1次执行数据传输时,将所述第四无线通信连接的生命周期的剩余时长增加第三时长阈值;所述第三时长阈值大于所述第二时长阈值;When the fourth wireless communication connection located in the cold partition performs data transmission for the i-th time within its life cycle, the remaining duration of the life cycle of the fourth wireless communication connection is increased by the second duration threshold; when the fourth wireless communication connection located in the cold partition performs data transmission for the i+1-th time within its life cycle, the remaining duration of the life cycle of the fourth wireless communication connection is increased by the third duration threshold; the third duration threshold is greater than the second duration threshold;
    当所述第四无线通信连接的生命周期达到设定时长时,将所述第四无线通信连接的信息从所述冷分区移到所述热分区。When the life cycle of the fourth wireless communication connection reaches a set duration, information of the fourth wireless communication connection is moved from the cold partition to the hot partition.
  15. 如权利要求4-14任一项所述的方法,其特征在于,所述第一电子设备断开与所述第三电子设备之间的所述第一无线通信连接后,所述方法还包括:The method according to any one of claims 4 to 14, characterized in that after the first electronic device disconnects the first wireless communication connection with the third electronic device, the method further comprises:
    将所述第一无线通信连接的连接参数保存;Saving connection parameters of the first wireless communication connection;
    当所述第三电子设备请求与所述第一电子设备建立无线通信连接时,所述第一电子设备根据保存的所述第一无线通信连接的连接参数与所述第三电子设备建立所述第一无线通信连接。When the third electronic device requests to establish a wireless communication connection with the first electronic device, the first electronic device establishes the first wireless communication connection with the third electronic device according to the saved connection parameters of the first wireless communication connection.
  16. 一种电子设备,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合,所述至少一个处理器用于读取所述至少一个存储器所存储的计算机程序,以执行如权利要求4至15中任一项所述的方法。An electronic device, characterized in that it comprises at least one processor, wherein the at least one processor is coupled to at least one memory, and the at least one processor is used to read a computer program stored in the at least one memory to execute a method as described in any one of claims 4 to 15.
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求4至15中任一项所述的方法。A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer is caused to execute the method as claimed in any one of claims 4 to 15.
  18. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求4至15中任一项所述的方法。 A computer program product comprising instructions, characterized in that when the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 4 to 15.
PCT/CN2023/137532 2022-12-26 2023-12-08 Connection management method, apparatus, and system for electronic device WO2024140122A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211673033.3 2022-12-26
CN202211673033.3A CN118265182A (en) 2022-12-26 2022-12-26 A method, device and system for connection management of electronic equipment

Publications (1)

Publication Number Publication Date
WO2024140122A1 true WO2024140122A1 (en) 2024-07-04

Family

ID=91611669

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/137532 WO2024140122A1 (en) 2022-12-26 2023-12-08 Connection management method, apparatus, and system for electronic device

Country Status (2)

Country Link
CN (1) CN118265182A (en)
WO (1) WO2024140122A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120111465A (en) * 2025-04-02 2025-06-06 飞天诚信科技股份有限公司 A method and device for communicating between a Hongmeng system device and a Bluetooth device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118964348B (en) * 2024-07-17 2025-06-03 安徽鸿凌科技股份有限公司 Method and system for acquiring production environment data of gas meter

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150031404A1 (en) * 2013-07-23 2015-01-29 Brother Kogyo Kabushiki Kaisha Function Execution Apparatus
JP2020162101A (en) * 2019-03-28 2020-10-01 三菱電機インフォメーションシステムズ株式会社 Slave connection switching device and slave connection switching method
CN112399396A (en) * 2021-01-19 2021-02-23 深圳市汇顶科技股份有限公司 Bluetooth connection switching method, Bluetooth chip and Bluetooth device
CN113747406A (en) * 2021-08-06 2021-12-03 深圳Tcl新技术有限公司 Bluetooth connection method, device, Bluetooth equipment and storage medium
CN113766477A (en) * 2021-09-23 2021-12-07 Oppo广东移动通信有限公司 Device connection method, device, electronic device and computer readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150031404A1 (en) * 2013-07-23 2015-01-29 Brother Kogyo Kabushiki Kaisha Function Execution Apparatus
JP2020162101A (en) * 2019-03-28 2020-10-01 三菱電機インフォメーションシステムズ株式会社 Slave connection switching device and slave connection switching method
CN112399396A (en) * 2021-01-19 2021-02-23 深圳市汇顶科技股份有限公司 Bluetooth connection switching method, Bluetooth chip and Bluetooth device
CN113747406A (en) * 2021-08-06 2021-12-03 深圳Tcl新技术有限公司 Bluetooth connection method, device, Bluetooth equipment and storage medium
CN113766477A (en) * 2021-09-23 2021-12-07 Oppo广东移动通信有限公司 Device connection method, device, electronic device and computer readable medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120111465A (en) * 2025-04-02 2025-06-06 飞天诚信科技股份有限公司 A method and device for communicating between a Hongmeng system device and a Bluetooth device

Also Published As

Publication number Publication date
CN118265182A (en) 2024-06-28

Similar Documents

Publication Publication Date Title
CN113645693B (en) WiFi P2P connection method, electronic device and medium
JP7554905B2 (en) Channel adjustment method and electronic device - Patents.com
US20240205823A1 (en) Sleep scheduling method and device
CN113490191B (en) Bluetooth communication method, medium and electronic device thereof
WO2024140122A1 (en) Connection management method, apparatus, and system for electronic device
WO2021218864A1 (en) Implementation method for wi-fi peer-to-peer service and related device
CN114647350B (en) Application sharing method, electronic device and storage medium
WO2021135734A1 (en) Method for transmitting file in application, and electronic device and system
CN115278611A (en) Method and equipment for establishing connection among multiple devices
CN114390501B (en) Method and electronic device for data transmission
CN114615660B (en) Access method, system and electronic equipment
CN112130788A (en) A content sharing method and device thereof
EP4202666A1 (en) Application access method and related apparatus
CN112351411B (en) Information transmission method and electronic device
WO2022135553A1 (en) Screen projection method capable of continuously playing videos, and apparatus and system
CN113572890B (en) Volume management method and electronic device
WO2022068646A1 (en) Data transmission method and electronic device
CN112015359A (en) Display method and electronic equipment
CN114928899B (en) Physical link establishment method and electronic equipment
CN117156091B (en) Video call method and electronic equipment
WO2024109443A1 (en) Device connection method, device and system
WO2024046062A1 (en) Cross-device card interaction method and electronic device
CN118264709A (en) Service discovery method and electronic equipment
WO2024022256A1 (en) Method for managing connection between devices, and device and system
CN120018124A (en) Network distribution method and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23910052

Country of ref document: EP

Kind code of ref document: A1