Communication connection management method and electronic equipment

By establishing and maintaining P2P connections between electronic devices, the problem of delay in obtaining image information between devices is solved, and the efficiency of information acquisition and user experience is improved.

CN120201590AActive Publication Date: 2025-06-24HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311737307.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2025-06-24
Estimated Expiration
2043-12-15

AI Technical Summary

Technical Problem

When establishing a P2P connection between multiple electronic devices, there is a delay in acquiring image information between devices, which increases the user's waiting time.

Method used

By establishing and maintaining a P2P connection between the first device and the second device, it is ensured that the connection remains open at all times when information transmitted by the second device is required. The specific method includes establishing two session sessions when the first device receives the camera enabled operation and carrying them in a P2P connection to ensure that the connection is constantly open.

Benefits of technology

By maintaining P2P connection, the delay in switching cameras between devices is reduced, the efficiency of obtaining information between devices is improved, and the user's waiting time is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201590A_ABST
    Figure CN120201590A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a communication connection management method and electronic equipment, relates to the technical field of electronic equipment, and enables P2P connection between first equipment and second equipment to be kept uninterrupted when the first equipment acquires information transmitted by the second equipment. According to the scheme, the method is applied to first equipment, and equipment in communication connection with the first equipment comprises second equipment. The second device is provided with a first camera. The method comprises the following steps: a first device receives a first operation for starting a first camera; in response to the first operation, the first device establishes a first session with the second device. The first session is used for transmitting image information acquired by the first camera. The first device establishes a second session with the second device. Wherein the first session and the second session are both carried in the first P2P connection, and the first P2P connection is the P2P connection between the first device and the second device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of electronic devices, and in particular, to a communication connection management method and an electronic device. Background Art

[0002] Currently, multiple electronic devices can share camera resources by establishing a P2P connection.

[0003] Taking the multiple electronic devices including Device 1 and Device 2 as an example, where Device 2 includes Camera A and Camera B. When Device 1 activates Camera A, it can establish a P2P connection 1 with Device 1. Device 1 can obtain the image information collected by Camera A based on this P2P connection 1. When Device 1 switches from Camera A to activate Camera B, it can establish a P2P connection 2 with Device 1. Device 1 can obtain the image information collected by Camera B based on this P2P connection 2.

[0004] Since establishing a P2P connection takes a certain amount of time, it results in a delay in Device 1 obtaining the image information collected by Device B, and at the same time increases the waiting time of the user. Summary of the Invention

[0005] The embodiments of the present application provide a communication connection management method and an electronic device, such that when a first device needs to obtain information transmitted by a second device, the P2P connection between the first device and the second device remains uninterrupted.

[0006] In a first aspect, a communication connection management method is applied to a first device, and the devices communicatively connected to the first device include a second device. The second device is configured with a first camera. The method includes: the first device receives a first operation for activating the first camera. In response to the first operation, the first device establishes a first session with the second device. The first session is used to transmit the image information collected by the first camera. The first device establishes a second session with the second device. Wherein, both the first session and the second session are carried on a first P2P connection, and the first P2P connection is the P2P connection between the first device and the second device.

[0007] In an embodiment of the present application, if there is no session in the first P2P connection, the first device will release the first P2P connection. Based on the above solution, when the first device receives a first operation for starting the first camera, it establishes a first session with the second device. Additionally, the first device also establishes a second session with the second device. Both the first session and the second session are carried in the first P2P connection. Since the second session is also carried in the first P2P connection, the first P2P connection can be kept from disconnecting.

[0008] Optionally, the first device establishing the second session with the second device includes: before the first session is released, the first device establishing the second session with the second device. In this way, when the first device releases the first session subsequently, since the second session is still carried in the first P2P connection, the first P2P connection will not be immediately disconnected.

[0009] Optionally, the first device establishing the second session with the second device includes: the first device sending a first request to the second device, the first request carrying information of the second session. The first device receives a first response, and the first response indicates that the second session is successfully established. Thus, the first device and the second device can achieve the establishment of the second session.

[0010] Optionally, the first request further carries information of the first session. The first response is further used to indicate that the first session is successfully established. In this way, the first device and the second device can simultaneously establish the first session and the second session.

[0011] Optionally, the first request is further used to indicate establishing the first P2P connection with the second device. The first response is further used to indicate that the first P2P connection is successfully established. Thus, the first device and the second device can achieve the establishment of the first P2P connection.

[0012] Optionally, the method further includes: when it is determined that only the second session is carried in the first P2P connection within a first duration, releasing the second session. In this way, when other sessions in the first P2P connection are released, the second session is still carried in the first P2P connection within the first duration, and thus the first P2P connection can still be kept from disconnecting within the first duration.

[0013] Optionally, before releasing the second session, the method further includes: the first device sending a first renewal indication. The first device receives and in response to the first renewal indication, maintains the second session. Sending the first renewal indication to the second device so that when the second device receives the first renewal indication, it maintains the second session. Thus, after the second session is established, the keep-alive of the second session can be implemented, and further the first P2P connection always exists.

[0014] Optionally, the sending of the first renewal indication includes: when it is determined that a third session is carried on the first P2P connection, sending the first renewal indication. The third session is different from the second session, and the third session includes the first session. In this way, when a session different from the second session is carried on the first P2P connection, the second session can always be carried on the first P2P connection.

[0015] Optionally, the determining that the first P2P connection only carries the second session within a first duration includes: when the first P2P connection only carries the second session, starting a first timer. The timing duration of the first timer is the first duration. When the first timer expires, it is determined that the first P2P connection only carries the second session. Thus, it can be determined that only the second session exists in the first P2P connection within the first duration, which is convenient for the first device to manage the validity period of the second session later.

[0016] Optionally, the first device is configured with a second timer. The second timer is used to trigger the first device to release the second session when the timing duration ends. The maintaining of the second session includes: before the timing duration of the second timer ends, resetting the timing duration of the second timer. Thus, the keep-alive of the second session can be implemented, and further the first P2P connection remains uninterrupted.

[0017] Optionally, the releasing of the second session includes: the first device sending a first release indication. Receiving and in response to the first release indication, releasing the second session. In this way, the first device can release the second session when it receives the first release indication.

[0018] Optionally, the first device is configured with a display screen. The method further includes: after the first camera is started, receiving first image information through the first session. The first image information is captured by the first camera. When the first image information is received, a first interface is displayed. The first interface includes a first image. The first image corresponds to the first image information. In this way, the first device can obtain the image information captured by the first camera through the first session, realizing the use of the first camera.

[0019] Optionally, the second device is configured with a second camera. After the first interface is displayed, the method includes: the first device receives a second operation for switching to use the second camera. In response to the second operation, the first device establishes a fourth session with the second device. The fourth session is used to transmit the image information captured by the second camera. The fourth session is carried in a first P2P connection, and the fourth session is included in the third session.

[0020] In this way, the first device realizes obtaining the image information captured by the second camera based on the first P2P connection. It avoids re - establishing a P2P connection between the first device and the second device, improves the efficiency of the first device switching from the first camera to the second camera, and reduces the waiting time of the user.

[0021] Optionally, before the first device establishes the fourth session with the second device, the method further includes: turning off the first camera and releasing the first session.

[0022] Optionally, the first device establishing the fourth session with the second device includes: the first device sending a second request to the second device, the second request carrying information of the fourth session. The first device receives a second response indicating that the fourth session is successfully established. Thus, the first device realizes establishing the fourth session with the second device.

[0023] In a second aspect, an electronic device includes one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the communication connection management method provided in any one of the first aspect and its optional designs.

[0024] In a third aspect, a chip system includes a processor and a communication interface. The processor is configured to call and run a computer program stored in a storage medium, and execute the communication connection management method provided in any one of the first aspect and its optional designs.

[0025] In a fourth aspect, a computer-readable storage medium is provided, which includes computer instructions that, when running, execute the communication connection management method provided in any one of the first aspect and its optional designs.

[0026] In a fifth aspect, a computer program product is provided, the computer program includes instructions that, when the computer runs the instructions, execute the communication connection management method provided in any one of the first aspect and its optional designs.

[0027] It can be understood that the technical solutions provided in the above second to fifth aspects can respectively correspond to the communication connection management methods provided in the foregoing designs, and the beneficial effects that can be obtained are similar, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 FIG. [X] is a schematic diagram of an interface of a communication connection management method;

[0029] Figure 2 FIG. [X] is a schematic diagram of an interface of another communication connection management method;

[0030] Figure 3 FIG. [X] is a schematic diagram of interface interaction of a communication connection management method;

[0031] Figure 4 FIG. [X] is a schematic diagram of the inter-module interaction process of a communication connection management method;

[0032] Figure 5 FIG. [X] is a schematic diagram of an interface of another communication connection management method;

[0033] Figure 6 FIG. [X] is a schematic diagram of an interface of another communication connection management method;

[0034] Figure 7 FIG. [X] is a schematic diagram of an interface of another communication connection management method;

[0035] Figure 8 FIG. [X] is a schematic diagram of an interface of another communication connection management method;

[0036] Figure 9 FIG. [X] is a schematic diagram of the inter-module interaction process of a communication connection management method provided by an embodiment of the present application;

[0037] Figure 10Schematic flowchart of a communication connection management method provided by an embodiment of the present application;

[0038] Figure 11 Schematic diagram of the composition of an electronic device provided by an embodiment of the present application;

[0039] Figure 12 Schematic diagram of the composition of another electronic device provided by an embodiment of the present application;

[0040] Figure 13 Schematic diagram of the composition of another electronic device provided by an embodiment of the present application;

[0041] Figure 14 Schematic diagram of the composition of a chip system provided by an embodiment of the present application. Detailed implementation manners

[0042] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of this embodiment, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0043] Currently, multiple electronic devices can share hardware resources by establishing a P2P connection.

[0044] Exemplarily, taking Electronic Device 1 (abbreviated as Device 1) and Electronic Device 2 (abbreviated as Device 2) as an example, Device 2 includes at least one camera, and a P2P connection is established between Device 1 and Device 2. Based on this P2P connection, Device 1 can call any one of the target cameras 1 in Device 2 to send the image information A collected by the target camera 1 to Device 1.

[0045] Similarly, in some implementations, Device 1 includes at least one camera. Based on this P2P connection, Device 2 can call any one of the target cameras 2 in Device 1 to send the image information B collected by the target camera 2 to Device 2.

[0046] Hereinafter, taking Device 1 as an example, the specific implementation of Device 1 calling any one of the target cameras 1 in Device 2 will be described.

[0047] In some embodiments, before establishing a P2P connection between Device 1 and Device 2, Device 1 and Device 2 need to perform device discovery first. So that Device 1 can recognize the cameras in Device 2 subsequently.

[0048] As an implementation, Device 1 can discover Device 2 by establishing a wireless communication connection with Device 2. The wireless communication connection can include any one of wireless communication connection methods such as Bluetooth connection, WIFI connection, and NFC connection.

[0049] As another implementation, Device 1 is installed with Device Discovery Application 1, and Device 2 is installed with Device Discovery Application 2. When Device Application 1 and Device Application 2 log in to the same account and a wireless communication connection is established between Device 1 and Device 2, Device 1 can discover Device 2 through Device Application 1.

[0050] Taking Device 1 as a laptop computer and Device 2 as a mobile phone as an example, the discovery of Device 2 by Device 1 according to Device Discovery Application 1 will be described with reference to the accompanying drawings.

[0051] Specifically, referring to Figure 1 , Figure 1 shows the interface 101 of Device Discovery Application 1 in Device 1. The interface 101 may include function items such as device interconnection. Device interconnection can be used to display the identified electronic devices to the user.

[0052] As Figure 1 shown, assume that the account logged in by Device Discovery Application 2 in Device 2 is Account A. When the account logged in by Device Discovery Application 1 in Device 1 is also Account A and a wireless communication connection (such as a Bluetooth connection) is established between Device 1 and Device 2, Device 1 can display the interface 101. Among them, the interface 101 corresponds to the detailed interface of device interconnection. Device 2 is included in the interface 101.

[0053] In this embodiment, a virtual driver module is also configured in Device 1. The virtual driver module includes parameter information of the virtual camera. The parameter information may include the identifier and attributes corresponding to the virtual camera, etc. The virtual driver module is used for the registration of the virtual camera.

[0054] Exemplarily, after Device 1 identifies Device 2, it can register the required virtual camera through this virtual driver module. Among them, the virtual camera corresponds to at least one camera included in Device 2.

[0055] For example, Device 2 includes Camera A and Camera B. The virtual driver module may include Parameter Information A and Parameter Information B. Among them, Parameter Information A includes the identifier and attributes corresponding to Camera A, and Parameter Information B includes the identifier and attributes corresponding to Camera B. After Device 1 identifies Device 2, it can register Virtual Camera A according to Parameter Information A and register Virtual Camera B according to Parameter Information B through this virtual driver module. Among them, Virtual Camera A corresponds to Camera A, and Virtual Camera B corresponds to Camera B.

[0056] It can be understood that the virtual cameras A and B registered in device 1 can be viewed in the device manager.

[0057] For example, taking camera A as the front camera of device 2 and camera B as the rear camera of device 2 as an example, Figure 2 The interface 201 corresponding to the device manager in device 1 is shown. Other device resources such as cameras in device 1 are displayed in interface 201. The camera in device 1 may include the front camera of device 2 and the rear camera of device 2, etc.

[0058] Reference Figure 3 , after the virtual cameras A and B are registered in device 1, device 1 can establish a P2P connection with device 2 and use the virtual cameras A and B. Furthermore, the image information collected by cameras A and B can be sent to device 1.

[0059] Exemplarily, device 1 can use the virtual cameras A and B through the application installed on the upper layer. Taking this application as a conference application as an example, reference Figure 4 , which is a schematic diagram of the method interaction for device 1 to obtain the image information collected by cameras A and B.

[0060] As Figure 4 shown, device 1 includes a conference application, a virtual driver module, a service management module A, a distributed mobile sensing development platform (DMSDP) module A, and a connection module A. Among them, the service management module A is used to manage the corresponding prompt information (such as "Camera A is being turned on") when device 1 requests to turn on cameras A and B. The connection module A is used to provide a communication interface 1 to facilitate data interaction between device 1 and device 2 through this communication interface 1. The DMSDP module A is used to control the data transmission between device 1 and device 2.

[0061] Device 2 includes a connection module B, a DMSDP module B, a service management module B, camera A, and camera B. Among them, the service management module B is used to obtain the user's authorization for camera usage permission and manage the corresponding prompt information (such as "Camera A is in use"). The connection module B is used to realize data interaction between device 2 and device 1. The DMSDP module B is used to control the data transmission between device 2 and device 1.

[0062] As Figure 4 shown, the process for device 1 to obtain the image information collected by camera A and / or camera B may include:

[0063] S401. In response to operation 503, the conferencing application sends startup request 1 to the virtual drive module.

[0064] In some embodiments of the present application, referring to Figure 5 , taking the conferencing application as an example, Figure 5 Figure 501 shows the user interface of the conferencing application. Other function items such as turning on the camera are included in interface 501. In interface 501, the user can input operation 502 to the control 1 corresponding to turning on the camera, so as to select the camera to be turned on. Among them, operation 502 can be a click operation on control 1.

[0065] In response to operation 502, the cameras included in device 1 can be displayed in interface 501. As Figure 5 shown, device 1 may include a front camera of device 2 and a rear camera of device 2, etc.

[0066] In some implementations, in interface 501, the user can input operation 503 to the control 2 corresponding to the front camera of device 2, and this operation 503 is used to instruct device 1 to turn on the front camera of device 2 (such as camera A). Among them, operation 503 can be a click operation on control 2.

[0067] As Figure 4 shown, in response to operation 503, the conferencing application can send startup request 1 to the virtual drive module. Among them, this startup request 1 is used to instruct to start camera A.

[0068] S402. When the virtual drive module receives startup request 1, it sends startup request 1 to DMSDP module A.

[0069] S403. When DMSDP module A receives startup request 1, it sends startup request 1 to service module A.

[0070] In this embodiment, when DMSDP module A receives startup request 1, it can also perform the operations in S407.

[0071] S404. When service module A receives startup request 1, it generates prompt message 1.

[0072] Exemplarily, referring to Figure 5 , when the service module receives startup request 1, it can generate prompt message 1 as shown in interface 504. This prompt message 1 may include "The camera is being turned on...".

[0073] In this embodiment, when service module A receives startup request 1, it can also perform the operations in S405.

[0074] S405. The service module A sends the start request 1 to the service module B.

[0075] Combined with the foregoing Figure 1 In the description, a wireless communication connection is established between device 1 and device 2. Taking this wireless communication connection as a Bluetooth connection as an example, in this embodiment, the service module A can send the start request 1 to the service module B through this Bluetooth connection.

[0076] S406. The DMSDP module A sends a request 2 to establish a P2P connection 1 to the DMSDP module B.

[0077] Exemplarily, when the DMSDP module A receives the start request 1 in S402, it can send a request 2 to establish a P2P connection 1 to the DMSDP module B. Among them, the information of session 1 (which can also be called a session) is carried in the request 2. Session 1 is used to transmit the image information collected by the camera A based on the P2P connection 1.

[0078] As an implementation manner, the DMSDP module A can send a request 2 to establish a P2P connection 1 to the DMSDP module B by calling the communication interface 1 provided in the connection module A.

[0079] S407. The DMSDP module B sends a P2P connection 1 establishment success message to the DMSDP module A.

[0080] Exemplarily, when the DMSDP module B receives the request 2 to establish a P2P connection 1, in response to the request 2, it can send a P2P connection 1 establishment success message to the DMSDP module A.

[0081] In this example, after the P2P connection 1 is successfully established, session 1 is carried in the P2P connection 1.

[0082] S408. When the service module B receives the start request 1, it generates a pop-up window 1.

[0083] Exemplarily, the pop-up window 1 is used to provide an operation window for the user to authorize the use of the camera permission in device 2. Device 2 can display the corresponding interface according to the pop-up window 1.

[0084] For example, referring to Figure 6 , Figure 6 shows the user interface 601 of device 2. Among them, the interface 601 includes a pop-up window 1. In some implementations, the user can input an operation 602 to the control 3. The operation 602 is used to authorize device 1 to enable the camera included in device 2. Among them, the operation 602 can be a click operation on the control 3.

[0085] In response to operation 602, service module B can also continue with the operations in S409 and S410.

[0086] S409. In response to operation 602, service module B sends indication A to camera A.

[0087] Exemplarily, this indication A is used to instruct camera A to turn on.

[0088] S410. Service module B generates prompt message 2.

[0089] In some embodiments, in response to operation 602, service module B can generate prompt message 2. This prompt message 2 is used to prompt the user that camera A is in use. Device 2 can display a corresponding interface according to this prompt message 2.

[0090] For example, referring to Figure 7 , Figure 7 shows the user interface 701 of device 2. Among them, the interface 701 includes prompt message 2. This prompt message 2 can include "The front camera is in use".

[0091] It should be noted that in some other embodiments, in response to operation 602, service module B can also provide operations for managing camera A. These operations for managing camera A can include pausing the use of camera A and turning off camera A, etc.

[0092] Correspondingly, the interface 701 can also include control 4 and control 5. Among them, control 4 is used to provide the user with an operation to pause the use of camera A, and control 5 is used to provide the user with an operation to turn off camera A.

[0093] S411. Camera A starts to boot up.

[0094] Exemplarily, in response to indication A, camera A starts to boot up.

[0095] In this example, after starting up, camera A can continue with the operation in S412.

[0096] S412. Camera A sends the captured image information A to DMSDP module B.

[0097] Exemplarily, referring to Figure 7 , taking the image range that can be captured by camera A in device 2 as the fan-shaped area 702, in this area 702, there is object 1. In this example, camera A can send the captured image information A to DMSDP module B in device 1. Among them, this image information A corresponds to object 1.

[0098] S413. When the DMSDP module B receives the image information A, it sends the image information A to the DMSDP module A.

[0099] Exemplarily, in combination with the foregoing description, when the DMSDP module B receives the image information A collected by the camera A, it can send the image information A to the DMSDP module A through the established session1. Thus, the device 1 can obtain the image information A.

[0100] S414. When the DMSDP module A receives the image information A, it decodes the image information A to obtain the image information B.

[0101] It can be understood that in order to improve the efficiency of information transmission, the image information A can be encoded first and then sent to the device 1. Correspondingly, when the device 1 receives the image information A, it also needs to decode the image information A.

[0102] Exemplarily, when receiving the image information A, the device 1 can decode the image information A through the DMSDP module A to obtain the image information B.

[0103] In this example, after obtaining the image information B, the DMSDP module A can continue with the operations in S415.

[0104] S415. The DMSDP module A sends the image information B to the virtual driver module.

[0105] S416. The virtual driver module sends the image information B to the conferencing application.

[0106] Exemplarily, when the virtual driver module receives the image information B, it can send the image information B to the conferencing application. In this way, the device 1 will display the corresponding interface in the conferencing application according to the image information B.

[0107] For example, as Figure 7 shown, when the conferencing application receives the image information B, it can display the interface 703 correspondingly. The interface 703 displays an image 705, and the image 705 corresponds to the image information A collected by the camera A.

[0108] In this way, the device 1 has thus completed obtaining the image information A collected by the camera A.

[0109] In some embodiments, referring to Figure 7 , in the interface 703, the user can input an operation 704 to the control 6 corresponding to the rear camera of the device 2, and the operation 704 is used to instruct the device 1 to turn on the rear camera of the device 2 (such as the camera B). Among them, the operation 704 can be a click operation on the control 6.

[0110] In this embodiment, when the device 1 receives the operation 704, it can perform further processing according to Figure 4 the method provided in. So that the device 1 can switch the virtual camera A to the virtual camera B, and then call the camera B in the device 2.

[0111] As Figure 4 shown, the process may include:

[0112] S417. In response to the operation 704, the conference application sends a close request 3 to the virtual drive module.

[0113] Exemplarily, the close request 3 is used to indicate closing the camera A. In this example, in response to the operation 704, the conference application can send the close request 3 to the virtual drive module.

[0114] S418. When the virtual drive module receives the close request 3, it sends the close request 3 to the DMSDP module A.

[0115] In this embodiment, when the DMSDP module A receives the close request 3 for closing the camera A, it can continue with the operation in S419.

[0116] S419. When the DMSDP module A receives the close request 3, it sends the close request 3 to the DMSDP module B.

[0117] S420. When the DMSDP module B receives the close request 3, it closes the camera A.

[0118] As an implementation, the device 2 is configured with a camera management module, which is used to control the opening and / or closing of the camera. In this implementation, when the DMSDP module B receives the close request 3 for closing the camera A, it can close the camera A through this camera management module.

[0119] S421. The DMSDP module A sends an indication B to the connection module A.

[0120] Exemplarily, when the DMSDP module A receives the close request 3 in S418, it can also send an indication B to the connection module A. Wherein, the indication B is used to indicate releasing session1.

[0121] S422. In response to the indication B, the connection module A releases session1 and disconnects the P2P connection 1.

[0122] Exemplarily, when the connection module A receives the indication B, in response to the indication B, it releases session1 on the P2P connection 1.

[0123] It should be noted that in this embodiment, when at least one session (such as session1) is carried in the P2P connection 1, the connection module A maintains the establishment of the P2P connection 1 between device 1 and device 2. On the contrary, when there is no session in the P2P connection 1, the connection module A will disconnect the P2P connection 1.

[0124] According to the foregoing description, after the connection module A releases session1, it will disconnect the P2P connection 1.

[0125] S423. The conference application sends a start request 4 to the virtual drive module.

[0126] Exemplarily, the conference application can send a start request 4 to the virtual drive module after sending a close request 3 to turn off camera A. Among them, the start request 4 is used to indicate starting camera B.

[0127] S424. When the virtual drive module receives the start request 4, it sends the start request 4 to the DMSDP module A.

[0128] S425. When the DMSDP module A receives the start request 4, it sends the start request 4 to the service module A.

[0129] In this embodiment, when the DMSDP module A receives the start request 4, it can also perform the operations in S428.

[0130] S426. When the service module A receives the start request 4, it generates a prompt message 3.

[0131] Exemplarily, similar to the prompt message 1, the prompt message 3 can include "The camera is being turned on...". In this way, device 1 can display the prompt message 3 on the user interface of the conference application according to the prompt message 3.

[0132] In this embodiment, when the service module A receives the start request 4, it can also perform the operations in S427.

[0133] S427. The service module A sends the start request 4 to the service module B.

[0134] Exemplarily, when the service module A receives the start request 4, it can send the start request 4 to the service module B.

[0135] In this example, the service module A sends the start request 4 to the service module B in the same implementation manner as sending the start request 1. The specific content can refer to the description in S405 and will not be elaborated here.

[0136] S428. The DMSDP module A sends a request 5 to establish a P2P connection 2 to the DMSDP module B.

[0137] Exemplarily, when DMSDP module A receives the start request 4 in S424, it may send a request 5 to establish a P2P connection 2 to DMSDP module B. Among them, the information of session2 is carried in the request 5. Session2 is used to transmit the image information collected by camera B based on the P2P connection 2.

[0138] S429. DMSDP module B sends a P2P connection 2 establishment success message to DMSDP module A.

[0139] Exemplarily, when DMSDP module B receives the request 5 to establish a P2P connection 2, in response to the request 5, it may send a P2P connection 2 establishment success message to DMSDP module A.

[0140] In this example, after the P2P connection 2 is successfully established, session2 is carried in the P2P connection 2.

[0141] S430. Service module B sends an instruction C to camera B.

[0142] Exemplarily, when service module B receives the start request 4, it may send an instruction B to camera B. Among them, instruction B is used to instruct camera B to turn on.

[0143] S431. Service module B generates a prompt message 4.

[0144] In some embodiments, after sending the instruction C to camera B, service module B may generate a prompt message 4. The prompt message 4 is used to prompt the user that camera B is in use. Device 2 may display a corresponding interface according to the prompt message B.

[0145] For example, referring to Figure 8 , Figure 8 shows the user interface 801 of device 2. Among them, the interface 801 includes a prompt message 4. The prompt message 4 may include "Rear camera in use".

[0146] It should be noted that in some other embodiments, in response to the operation 802, service module B may also provide operations to manage camera B. The operations to manage camera B may include operations such as pausing the use of camera B and turning off camera B.

[0147] Correspondingly, the interface 801 may also include a control 6 and a control 7. Among them, control 6 is used to provide an operation for the user to pause the use of camera B, and control 7 is used to provide an operation for the user to turn off camera B.

[0148] S432. Camera B starts to start.

[0149] Exemplarily, when camera B receives instruction C, in response to instruction C, it starts to boot up.

[0150] In this example, after camera B boots up, it can continue with the operations in S434.

[0151] S433. Camera B sends the captured image information C to DMSDP module B.

[0152] Exemplarily, referring to Figure 8 , the image range that can be captured by camera B in device 2 is a fan-shaped area 802, and in this area 802, object 2 is included. In this example, camera B can send the captured image information B to DMSDP module B. Among them, this image information C corresponds to object 2.

[0153] S434. When DMSDP module B receives image information C, it sends image information C to DMSDP module A.

[0154] Exemplarily, in combination with the foregoing description, when DMSDP module B receives the image information C captured by camera B, it can send this image information C to DMSDP module A through the established session2. Thus, device 1 can obtain this image information C.

[0155] S435. When DMSDP module A receives image information C, it performs decoding processing on image information C to obtain image information D.

[0156] In some embodiments, similar to image information A, image information C can be encoded first and then sent to device 1. Correspondingly, when device 1 receives this image information C, it also needs to perform decoding processing on image information C.

[0157] Exemplarily, when receiving image information C, device 1 can perform decoding processing on image information C through DMSDP module A to obtain image information D.

[0158] In this example, after DMSDP module A obtains image information D, it can continue with the operations in S436.

[0159] S436. DMSDP module A sends image information D to the virtual drive module.

[0160] S437. The virtual drive module sends image information D to the conferencing application.

[0161] Exemplarily, when the virtual drive module receives image information D, it can send this image information D to the conferencing application. In this way, device 1 will display the corresponding interface in the conferencing application according to this image information D.

[0162] For example, as Figure 8 shown, when the conference application receives the image information D, it can display the interface 803 correspondingly. An image 804 is displayed in the interface 803, and this image 804 corresponds to the image information C captured by the camera B.

[0163] In this way, the device 1 further completes obtaining the image information C captured by the camera B.

[0164] In some embodiments, referring to Figure 8 , in the interface 803, the user can input an operation 805 to the control 8 corresponding to turning off the camera, and this operation 805 is used to instruct the device 1 to turn off the camera B. Among them, this operation 805 can be a click operation on the control 8.

[0165] In this embodiment, when the device 1 receives the operation 805, it can perform further processing according to the method provided in Figure 4 , enabling the device 1 to turn off the camera B.

[0166] As Figure 4 shown, this process includes:

[0167] S438. In response to the operation 805, the conference application sends a close request 6 to the virtual driver module.

[0168] Exemplarily, this close request 6 is used to instruct to turn off the camera B. In this example, in response to the operation 805, the conference application can send this close request 6 to the virtual driver module.

[0169] S439. When the virtual driver module receives the close request 6, it sends the close request 6 to the DMSDP module A.

[0170] In this embodiment, when the DMSDP module A receives the close request 6, it can continue with the operation in S440.

[0171] S440. When the DMSDP module A receives the close request 6, it sends the close request 6 to the DMSDP module B.

[0172] In this example, the DMSDP module A sending the close request 6 to the DMSDP module B is similar to the implementation method of sending the close request 3, and the specific content can refer to the description in S419, which will not be elaborated here.

[0173] S441. When the DMSDP module B receives the close request 6, it turns off the camera B.

[0174] In this example, the implementation of turning off Camera B by the DMSDP module B is similar to that of turning off Camera A. For specific details, refer to the description in S420, which will not be elaborated here.

[0175] S442. The DMSDP module A sends an indication D to the connection module A.

[0176] Exemplarily, when the DMSDP module A receives the shutdown request 6 in S439, it can also send an indication D to the connection module A. Here, the indication D is used to indicate the release of session2.

[0177] S443. In response to the indication D, the connection module A releases session2 and disconnects the P2P connection 2.

[0178] Exemplarily, when the connection module A receives the indication D, in response to the indication D, it releases session2 on the P2P connection 2.

[0179] According to the description in the foregoing S422, after the connection module A releases session1, it determines that there is no session on the P2P connection 1. In this case, the connection module A disconnects the P2P connection 2.

[0180] Thus, Device 1 has achieved the shutdown of Camera B.

[0181] It should be noted that in an example such as Figure 4 , when Device 1 realizes the switch from the virtual camera A to the virtual camera B, it is necessary to re - establish the P2P connection 2 between Device 1 and Device 2. Since it takes some time to establish the P2P connection 2, there is a delay in Device 1 obtaining the image information collected by Device B. During this period, Device 1 will display the user interface as shown in Interface 504. Furthermore, the efficiency of Device 1 switching the virtual camera is reduced, and the waiting time of the user is increased.

[0182] To solve the above problems, an embodiment of the present application provides a communication connection management method and an electronic device. Device 1 includes a virtual camera A and a virtual camera B. Device 2 includes a camera A and a camera B. The virtual camera A corresponds to the camera A, and the virtual camera B corresponds to the camera B. When Device 1 activates the virtual camera A, a first P2P connection is established between Device 1 and Device 2. This first P2P connection carries session11. Session11 is used to transmit the image information collected by the camera A. The first device and the second device establish session12. Session12 is carried in the first P2P connection.

[0183] In this way, when session11 is released, since the first P2P connection still bears session12, the first P2P connection can be maintained between the first device and the second device.

[0184] Furthermore, when device 1 performs the process of switching from virtual camera A to virtual camera B, session13 can be established between device 1 and device 2 based on the first P2P connection. This session13 is used to transmit the image information collected by camera B. Thus, device 1 can switch from virtual camera A to virtual camera B in a relatively short time, reducing the waiting time of the user.

[0185] In some other embodiments of the present application, device 1 can also be referred to as the first device. Device 2 can also be referred to as the second device. Camera A can also be referred to as the first camera. Camera B can also be referred to as the second camera. Session11 can also be referred to as the first session. Session12 can also be referred to as the second session. Session13 can also be referred to as the fourth session. Additionally, session11 and session13 are included in the third session, and the third session is different from session12.

[0186] Exemplarily, taking a conference application as an example, refer to Figure 9 , which is an interaction schematic diagram of a communication connection management method provided by an embodiment of the present application. Through the solution as Figure 9 shown, device 1 can complete the switch from virtual camera A to virtual camera B in a relatively short time.

[0187] As Figure 9 shown, the solution can include:

[0188] S901. In response to operation 503, the conference application sends a start request 11 to the virtual drive module.

[0189] Combined with the foregoing description, this operation 503 is used to instruct device 1 to turn on the front camera of device 2 (such as camera A). In response to this operation 503, the conference application can send a start request 11 to the virtual drive module.

[0190] Among them, this start request 11 can be the start request 1 in S401. This start request 11 is used to instruct to start camera A.

[0191] In some other embodiments of the present application, operation 503 can also be referred to as the first operation.

[0192] S902. When the virtual drive module receives the start request 11, it sends the start request 11 to DMSDP module A.

[0193] When the DMSDP module A receives the start request 11, it sends the start request 11 to the service module A.

[0194] In this embodiment, when the DMSDP module A receives the start request 11, it can also perform the operations in S910.

[0195] When the service module A receives the start request 11, it generates the prompt message 11.

[0196] Exemplarily, the prompt message 11 can be Figure 5 the prompt message 1 shown in the interface 504 in. The prompt message 11 can include "The camera is being turned on...".

[0197] In this embodiment, when the service module A receives the start request 11, it can also perform the operations in S905.

[0198] The service module A sends the start request 11 to the service module B.

[0199] Exemplarily, the service module A can send the start request 11 to the service module B through the wireless communication connection (such as a Bluetooth connection) established between the device 1 and the device 2.

[0200] In this example, the specific implementation manner of S905 can refer to the description in S405, which will not be elaborated here.

[0201] When the service module B receives the start request 11, it generates the pop-up window 11.

[0202] Exemplarily, the pop-up window 11 can include Figure 6 the pop-up window 1 shown in the interface 601 in. The pop-up window 11 is used to provide an operation window for the user to authorize the use of the camera permission in the device 2.

[0203] In some implementations, such as Figure 6 shown, the user can input the operation 602 in the pop-up window 11, and the operation 602 is used to authorize the device 1 to use the cameras (such as camera A and camera B) in the device 2.

[0204] In response to the operation 602, the service module B can also continue to perform the operations in S907 and S908.

[0205] In response to the operation 602, the service module B sends the instruction 1 to the camera A.

[0206] Exemplarily, the instruction 1 is used to instruct the camera A to turn on. In response to the operation 602, the service module B can send the instruction 1 to the camera A.

[0207] In this example, the indication 1 can be the indication A in S409.

[0208] S908. The service module B generates a prompt message 12.

[0209] Exemplarily, in response to operation 602, the service module B can generate a prompt message 12. The prompt message 12 can be Figure 7 the prompt message 2 shown in the interface 701 in. The prompt message 12 is used to prompt the user that the camera A is in use. The prompt message 12 can include "The front camera is in use". The device 2 can display the corresponding interface according to the prompt message 12.

[0210] S909. The camera A starts to boot up.

[0211] Exemplarily, upon receiving and in response to the indication 1, the camera A starts to boot up.

[0212] In this example, after the camera A boots up, it can continue with the operation in S917.

[0213] S910. The DMSDP module A sends a request 12 to establish a P2P connection 11 to the DMSDP module B.

[0214] Exemplarily, when the DMSDP module A receives the start-up request 11 in S902, it can send a request 12 to establish a P2P connection 11 to the DMSDP module B. Among them, the request 12 carries the information of session11 and session12. Among them, session11 is used to transmit the image information collected by the camera A based on the P2P connection 11.

[0215] In this exemplary case, the DMSDP module A sending the request 12 to the DMSDP module B is similar to the implementation manner of sending the request 2 in S406. The specific content can refer to the description in S406 and will not be elaborated here.

[0216] In some other embodiments of the present application, the request 12 can also be referred to as the first request.

[0217] S911. The DMSDP module B sends a response 12 to the DMSDP module A.

[0218] Exemplarily, the DMSDP module B can, upon receiving the request 12 to establish a P2P connection 11, in response to the request 12, send a response 12 to the DMSDP module A. Among them, the response 12 is used to indicate that the P2P connection 11 is successfully established.

[0219] In this example, after the P2P connection 11 is successfully established, the P2P connection 11 carries session11 and session12.

[0220] In some other embodiments of the present application, the response 12 may also be referred to as the second response.

[0221] It should be noted that in the descriptions of S910 and S911, the establishment of session11 and session12 simultaneously is taken as an example. In some other embodiments of the present application, device 1 may establish session12 with device 2 before releasing session11.

[0222] For example, before releasing session11, device 1 sends a request A to device 2. The request A carries the information of session12, and the request A is used to indicate the establishment of session12 with device 2.

[0223] Correspondingly, when device 2 receives the request A, in response to the request A, it sends a response B to device A. The response A is used to indicate the successful establishment of session12.

[0224] In the embodiments of the present application, referring to Figure 10 , after the establishment of session12, DMSDP module A can manage the validity period of session12 according to the Figure 10 scheme shown. So that when other sessions on the P2P connection 11 are closed, session12 is still carried in the P2P connection 11 for a period of time, and thus the P2P connection 11 is still maintained between device 1 and device 2.

[0225] As Figure 10 shown, the scheme may include:

[0226] S1001. DMSDP module A determines whether there are other sessions carried in the P2P connection 11 except session12.

[0227] In some embodiments of the present application, DMSDP module A may determine whether there are other sessions carried in the P2P connection 11 except session12 when receiving the successful establishment message of the P2P connection 11.

[0228] In one implementation, DMSDP module A determines that there are other sessions (such as session11) carried in the P2P connection 11. In this implementation, DMSDP module A may continue to perform the operations in S1002.

[0229] In another implementation, DMSDP module A determines that only session12 exists in the P2P connection 11. In this implementation, DMSDP module A may continue to perform the operations in S1004.

[0230] S1002. Before the expiration of the validity period of session12, DMSDP module A sends indication 2 to connection module A.

[0231] Exemplarily, when DMSDP module A determines that other sessions are carried in P2P connection 11, it sends indication 2 to connection module A. The indication 2 is used to instruct connection module A to keep session12 alive, so that session12 continues to be carried in P2P connection 11.

[0232] In this example, DMSDP module A can send indication 2 to connection module A before the expiration of the validity period of session12.

[0233] For example, a cyclic timer is configured in DMSDP module A. DMSDP module A can send indication 2 to connection module A every time the cyclic timer expires. The period duration of the cyclic timer is T1 duration, and the T1 duration is less than or equal to the validity period of session12.

[0234] Another example is that DMSDP module A can be configured with a detection unit for detecting the validity period of session12. DMSDP module A can send indication 2 to connection module A before the expiration of the validity period of session12 by detecting the validity period of session12.

[0235] It should be noted that in the embodiments of the present application, after DMSDP module A sends indication 2 to module A, it repeatedly executes the process of S1001.

[0236] In other embodiments of the present application, DMSDP module A determines that only session12 exists in P2P connection 11. In this case, DMSDP module A can, before the expiration of the validity period of session12, determine again whether other sessions other than session12 are carried in P2P connection 11.

[0237] As a specific implementation, DMSDP module A can execute the processes in S1003 and S1004 when it determines that only session12 exists in P2P connection 11.

[0238] In other embodiments of the present application, indication 2 can also be referred to as the first renewal indication.

[0239] S1003. DMSDP module A initiates timer 1.

[0240] Exemplarily, when the DMSDP module A determines that only session12 is carried in the P2P connection 11, it initiates Timer 1. Among them, the duration of this Timer 1 is T2, and the T2 duration is less than or equal to the validity period of session12.

[0241] In some other embodiments of the present application, Timer 1 can also be referred to as the first timer, and the T2 duration can also be referred to as the first duration.

[0242] S1004. When the timer 1 expires, the DMSDP module A determines whether there are other sessions carried in the P2P connection 11 except session12.

[0243] As an implementation manner, when the timer 1 expires, the DMSDP module A determines that there are other sessions carried in the P2P connection 11. In this implementation manner, the DMSDP module A can continue to execute the operation in S1002.

[0244] In another implementation manner, when the timer 1 expires, the DMSDP module A determines that only session12 exists on the P2P connection 11. In this implementation manner, the DMSDP module A can continue to execute the operation in S1005.

[0245] S1005. The DMSDP module A sends indication 6 to the connection module A.

[0246] Combined with the descriptions in the foregoing S1003 and S1004, in some implementations, within the T2 duration, only session12 is included on the P2P connection 11. In this implementation manner, the DMSDP module A can send indication 6 to the connection module A. Among them, this indication 6 is used to instruct the connection module A to release session12. So that when all other sessions in the P2P connection 11 are released, session12 is released after a delay of T2 duration.

[0247] According to the example in Figure 10 The DMSDP module A can execute operation S1002 and send indication 2 for keeping session12 alive to the connection module A when it determines that there are other sessions in the P2P connection 11.

[0248] In addition, when the DMSDP module A determines that only session12 exists on the P2P connection 11 within the T2 duration, it sends indication 6 for releasing session12 to the connection module A.

[0249] In some other embodiments of the present application, indication 6 can also be referred to as the first release indication.

[0250] Combined with Figure 10Specific examples in this application, in some embodiments of the present application, after the device 1 receives the response 12 indicating the successful establishment of the P2P connection 11 in S911, it can execute the processing in S912 to S916 to achieve maintaining the session 12 carried in the P2P connection 11 when there are other sessions included in the P2P connection 11.

[0251] S912. The DMSDP module A determines that session 11 is also carried in the P2P connection 11.

[0252] Exemplarily, after receiving the message indicating the successful establishment of the P2P connection 11, the DMSDP module A can determine that in addition to the session 12 existing in the P2P connection 11 at this time, there is also a session 11.

[0253] In the embodiments of the present application, according to Figure 10 the description in, the DMSDP module A can continue to execute the operation in S913.

[0254] S913. Before the expiration of the validity period of session 12, the DMSDP module A sends an indication 2 to the connection module A.

[0255] In this example, S913 corresponds to Figure 10 the operation S1002 in, and the specific implementation manner of S912 can refer to the description in S1002, which will not be elaborated here.

[0256] S914. When receiving the indication 2, the connection module A sends the indication 2 to the connection module B.

[0257] Exemplarily, taking the wireless communication connection established between the device 1 and the device 2 as a Bluetooth connection as an example, the connection module A can send the indication 2 to the connection module B based on the Bluetooth connection.

[0258] S915. The connection module A keeps session 12 alive.

[0259] Exemplarily, when receiving the indication 2, the connection module keeps session 12 alive.

[0260] As a specific implementation manner, a timer 2 is configured in the connection module A. Wherein, the timer 2 is used to trigger the first device to release session 12 when the timing duration ends.

[0261] In this implementation manner, the connection module A can reset the timer 2 when receiving the indication 2. Avoid triggering the release of session 12 when the timer 2 times out, and keep session 12 alive.

[0262] In some other embodiments of the present application, the timer 2 can also be referred to as the second timer.

[0263] S916. The connection module B keeps the session12 alive.

[0264] Exemplarily, a timer 3 is configured in the connection module A. Among them, the function of the timer 3 is similar to that of the timer 2. The timer 23 is used to trigger the second device to release the session12 when the timing duration ends.

[0265] In this example, when the connection module A receives the indication 2, it can keep the session12 alive by resetting the timer 3.

[0266] S917. The camera A sends the collected image information 1 to the DMSDP module B.

[0267] In this example, the implementation method in S917 is similar to Figure 4 S412 in, and the specific content can be referred to the description in S412 and will not be elaborated here.

[0268] In some other embodiments of the present application, the image information 1 can also be referred to as the first image information.

[0269] S918. When the DMSDP module B receives the image information 1, it sends the image information 1 to the DMSDP module A.

[0270] Exemplarily, in combination with the foregoing description, when the DMSDP module B receives the image information 1 collected by the camera A, it can send the image information 1 to the DMSDP module A through the previously established session11. Thus, the device 1 can obtain the image information 1.

[0271] S919. When the DMSDP module A receives the image information 1, it decodes the image information 1 to obtain the image information 2.

[0272] In this example, the implementation method in S919 is similar to Figure 4 S414 in, and the specific content can be referred to the description in S414 and will not be elaborated here.

[0273] S920. The DMSDP module A sends the image information 2 to the virtual driver module.

[0274] S921. The virtual driver module sends the image information 2 to the conference application.

[0275] Exemplarily, when the virtual driver module receives the image information 2, it can send the image information 2 to the conference application. In this way, the device 1 will display the corresponding interface in the conference application according to the image information 2.

[0276] In this example, the implementation in S921 is similar to that in Figure 4 S416, and the specific content can be referred to the description in S416.

[0277] For example, as Figure 7 shown, when the conference application receives the image information 2, the corresponding display interface 703 can be displayed. The image 705 is displayed in the interface 703, and the image 705 corresponds to the image information 2 collected by the camera A.

[0278] In some other embodiments of the present application, the interface 703 can also be referred to as the first interface. The image 705 can also be referred to as the first image.

[0279] In this way, the device 1 further completes obtaining the image information 1 collected by the camera A.

[0280] Combined with the description in Figure 7 , when the user wants to switch from the virtual camera A to the virtual camera B, an operation 704 can be input in the interface 703 in Figure 7 . The operation 704 is used to instruct the device 1 to turn on the rear camera of the device 2 (such as the camera B).

[0281] In the embodiments of the present application, when the device 1 receives the operation 704, it can perform further processing according to the method provided in Figure 9 . So that the device 1 can realize switching the virtual camera A to the virtual camera B, and further realize obtaining the image information collected by the camera B.

[0282] For example, as Figure 9 shown, the process can include:

[0283] S922. In response to the operation 704, the conference application sends a close request 13 to the virtual drive module.

[0284] Exemplarily, the close request 13 is used to instruct to close the camera A. In this example, in response to the operation 704, the conference application can send the close request 13 to the virtual drive module.

[0285] In this example, the close request 13 corresponds to the close request 3 in Figure 4 .

[0286] In some other embodiments of the present application, the operation 704 can also be referred to as the second operation.

[0287] S923. When the virtual drive module receives the close request 13, it sends the close request 13 to the DMSDP module A.

[0288] In this embodiment, when the DMSDP module A receives the shutdown request 13 to shut down the camera A, it can continue with the operations in S924.

[0289] S924. When the DMSDP module A receives the shutdown request 13, it sends the shutdown request 13 to the DMSDP module B.

[0290] S925. When the DMSDP module B receives the shutdown request 13, it shuts down the camera A.

[0291] In this example, S924 corresponds to Figure 4 S419 in Figure 4 S420 in, and the implementation of S924 to S925 can refer to the description in S419 to S420. Specific embodiments can refer to each other and will not be elaborated here.

[0292] S926. The DMSDP module A sends an indication 3 to the connection module A.

[0293] Exemplarily, when the DMSDP module A receives the shutdown request 13 in S923, it can also send an indication 3 to the connection module A. Among them, this indication 3 is used to indicate the release of session11.

[0294] S927. The connection module A releases session11 in response to the indication 3.

[0295] Exemplarily, when the connection module A receives the indication 3, it releases session11 on the P2P connection 11 in response to the indication 3.

[0296] In this example, the indication 3 corresponds to Figure 4 indication C in

[0297] It should be noted that, in combination with the foregoing Figure 10 description, after session11 is closed, the DMSDP module A can perform the operations in S1001 to determine that only session12 exists in the P2P connection 11. At this time, the DMSDP module A continues to execute the processing in S1003 and initiates a timer 1 with a duration of T2.

[0298] That is to say, session12 is still carried in the P2P connection 11 within this T2 duration. Further, within this T2 duration, the P2P connection 11 is still maintained between device 1 and device 2.

[0299] S928. The conference application sends a start request 14 to the virtual drive module.

[0300] Exemplarily, after sending the shutdown request 13 to shut down camera A, the conference application may send a startup request 14 to the virtual drive module. Among them, the startup request 14 is used to indicate starting camera B.

[0301] In this example, the shutdown request 14 corresponds to Figure 4 the shutdown request 4 in

[0302] S929. When the virtual drive module receives the startup request 14, it sends the startup request 14 to DMSDP module A.

[0303] S930. When DMSDP module A receives the startup request 14, it sends the startup request 14 to service module A.

[0304] In this embodiment, when DMSDP module A receives the startup request 14, it may also perform the operation in S933.

[0305] S931. When service module A receives the startup request 14, it generates a prompt message 13.

[0306] Exemplarily, similar to the prompt message 11, the prompt message 13 may include "The camera is being turned on...". In this way, device 1 may display the prompt message 13 on the user interface of the conference application according to the prompt message 13.

[0307] In this embodiment, when service module A receives the startup request 14, it may also perform the operation in S932.

[0308] S932. Service module A sends the startup request 14 to service module B.

[0309] In this example, similar to the implementation manner of sending the startup request 11, service module A may send the startup request 14 to service module B through the Bluetooth connection established between device 1 and device 2.

[0310] S933. DMSDP module A sends a request 15 to establish session13 to DMSDP module B.

[0311] It should be noted that in the embodiments of the present application, the duration for device 1 to execute the operations of S928 to S933 is less than the T2 duration. That is to say, during the execution of the operations of S928 to S933, the P2P connection 11 is still established between device 1 and device 2.

[0312] Exemplarily, when the DMSDP module A receives the start request 14 in S930, it can send a request 15 to establish session13 to the DMSDP module B. Among them, the information of session13 is carried in the request 15. Session13 is used to transmit the image information collected by the camera B based on the P2P connection 11.

[0313] In some other embodiments of the present application, the request 15 can also be referred to as the second request.

[0314] S934. The DMSDP module B sends a response 15 to the DMSDP module A.

[0315] As an implementation manner, when the DMSDP module B receives the request 15 to establish session13, it can send a response 15 to the DMSDP module A. The response 15 is used to indicate that session13 is successfully established.

[0316] In some other embodiments of the present application, the response 15 can also be referred to as the second response.

[0317] Thus, session13 is also carried on the P2P connection 11 between device 1 and device 2.

[0318] It should be noted that, in combination with the foregoing description, when the timer 1 expires, the DMSDP module A can continue to perform the operation in S1004 to determine whether there is a session other than session12 carried in the P2P connection 11. In the example of S934, the DMSDP module A can determine that in addition to session12, there is also session13 in the P2P connection 11. Combining Figure 10 with the description in S1004, at this time, the DMSDP module A can continue to perform the operation in S1002 to keep session12 alive.

[0319] As a specific example, after establishing session13 between device 1 and device 2, device 1 and device 2 can perform the operations such as S912 to S916 to keep session12 alive.

[0320] Therefore, after the operation in S934 is completed, in addition to carrying session13, the P2P connection 11 also continues to carry session12.

[0321] S935. The service module B sends an indication 4 to the camera B.

[0322] Exemplarily, when the service module B receives the start request 14 in S932, it can send an indication 4 to the camera B. Among them, the indication 4 is used to indicate the camera B to turn on.

[0323] S936. The service module B generates a prompt message 14.

[0324] In some embodiments of the present application, after sending the instruction 4 to the camera B, the service module B may generate a prompt message 14. The prompt message 14 is used to prompt the user that the camera B is in use. The device 2 may display a corresponding interface according to the prompt message B.

[0325] For example, referring to Figure 8 , the prompt message 14 may be Figure 8 the prompt message 4 shown in the interface 801 in . The prompt message 14 may include "The front camera is in use".

[0326] S937. The camera B starts to boot up.

[0327] Exemplarily, upon receiving and in response to the instruction 4, the camera B starts to boot up.

[0328] In this example, after the camera B boots up, it may continue with the operations in S938.

[0329] S938. The camera B sends the captured image information 3 to the DMSDP module B.

[0330] Exemplarily, referring to Figure 8 , taking the image range that can be captured by the camera B in the device 2 as the fan-shaped area 802, in this area 802, there is an object 2. In this example, the camera B may send the captured image information 3 to the DMSDP module B. Among them, the image information 3 corresponds to the object 2.

[0331] S939. When the DMSDP module B receives the image information 3, it sends the image information 3 to the DMSDP module A.

[0332] Exemplarily, in combination with the foregoing description, when the DMSDP module B receives the image information 3 captured by the camera B, it may send the image information 3 to the DMSDP module A through the previously established session13. Thus, the device 1 can obtain the image information 3.

[0333] S940. When the DMSDP module A receives the image information 3, it decodes the image information 3 to obtain the image information 4.

[0334] In this example, the implementation manner in S940 is similar to Figure 4 S435 in . The specific content can refer to the description in S435 and will not be elaborated here.

[0335] In this example, after the DMSDP module A obtains the image information 4, it can continue with the operations in S941.

[0336] S941. The DMSDP module A sends the image information 4 to the virtual driver module.

[0337] S942. The virtual driver module sends the image information 4 to the conferencing application.

[0338] Exemplarily, when the virtual driver module receives the image information 4, it can send the image information 4 to the conferencing application. In this way, device 1 will display the corresponding interface in the conferencing application according to the image information 4.

[0339] In this example, the implementation manner in S942 is similar to Figure 4 S437 in [reference], and the specific content can be referred to the description in S437, which will not be elaborated here.

[0340] In this way, device 1 can further complete obtaining the image information 3 captured by camera B based on session13 on the P2P connection 11.

[0341] According to the descriptions of S922 to S942, when device 1 switches from virtual camera A to virtual camera B, it needs to first release session11 on the P2P connection 11 and then establish session13 for transmitting the image information 3. Since session12 still exists within the time period T2 after session11 is closed, device 1 and device 2 maintain the P2P connection 11 within this T2 time period. Therefore, when device 1 sends the request 15 to establish session13 within the T2 time period, it can establish session13 based on the current P2P connection 11. This enables device 1 to switch from virtual camera A to virtual camera B in a relatively short time, and further enables device 1 to obtain the image information 3 captured by camera B in a relatively short time.

[0342] Combined with the foregoing Figure 8 description, taking camera B as an example, when the user wants to turn off camera B through device 1, an operation 805 can be input in the interface 803 in Figure 8 , and this operation 805 is used to instruct device 1 to turn off camera B.

[0343] In some embodiments of the present application, when device 1 receives the operation 805, it can perform further processing according to the Figure 9 method provided in [reference]. This enables device 1 to turn off camera B.

[0344] As Figure 9 shown, this process includes:

[0345] S943. In response to operation 805, the conferencing application sends a shutdown request 16 to the virtual drive module.

[0346] Exemplarily, the shutdown request 16 is used to indicate shutting down Camera B. In this example, in response to operation 805, the conferencing application may send the shutdown request 16 to the virtual drive module.

[0347] S944. When the virtual drive module receives the shutdown request 16, it sends the shutdown request 16 to DMSDP module A.

[0348] In this embodiment, when DMSDP module A receives the shutdown request 16 for shutting down Camera A, it can continue with the operations in S945.

[0349] S945. When DMSDP module A receives the shutdown request 16, it sends the shutdown request 16 to DMSDP module B.

[0350] In this example, the way DMSDP module A sends the shutdown request 16 to DMSDP module B is similar to the implementation of sending the shutdown request 13. For specific details, reference can be made to the description in S924, which will not be elaborated here.

[0351] S946. When DMSDP module B receives the shutdown request 16, it shuts down Camera B.

[0352] In this example, the way DMSDP module B shuts down Camera B is similar to the implementation of shutting down Camera A. For specific details, reference can be made to the description in S925, which will not be elaborated here.

[0353] S947. DMSDP module A sends an indication 5 to connection module A.

[0354] Exemplarily, when DMSDP module A receives the shutdown request 16, it may also send an indication 5 to connection module A. Among them, the indication 5 is used to indicate releasing session 13.

[0355] S948. In response to the indication 5, connection module A releases session 13.

[0356] It should be noted that similar to session 11, after releasing session 13, DMSDP module A can perform the operations in S1001 to determine that only session 12 exists on P2P connection 11. At this time, DMSDP module A continues to execute the processing in S1003 to determine again after T2 duration whether there are other sessions on P2P connection 11 in addition to session 12.

[0357] As an implementation, after the duration of T2, DMSDP module A can perform the operation of S949.

[0358] S949. DMSDP module A determines that only session12 exists in P2P connection 11 within the duration of T2.

[0359] Based on Figure 8 the scenario where device 1 in [ ] closes camera B. In this example, DMSDP module A determines that only session12 is carried on P2P connection 11 within the duration of T2. At this time, DMSDP module A can continue to perform the processing in S950.

[0360] S950. DMSDP module A sends indication 6 to connection module A.

[0361] Exemplarily, after completing the operation in S949, DMSDP module A sends indication 6 to connection module A. Among them, this indication 6 is used to indicate the release of session12.

[0362] S951. Connection module A releases session12 and disconnects P2P connection 11.

[0363] Exemplarily, when connection module A receives indication 6, in response to this indication 6, it releases session12 carried in P2P connection 11.

[0364] At this time, there is no session on P2P connection 11. Combining with the description in the foregoing [ ], in this implementation, after connection module A releases session12, it will continue to disconnect P2P connection 11. Figure 4 In this way, device 1 has completed the closing of camera B.

[0365] It should be noted that in the examples of [ ], device 1 is described by taking a laptop computer as an example. In other embodiments of the present application, device 1 can also be other product forms such as a mobile phone or a tablet computer. The specific form of this electronic device is not particularly limited in the embodiments of the present application.

[0366] It should be noted that in Figure 9 the examples, device 1 is described by taking a laptop computer as an example. In other embodiments of the present application, device 1 can also be other product forms such as a mobile phone or a tablet computer. The specific form of this electronic device is not particularly limited in the embodiments of the present application.

[0367] The solution provided by the embodiments of the present application can be applied to an electronic device. In the electronic device (such as device 1) involved in the embodiments of the present application, an operating system can be run, and this operating system can be or other operating systems.

[0368] Exemplarily, taking the operating system running in device 1 as an example. Figure 11 Shows a schematic composition of device 1. As a possible implementation, this device 1 can be, for example, Figure 3The laptop shown.

[0369] In this example, device 1 may have a layered architecture. This layered architecture includes several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces.

[0370] As Figure 11 shown, the layered architecture in device 1 from top to bottom is the application layer, the application framework layer, Android runtime (ART) and system libraries, the Hardware Abstract Layer (HAL), the kernel layer, and the hardware layer.

[0371] As Figure 11 shown, the application layer may include applications such as music, video, call, ringtone, alarm clock, Bluetooth, navigation, gallery, etc.

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

[0373] As Figure 11 shown, the application framework layer may include a window manager, an activity manager, an input manager, a resource manager, a notification manager, a view system, etc.

[0374] The window manager provides a window manager service (WMS). WMS can be used for window management, window animation management, surface management, and as a transfer station for the input system.

[0375] The activity manager can provide an activity manager service (AMS). AMS can be used for the startup, switching, scheduling of system components (such as activities, services, content providers, broadcast receivers), and the management and scheduling of application processes.

[0376] The input manager can provide an input manager service (IMS). IMS can be used to manage the input of the system, such as touch screen input, key input, sensor input, etc. IMS retrieves events from the input device nodes and distributes the events to the appropriate windows through interaction with WMS.

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

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

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

[0380] The Android Runtime is responsible for converting source code into machine code. The Android Runtime mainly includes the ahead-of-time (AOT) compilation technology and the just-in-time (JIT) compilation technology.

[0381] The Android Runtime also includes core libraries. The core libraries are mainly used to provide the functions of basic Java class libraries, such as libraries for basic data structures, mathematics, IO, tools, databases, networks, etc. The core libraries provide APIs for users to develop applications.

[0382] The system libraries can include multiple functional modules. For example: surface manager, media libraries, and media framework, etc.

[0383] Among them, the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media framework supports the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0384] The Hardware Abstraction Layer runs in the user space, encapsulates the kernel layer drivers, and provides call interfaces to the upper layer. The Hardware Abstraction Layer includes at least a display module, etc.

[0385] The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver.

[0386] The hardware layer includes at least a memory and a display screen. Among them, the memory is used to store Figure 9The computer-executable program code involved therein, the executable program code including instructions. The display screen is used to display, for example, Figures 5 to 8 the interface in

[0387] In addition, in the embodiment of the present application, in device 1, the application layer further includes a conference application. The application framework layer further includes service module A, DMSDP module A, and connection module A. The hardware abstraction layer further includes a virtual driver module.

[0388] It should be noted that, in the embodiment of the present application, device 2 may have a structural composition as Figure 11 shown. As a possible implementation, the device 2 may be a mobile phone or a tablet computer, etc. The structural composition may refer to the foregoing description and will not be elaborated herein.

[0389] In addition, in device 2, the application framework layer further includes service module B, DMSDP module B, and connection module B. The hardware layer further includes camera A and camera B.

[0390] Exemplarily, taking the operation of an operating system in device 1 as an example. Figure 12 shows another schematic composition of device 1.

[0391] As Figure 12 shown, the operating system in device 1 can generally be divided into a kernel mode (KernelModel) and a user mode (User Model).

[0392] In this example, the user mode can correspond to the operating environment of the application. In some implementations, the code running permissions in the user mode are restricted to improve system security. In addition, if the application performs some actions such as directly accessing physical memory, a request needs to be made to the components in the kernel mode. The user module may include a conference application, service module A, DMSDP module A, and connection module A.

[0393] The kernel mode can correspond to the operating environment of the operating system-level code. The kernel module includes a virtual driver module.

[0394] It should be noted that the above Figure 11 and Figure 12 shown electronic device compositions are only examples and do not constitute a limitation on the electronic devices involved in the technical solutions provided in the embodiments of the present application. The embodiments of the present application do not limit the specific composition of the electronic device.

[0395] The above mainly introduced the solution provided by the embodiments of the present application from the perspective of each functional module. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described function for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0396] The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation.

[0397] Exemplarily, Figure 13 shows a schematic diagram of the composition of an electronic device 1300. As Figure 13 shown, the electronic device 1300 may include: a processor 1301 and a memory 1302. The memory 1302 is used to store computer execution instructions. Exemplarily, in some embodiments, when the processor 1301 executes the instructions stored in the memory 1302, the electronic device 1300 can be made to execute the method shown in any one of the above embodiments.

[0398] It should be noted that all relevant contents of the steps involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be repeated here.

[0399] Figure 14 shows a schematic diagram of the composition of a chip system 1400. The chip system 1400 may include: a processor 1401 and a communication interface 1402, which are used to support related devices to implement the functions involved in the above embodiments. In a possible design, the chip system further includes a memory for storing necessary program instructions and data of the electronic device. The chip system can be composed of chips or can include chips and other discrete devices. It should be noted that in some implementation manners of the present application, the communication interface 1402 can also be referred to as an interface circuit.

[0400] It should be noted that all relevant contents of the steps involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be repeated here.

[0401] The functions, actions, operations, steps, etc. in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.

[0402] Although the present application has been described in connection with specific features and their embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and 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 equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A communication connection management method, characterized in that, The method is applied to a first device, and the devices communicatively connected to the first device include a second device; the second device is configured with a first camera; the method includes: The first device receives a first operation for enabling the first camera. In response to the first operation, the first device establishes a first session with the second device; the first session is used for transmitting the image information collected by the first camera. The first device establishes a second session with the second device. Wherein, both the first session and the second session are carried in a first P2P connection, and the first P2P connection is a P2P connection between the first device and the second device.

2. The method according to claim 1, characterized in that, The first device establishing a second session with the second device includes: Before the first session is released, the first device establishes the second session with the second device.

3. The method according to claim 1 or 2, characterized in that, The first device establishing a second session with the second device includes: The first device sends a first request to the second device, and the first request carries the information of the second session. The first device receives a first response indicating that the second session is successfully established.

4. The method according to claim 3, characterized in that, The first request further carries the information of the first session; the first response is further used to indicate that the first session is successfully established.

5. The method according to claim 3 or 4, characterized in that The first request is further used to indicate establishing the first P2P connection with the second device; the first response is further used to indicate that the first P2P connection is successfully established.

6. The method according to any one of claims 1-5, characterized in that The method further includes: When it is determined that the first P2P connection only carries the second session within a first duration, the second session is released.

7. The method according to claim 6, wherein Before releasing the second session, the method further includes: The first device sends a first renewal indication; the first device receives and in response to the first renewal indication, continues the second session. Sending the first renewal indication to the second device so that the second device continues the second session when receiving the first renewal indication.

8. The method according to claim 7, characterized in that, The sending of the first renewal indication includes: When it is determined that the first P2P connection carries a third session, the first renewal indication is sent; the third session is different from the second session, and the third session includes the first session.

9. The method according to any one of claims 6 - 8, characterized in that, The determining that the first P2P connection only carries the second session within a first duration includes: When the first P2P connection only carries the second session, a first timer is initiated; the timing duration of the first timer is the first duration. When the first timer expires, it is determined that the first P2P connection only carries the second session.

10. The method according to any one of claims 7-9, characterized in that, The first device is configured with a second timer; the second timer is used to trigger the first device to release the second session when the timing duration ends; The maintaining of the second session includes: Before the timing duration of the second timer ends, reset the timing duration of the second timer.

11. The method according to claim 9 or 10, characterized in that, The releasing of the second session includes: The first device sends a first release indication; Receive and in response to the first release indication, release the second session.

12. The method according to claim 11, wherein The first device is configured with a display screen; the method further includes: After the first camera is started, receive first image information through the first session; the first image information is collected by the first camera; When the first image information is received, display a first interface; the first interface includes a first image; the first image corresponds to the first image information.

13. The method according to claim 12, characterized in that, The second device is configured with a second camera; after the first interface is displayed, the method includes: The first device receives a second operation for switching to use the second camera; In response to the second operation, the first device establishes a fourth session with the second device; the fourth session is used to transmit the image information collected by the second camera, the fourth session is carried in a first P2P connection, and the fourth session is included in the third session.

14. The method according to claim 13, wherein Before the first device establishes a fourth session with the second device, the method further includes: Turn off the first camera and release the first session.

15. The method according to claim 13 or 14, characterized in that, The first device establishing a fourth session with the second device includes: The first device sends a second request to the second device, and the second request carries information about the fourth session; The first device receives a second response indicating that the fourth session is successfully established.

16. An electronic device, characterized in that, The electronic device includes one or more processors and one or more memories; the one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions; When the one or more processors execute the computer instructions, the electronic device is caused to execute the method according to any one of claims 1-15.

17. A chip system, characterized in that, The chip system includes a processor and a communication interface; the processor is used to call and run a computer program stored in a storage medium and execute the method according to any one of claims 1-15.

Citation Information

Patent Citations

  • Camera switching method and electronic equipment

    CN118450249A

  • Method and electronic device for providing tethering service

    US20170223758A1

  • Data Transmission Method and Electronic Device

    US20230291688A1