本申请要求于2023年3月28日提交国家知识产权局、申请号为202310344514.8、发明名称为“一种图像拍摄方法、电子设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application filed with the State Intellectual Property Office on March 28, 2023, with application number 202310344514.8 and invention name “An image capture method, electronic device and system”, the entire contents of which are incorporated by reference in this application.
本申请涉及终端技术领域,尤其涉及一种图像拍摄方法、电子设备及系统。The present application relates to the field of terminal technology, and in particular to an image capturing method, electronic equipment and system.
在使用平板、笔记本电脑等电子设备中一些应用的过程中,应用可能需要随时调用摄像头拍摄图片或者视频。例如,在平板、笔记本电脑上编辑文档时,用户可能需要插入对周围事物进行拍摄得到的图片。然而,平板、笔记本电脑等电子设备的体积较大或摄像头能力有限等原因,将导致拍照灵活性通常较低或质量不佳,无法便捷地拍摄得到理想的图片。When using some applications in electronic devices such as tablets and laptops, the application may need to call the camera to take pictures or videos at any time. For example, when editing a document on a tablet or laptop, the user may need to insert pictures of the surrounding objects. However, due to the large size or limited camera capabilities of electronic devices such as tablets and laptops, the flexibility of taking pictures is usually low or the quality is poor, and it is not easy to take ideal pictures.
发明内容Summary of the invention
本申请提供了一种图像拍摄方法、电子设备及系统,可以为用户提供便捷、舒适的图片或视频拍摄体验。The present application provides an image capturing method, electronic device and system, which can provide users with a convenient and comfortable picture or video capturing experience.
第一方面,本申请提供了一种图像拍摄方法,应用于第一设备。其中,第一设备显示第一应用的第一界面。响应于用户对第一界面的第一操作(如插入图片的操作),第一设备显示第一选项,第一操作用于获取图像(包括图片或视频)。响应于用户对第一选项的选择操作,第一设备向第一选项指示的第二设备发送第一请求。第一请求中包括第一设备的设备信息和请求类型。第一设备的设备信息用于第二设备的远程相机根据第一设备的设备信息向第一设备分发第二设备的系统相机拍摄的图像。远程相机是具有如下能力的应用:调用系统相机拍摄图像,并对系统相机拍摄的图像进行分发。请求类型用于指示第一请求调用的是远程相机。第一设备接收第二设备拍摄的图像和应用标识。第一设备基于应用标识在第一界面显示第二设备拍摄的图像。In a first aspect, the present application provides an image capture method, which is applied to a first device. The first device displays a first interface of a first application. In response to a user's first operation on the first interface (such as an operation of inserting a picture), the first device displays a first option, and the first operation is used to obtain an image (including a picture or a video). In response to the user's selection operation on the first option, the first device sends a first request to the second device indicated by the first option. The first request includes device information and a request type of the first device. The device information of the first device is used for the remote camera of the second device to distribute the image captured by the system camera of the second device to the first device according to the device information of the first device. The remote camera is an application with the following capabilities: calling the system camera to capture an image and distributing the image captured by the system camera. The request type is used to indicate that the first request calls a remote camera. The first device receives the image captured by the second device and an application identifier. The first device displays the image captured by the second device on the first interface based on the application identifier.
综上,采用本申请,在第一设备需要获取图像时,可以请求第二设备来拍摄图像。如此,可以打破只能从本地(包括本地相机或者本地图库)获取图像的局限。尤其是对于平板、笔记本电脑等拍摄灵活性较差的第一设备,可以使用调用第二设备(如手机)来拍摄,可以为用户提供便捷、舒适的图像拍摄体验。In summary, by using this application, when the first device needs to obtain an image, it can request the second device to capture the image. In this way, the limitation of only being able to obtain images from the local (including the local camera or the local gallery) can be broken. Especially for the first device with poor shooting flexibility such as tablets and laptops, the second device (such as a mobile phone) can be called to shoot, which can provide users with a convenient and comfortable image shooting experience.
在第一方面的一种可能的设计方式中,上述方法还包括:第一设备接收来自第二设备的第一信息,第一信息指示第二设备具有远程相机的能力。响应于第一信息,第一设备记录第二设备具有远程相机的能力的信息。相应的,第一设备显示第一选项,包括:如果第一设备记录有第二设备具有远程相机的能力的信息,第一设备显示第一选项。In a possible design of the first aspect, the method further includes: the first device receives first information from the second device, the first information indicating that the second device has a remote camera capability. In response to the first information, the first device records information that the second device has a remote camera capability. Accordingly, the first device displays a first option, including: if the first device records information that the second device has a remote camera capability, the first device displays the first option.
只有具有远程相机的功能,如安装有远程相机、且允许使用远程相机为其他设备拍摄图像,第二设备才能为其他设备(如第一设备)拍摄图像。因此,第一设备在显示第一选项之前,需要确定第二设备具有远程相机的功能,从而便于准确的调用有远程相机的能力的设备拍摄图像。The second device can only take pictures for other devices (such as the first device) if it has the function of a remote camera, such as being equipped with a remote camera and allowing the remote camera to be used to take pictures for other devices. Therefore, before displaying the first option, the first device needs to determine whether the second device has the function of a remote camera, so as to accurately call the device with the remote camera capability to take pictures.
在第一方面的一种可能的设计方式中,同账号设备之间可以实时同步远程相机被占用与否的情况。相应的,上述方法还包括:第一设备接收来自第二设备的第二信息,第二信息指示远程相机被占用。响应于第二信息,第一设备更新远程相机的状态为被占用状态。和/或,第一设备接收来自第二设备的第三信息,第三信息指示远程相机未被占用。响应于第三信息,第一设备更新远程相机的状态为未被占用状态。第一设备显示第一选项,包括:如果远程相机的状态为未被占用状态,第一设备则显示第一选项。In a possible design of the first aspect, whether the remote camera is occupied or not can be synchronized in real time between devices with the same account. Accordingly, the above method also includes: the first device receives second information from the second device, and the second information indicates that the remote camera is occupied. In response to the second information, the first device updates the state of the remote camera to an occupied state. And/or, the first device receives third information from the second device, and the third information indicates that the remote camera is not occupied. In response to the third information, the first device updates the state of the remote camera to an unoccupied state. The first device displays a first option, including: if the state of the remote camera is an unoccupied state, the first device displays the first option.
这样,第一设备才能准确的调用未被占用的远程相机,避免调用存在冲突。In this way, the first device can accurately call an unoccupied remote camera to avoid calling conflicts.
在第一方面的一种可能的设计方式中,上述第一选项是在第一设备的近场通信范围内和/或与第一设备中登录相同的用户账号的设备的选项。In a possible design manner of the first aspect, the first option is an option for a device within a near field communication range of the first device and/or a device with the same user account logged in as the first device.
其中,第二设备在第一设备的近场通信范围内,则表明第一设备和第二设备之间可以通过近场传输调用请求、图像等数据。以及,第一设备和第二设备登录相同的用户账号,则表明第一设备和第二设备是可以互相信任的。If the second device is within the near field communication range of the first device, it indicates that the first device and the second device can transmit call requests, images and other data through the near field. And if the first device and the second device log in to the same user account, it indicates that the first device and the second device can trust each other.
这样,可以在互相信任的设备之间通过近场通信传输调用请求、图像数据等。In this way, call requests, image data, etc. can be transmitted between mutually trusted devices via near-field communication.
在第一方面的一种可能的设计方式中,第一设备中包括设备管理服务。上述第一设备接收来自第二设备的第一信息,包括:设备管理服务接收第二设备同步的第一信息。第一设备记录第二设备具有远程相机的能力的信息,包括:设备管理服务记录第二设备具有远程相机的能力的信息。In a possible design of the first aspect, the first device includes a device management service. The first device receives the first information from the second device, including: the device management service receives the first information synchronized by the second device. The first device records the information that the second device has the capability of a remote camera, including: the device management service records the information that the second device has the capability of a remote camera.
在第一方面的另一种可能的设计方式中,第一设备中还可以包括通信服务。上述方法还包括:通信服务发现第二设备在第一设备的近场通信范围内,和/或,第二设备与第一设备中登录相同的用户账号。通信服务向设备管理服务更新第二设备为在线设备。In another possible design of the first aspect, the first device may further include a communication service. The method further includes: the communication service discovers that the second device is within the near field communication range of the first device, and/or that the second device and the first device are logged in with the same user account. The communication service updates the second device to the device management service as an online device.
也就是说,第一设备的设备管理服务中可以维护支持远程相机的功能的设备和近场通信范围内的同账号设备。That is, the device management service of the first device can maintain devices that support the remote camera function and devices with the same account within the near field communication range.
在第一方面的另一种可能的设计方式中,第一设备中还包括接续服务,在第一设备显示第一选项之前,方法还包括:第一应用向接续服务发送查询请求。接续服务向设备管理服务转发查询请求。响应于查询请求,如果设备管理服务中包括第二设备具有远程相机的能力的信息、且第二设备为在线设备,设备管理服务向接续服务返回第二设备的设备信息。接续服务向第一应用返回第二设备的设备信息。第一设备显示第一选项,包括:第一应用基于第二设备的设备信息显示第二设备对应的第一选项。In another possible design of the first aspect, the first device also includes a continuation service, and before the first device displays the first option, the method also includes: the first application sends a query request to the continuation service. The continuation service forwards the query request to the device management service. In response to the query request, if the device management service includes information that the second device has remote camera capabilities and the second device is an online device, the device management service returns the device information of the second device to the continuation service. The continuation service returns the device information of the second device to the first application. The first device displays the first option, including: the first application displays the first option corresponding to the second device based on the device information of the second device.
这样,第一设备可以通过查询设备管理服务,确定支持远程相机、在近场通信范围内且等偶遇相同用户账号的可用设备,并将可用设备的选项提供给用户选择。In this way, the first device can query the device management service to determine the available devices that support remote cameras, are within the near field communication range, and have the same user account, and provide options of the available devices to the user for selection.
在第一方面的一种可能的设计方式中,第二设备的设备信息包括用户账号的用户名称(如汤姆、杰尼)、第二设备的设备型号(如A型号、B型号)和/或第二设备的设备类型(如手机、平板),第一选项中包括用户名称、设备型号和/或设备类型。In a possible design of the first aspect, the device information of the second device includes the user name of the user account (such as Tom, Jenny), the device model of the second device (such as model A, model B) and/or the device type of the second device (such as mobile phone, tablet), and the first option includes the user name, device model and/or device type.
这样,可以使第一选项指示相应的可用设备。同时,用户名称、设备型号、设备类型都是一些不具有唯一指向性的信息,多个设备可能具有相同的用户名称、设备型号、设备类型,不会过多的泄露可用设备的信息。In this way, the first option can indicate the corresponding available device. At the same time, the user name, device model, and device type are all information that does not have unique directionality, and multiple devices may have the same user name, device model, and device type, which will not leak too much information about available devices.
在第一方面的一种可能的设计方式中,在通信服务发现第二设备在第一设备的近场通信范围内,和/或,第二设备与第一设备中登录相同的用户账号之后,上述方法还包括:通信服务为第二设备分配临时ID,第二设备的设备信息包括临时ID。相应的,第一设备向第一选项指示的第二设备发送第一请求,包括:第一应用向临时ID指示的第二设备发送第一请求。In a possible design of the first aspect, after the communication service finds that the second device is within the near field communication range of the first device, and/or the second device and the first device log in to the same user account, the method further includes: the communication service assigns a temporary ID to the second device, and the device information of the second device includes the temporary ID. The second device indicated by the first option sends a first request, including: the first application sends the first request to the second device indicated by the temporary ID.
这样,可以避免因将可用设备的MAC地址、设备序列号等固定不变的标识信息发送给目标应用,而导致隐私泄露。In this way, privacy leakage caused by sending fixed identification information such as the MAC address of the available device and the device serial number to the target application can be avoided.
在第一方面的一种可能的设计方式中,上述方法还包括:如果第二设备满足预设条件,响应于用户对第一选项的选择操作,第一设备发出第一提示信息,第一提示信息用于提示第二设备正在拍摄中。其中,满足预设条件则表明第二设备可以为第一设备拍摄图像。例如,预设条件包括系统相机处于空闲状态和/或第二设备处于开机状态。从而给用户提供明确的指示。In a possible design of the first aspect, the method further includes: if the second device meets a preset condition, in response to the user's selection operation of the first option, the first device sends a first prompt message, and the first prompt message is used to prompt that the second device is shooting. Wherein, satisfying the preset condition indicates that the second device can shoot images for the first device. For example, the preset condition includes that the system camera is in an idle state and/or the second device is in a powered-on state. Thereby providing a clear instruction to the user.
在第一方面的一种可能的设计方式中,第一设备中包括接续服务以及通信服务。相应的,响应于用户对第一选项的选择操作,第一设备向第一选项指示的第二设备发送第一请求,包括:响应于用户对第一选项的选择操作,第一应用向接续服务发送第二请求,第二请求中包括第二设备的设备信息以及请求类型,第二设备的设备信息用于指示拍摄图像的设备。响应于第二请求,接续服务向通信服务发送第三请求,第三请求中包括第一设备的设备信息、第二设备的设备信息、应用标识以及请求类型。响应于第三请求,通信服务向第三请求中第二设备的设备信息指示的第二设备发送第一请求。In a possible design of the first aspect, the first device includes a continuation service and a communication service. Accordingly, in response to the user's selection operation on the first option, the first device sends a first request to the second device indicated by the first option, including: in response to the user's selection operation on the first option, the first application sends a second request to the continuation service, the second request includes device information of the second device and a request type, and the device information of the second device is used to indicate a device for taking images. In response to the second request, the continuation service sends a third request to the communication service, the third request includes device information of the first device, device information of the second device, an application identifier, and a request type. In response to the third request, the communication service sends the first request to the second device indicated by the device information of the second device in the third request.
这样,可以通过接续服务、通信服务实现向第二设备发送第一请求。In this way, the first request can be sent to the second device through the connection service and the communication service.
在第一方面的一种可能的设计方式中,第一设备中包括通信服务以及接续服务。相应的,第一设备接收第二设备拍摄的图像和第一应用的应用标识,包括:通信服务接收第二设备拍摄得到的图像以及第一应用的应用标识。通信服务向接续服务发送图像以及应用标识。这样,可以通过通信服务、接续服务,接收第二设备拍摄的图像。In a possible design of the first aspect, the first device includes a communication service and a connection service. Accordingly, the first device receives an image captured by the second device and an application identifier of the first application, including: the communication service receives the image captured by the second device and the application identifier of the first application. The communication service sends the image and the application identifier to the connection service. In this way, the image captured by the second device can be received through the communication service and the connection service.
并且,第一设备基于应用标识在第一界面显示第二设备拍摄的图像,包括:接续服务向应用标识指示的第一应用发送图像。第一应用显示图像。这样,第一设备可以准确的将图像返回给应用标识指示的第一应用。Furthermore, the first device displays the image captured by the second device on the first interface based on the application identifier, including: the continuation service sends the image to the first application indicated by the application identifier. The first application displays the image. In this way, the first device can accurately return the image to the first application indicated by the application identifier.
第二方面,本申请提供了一种图像拍摄方法,应用于第二设备。其中,第二设备接收第一请求,第一请求中包括第一设备的设备信息、第一应用的应用标识和请求类型,请求类型用于指示第一请求调用的是远程相机,远程相机为第二设备中的一个应用。响应于第一请求,第二设备启动远程相机并在远程相机中记录第一设备的设备信息和应用标识。响应于启动远程相机,第二设备显示第二界面,第二界面是第二设备中系统相机的拍摄预览界面。响应于用户的拍摄操作,第二设备拍摄图像。第二设备向远程相机中第一设备的设备信息指示的第一设备发送图像,以及远程相机中的应用标识。In a second aspect, the present application provides an image capture method, which is applied to a second device. The second device receives a first request, which includes device information of the first device, an application identifier of the first application, and a request type, and the request type is used to indicate that the first request calls a remote camera, which is an application in the second device. In response to the first request, the second device starts the remote camera and records the device information and application identifier of the first device in the remote camera. In response to starting the remote camera, the second device displays a second interface, which is a shooting preview interface of the system camera in the second device. In response to the user's shooting operation, the second device captures an image. The second device sends an image to the first device indicated by the device information of the first device in the remote camera, as well as the application identifier in the remote camera.
综上,采用本申请,第二设备可以启动远程相机来调用系统相机拍摄图像,并将系统相机拍摄的图像分发给第一设备。从而为第一设备提供了一种远程拍摄的能力。In summary, by using the present application, the second device can start the remote camera to call the system camera to shoot images, and distribute the images shot by the system camera to the first device, thereby providing the first device with a remote shooting capability.
在第二方面的一种可能的设计方式中,上述方法还包括:第二设备发出第二提示信息,第二提示信息用于提示第一设备请求调用本设备(即第二设备)拍摄图像。第二设备启动远程相机,包括:响应于用户对第二提示信息的确认操作,第二设备启动远程相机。In a possible design of the second aspect, the method further includes: the second device sends a second prompt message, the second prompt message is used to prompt the first device to request to call the present device (i.e., the second device) to capture an image. The second device starts the remote camera, including: in response to a user's confirmation operation on the second prompt message, the second device starts the remote camera.
这样,可以在用户确认之后,才启动远程相机,避免影响第二设备的正常使用。In this way, the remote camera can be started only after the user confirms, thus avoiding affecting the normal use of the second device.
在第二方面的一种可能的设计方式中,第二设备中包括通信服务、接续服务。相应的,第二设备接收第一请求,包括:通信服务接收第一请求。以及,响应于第一请求,第二设备启动远程相机并在远程相机中记录第一设备的设备信息和第一应用的应用标识,包括:响应于接收到第一请求,通信服务向接续服务发送第四请求,第四请求中包括第一设备的设备信息、第一应用的应用标识和请求类型。响应于接收到第四请求,接续服务启动远程相机并向远程相机发送第一设备的设备信息和第一应用的应用标识。远程相机记录第一设备的设备信息和第一应用的应用标识。In a possible design of the second aspect, the second device includes a communication service and a connection service. Accordingly, the second device receives the first request, including: the communication service receives the first request. And, in response to the first request, the second device The communication service starts a remote camera and records the device information of the first device and the application identifier of the first application in the remote camera, including: in response to receiving the first request, the communication service sends a fourth request to the connection service, and the fourth request includes the device information of the first device, the application identifier of the first application, and the request type. In response to receiving the fourth request, the connection service starts the remote camera and sends the device information of the first device and the application identifier of the first application to the remote camera. The remote camera records the device information of the first device and the application identifier of the first application.
这样,可以通过通信服务、接续服务将第一应用的应用标识和第一设备的设备信息准确的传输给远程相机,以使远程相机明确启动的原因,便于后续分发图像。In this way, the application identifier of the first application and the device information of the first device can be accurately transmitted to the remote camera through the communication service and the connection service, so that the remote camera can clearly understand the reason for starting up and facilitate the subsequent distribution of images.
在第二方面的一种可能的设计方式中,第二设备中还包括系统相机。第二设备显示第二界面,包括:远程相机调用第二设备中的系统相机,系统相机显示第二界面。第二设备拍摄图像,包括:系统相机拍摄图像。In a possible design of the second aspect, the second device further includes a system camera. The second device displays the second interface, including: the remote camera calls the system camera in the second device, and the system camera displays the second interface. The second device captures an image, including: the system camera captures the image.
在第二方面的一种可能的设计方式中,第二设备向远程相机中记录的第一设备的设备信息指示的第一设备发送图像,以及发送远程相机中记录的第一应用的应用标识,包括:远程相机向接续服务发送图像、第一设备的设备信息和第一应用的应用标识。接续服务向通信服务发送图像、第一设备的设备信息和第一应用的应用标识。通信服务向第一设备的设备信息指示的第一设备发送图像和第一应用的应用标识。In a possible design of the second aspect, the second device sends an image to the first device indicated by the device information of the first device recorded in the remote camera, and sends an application identifier of the first application recorded in the remote camera, including: the remote camera sends the image, the device information of the first device, and the application identifier of the first application to the connection service. The connection service sends the image, the device information of the first device, and the application identifier of the first application to the communication service. The communication service sends the image and the application identifier of the first application to the first device indicated by the device information of the first device.
第二设备在向第一设备传输图像时,还会将远程相机中记录的第一应用的应用标识依次经过接续服务、通信服务发送给第一设备,使第一设备明确接收图像的应用为第一应用。When the second device transmits the image to the first device, it will also send the application identifier of the first application recorded in the remote camera to the first device through the connection service and the communication service in sequence, so that the first device can clearly know that the application receiving the image is the first application.
在第二方面的一种可能的设计方式中,在第二设备接收第一请求之前,上述方法还包括:第二设备向第一设备同步第一信息,第一信息指示第二设备具有远程相机的能力。In a possible design manner of the second aspect, before the second device receives the first request, the method further includes: the second device synchronizing first information to the first device, the first information indicating that the second device has remote camera capability.
其中,第二设备在其安装有远程相机、且允许将远程相机用于为其他设备拍摄图像时,可以向账号设备同步其远程相机的能力,以使同账号设备获知第二设备具有远程相机的能力。从而可以在有需求时调用第二设备的远程相机的能力。When the second device is equipped with a remote camera and allows the remote camera to be used to capture images for other devices, it can synchronize its remote camera capabilities with the account device, so that the same account device knows that the second device has the remote camera capability. Thus, the remote camera capability of the second device can be called when needed.
在第二方面的一种可能的设计方式中,在第二设备开始拍摄图像之后,在第二设备结束拍摄图像之前,上述方法还包括:第二设备向第一设备同步第二信息,第二信息指示第二设备的远程相机被占用。在第二设备结束拍摄图像之后,上述方法还包括:第二设备向第一设备同步第三信息,第三信息指示第二设备的远程相机未被占用。In a possible design of the second aspect, after the second device starts capturing images and before the second device finishes capturing images, the method further includes: the second device synchronizing second information to the first device, the second information indicating that the remote camera of the second device is occupied. After the second device finishes capturing images, the method further includes: the second device synchronizing third information to the first device, the third information indicating that the remote camera of the second device is not occupied.
这样,第二设备可以实时将其远程相机的工作状态(被占用或者未被占用)同步给同账号的设备,以使同账号设备获知第二设备的远程相机的工作状态,避免调用存在冲突。In this way, the second device can synchronize the working status (occupied or unoccupied) of its remote camera to the device with the same account in real time, so that the device with the same account can know the working status of the remote camera of the second device to avoid call conflicts.
在第二方面的一种可能的设计方式中,第二设备中包括设备管理服务,上述方法还包括:设备管理服务向第一设备同步第二设备具有远程相机的能力和/或第二设备的远程相机被占用或未被占用的信息。In a possible design of the second aspect, the second device includes a device management service, and the method further includes: the device management service synchronizes to the first device information that the second device has remote camera capability and/or that the remote camera of the second device is occupied or unoccupied.
第三方面,本申请提供了一种图像拍摄方法。其中,第一设备显示第一应用的第一界面。响应于用户对第一界面的第一操作,第一设备显示第一选项,第一操作用于获取图像。响应于用户对第一选项的选择操作,第一设备向第一选项指示的第二设备发送第一请求,第一请求中包括第一设备的设备信息、第一应用的应用标识和请求类型,请求类型用于指示第一请求调用的是远程相机,远程相机为第二设备中的一个应用。第二设备接收第一请求。响应于第一请求,第二设备启动远程相机并在远程相机中记录第一设备的设备信息和第一应用的应用标识。响应于启动远程相机,第二设备显示第二界面,第二界面是第二设备中系统相机的取景界面。响应于用户的拍摄操作,第二设备拍摄图像。第二设备向远程相机中第一设备的设备信息指示的第一设备发送图像,以及远程相机中的应用标识。In a third aspect, the present application provides an image capturing method. In which, a first device displays a first interface of a first application. In response to a first operation of a user on the first interface, the first device displays a first option, and the first operation is used to acquire an image. In response to a user's selection operation on the first option, the first device sends a first request to a second device indicated by the first option, and the first request includes device information of the first device, an application identifier of the first application, and a request type, and the request type is used to indicate that the first request calls a remote camera, and the remote camera is an application in the second device. The second device receives the first request. In response to the first request, the second device starts the remote camera and records the device information of the first device and the application identifier of the first application in the remote camera. In response to starting the remote camera, the second device displays a second interface, and the second interface is the viewfinder interface of the system camera in the second device. In response to the user's shooting operation, the second device captures an image. The second device sends a message to the remote The first device in the camera sends the image as indicated by the device information of the first device, and the application identifier in the remote camera.
综上,采用本申请,在第一设备需要获取图像时,可以请求第二设备来拍摄图像。如此,可以打破只能从本地(包括本地相机或者本地图库)获取图像的局限。尤其是对于平板、笔记本电脑等拍摄灵活性较差的第一设备,可以使用调用第二设备(如手机)来拍摄,可以为用户提供便捷、舒适的图像拍摄体验。In summary, by using this application, when the first device needs to obtain an image, it can request the second device to capture the image. In this way, the limitation of only being able to obtain images from the local (including the local camera or the local gallery) can be broken. Especially for the first device with poor shooting flexibility such as tablets and laptops, the second device (such as a mobile phone) can be called to shoot, which can provide users with a convenient and comfortable image shooting experience.
第四方面,本申请还提供了一种电子设备,电子设备为第一设备或者第二设备,包括:存储器和一个或多个处理器,存储器与处理器耦合;其中,存储器中存储有计算机程序代码,计算机程序代码包括计算机指令,当计算机指令被处理器执行时,使得电子设备执行上述第一方面、第二方面及其任一种可能的设计方式中的方法。In a fourth aspect, the present application also provides an electronic device, which is a first device or a second device, and includes: a memory and one or more processors, and the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method in the above-mentioned first aspect, second aspect and any possible design method thereof.
第五方面,本申请还提供了一种芯片系统,芯片系统应用于包括处理器和存储器的电子设备,芯片系统包括一个或多个接口电路和一个或多个处理器,接口电路和处理器通过线路互联,接口电路用于从电子设备的存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令,当处理器执行计算机指令时,使得电子设备执行上述第一方面、第二方面及其任一种可能的设计方式中的方法。In the fifth aspect, the present application also provides a chip system, which is applied to an electronic device including a processor and a memory. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected through lines. The interface circuit is used to receive signals from the memory of the electronic device and send signals to the processor. The signals include computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device executes the methods in the above-mentioned first aspect, second aspect and any possible design method thereof.
第六方面,本申请还提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得服务器执行上述第一方面、第二方面及其任一种可能的设计方式中的方法。In a sixth aspect, the present application also provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enable a server to execute the methods in the first aspect, the second aspect and any possible design thereof.
第七方面,本申请提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面、第二方面及其任一种可能的设计方式的方法。In a seventh aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method of the first aspect, the second aspect, and any possible design thereof.
可以理解地,上述提供的服务器,电子设备,芯片系统,计算机存储介质,计算机程序产品所能达到的有益效果,可参考第一方面、第二方面及其任一种可能的设计方式中的有益效果,此处不再赘述。It can be understood that the beneficial effects that can be achieved by the above-mentioned server, electronic device, chip system, computer storage medium, and computer program product can refer to the beneficial effects in the first aspect, the second aspect and any possible design method thereof, and will not be repeated here.
图1为本申请实施例提供的笔记本电脑的界面图之一;FIG1 is one of the interface diagrams of a laptop computer provided in an embodiment of the present application;
图2为本申请实施例提供的一种通信系统的组成示意图;FIG2 is a schematic diagram of the composition of a communication system provided in an embodiment of the present application;
图3为本申请实施例提供的一种电子设备的硬件结构图;FIG3 is a hardware structure diagram of an electronic device provided in an embodiment of the present application;
图4A为本申请实施例提供的第一设备的软件架构图;FIG4A is a software architecture diagram of a first device provided in an embodiment of the present application;
图4B为本申请实施例提供的第二设备的软件架构图;FIG4B is a software architecture diagram of a second device provided in an embodiment of the present application;
图5为本申请实施例提供的图像拍摄方法的交互流程图之一;FIG5 is one of the interactive flow charts of the image capturing method provided in an embodiment of the present application;
图6A为本申请实施例提供的同步远程相机的能力的原理示意图;FIG6A is a schematic diagram showing the principle of the capability of synchronizing remote cameras provided by an embodiment of the present application;
图6B为本申请实施例提供的发现在线设备的原理示意图;FIG6B is a schematic diagram showing the principle of discovering an online device according to an embodiment of the present application;
图7A为本申请实施例提供的笔记本电脑的界面图之二;FIG7A is a second interface diagram of a laptop computer provided in an embodiment of the present application;
图7B为本申请实施例提供的笔记本电脑的界面图之三;FIG7B is a third interface diagram of a laptop computer provided in an embodiment of the present application;
图7C为本申请实施例提供的笔记本电脑的界面图之四;FIG7C is a fourth interface diagram of a laptop computer provided in an embodiment of the present application;
图8A为本申请实施例提供的手机的界面图之一;FIG8A is one of the interface diagrams of a mobile phone provided in an embodiment of the present application;
图8B为本申请实施例提供的手机的界面图之二;FIG8B is a second interface diagram of a mobile phone provided in an embodiment of the present application;
图8C为本申请实施例提供的手机的界面图之三;FIG8C is a third interface diagram of a mobile phone provided in an embodiment of the present application;
图9为本申请实施例提供的笔记本电脑的界面图之五;FIG9 is a fifth interface diagram of a laptop computer provided in an embodiment of the present application;
图10为本申请实施例提供的多个设备先后调用同一设备的远程相机的示意图;FIG10 is a schematic diagram of multiple devices successively calling a remote camera of the same device according to an embodiment of the present application;
图11为本申请实施例提供的图像拍摄方法的交互流程图之二;FIG11 is a second interactive flow chart of the image capturing method provided in an embodiment of the present application;
图12为本申请实施例提供的图像拍摄方法的交互流程图之三;FIG12 is a third interactive flow chart of the image capturing method provided in an embodiment of the present application;
图13为本申请实施例提供的手机的界面图之四;FIG13 is a fourth interface diagram of a mobile phone provided in an embodiment of the present application;
图14为本申请实施例提供的一种芯片系统的结构图。FIG14 is a structural diagram of a chip system provided in an embodiment of the present application.
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The technical solutions in the embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "a kind", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and/or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in a kind of "or" relationship.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
本申请实施例提供的图像拍摄方法,可以应用于在使用平板、笔记本电脑等电子设备中运行一些应用时,获取图片/视频的场景中。应理解,视频通常由多个图像帧组成,每个图像帧即为一张图像。因此,为了便于说明,在下文中,将图片/视频简称为图像。The image capture method provided in the embodiment of the present application can be applied to the scene of obtaining pictures/videos when running some applications in electronic devices such as tablets and laptops. It should be understood that a video is usually composed of multiple image frames, and each image frame is an image. Therefore, for the sake of convenience, in the following, pictures/videos are referred to as images.
以获取图片为例,上述一些应用可以是任意有插入图片、编辑图片、发送图片、扫描图片等功能的应用,在这些应用的运行过程中,可以获取图片并对其进行插入、编辑、发送、扫描等处理。Taking the acquisition of pictures as an example, the above-mentioned applications may be any application with functions such as inserting pictures, editing pictures, sending pictures, scanning pictures, etc. During the operation of these applications, pictures may be acquired and inserted, edited, sent, scanned, etc.
示例性的,文字处理系统(Word Processing System,WPS)、office、备忘录等文档编辑应用都有插入图片的功能,则上述一些应用可以为WPS、office、备忘录等文档编辑应用。For example, document editing applications such as word processing system (WPS), office, and memo all have the function of inserting pictures, so some of the above-mentioned applications may be document editing applications such as WPS, office, and memo.
又示例性的,购物应用有扫描商品图片的功能,银行应用有扫描证件图片的功能,则上述一些应用可以为购物应用、银行应用。As another example, a shopping application has a function of scanning product images, and a banking application has a function of scanning ID images, so some of the above applications may be shopping applications and banking applications.
再示例性的,视频剪辑应用、图片处理应用都有编辑图片的功能,则上述一些应用可以为视频剪辑应用、图片处理应用。As another example, a video editing application and a picture processing application both have the function of editing pictures, so some of the above applications may be video editing applications and picture processing applications.
还示例性的,聊天应用具有发送图片的功能,则上述一些应用可以为聊天应用。Also exemplarily, if a chat application has a function of sending pictures, some of the above applications may be chat applications.
在下文中,为了便于说明,将上述一些应用统称为目标应用(也可以称为第一应用)。In the following, for the sake of convenience, the above applications are collectively referred to as target applications (also referred to as first applications).
下面以目标应用是文档编辑应用为例,来示例性的说明本申请的应用场景:The following takes the target application as a document editing application as an example to illustrate the application scenario of this application:
参见图1,笔记本电脑在运行文档编辑应用的过程中,可以显示图1所示的界面101,界面101中包括编辑的文档内容,如“旅行日记……”,还包括插入图片的控件102。笔记本电脑可以接收用户对控件102的点击操作,响应于用户对控件102的点击操作,笔记本电脑则获取图片插入到文档内容中。本申请实施例提供的图像拍摄方法,可以应用于用户点击控件102后,获取图片的场景中。Referring to FIG. 1 , when a laptop computer is running a document editing application, an interface 101 shown in FIG. 1 may be displayed. The interface 101 includes the edited document content, such as “travel diary…”, and also includes a control 102 for inserting a picture. The laptop computer may receive a user click operation on the control 102, and in response to the user click operation on the control 102, the laptop computer obtains the picture and inserts it into the document content. The image shooting method provided in the embodiment of the present application may be applied to a scenario in which a user obtains a picture after clicking the control 102.
在一些常规技术中,在上述获取图片的场景中,电子设备只能获取本地中已经存储的图片。示例性的,笔记本电脑响应于用户对图1中所示的界面101中控件102的点击操作,可以显示图1所示的界面103,界面103中包括对话框104。在对话框104中,用户可以从笔记本电脑的本地已经存储的图片中选择图片插入到正在编辑的文档中。In some conventional technologies, in the above-mentioned scenario of acquiring pictures, the electronic device can only acquire pictures that have been stored locally. Exemplarily, in response to a user clicking on a control 102 in the interface 101 shown in FIG. 1 , the laptop computer can display the interface 103 shown in FIG. 1 , and the interface 103 includes a dialog box 104. In the dialog box 104, the user can select a picture from the pictures that have been stored locally on the laptop computer and insert it into the document being edited.
然而,在一些情况下,当前运行该目标应用的电子设备(如图1中的笔记本电脑)中并没有存储用户所需的图片,因此不能满足用户获取图片的需求。However, in some cases, the electronic device (such as the laptop in FIG. 1 ) currently running the target application does not store the pictures required by the user, and thus cannot meet the user's need to obtain pictures.
在另一些常规技术中,电子设备可以支持直接通过调用本地相机来拍摄图片,然后获取本地相机拍摄的图片。示例性的,笔记本电脑响应于用户对图1所示的界面101中控件102的点击操作,可以显示图1中所示的界面103,界面103中包括对话框104。此时,用户可以先使用笔记本电脑中的相机拍摄得到图片,然后在对话框104中查找到相应的图片并插入到正在编辑的文档中。In other conventional technologies, the electronic device can support taking pictures directly by calling a local camera, and then obtain the pictures taken by the local camera. Exemplarily, in response to the user clicking the control 102 in the interface 101 shown in FIG. 1, the laptop can display the interface 103 shown in FIG. 1, and the interface 103 includes a dialog box 104. At this time, the user can first use the camera in the laptop to take pictures, and then find the corresponding pictures in the dialog box 104 and insert them into the document being edited.
然而,在一些情况中,当前运行该目标应用的电子设备可能并不能便捷的拍摄得到合适的图片。一种典型的可能为:平板、笔记本电脑等电子设备的体积较大或摄像头能力有限等原因,将导致拍照灵活性通常较低或质量不佳,无法便捷地拍摄得到理想的图片。However, in some cases, the electronic device currently running the target application may not be able to conveniently take suitable pictures. A typical possibility is that the electronic devices such as tablets and laptops are large in size or have limited camera capabilities, which will result in low flexibility or poor quality of taking pictures, and it is not possible to conveniently take ideal pictures.
由此可见,如果在上述获取图像的场景中,电子设备只能使用本地相机来拍摄图像,或者获取本地中已经存储的图像,则极有可能无法满足目标应用对图像的需求。It can be seen that if in the above-mentioned image acquisition scenario, the electronic device can only use the local camera to capture images, or obtain images that have been stored locally, it is very likely that the image requirements of the target application cannot be met.
基于此,本申请实施例提供了一种图像拍摄方法,可以应用于上述获取图像的场景中。其中,在电子设备获取图像的情况下,可以调用其它设备拍摄图像。然后,其它设备将拍摄得到的图像返回给电子设备。如此,该方法不仅可以打破只能从本地(包括本地相机或者本地图库)获取图像的局限。尤其是对于平板、笔记本电脑等拍摄灵活性较差的电子设备,可以使用调用其它电子设备来拍摄,可以为用户提供便捷、舒适的图像拍摄体验。Based on this, an embodiment of the present application provides an image capture method that can be applied to the above-mentioned scene of acquiring images. Among them, when an electronic device acquires an image, other devices can be called to capture the image. Then, the other devices return the captured image to the electronic device. In this way, the method can not only break the limitation of only being able to acquire images locally (including local cameras or local galleries). Especially for electronic devices with poor shooting flexibility such as tablets and laptops, other electronic devices can be called to shoot, which can provide users with a convenient and comfortable image capture experience.
本申请实施例还提供了一种通信系统,参见图2,通信系统包括第一设备(如图2所示的笔记本电脑210)和至少一个第二设备(如图2所示的手机220、平板230)。An embodiment of the present application also provides a communication system. Referring to FIG. 2 , the communication system includes a first device (a laptop computer 210 as shown in FIG. 2 ) and at least one second device (a mobile phone 220 and a tablet computer 230 as shown in FIG. 2 ).
其中,第一设备中安装有目标应用,在第一设备运行目标应用的过程中,可能产生获取图像的需求。第二设备中包括实现远程的拍摄调用和图像分发功能的应用(可简称为远程相机),远程相机可以接收第一设备的调用请求,并将第二设备的系统相机拍摄得到的图像分发给第一设备。The first device has a target application installed in it, and when the first device runs the target application, it may need to obtain an image. The second device includes an application that implements remote shooting call and image distribution functions (referred to as a remote camera for short), and the remote camera can receive the call request of the first device and distribute the image captured by the system camera of the second device to the first device.
第一设备和第二设备之间可以通信连接。通信连接包括互联网连接。通过互联网连接,第二设备可以向第一设备同步(即发送)其支持远程相机的功能,以便于第一设备发现第二设备的远程相机并调用。以及,通信连接还包括近场通信连接。通过近场通信连接,第一设备可以点对点的向第二设备发送调用请求,以及第二设备可以将拍摄得到的图像传输给第一设备。其中,近场通信包括蓝牙、无线保真(Wireless Fidelity,WIFI)、近距离无线通信(Near Field Communication,NFC)等。The first device and the second device can be connected in communication. The communication connection includes an Internet connection. Through the Internet connection, the second device can synchronize (i.e., send) its remote camera support function to the first device, so that the first device can discover and call the remote camera of the second device. And, the communication connection also includes a near-field communication connection. Through the near-field communication connection, the first device can send a call request to the second device point-to-point, and the second device can transmit the captured image to the second device. To the first device. Among them, near field communication includes Bluetooth, Wireless Fidelity (Wireless Fidelity, WIFI), Near Field Communication (Near Field Communication, NFC) and the like.
需要说明的是,本申请实施例中,与互联网连接相比:通过近场通信传输调用请求以及图像数据等,一方面可以通过点对点的方式来传输信息,更有利于保证信息安全。另一方面,如果使用蓝牙或者NFC等无需依赖网络的近场通信技术,信息传输速率不会受到网络因素的影响,可以更稳定快速的传输信息;而且,即使第一设备和/或第二设备没有连接网络,也可以实现远程相机的调用以及图像数据的传输。It should be noted that, in the embodiments of the present application, compared with Internet connection: transmitting call requests and image data through near-field communication, on the one hand, can transmit information in a point-to-point manner, which is more conducive to ensuring information security. On the other hand, if near-field communication technologies such as Bluetooth or NFC that do not rely on the network are used, the information transmission rate will not be affected by network factors, and information can be transmitted more stably and quickly; moreover, even if the first device and/or the second device are not connected to the network, the remote camera call and image data transmission can be realized.
应注意,第一设备和第二设备之间可以不同时建立互联网连接和近场通信连接。例如,在调用远程相机的过程中,则可以仅建立近场通信连接,而无需建立互联网连接。It should be noted that the first device and the second device may not establish an Internet connection and a near field communication connection at the same time. For example, in the process of calling a remote camera, only a near field communication connection may be established without establishing an Internet connection.
在一些示例中,第一设备和第二设备中可以登录有相同的系统级别的用户账号,如相同的账号、相同的账号等。应理解,登录相同用户账号的同账号设备(如第一设备和第二设备)之间,可以通过身份认证,加入到同一信任环中。从而可以仅在信任环内进行信息交互,如同步远程相机的能力、传输调用请求、传输图像等,保证设备安全。In some examples, the first device and the second device may have the same system-level user account logged in, such as the same Account number, same Accounts, etc. It should be understood that devices with the same account (such as the first device and the second device) that log in to the same user account can be added to the same trust ring through identity authentication. Therefore, information interaction can be performed only within the trust ring, such as synchronizing the capabilities of remote cameras, transmitting call requests, transmitting images, etc., to ensure device security.
上述第一设备和第二设备,仅仅只是基于电子设备在获取图片的场景中,扮演的不同功能角色来划分的。其中,第一设备为图像的需求设备,第二设备为图像的提供设备。应理解,同一电子设备,在一些场景中,可以作为第一设备,在另一些场景中,也可以作为第二设备。示例性的,如果上述图2中的手机220或者平板230从其它设备获取图像,即为图像的需求设备,其也可以作为第一设备。如果上述图2中的笔记本电脑210具有远程相机能力,其也可以作为图像的提供设备,即作为第二设备。The above-mentioned first device and second device are only divided based on the different functional roles played by the electronic device in the scene of acquiring pictures. Among them, the first device is an image demanding device, and the second device is an image providing device. It should be understood that the same electronic device can be used as a first device in some scenarios and as a second device in other scenarios. Exemplarily, if the mobile phone 220 or tablet 230 in Figure 2 above acquires images from other devices, that is, it is an image demanding device, it can also be used as a first device. If the laptop computer 210 in Figure 2 above has a remote camera capability, it can also be used as an image providing device, that is, as a second device.
示例性的,上述第一设备/第二设备可以是手持式设备、车载设备等,如手机(mobile phone)、平板、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID),虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线设备、无人驾驶(self driving)中的无线设备、远程手术(remote medical surgery)中的无线设备、智能电网(smart grid)中的无线设备、运输安全(transportation safety)中的无线设备、智慧城市(smart city)中的无线设备、智慧家庭(smart home)中的无线设备、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、个人计算机(personal computer,PC)、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,本申请实施例对此并不限定。Exemplarily, the first device/second device may be a handheld device, a vehicle-mounted device, etc., such as a mobile phone, a tablet, a laptop computer, a PDA, a mobile Internet device (MID), a virtual reality (VR) device, an augmented reality (AR) device, a wireless device in industrial control, a wireless device in self-driving, a wireless device in remote medical surgery, a wireless device in smart grid, a wireless device in transportation safety, a wireless device in smart city, etc. The present invention relates to wireless devices in the field of communications, wireless devices in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDA), handheld devices with wireless communication functions, personal computers (PC), computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or terminal devices in future evolved public land mobile communication networks (PLMN), etc., and the embodiments of the present application are not limited to this.
上述第一设备/第二设备也可以是可穿戴设备。例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,可以和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。The first device/second device may also be a wearable device, such as a smart watch or smart glasses, and may focus on a certain type of application function and be used in conjunction with other devices such as smart phones, such as various smart bracelets and smart jewelry for vital sign monitoring.
上述第一设备/第二设备还可以是物联网(internet of things,IoT)系统中的终端设备。The above-mentioned first device/second device can also be a terminal device in an Internet of Things (IoT) system.
参见图3,为本申请实施例提供的一种电子设备(如第一设备/第二设备)的硬件结构图。如图3所示,以电子设备是手机为例,其可以包括:处理器310,外部存储器接口320,内部存储器321,通用串行总线(universal serial bus,USB)接口330,充电管理模块340,电源管理模块341,电池342,天线1,天线2,移动通信模块350,无线通信模块360,音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,传感器模块380,按键390,马达391,指示器392,摄像头393,显示屏394,以及用户标识模块(subscriber identification module,SIM)卡接口395等。See Figure 3, which is a hardware structure diagram of an electronic device (such as a first device/second device) provided in an embodiment of the present application. As shown in Figure 3, taking the electronic device as a mobile phone as an example, it may include: a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, Audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone jack 370D, sensor module 380, button 390, motor 391, indicator 392, camera 393, display screen 394, and subscriber identification module (SIM) card interface 395, etc.
可以理解的是,本实施例示意的结构并不构成对电子设备的具体限定。在另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器310可以包括一个或多个处理单元,例如:处理器310可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 310 may include one or more processing units, for example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
控制器可以是电子设备的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
充电管理模块340用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。充电管理模块340为电池342充电的同时,还可以通过电源管理模块341为电子设备供电。The charging management module 340 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 340 is charging the battery 342, it can also power the electronic device through the power management module 341.
电源管理模块341用于连接电池342,充电管理模块340与处理器310。电源管理模块341接收电池342和/或充电管理模块340的输入,为处理器310,内部存储器321,外部存储器,显示屏394,摄像头393,和无线通信模块360等供电。电源管理模块341还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。The power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310. The power management module 341 receives input from the battery 342 and/or the charging management module 340, and supplies power to the processor 310, the internal memory 321, the external memory, the display screen 394, the camera 393, and the wireless communication module 360. The power management module 341 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块350,无线通信模块360,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem processor and baseband processor.
电子设备通过GPU,显示屏394,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏394和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器310可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device implements the display function through a GPU, a display screen 394, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs that execute program instructions to generate or change display information.
电子设备可以通过ISP,摄像头393,视频编解码器,GPU,显示屏394以及应用处理器等实现拍摄功能。The electronic device can realize the shooting function through ISP, camera 393, video codec, GPU, display screen 394 and application processor.
在一些实施例中,电子设备作为第二设备时,其可以基于第一设备的请求来调用摄像头393拍摄图像并返回给第一设备。In some embodiments, when the electronic device acts as a second device, it can call the camera 393 to capture an image based on a request from the first device and return the image to the first device.
外部存储器接口320可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口320与处理器310通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function. For example, files such as music and videos can be saved in the external memory card.
内部存储器321可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器310通过运行存储在内部存储器321的指令,从而执行电子设备的各种功能应用以及数据处理。内部存储器321可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器321可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 321 can be used to store computer executable program codes, which include instructions. The processor 310 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 321. The internal memory 321 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as up to Less one disk storage device, flash memory device, universal flash storage (UFS), etc.
电子设备可以通过音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device can implement audio functions such as music playing and recording through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the headphone jack 370D, and the application processor.
按键390包括开机键,音量键等。按键390可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。The key 390 includes a power key, a volume key, etc. The key 390 can be a mechanical key or a touch key. The electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
马达391可以产生振动提示。马达391可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏394不同区域的触摸操作,马达391也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 391 can generate vibration prompts. Motor 391 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 394, motor 391 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器392可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。Indicator 392 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
SIM卡接口395用于连接SIM卡。SIM卡可以通过插入SIM卡接口395,或从SIM卡接口395拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口395可以支持Nano SIM卡,Micro SIM卡,SIM卡等。The SIM card interface 395 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device by inserting the SIM card interface 395 or pulling the SIM card out of the SIM card interface 395. The electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 395 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
本申请实施例中,电子设备(如第一设备/第二设备)的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本文中,以分层架构的系统为例,示例性说明第一设备和第二设备的软件结构。In the embodiment of the present application, the software system of the electronic device (such as the first device/the second device) can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structures of the first device and the second device are exemplified.
参见图4A,为本申请实施例提供的第一设备的软件架构图。参见图4B,为本申请实施例提供的第二设备的软件架构图。如图4A和图4B所示,分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口进行数据的传输与通信。在一些实施例中,将系统分为五层,从上至下分别为应用程序层,应用程序框架层,运行时(runtime)和系统库、硬件抽象层(hardware abstract layer,HAL),以及内核层。See FIG. 4A, which is a software architecture diagram of a first device provided in an embodiment of the present application. See FIG. 4B, which is a software architecture diagram of a second device provided in an embodiment of the present application. As shown in FIG. 4A and FIG. 4B, the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Data is transmitted and communicated between layers through software interfaces. In some embodiments, The system is divided into five layers, from top to bottom: application layer, application framework layer, Runtime( runtime) and system libraries, hardware abstraction layer (HAL), and kernel layer.
应用程序层可以包括一系列应用程序包。应用程序包可以包括备忘录、计算器、通话、浏览器等应用程序。The application layer can include a series of application packages, which can include applications such as memo, calculator, call, browser, etc.
在本申请实施例中,第一设备的应用程序层中还包括目标应用,例如WPS、office、备忘录等文档编辑应用,购物应用,银行应用,视频剪辑应用,图片处理应用,社交应用等。In an embodiment of the present application, the application layer of the first device also includes target applications, such as document editing applications such as WPS, office, memo, shopping applications, banking applications, video editing applications, image processing applications, social applications, etc.
第二设备的应用程序层中还包括远程相机,远程相机用于接收第一设备的调用,并调用第二设备的系统相机拍摄图像后回传给第一设备。也就是说,与系统相机相比,远程相机支持调用者的编排传输,可以决定将图像传输给谁。The application layer of the second device also includes a remote camera, which is used to receive the call from the first device and call the system camera of the second device to take an image and then transmit it back to the first device. In other words, compared with the system camera, the remote camera supports the caller's orchestration transmission and can decide to whom to transmit the image.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
应用程序框架层可以包括通知管理器、窗口管理器、资源管理器、内容提供器和视图系统等。The application framework layer may include a notification manager, a window manager, a resource manager, a content provider, and a view system, etc.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息、发出提示音、终端设备振动、指示灯闪烁等。窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏、锁定屏幕、触摸屏幕、拖拽屏幕、截取屏幕等。资源管理器为应用程序提供各种资源,例如本地化字符串、图标、图片、布局文件、视频文件等等。内容提供器用于在不同的应用程序之间实现数据共享的功能,允许一个程序访问另一个程序中的数据,同时还能保证被访问的数据的安全性。视图系统可以负责应用程序的界面绘制和事件处理。The notification manager allows applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify that a download is complete. The notification manager can also be a notification that appears in the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is issued, the terminal device vibrates, the indicator light flashes, etc. The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc. The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc. The content provider is used to implement data sharing between different applications, allowing one program to access the data in another program while ensuring the security of the accessed data. The view system can be responsible for the interface drawing and event processing of the application.
以及,应用程序框架层还可以包括接续服务、应用鉴权服务、通信服务以及设备管理服务(Profile)。Furthermore, the application framework layer may also include connection services, application authentication services, communication services, and device management services (Profile).
接续服务为目标应用提供近场设备发现感知,以及提供数据和文件发送的能力。示例性的,接续服务可以负责目标应用的接入。以及,在目标应用接入接续服务后,接续服务还可以负责为目标应用查询可以调用并进行拍摄的设备(即下文中的可用设备),跨设备传输调用请求、图像等数据。The connection service provides the target application with near-field device discovery awareness and the ability to send data and files. For example, the connection service can be responsible for accessing the target application. And, after the target application accesses the connection service, the connection service can also be responsible for querying the target application for devices that can be called and shot (i.e., available devices below), and transmitting call requests, images and other data across devices.
应用鉴权服务可以负责应用的合法性校验,如校验应用的身份和权限。示例性的,应用鉴权模块可以负责校验请求接入接续服务的目标应用的合法性,在确认目标应用合法的情况下,才允许目标应用接入接续服务。从而避免为非法应用提供调用远程相机进行拍摄的服务。The application authentication service can be responsible for checking the legitimacy of the application, such as checking the identity and permissions of the application. For example, the application authentication module can be responsible for checking the legitimacy of the target application requesting access to the continuation service. Only when the target application is confirmed to be legitimate, the target application is allowed to access the continuation service. This avoids providing illegal applications with the service of calling the remote camera for shooting.
通信服务,如的智能互联服务(Magic Link),可用于实现跨设备间的数据传输,同账号设备的安全认证与账号鉴权、设备的自发现与自组网等。示例性的,通过通信服务,第一设备可以发现位于近场的第二设备并验证第二设备的身份,并在验证第二设备是可信任的设备(即登录相同的用户账号的设备)之后,在第一设备和第二设备之间传输调用请求以及传输图像等。Communication services such as The smart interconnection service (Magic Link) can be used to realize data transmission across devices, security authentication and account authentication of devices with the same account, self-discovery and self-organizing network of devices, etc. For example, through the communication service, the first device can discover the second device in the near field and verify the identity of the second device, and after verifying that the second device is a trusted device (i.e., a device logged in with the same user account), transmit call requests and images between the first device and the second device.
设备管理服务可视为设备间同步数据的数据库,数据库可以记录同账号设备具有的能力、能力被占用的情况、近场设备的信息等。示例性的,第一设备的设备管理服务可以记录第二设备具有远程相机的能力、该远程相机的能力被占用的情况、近场通信范围内的设备等信息。The device management service can be regarded as a database for synchronizing data between devices, and the database can record the capabilities of devices with the same account, the situation in which the capabilities are occupied, information about near-field devices, etc. For example, the device management service of the first device can record information such as the remote camera capability of the second device, the situation in which the remote camera capability is occupied, and the devices within the near-field communication range.
runtime包括核心库和虚拟机。runtime负责系统的调度和管理。 The runtime includes the core library and the virtual machine. The runtime is responsible for Scheduling and management of the system.
核心库包含两部分:一部分是java语言调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function called by Java language, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:媒体库(Media Libraries)、函数库(Function Libraries)图形处理库(例如:OpenGL ES)等。The system library can include multiple functional modules, such as media libraries, function libraries, graphics processing libraries (such as OpenGL ES), etc.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
函数库为开发者提供多种服务的API接口,方便开发者快速集成并实现各种功能。The function library provides developers with API interfaces for multiple services, making it easy for developers to quickly integrate and implement various functions.
图形处理库用于实现图形绘图、图像渲染、合成和图层处理等。The graphics processing library is used to implement graphics drawing, image rendering, synthesis and layer processing.
硬件抽象层是介于内核层和Android runtime之间的抽象出来的一层结构。硬件抽象层可以是对硬件驱动的一个封装,为上层应用的调用提供统一接口。硬件抽象层可以包括蓝牙模块、WIFI模块等。示例性的,蓝牙模块和WIFI模块可以屏蔽内核层中蓝牙驱动和WIFI驱动的具体硬件实现细节,上层应用在不必知道内核层硬件驱动的具体实现方式的情况下就可以通过调用接口实现蓝牙功能和WIFI功能。The hardware abstraction layer is an abstract structure between the kernel layer and the Android runtime. The hardware abstraction layer can be a package of the hardware driver, providing a unified interface for the upper-layer application to call. The hardware abstraction layer can include Bluetooth modules, WIFI modules, etc. For example, the Bluetooth module and the WIFI module can shield the specific hardware implementation details of the Bluetooth driver and the WIFI driver in the kernel layer, and the upper-layer application can implement the Bluetooth function and the WIFI function by calling the interface without knowing the specific implementation method of the kernel-layer hardware driver.
内核层是硬件和软件之间的层。内核层可以包括显示驱动、摄像头驱动、音频驱动、蓝牙驱动、WiFi驱动、通用串行总线(Universal Serial Bus,USB)驱动、中央处理器驱动等。The kernel layer is the layer between hardware and software. The kernel layer can include display drivers, camera drivers, audio drivers, Bluetooth drivers, WiFi drivers, Universal Serial Bus (USB) drivers, CPU drivers, etc.
在一些实施例中,通信服务(如Magic Link)可以通过蓝牙驱动以及WiFi驱动等相关近场通信模块进行跨设备间的连接,实现设备的自发现与自组网。In some embodiments, communication services (such as Magic Link) can connect across devices through related near-field communication modules such as Bluetooth drivers and WiFi drivers, thereby achieving self-discovery and self-organizing networking of devices.
本申请实施例这里将结合图4A和图4B的软件架构,对图像拍摄方法的实现进行说明:在第一设备的目标应用接入接续服务后,如果目标应用需要获取图像,目标应用可以依次通过第一设备的接续服务、设备管理服务查询到可用设备,可用设备中包括第二设备。然后,目标应用依次通过第一设备的接续服务、通信服务向可用设备中的第二设备发送调用请求,请求调用第二设备的远程相机。依次经过第二设备的通信服务、接续服务,第二设备的接续服务接收到调用请求。第二设备的接续服务启动第二设备的远程相机,以调用第二设备的系统相机拍摄图像。在第二设备的系统相机拍摄完图像之后,可以经过第二设备的远程相机、接续服务、通信服务,以及第一设备的通信服务、接续服务,最后传输给第一设备的目标应用。这样,第一设备的目标应用则获取到由第二设备拍摄得到的图像,打破只能从本地(包括本地相机或者本地图库)获取图像的局限,更加灵活的满足电子设备对图像的需求。The embodiment of the present application will be combined with the software architecture of Figures 4A and 4B to illustrate the implementation of the image shooting method: after the target application of the first device accesses the continuation service, if the target application needs to obtain an image, the target application can query the available devices through the continuation service and device management service of the first device in sequence, and the available devices include the second device. Then, the target application sends a call request to the second device in the available devices through the continuation service and communication service of the first device in sequence, requesting to call the remote camera of the second device. After passing through the communication service and continuation service of the second device in sequence, the continuation service of the second device receives the call request. The continuation service of the second device starts the remote camera of the second device to call the system camera of the second device to shoot an image. After the system camera of the second device shoots the image, it can be transmitted to the target application of the first device through the remote camera, continuation service, communication service of the second device, and the communication service and continuation service of the first device. In this way, the target application of the first device obtains the image shot by the second device, breaking the limitation of only being able to obtain images from the local (including the local camera or the local gallery), and more flexibly meeting the image needs of the electronic device.
至此,需要说明的是,上述图4A和图4B均以AndroidTM系统为例,说明了第一设备和第二设备的软件架构。实际中,上述第一设备和/或第二设备的操作系统也可以是WindowsTM系统。在WindowsTM操作系统中,应用层(如电脑管家应用)中还可以集成上述应用程序框架层中接续服务、应用鉴权服务、通信服务、设备管理服务,以及硬件抽象层中蓝牙模块、WIFI模块的功能。应用层通过调用蓝牙驱动或者WIFI驱动,完成与对端的近场通信,实现设备间的数据传输。At this point, it should be noted that the above-mentioned Figures 4A and 4B both take the AndroidTM system as an example to illustrate the software architecture of the first device and the second device. In practice, the operating system of the above-mentioned first device and/or the second device may also be a WindowsTM system. In the WindowsTM operating system, the application layer (such as a computer housekeeper application) may also integrate the connection service, application authentication service, communication service, device management service in the above-mentioned application framework layer, and the functions of the Bluetooth module and the WIFI module in the hardware abstraction layer. The application layer completes the near-field communication with the opposite end by calling the Bluetooth driver or the WIFI driver to realize data transmission between devices.
本申请实施例提供的图像拍摄方法,可以在由具有上述软硬件结构的第一设备和第二设备构成的通信系统中完成,下面将进一步结合附图,并以第一设备是笔记本电脑210、第二设备是手机220为例,来详细说明本申请实施例提供的图像拍摄方法。The image capturing method provided in the embodiment of the present application can be implemented in a communication system composed of a first device and a second device having the above-mentioned software and hardware structure. The image capturing method provided in the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings, taking the first device being a laptop computer 210 and the second device being a mobile phone 220 as an example.
参见图5,本申请实施例提供的图像拍摄方法包括如下步骤:Referring to FIG. 5 , the image capturing method provided in the embodiment of the present application includes the following steps:
S501、笔记本电脑210发现(手机220为)支持远程相机的设备和在线设备。S501. The notebook computer 210 discovers (the mobile phone 220 is) a device supporting a remote camera and an online device.
笔记本电脑210可以确定支持远程相机、且可以利用近场通信传输图像的可用设备,然后调用可用设备的远程相机拍摄图像。那么,笔记本电脑210可以发现支持远程相机的设备,以及发现在近场通信范围内的在线设备。The laptop computer 210 can determine an available device that supports a remote camera and can transmit images using near field communication, and then call the remote camera of the available device to capture images. Then, the laptop computer 210 can discover devices that support remote cameras and online devices within the near field communication range.
在一些实施例中,笔记本电脑210发现支持远程相机的设备的过程可以包括:In some embodiments, the process of the laptop 210 discovering a device that supports a remote camera may include:
针对任一设备,如果该设备和笔记本电脑210中登录有相同的用户账号、且该设备支持远程相机,则该设备可以通过互联网向笔记本电脑210同步其具有远程相机的能力。相应的,笔记本电脑210则可以记录该设备为支持远程相机的设备。For any device, if the same user account is logged in to the device and the laptop 210, and the device supports remote cameras, the device can synchronize its remote camera capability to the laptop 210 via the Internet. Accordingly, the laptop 210 can record the device as a device that supports remote cameras.
示例性的,参见图6A,笔记本电脑210、手机220和平板230中登录的用户账号均为账号a,属于同账号设备,且手机220和平板230都支持远程相机。那么,手机220和平板230可以将其具有远程相机的能力的信息通过互联网上报到云端。云端可以将手机220和平板230具有远程相机的能力的信息下发给所有的同账号设备,如将手机220具有远程相机的能力的信息下发给笔记本电脑210和平板230,将平板230具有远程相机的能力的信息下发给笔记本电脑210和手机220。这样,笔记本电脑210可以获取到手机220和平板230具有远程相机的能力的信息,则可以记录如下信息“平板230,支持远程相机;手机220,支持远程相机”。例如,笔记本电脑210可以数组或者矩阵等形式记录“平板230,支持远程相机;手机220,支持远程相机”,本申请实施例对此不作具体限定。For example, referring to FIG. 6A , the user accounts logged in on the laptop 210 , the mobile phone 220 , and the tablet 230 are all Account a belongs to the same account device, and both the mobile phone 220 and the tablet 230 support remote cameras. Then, the mobile phone 220 and the tablet 230 can report the information that they have the ability of remote cameras to the cloud through the Internet. The cloud can send the information that the mobile phone 220 and the tablet 230 have the ability of remote cameras to all the devices with the same account, such as sending the information that the mobile phone 220 has the ability of remote cameras to the laptop 210 and the tablet 230, and sending the information that the tablet 230 has the ability of remote cameras to the laptop 210 and the mobile phone 220. In this way, the laptop 210 can obtain the information that the mobile phone 220 and the tablet 230 have the ability of remote cameras, and can record the following information "Tablet 230, supports remote cameras; mobile phone 220, supports remote cameras". For example, the laptop 210 can record "Tablet 230, supports remote cameras; mobile phone 220, supports remote cameras" in the form of an array or matrix, etc., and the embodiments of the present application do not specifically limit this.
以及,笔记本电脑210发现在线设备的过程可以包括:And, the process of the laptop computer 210 discovering the online device may include:
针对任一设备,如果笔记本电脑210检测到该设备在笔记本电脑210的近场通信范围内,且验证该设备中登录的用户账号与笔记本电脑210中登录的用户账号相同,笔记本电脑210则可以将该设备标记为在线设备。例如,笔记本电脑210和该设备都打开了蓝牙,并且笔记本电脑210通过蓝牙扫描到了该设备,或者,该设备与笔记本电脑210连接同一Wifi,则可以确定该设备在笔记本电脑210的近场通信范围内,在此基础上,笔记本电脑210和该设备之间通过近场交换身份信息验证两者都登录有相同的用户账号,则可以确定该设备为在线设备。For any device, if the laptop 210 detects that the device is within the near field communication range of the laptop 210 and verifies that the user account logged in to the device is the same as the user account logged in to the laptop 210, the laptop 210 can mark the device as an online device. For example, if the laptop 210 and the device both have Bluetooth turned on, and the laptop 210 scans the device through Bluetooth, or the device and the laptop 210 are connected to the same Wifi, it can be determined that the device is within the near field communication range of the laptop 210. On this basis, the laptop 210 and the device exchange identity information through near field to verify that both are logged in with the same user account, and the device can be determined to be an online device.
以近场通信是蓝牙通信为例,参见图6B,笔记本电脑210通过蓝牙扫描到手机220、平板230和手机610,且笔记本电脑210、手机220、平板230和手机610都登录有用户账号a,笔记本电脑210则可以标记手机220、平板230和手机610为在线设备。Taking the case where the near field communication is Bluetooth communication as an example, see Figure 6B. The laptop computer 210 scans the mobile phone 220, the tablet computer 230 and the mobile phone 610 via Bluetooth, and the laptop computer 210, the mobile phone 220, the tablet computer 230 and the mobile phone 610 are all logged in with the user account a. The laptop computer 210 can then mark the mobile phone 220, the tablet computer 230 and the mobile phone 610 as online devices.
经过S501,笔记本电脑210发现支持远程相机的设备和在线设备之后,响应于用户获取图片的操作(如点击图7A所示界面701中“图片”702的操作),笔记本电脑210可以将支持远程相机的在线设备,确定为可用设备,以用于拍摄图像。示例性的,图6A中,支持远程相机的设备为手机220和平板230,图6B中,在线设备为手机220、平板230和手机610,那么,笔记本电脑210可以将手机220和平板230确定为可用设备以用于拍摄图像。After S501, the laptop computer 210 finds the device and online device supporting the remote camera, and in response to the user's operation of obtaining a picture (such as clicking the "Picture" 702 in the interface 701 shown in FIG. 7A), the laptop computer 210 can determine the online device supporting the remote camera as an available device for capturing an image. For example, in FIG. 6A, the devices supporting the remote camera are the mobile phone 220 and the tablet 230, and in FIG. 6B, the online devices are the mobile phone 220, the tablet 230, and the mobile phone 610, so the laptop computer 210 can determine the mobile phone 220 and the tablet 230 as available devices for capturing an image.
需要说明的是,上述S501是持续的。在开机后,笔记本电脑210会持续不断的发现支持远程相机的设备和在线设备。例如,有新的设备与笔记本电脑210登录相同的用户账号,且支持远程相机,则该新的设备会被笔记本电脑210发现为支持远程相机的设备。又例如,已经被发现为支持远程相机的设备,其不再提供远程相机的能力,则笔记本电脑210会将该设备从支持远程相机的设备中剔除。再例如,有新的设备进入笔记本电脑210的近场通信范围内,且该新的设备与笔记本电脑210登录相同的用户账号,则该新的设备会被笔记本电脑210发现为在线设备。还例如,已经被发现为在线设备的设备,其超出笔记本电脑210的近场通信范围,或者切换登录的用户账号,笔记本电脑210则会将该设备从在线设备中剔除。It should be noted that the above S501 is continuous. After booting, the laptop 210 will continuously discover devices and online devices that support remote cameras. For example, if a new device logs in to the same user account as the laptop 210 and supports remote cameras, the new device will be discovered by the laptop 210 as a device that supports remote cameras. For another example, if a device that has been discovered to support remote cameras no longer provides the ability of remote cameras, the laptop 210 will remove the device from the devices that support remote cameras. For another example, if a new device enters the near-field communication range of the laptop 210, and the new device logs in to the same user account as the laptop 210, the new device will be discovered by the laptop 210 as an online device. For another example, if a device that has been discovered to be an online device exceeds the near-field communication range of the laptop 210, or switches the logged-in user account, the laptop 210 will remove the device from the online devices.
S502、笔记本电脑210接收获取图像的获取操作(也可以称为第一操作)。S502: The notebook computer 210 receives an image acquisition operation (also referred to as a first operation).
在一些实施例中,目标应用的应用界面(也可以称为第一界面)中提供有获取控件,用于获取图像。获取操作可以是用户对获取控件的预设操作,如点击、长按等操作。In some embodiments, an acquisition control is provided in the application interface (also referred to as the first interface) of the target application for acquiring an image. The acquisition operation may be a preset operation of the acquisition control by the user, such as click, long press, and the like.
示例性的,参见图7A,获取控件为图7A所示界面701中的“图片”702,获取操作可以是用户对界面701中“图片”702的点击操作。For example, referring to FIG. 7A , the acquisition control is “Picture” 702 in the interface 701 shown in FIG. 7A , and the acquisition operation It may be a user clicking operation on “Picture” 702 in interface 701 .
又示例性的,参加图7B,获取控件包括图7B所示界面701中的“图片”702,获取操作包括用户对界面701中的“图片”702的点击操作。响应于用户对界面701中的“图片”702的点击操作,笔记本电脑210可以显示图7B所示的界面706,界面706中包括“本地图库”和“远程相机”707两个选项。“本地图库”可用于触发从笔记本电脑210的本地图库获取图像。“远程相机”707可用于触发调用其它设备(如手机220)的远程相机拍摄图像。在本示例中,获取控件还包括图7B所示的界面706中的“远程相机”707,获取操作还包括用户对界面706中的“远程相机”707的点击操作。即,获取操作包括用户的多个操作。As another example, referring to FIG. 7B , the acquisition control includes the “picture” 702 in the interface 701 shown in FIG. 7B , and the acquisition operation includes the user's click operation on the “picture” 702 in the interface 701 . In response to the user's click operation on the “picture” 702 in the interface 701 , the laptop computer 210 can display the interface 706 shown in FIG. 7B , and the interface 706 includes two options, “local gallery” and “remote camera” 707 . The “local gallery” can be used to trigger the acquisition of images from the local gallery of the laptop computer 210 . The “remote camera” 707 can be used to trigger the remote camera of other devices (such as the mobile phone 220 ) to capture images. In this example, the acquisition control also includes the “remote camera” 707 in the interface 706 shown in FIG. 7B , and the acquisition operation also includes the user's click operation on the “remote camera” 707 in the interface 706 . That is, the acquisition operation includes multiple operations of the user.
当然,获取操作并不以此为限。在另一些实施例中,获取操作还可以是用户对目标应用的应用界面的预设手势,如滑动、长按等手势。或者,获取操作还可以是用户输入预设语音的操作,如输入“插入图片”的语音。Of course, the acquisition operation is not limited to this. In other embodiments, the acquisition operation may also be a preset gesture of the user on the application interface of the target application, such as sliding, long pressing, etc. Alternatively, the acquisition operation may also be an operation of the user inputting a preset voice, such as inputting the voice of "insert picture".
S503、响应于获取操作,笔记本电脑210显示可用设备的选项,可用设备为支持远程相机的在线设备。S503 . In response to the acquisition operation, the notebook computer 210 displays options of available devices, where the available devices are online devices that support remote cameras.
其中,可用设备有多个,则可以显示与多个可用设备一一对应的多个选项,每个可用设备的选项用于触发调用相应可用设备的远程相机来拍摄图像。If there are multiple available devices, multiple options corresponding to the multiple available devices may be displayed, and the option of each available device is used to trigger the remote camera of the corresponding available device to capture an image.
以及,可用设备的选项中包括可用设备中登录的用户账号的用户名称(如汤姆、杰尼)、可用设备的设备型号(如A型号、B型号等)以及设备类型(如手机、平板等)中的至少一项,用于指示各个选项对应的可用设备。In addition, the options for available devices include at least one of the user name of the user account logged in to the available device (such as Tom, Jenny), the device model of the available device (such as model A, model B, etc.), and the device type (such as mobile phone, tablet, etc.), which is used to indicate the available devices corresponding to each option.
以获取操作是用户对图7A所示界面701中“图片”702的点击操作为例,笔记本电脑210响应于用户对图7A所示界面701中“图片”702的点击操作,可以显示图7A所示的界面703。与界面103相比,界面703中不仅包括从本地图库获取图像的选项,即界面703中的“本地图库”,界面703中还包括可用设备的选项,如“汤姆的A型号手机的相机”704、“汤姆的B型号平板的相机”705。其中,“汤姆”是用户账号的用户名称,“A型号”和“B型号”是设备型号,“手机”和“平板”是设备类型。“汤姆的A型号手机的相机”可用于触发调用汤姆的A型号手机(如手机220)的远程相机拍摄图像,“汤姆的B型号平板的相机”可用于触发调用汤姆的B型号平板(如平板230)的远程相机拍摄图像。Taking the acquisition operation as an example, the user clicks on the "picture" 702 in the interface 701 shown in FIG. 7A, the laptop computer 210 can display the interface 703 shown in FIG. 7A in response to the user's click on the "picture" 702 in the interface 701 shown in FIG. 7A. Compared with the interface 103, the interface 703 not only includes the option of acquiring images from the local gallery, that is, the "local gallery" in the interface 703, but also includes the options of available devices, such as "Tom's A-model mobile phone camera" 704 and "Tom's B-model tablet camera" 705. Among them, "Tom" is the user name of the user account, "A-model" and "B-model" are device models, and "mobile phone" and "tablet" are device types. "Tom's A-model mobile phone camera" can be used to trigger the remote camera of Tom's A-model mobile phone (such as mobile phone 220) to shoot images, and "Tom's B-model tablet camera" can be used to trigger the remote camera of Tom's B-model tablet (such as tablet 230) to shoot images.
以获取操作包括用户对图7B所示界面701中“图片”702的点击操作和用户对图7B所示界面706中“远程相机”707的点击操作为例,笔记本电脑210响应于用户对图7B所示界面706中“远程相机”707的点击操作,可以显示图7B所示的界面708。与界面703类似的,界面708中也包括可用设备的选项,如“汤姆的A型号手机的相机”704、“汤姆的B型号平板的相机”705。Taking the acquisition operation including the user's click operation on "Picture" 702 in interface 701 shown in FIG. 7B and the user's click operation on "Remote Camera" 707 in interface 706 shown in FIG. 7B as an example, the laptop computer 210 can display interface 708 shown in FIG. 7B in response to the user's click operation on "Remote Camera" 707 in interface 706 shown in FIG. 7B. Similar to interface 703, interface 708 also includes options for available devices, such as "Camera of Tom's Model A mobile phone" 704 and "Camera of Tom's Model B tablet" 705.
S504、笔记本电脑210接收用户对可用设备的选项中手机220的选项的选择操作。S504 , the notebook computer 210 receives the user's selection operation of the mobile phone 220 option among the available device options.
其中,手机220的选项也可以称为第一选项。选择操作可以是点击操作、长按操作、滑动操作等。下文主要以点击操作为例来说明。The option of the mobile phone 220 may also be referred to as the first option. The selection operation may be a click operation, a long press operation, a slide operation, etc. The following mainly takes the click operation as an example for explanation.
以手机220的选项是图7A所示界面703中的”汤姆的A型号手机的相机”704为例,则对手机220的选项的选择操作可以是对界面703中“汤姆的A型号手机的相机”704的点击操作。Taking the option of the mobile phone 220 as “Camera of Tom’s Model A Mobile Phone” 704 in the interface 703 shown in FIG. 7A as an example, the selection operation of the option of the mobile phone 220 may be a click operation on “Camera of Tom’s Model A Mobile Phone” 704 in the interface 703 .
需要说明的是,前述S503和S504中,以由用户手动选择手机220来说明,实际中,响应于获取操作,也可以由笔记本电脑210自动选择手机220。It should be noted that, in the above S503 and S504, the user manually selects the mobile phone 220 for illustration. In practice, The mobile phone 220 may also be automatically selected by the notebook computer 210 in response to the acquisition operation.
示例性的,笔记本电脑210可以基于可用设备的优先级来自动选择手机220。例如,按照拍摄灵活性,优先级由高至低依次为:手机、平板以及笔记本电脑,那么,在可用设备包括手机220和平板230时,笔记本电脑210可以自动选择手机220调用远程相机。又例如,作为被调用设备的次数越多,则优先级越高,作为被调用设备的次数越少,则优先级越低,且可用设备包括手机220和平板230,手机220的被调用次数多于平板230的被调用次数,则笔记本电脑210可以自动选择手机220调用远程相机。Exemplarily, the laptop 210 may automatically select the mobile phone 220 based on the priority of the available devices. For example, according to the shooting flexibility, the priority from high to low is: mobile phone, tablet and laptop computer. Then, when the available devices include the mobile phone 220 and the tablet 230, the laptop 210 may automatically select the mobile phone 220 to call the remote camera. For another example, the more times it is a called device, the higher the priority, and the fewer times it is a called device, the lower the priority. If the available devices include the mobile phone 220 and the tablet 230, and the number of times the mobile phone 220 is called is more than the number of times the tablet 230 is called, the laptop 210 may automatically select the mobile phone 220 to call the remote camera.
又示例性的,笔记本电脑210中可以在每次选择可用设备后,可记录选择的可用设备的信息,并且本次响应于获取操作,则基于记录的可用设备的信息自动选择前一次选择的可用设备。在一些场景中,响应于获取操作,笔记本电脑210确定出的可用设备中可能并不包括前一次选择的可用设备。如果可用设备中不包括前一次选择的可用设备,笔记本电脑210则可以基于优先级来自动选择,或者由用户手动来选择。这样,可以确保选择出可用设备。As another example, the laptop computer 210 may record the information of the selected available device each time after selecting an available device, and automatically select the previously selected available device based on the recorded available device information in response to the acquisition operation this time. In some scenarios, in response to the acquisition operation, the available devices determined by the laptop computer 210 may not include the previously selected available device. If the previously selected available device is not included in the available devices, the laptop computer 210 may automatically select based on the priority, or the user may select manually. In this way, it is ensured that an available device is selected.
S505、响应于选择操作,笔记本电脑210向手机220发送远程相机的调用请求。S505 , in response to the selection operation, the notebook computer 210 sends a remote camera calling request to the mobile phone 220 .
其中,调用请求(也可以称为第一请求)用于请求调用远程相机。The calling request (also referred to as the first request) is used to request to call the remote camera.
示例性的,响应于用户对图7A所示界面703中“汤姆的A型号手机的相机”704的选择操作,笔记本电脑可以向手机220发送远程相机的调用请求,以请求调用手机220的远程相机来实现拍摄。For example, in response to the user's selection operation of “Tom's Model A mobile phone camera” 704 in the interface 703 shown in FIG. 7A , the laptop computer may send a remote camera call request to the mobile phone 220 to request to call the remote camera of the mobile phone 220 to achieve shooting.
其中,调用请求中包括远程相机的能力信息(远程相机的能力信息可以指示调用请求所调用的能力,即本次调用的调用类型,因此远程相机的能力信息也可以称为请求类型)、笔记本电脑210的设备信息以及目标应用的应用标识。远程相机的能力信息,如标识“remote camera”、“远程相机”等,用于指示调用的能力为远程相机的能力。笔记本电脑210的设备信息,如媒体访问控制地址(Media Access ControlAddress,MAC)、设备序列号等可唯一指示笔记本电脑210的信息,用于指示请求调用的设备为笔记本电脑210;以及,目标应用的应用标识用于指示请求调用的应用为目标应用。上述设备信息和应用标识主要用于手机220在拍摄得到图像后,确定图像的接收对象,即接收对象为笔记本电脑210中的目标应用。Among them, the call request includes the capability information of the remote camera (the capability information of the remote camera can indicate the capability called by the call request, that is, the call type of this call, so the capability information of the remote camera can also be called the request type), the device information of the laptop computer 210, and the application identifier of the target application. The capability information of the remote camera, such as the identifiers "remote camera", "remote camera", etc., is used to indicate that the called capability is the capability of the remote camera. The device information of the laptop computer 210, such as the Media Access Control Address (MAC), the device serial number, etc., which can uniquely indicate the information of the laptop computer 210, is used to indicate that the device requesting the call is the laptop computer 210; and the application identifier of the target application is used to indicate that the application requesting the call is the target application. The above-mentioned device information and application identifier are mainly used for the mobile phone 220 to determine the receiving object of the image after capturing the image, that is, the receiving object is the target application in the laptop computer 210.
在一些实施例中,如果手机220满足拍摄图像的预设条件,响应于选择操作,笔记本电脑210还可以发出手机220正在拍摄的提示(也可以称为第一提示信息)。其中,如果满足预设条件,则表示手机220具备拍摄图像的条件。在一种具体的实现方式中,预设条件包括:第二设备处于开机状态、手机220的系统相机处于空闲状态等。空闲状态是指系统相机未在前台运行,例如,手机220当前未显示拍摄取景界面。In some embodiments, if the mobile phone 220 meets the preset conditions for taking images, in response to the selection operation, the laptop computer 210 may also issue a prompt (also referred to as first prompt information) that the mobile phone 220 is taking pictures. If the preset conditions are met, it means that the mobile phone 220 has the conditions for taking pictures. In a specific implementation, the preset conditions include: the second device is in a powered-on state, the system camera of the mobile phone 220 is in an idle state, etc. The idle state means that the system camera is not running in the foreground, for example, the mobile phone 220 currently does not display the shooting viewfinder interface.
示例性的,如果手机220的系统相机处于空闲状态、且手机220处于开机状态,那么,响应于用户对图7A所示界面703或者图7B所示界面708中的“汤姆的A型号手机的相机”704的选择操作,笔记本电脑210可以显示图7C所示的界面709,界面709中包括提示“汤姆的A型号手机的相机拍摄中”710,从而提示手机220正在拍摄。其中,该提示可以在显示预设时长之后则自动消失。或者,在显示该提示后,响应于用户取消显示该提示的取消操作后,笔记本电脑210才会取消显示该提示。例如,取消操作可以是用户对界面706中“取消”按钮的点击操作。如果未接收到取消操作,则笔记本电脑210会一直显示该提示。Exemplarily, if the system camera of the mobile phone 220 is in an idle state and the mobile phone 220 is in a powered-on state, then in response to the user's selection operation on the "Camera of Tom's Model A Mobile Phone" 704 in the interface 703 shown in FIG. 7A or the interface 708 shown in FIG. 7B , the laptop computer 210 may display the interface 709 shown in FIG. 7C , wherein the interface 709 includes a prompt "The camera of Tom's Model A Mobile Phone is shooting" 710, thereby prompting that the mobile phone 220 is shooting. Among them, the prompt may automatically disappear after being displayed for a preset period of time. Alternatively, after displaying the prompt, in response to the user's cancel operation of canceling the display of the prompt, the laptop computer 210 will cancel the display of the prompt. For example, the cancel operation may be a user clicking the "Cancel" button in the interface 706. If the cancel operation is not received, the laptop computer 210 will continue to display the prompt. The prompt is displayed.
反之,如果手机220不满足拍摄图像的预设条件,如手机220的前台正在显示拍摄取景界面或者手机220处于关机状态,笔记本电脑210也可以发出手机220无法拍摄的提示。这种情况下,响应于用户的预设操作(如返回操作、关闭提示的操作等),笔记本电脑210可以继续显示可用设备的选项。这样,用户可以重新选择可用设备并调用。On the contrary, if the mobile phone 220 does not meet the preset conditions for shooting an image, such as the foreground of the mobile phone 220 is displaying the shooting view interface or the mobile phone 220 is turned off, the laptop computer 210 may also issue a prompt that the mobile phone 220 cannot shoot. In this case, in response to the user's preset operation (such as a return operation, an operation to close the prompt, etc.), the laptop computer 210 may continue to display the options of the available devices. In this way, the user can reselect the available device and call it.
应理解,响应于选择操作,笔记本电脑210则可以向手机220发送远程相机的调用请求,即此时笔记本电脑210可以与手机220交互。那么,笔记本电脑210可以通过与手机220交互,获取手机220的系统相机是否处于空闲状态、手机220是否处于开机状态的信息,以用于判断手机220是否满足拍摄图像的预设条件。It should be understood that in response to the selection operation, the laptop computer 210 can send a remote camera call request to the mobile phone 220, that is, at this time the laptop computer 210 can interact with the mobile phone 220. Then, the laptop computer 210 can obtain information about whether the system camera of the mobile phone 220 is in an idle state and whether the mobile phone 220 is in a powered-on state by interacting with the mobile phone 220, so as to determine whether the mobile phone 220 meets the preset conditions for capturing an image.
S506、响应于调用请求,手机220启动远程相机,以调用系统相机拍摄图像。S506 . In response to the calling request, the mobile phone 220 starts the remote camera to call the system camera to capture an image.
手机220在启动远程相机后,远程相机可以调用系统相机来拍摄图像。示例性的,手机220在接收到调用请求后,可以显示图8A所示的界面801,界面801为系统相机的拍摄取景界面(也可以称为第二界面)。手机220响应于用户对界面801中拍摄按钮802的点击操作,可以完成一张图片的拍摄。After the mobile phone 220 starts the remote camera, the remote camera can call the system camera to shoot an image. Exemplarily, after receiving the call request, the mobile phone 220 can display the interface 801 shown in FIG. 8A, and the interface 801 is the shooting and framing interface of the system camera (also referred to as the second interface). In response to the user clicking the shooting button 802 in the interface 801, the mobile phone 220 can complete the shooting of a picture.
以及,手机220在启动远程相机时,还会在远程相机中记录调用请求中的设备信息,用于指示笔记本电脑210调用远程相机,以便远程相机明确图像的接收对象。Furthermore, when the mobile phone 220 starts the remote camera, it will also record the device information in the calling request in the remote camera, which is used to instruct the notebook computer 210 to call the remote camera so that the remote camera can clearly know the recipient of the image.
应理解,系统相机仅仅具有拍摄的能力,而并不具备远程分发的业务功能。本申请实施例中,在系统相机之上部署远程相机。远程相机可以调用系统相机来拍摄。并且,远程相机还可以基于调用请求中的设备信息进行远程分发。从而实现将系统相机拍摄得到的图像分发给笔记本电脑210。It should be understood that the system camera only has the ability to shoot, but does not have the business function of remote distribution. In the embodiment of the present application, a remote camera is deployed on the system camera. The remote camera can call the system camera to shoot. In addition, the remote camera can also perform remote distribution based on the device information in the call request. In this way, the image captured by the system camera is distributed to the laptop computer 210.
在一些场景中,手机220接收到调用请求时,可能正在被使用,如正在使用手机220打电话、玩游戏等。此时,若直接调用远程相机,以进一步调用系统相机来拍摄,可能会影响手机220的使用。In some scenarios, when the mobile phone 220 receives the call request, it may be in use, such as using the mobile phone 220 to make a call, play games, etc. At this time, if the remote camera is directly called to further call the system camera to take pictures, the use of the mobile phone 220 may be affected.
基于此,在一些实施例中,手机220响应于调用请求,可以发出笔记本电脑210调用远程相机的提示(也可以称为第二提示信息),并在接收到确认启动远程相机的确认事件后,才启动远程相机。这样,可以避免影响手机220的使用。Based on this, in some embodiments, the mobile phone 220 can send a prompt (also called second prompt information) to the laptop computer 210 to call the remote camera in response to the call request, and start the remote camera only after receiving a confirmation event to confirm starting the remote camera. In this way, the use of the mobile phone 220 can be avoided from being affected.
示例性的,手机220响应于调用请求,可以显示图8B所示的界面803,界面803中包括提示“笔记本电脑210想要开启远程相机,是否现在开启?”,并且界面803中还包括“是”和“否”两个选项。手机220响应于用户对界面803中“是”选项的选择操作,才会启动远程相机。即,确认事件包括用户对界面803中“是”选项的选择操作。例如,响应于用户对界面803中“是”选项的选择操作,手机220才会显示图8B所示的界面801。Exemplarily, in response to the call request, the mobile phone 220 may display the interface 803 shown in FIG. 8B , wherein the interface 803 includes a prompt “The laptop computer 210 wants to turn on the remote camera, do you want to turn it on now?”, and the interface 803 also includes two options “Yes” and “No”. The mobile phone 220 will start the remote camera only in response to the user’s selection operation of the “Yes” option in the interface 803. That is, the confirmation event includes the user’s selection operation of the “Yes” option in the interface 803. For example, in response to the user’s selection operation of the “Yes” option in the interface 803, the mobile phone 220 will display the interface 801 shown in FIG. 8B .
反之,手机220响应于用户对界面803中“否”选项的选择操作,可以恢复显示笔记本电脑210调用远程相机的提示之前的界面,如显示图8B所示的界面804,继续播放视频。On the contrary, in response to the user selecting the "No" option in the interface 803, the mobile phone 220 can restore the interface before the prompt of the laptop computer 210 calling the remote camera, such as the interface 804 shown in FIG. 8B, and continue to play the video.
又示例性的,手机220响应于调用请求,可以显示图8C所示的界面805,界面805中包括提示“笔记本电脑210想要开启远程相机,是否现在开启?”,并且界面805中还包括“是”和“否,稍后开启”两个选项。手机220响应于用户对界面805中“是”选项的选择操作,可以启动远程相机。即,确认事件包括用户对界面805中“是”选项的选择操作。例如,响应于用户对界面805中“是”选项的选择操作,手机220才会显示图8C所示的界面801。In another exemplary embodiment, in response to the call request, the mobile phone 220 may display the interface 805 shown in FIG8C , wherein the interface 805 includes a prompt “The laptop computer 210 wants to turn on the remote camera, do you want to turn it on now?”, and the interface 805 also includes two options “Yes” and “No, turn it on later”. In response to the user’s selection operation of the “Yes” option in the interface 805, the mobile phone 220 may start the remote camera. That is, the confirmation event includes the user’s selection operation of the “Yes” option in the interface 805. For example, in response to the user’s selection operation of the “Yes” option in the interface 805, the mobile phone 220 will display the interface 801 shown in FIG8C .
反之,手机220响应于用户对界面805中“否,稍后开启”选项的选择操作,可以显示图8C所示的界面806,界面806中包括多个延时时长,如1分钟、2分钟、3分钟等。用户可以从多个延时时长中选择目标时长,响应于用户对目标时长(如5分钟)的选择操作,手机220可以开始(如在9:00开始)计时,并在计时达到目标时长(如在9:05达到5分钟)后,如显示界面807后,启动远程相机。即,确认事件包括用户对界面806中目标时长的选择操作以及计时达到目标时长。例如,响应于用户对界面805中目标时长的选择操作且计时达到目标时长,手机220才会显示图8C所示的界面801。On the contrary, in response to the user's selection operation of the "No, open later" option in interface 805, the mobile phone 220 can display the interface 806 shown in FIG8C, and the interface 806 includes multiple delay durations, such as 1 minute, 2 minutes, 3 minutes, etc. The user can select a target duration from multiple delay durations. In response to the user's selection operation of the target duration (such as 5 minutes), the mobile phone 220 can start timing (such as at 9:00) and start the remote camera after the timing reaches the target duration (such as 5 minutes at 9:05), such as after displaying interface 807. That is, the confirmation event includes the user's selection operation of the target duration in interface 806 and the timing reaching the target duration. For example, in response to the user's selection operation of the target duration in interface 805 and the timing reaching the target duration, the mobile phone 220 will display the interface 801 shown in FIG8C.
另外,手机220响应于拒绝启动远程相机的拒绝事件,无需启动远程相机,并且向笔记本电脑210返回拒绝调用的反馈信息。示例性的,笔记本电脑210调用远程相机的提示中包括拒绝控件,如图8B所示界面803中“否”选项,拒绝事件可以是用户对拒接控件的点击、长按等操作。又示例性的,拒绝事件可以是手机220正在显示预设界面的事件。其中,预设界面可以是高权限应用的应用界面,如通话应用的通话界面。从而可以中断高权限应用的运行。预设界面可以是使用系统相机的界面,如拍照界面、视频通话界面等。从而可以避免中断系统相机的工作。In addition, in response to the rejection event of refusing to start the remote camera, the mobile phone 220 does not need to start the remote camera, and returns feedback information of the rejection of the call to the laptop computer 210. Exemplarily, the prompt for the laptop computer 210 to call the remote camera includes a rejection control, such as the "No" option in the interface 803 shown in FIG8B, and the rejection event can be a user's click, long press, and other operations on the rejection control. Another exemplary event may be an event that the mobile phone 220 is displaying a preset interface. Among them, the preset interface may be an application interface of a high-authority application, such as a call interface of a call application. Thereby, the operation of the high-authority application can be interrupted. The preset interface may be an interface for using the system camera, such as a photo taking interface, a video call interface, etc. Thereby, interrupting the operation of the system camera can be avoided.
S507、在完成拍摄后,手机220向笔记本电脑210传输图像。S507 , after completing the shooting, the mobile phone 220 transmits the image to the notebook computer 210 .
在手机220中,系统相机在拍摄得到图像后,手机220可以基于远程相机记录的笔记本电脑210的设备信息,向笔记本电脑210传输图像。In the mobile phone 220 , after the system camera captures an image, the mobile phone 220 can transmit the image to the laptop computer 210 based on the device information of the laptop computer 210 recorded by the remote camera.
在一些场景中,笔记本电脑210中的多个应用可能在先后在间隔较短的时间内调用不同设备的远程相机。例如,笔记本电脑210中的应用1调用手机220的远程相机,紧接着笔记本电脑210中的应用2调用平板230的远程相机。那么,手机220和平板230可能会几乎同时向笔记本电脑210传输拍摄得到的图像。此时,笔记本电脑210可能难以决策将来自手机220的图像和来自平板230的图像分别反馈给笔记本电脑210中的哪个应用。In some scenarios, multiple applications in the laptop computer 210 may call remote cameras of different devices in succession within a short time interval. For example, application 1 in the laptop computer 210 calls the remote camera of the mobile phone 220, and then application 2 in the laptop computer 210 calls the remote camera of the tablet 230. Then, the mobile phone 220 and the tablet 230 may transmit the captured images to the laptop computer 210 almost at the same time. At this time, the laptop computer 210 may find it difficult to decide which application in the laptop computer 210 to feed the images from the mobile phone 220 and the images from the tablet 230 respectively.
针对上述问题,在一些实施例中,在上述S505中,笔记本电脑210可以进一步在调用请求中携带目标应用的应用标识。那么,目标应用的应用标识也传输给手机220。相应的,在S506中,手机220启动远程相机时,不仅会在远程相机中记录调用请求中的设备信息,还会记录应用标识,用于指示笔记本电脑210中的目标应用调用远程相机,以进一步明确图像的接收对象。并且,在S507中,手机220在向笔记本电脑210传输图像时,还会传输远程相机中记录的目标应用的应用标识,以指示笔记本电脑210向目标应用反馈图像。如此,通过将图像的和应用标识一起反馈给笔记本电脑210的方式,可以使笔记本电脑210在接收到图像的同时,明确图像的接收应用,从而可以准确的向相应的应用反馈图像。In view of the above problem, in some embodiments, in the above S505, the laptop computer 210 can further carry the application identifier of the target application in the call request. Then, the application identifier of the target application is also transmitted to the mobile phone 220. Correspondingly, in S506, when the mobile phone 220 starts the remote camera, it will not only record the device information in the call request in the remote camera, but also record the application identifier to instruct the target application in the laptop computer 210 to call the remote camera to further clarify the receiving object of the image. And, in S507, when the mobile phone 220 transmits the image to the laptop computer 210, it will also transmit the application identifier of the target application recorded in the remote camera to instruct the laptop computer 210 to feedback the image to the target application. In this way, by feeding back the image and the application identifier to the laptop computer 210 together, the laptop computer 210 can clarify the receiving application of the image while receiving the image, so that the image can be accurately fed back to the corresponding application.
S508、笔记本电脑210显示手机220拍摄的图像。S508 : The notebook computer 210 displays the image captured by the mobile phone 220 .
示例性的,笔记本电脑210在接收到图片后,可以显示图9所示的界面901,界面901中包括图片902。以及,界面901中还包括提示“汤姆的A型号手机的相机拍摄中”903和“取消”按钮904。响应于用户对“取消”按钮904的点击操作,笔记本电脑210可以显示图9所示的界面905。界面905中不再显示提示“汤姆的A型号手机的相机拍摄中”903,用户可以继续编辑文档。Exemplarily, after receiving the picture, the laptop computer 210 may display the interface 901 shown in FIG. 9 , where the interface 901 includes the picture 902. Also, the interface 901 includes a prompt “The camera of Tom’s model A mobile phone is taking pictures” 903 and a “Cancel” button 904. In response to the user clicking the “Cancel” button 904, the laptop computer 210 may display the interface 905 shown in FIG. The prompt “The camera of Tom’s model A mobile phone is taking pictures” 903 is no longer displayed in the interface 905, and the user can continue to edit the document.
在一些场景中,可能会有多台设备先后在间隔较短的时间内调用同一设备的远程相机。示例性的,参见图10,在8点30分整,笔记本电脑210调用手机220的远程相机来拍摄,在8点30分至8点32分之间,平板230调用手机220的远程相机来拍摄。In some scenarios, multiple devices may call the remote camera of the same device in a short interval. For example, referring to FIG. 10 , at 8:30, the laptop 210 calls the remote camera of the mobile phone 220 to take a photo. Between 8:30 and 8:32, the tablet 230 uses the remote camera of the mobile phone 220 to take photos.
然而,在同一时刻,同一设备的远程相机只能被一台设备调用。也就是说,同一时刻,同一设备的远程相机只能被一台设备占用。继续参见图10,在笔记本电脑210调用手机220的远程相机后,在8点30分至8点32分的时间段内,手机220的远程相机一直处于被笔记本电脑210占用的工作状态。那么,在8点30分至8点32分之间,平板230将无法成功调用手机220的远程相机,而只能等到手机220的远程相机解除占用,平板230才能成功调用手机220的远程相机,这样会导致调用效率低下。However, at the same time, the remote camera of the same device can only be called by one device. In other words, at the same time, the remote camera of the same device can only be occupied by one device. Continuing to refer to FIG. 10, after the laptop 210 calls the remote camera of the mobile phone 220, during the time period from 8:30 to 8:32, the remote camera of the mobile phone 220 is always in a working state occupied by the laptop 210. Then, between 8:30 and 8:32, the tablet 230 will not be able to successfully call the remote camera of the mobile phone 220, and can only wait until the remote camera of the mobile phone 220 is unoccupied before the tablet 230 can successfully call the remote camera of the mobile phone 220, which will result in low calling efficiency.
针对上述图10类似的场景,参见图11,在一些实施例中,笔记本电脑210在向手机220发送调用请求之后,如S505之后,还包括:For a scenario similar to FIG. 10 , referring to FIG. 11 , in some embodiments, after the laptop computer 210 sends the call request to the mobile phone 220 , such as after S505 , the following further includes:
S1101、响应于启动远程相机,手机220向同账号设备(如笔记本电脑210)同步其远程相机的工作状态为被占用(也可以称为第二信息)。S1101. In response to starting the remote camera, the mobile phone 220 synchronizes the working status of its remote camera as occupied (also referred to as second information) to the device with the same account (such as the laptop computer 210).
示例性的,笔记本电脑210、手机220以及平板230中登录的用户账号均为荣耀账号a,那么,手机220响应于来自笔记本电脑210的调用请求,启动远程相机后,可以向笔记本电脑210和平板230同步其远程相机的工作状态为被占用。Exemplarily, the user accounts logged in to the laptop computer 210, the mobile phone 220 and the tablet 230 are all Honor account a. Then, in response to the call request from the laptop computer 210, after starting the remote camera, the mobile phone 220 can synchronize the working status of its remote camera to the laptop computer 210 and the tablet 230 as occupied.
在执行S1101之后,同账号设备(如笔记本电脑210)可以确定手机220中的远程相机正在被占用。After executing S1101 , the same account device (such as the laptop computer 210 ) may determine that the remote camera in the mobile phone 220 is being occupied.
以及,在本实施例中,在拍摄完成之后,如S507之后,还包括:And, in this embodiment, after the shooting is completed, such as after S507, the following steps are further included:
S1102、响应于完成拍摄,手机220向同账号设备(如笔记本电脑210)同步手机220的远程相机的工作状态为未被占用(也可以称为第三信息)。S1102 . In response to completing the shooting, the mobile phone 220 synchronizes the working state of the remote camera of the mobile phone 220 to the device with the same account (such as the laptop computer 210 ) as unoccupied (also referred to as the third information).
在执行S1102之后,同账号设备可以确定手机220中的远程相机未被占用。After executing S1102 , the device with the same account may determine that the remote camera in the mobile phone 220 is not occupied.
在本实施例中,可用设备为支持远程相机、且远程相机未被占用的在线设备。例如,手机220为支持远程相机的在线设备,但是其远程相机正在被占用,则不会将其确定为可用设备。那么,在S1101之后,S1102之前,如果同账号设备(如平板230)接收到图像的获取操作,则不会将支持远程相机、但远程相机被占用的在线设备(如手机220)确定为可用设备,后续则不会显示手机220的选项,或者,会显示处于不可操作状态(如置灰状态)的手机220的选项。从而无法调用手机220的远程相机,可以避免调用存在冲突。In this embodiment, the available device is an online device that supports a remote camera and whose remote camera is not occupied. For example, if the mobile phone 220 is an online device that supports a remote camera, but its remote camera is occupied, it will not be determined as an available device. Then, after S1101 and before S1102, if the same account device (such as the tablet 230) receives an image acquisition operation, the online device (such as the mobile phone 220) that supports a remote camera but whose remote camera is occupied will not be determined as an available device, and the option of the mobile phone 220 will not be displayed subsequently, or the option of the mobile phone 220 in an inoperable state (such as a grayed-out state) will be displayed. As a result, the remote camera of the mobile phone 220 cannot be called, and conflicts in calls can be avoided.
前文图5-图11主要以笔记本电脑210和手机220为执行主体说明了本申请实施例提供的图像拍摄方法,下面将结合笔记本电脑210和手机220的软件模块,进一步说明本申请实施例提供的图像拍摄方法。其中,关于笔记本电脑210和手机220中各个软件模块及其所属的层级,可以参见前文图4A和图4B的说明,此处不再赘述。The above-mentioned FIGS. 5 to 11 mainly illustrate the image capturing method provided by the embodiment of the present application by taking the laptop computer 210 and the mobile phone 220 as the execution subjects. The image capturing method provided by the embodiment of the present application will be further illustrated below in combination with the software modules of the laptop computer 210 and the mobile phone 220. Among them, the various software modules in the laptop computer 210 and the mobile phone 220 and the levels to which they belong can be referred to the above-mentioned description of FIGS. 4A and 4B, which will not be repeated here.
具体的,参见图12,在S501之前,还包括S1201-S1203:Specifically, referring to FIG. 12 , before S501, S1201 to S1203 are also included:
S1201、手机220的远程相机向手机220的设备管理服务注册远程相机的能力。S1201 . The remote camera of the mobile phone 220 registers the remote camera capability with the device management service of the mobile phone 220 .
其中,注册远程相机的能力,是指:远程相机将其具有的远程相机的能力(为同账号设备拍摄图像并回传的能力)告知设备管理服务。Registering the remote camera capability means that the remote camera informs the device management service of its remote camera capability (capability to capture images for devices with the same account and transmit them back).
在一些实施例中,在手机220首次开机时,手机220可在用户向导中提示启用远程相机,如果接收到用户开启远程相机的操作,则会触发远程相机向设备管理服务注册其能力。示例性的,在手机220首次开机时,手机220可以显示图13中的(a)所示的界面1301。界面1301是用户向导的一个界面,界面1301中包括语言选项,如“简体中文”、“繁体中文”、“英文”、“日文”等。手机220响应于用户对界面1301中“简体中文”的选择操作后,可以显示图13中的(b)所示的界面1302。界面1302是用户向导的另一个界面,界面1302中包括提示“开启远程相机后,则允许其他设备调用本设备拍摄图像,是否开启!”,用于提示启用远程相机。以及,界面1302中还包括“是”和“否”两个选项,开启远程相机的操作可以是对界面1302中“否”的选择操作。那么,响应于用户对界面1302中“否”的选择操作,则会触发手机220中的远程相机向设备管理服务注册其能力。In some embodiments, when the mobile phone 220 is powered on for the first time, the mobile phone 220 may prompt the user to enable the remote camera in the user wizard. If the user initiates an operation to enable the remote camera, the remote camera will be triggered to register its capabilities with the device management service. Exemplarily, when the mobile phone 220 is powered on for the first time, the mobile phone 220 may display the interface 1301 shown in (a) of FIG. 13 . The interface 1301 is an interface of the user wizard, and the interface 1301 includes language options, such as “Simplified Chinese”, “Traditional Chinese”, “English”, “Japanese”, etc. The mobile phone 220 responds to the user’s selection of “Simplified Chinese” in the interface 1301. After that, the interface 1302 shown in (b) of FIG. 13 may be displayed. The interface 1302 is another interface of the user guide. The interface 1302 includes a prompt "After turning on the remote camera, other devices are allowed to call this device to take images. Do you want to turn it on!", which is used to prompt the activation of the remote camera. In addition, the interface 1302 also includes two options "Yes" and "No". The operation of turning on the remote camera can be a selection operation of "No" in the interface 1302. Then, in response to the user's selection operation of "No" in the interface 1302, the remote camera in the mobile phone 220 will be triggered to register its capabilities with the device management service.
应注意,在图13的示例中,以用户在界面1301中选择语言后,则接着显示界面1302为例来说明。实际实施时,用户在界面1301中选择语言后,手机220也可以先显示其它引导界面,如先设置指纹、人脸、密码的引导界面或者数据导入的引导界面等,并在这些其它引导界面中完成设置后,手机220才跳转到界面1302。It should be noted that in the example of FIG13 , after the user selects a language in interface 1301, interface 1302 is displayed. In actual implementation, after the user selects a language in interface 1301, mobile phone 220 may first display other guide interfaces, such as a guide interface for setting fingerprint, face, password, or a guide interface for data import, and after completing the settings in these other guide interfaces, mobile phone 220 jumps to interface 1302.
在另一些实施例中,在手机220首次开机时,用户未执行启用远程相机的操作,但在后续使用手机220的过程中,接收到用户启用远程相机的操作,也可以触发远程相机向设备管理服务注册其能力。In other embodiments, when the mobile phone 220 is turned on for the first time, the user does not perform the operation of enabling the remote camera, but during the subsequent use of the mobile phone 220, receiving the user's operation of enabling the remote camera can also trigger the remote camera to register its capabilities with the device management service.
远程相机在注册其能力时,可以向设备管理服务发送远程相机的应用标识,如发送远程相机的APP包名,用于指示注册的应用为远程相机。以及,远程相机还可以向设备管理服务发送其能力的能力信息,用于指示注册的能力是远程相机的能力。When registering its capabilities, the remote camera may send the application identifier of the remote camera to the device management service, such as sending the APP package name of the remote camera, to indicate that the registered application is the remote camera. In addition, the remote camera may also send the capability information of its capabilities to the device management service to indicate that the registered capabilities are the capabilities of the remote camera.
S1202、手机220的设备管理服务记录远程相机及其注册的能力。S1202 . The device management service of the mobile phone 220 records the remote camera and its registered capabilities.
例如,设备管理服务记录远程相机的应用标识以及远程相机的能力的能力信息。For example, the device management service records the application identifier of the remote camera and capability information of the capabilities of the remote camera.
S1203、手机220的设备管理服务向手机220的远程相机反馈注册成功的消息。S1203 . The device management service of the mobile phone 220 feeds back a registration success message to the remote camera of the mobile phone 220 .
至此,则完成了远程相机的能力注册。At this point, the remote camera capability registration is completed.
在一些实施例中,在注册远程相机的能力后,如果用户不想将手机220继续用于为其他同账号设备拍摄图像,也可以在手机220中停用远程相机。响应于用户停用远程相机的操作,远程相机则会向设备管理服务请求注销其能力。设备管理服务在接收到来自远程相机的注销请求后,会删除远程相机的注册信息,如会删除远程相机的应用标识以及远程相机的能力的能力信息。In some embodiments, after registering the remote camera capability, if the user does not want to continue using the mobile phone 220 to capture images for other devices with the same account, the remote camera can also be disabled in the mobile phone 220. In response to the user's operation of disabling the remote camera, the remote camera will request the device management service to deregister its capability. After receiving the deregistration request from the remote camera, the device management service will delete the registration information of the remote camera, such as deleting the application identifier of the remote camera and the capability information of the remote camera.
继续参见图12,在笔记本电脑210中,S501进一步包括以下S5011-S5013:Continuing to refer to FIG. 12 , in the notebook computer 210 , S501 further includes the following S5011 - S5013:
S5011、手机220的设备管理服务通过互联网向同账号设备(如笔记本电脑210)的设备管理服务同步远程相机能力。S5011. The device management service of the mobile phone 220 synchronizes the remote camera capability with the device management service of the same account device (such as the laptop computer 210) via the Internet.
手机220和笔记本电脑210登录相同的用户账号,则两者的设备管理服务可以通过互联网(即云端)同步远程相机的能力的支持情况。当然,如果还有其他同账号设备,则手机220的设备管理服务同样可以向其他同账号设备的设备管理服务同步其远程相机的能力。If the mobile phone 220 and the laptop computer 210 log in to the same user account, the device management services of the two can synchronize the support status of the remote camera capability through the Internet (i.e., the cloud). Of course, if there are other devices with the same account, the device management service of the mobile phone 220 can also synchronize its remote camera capability with the device management services of other devices with the same account.
在同步远程相机的能力(即同步第一信息)时,手机220的设备管理服务可以向笔记本电脑210的设备管理服务同步手机220的设备信息(如手机220的名称)以及远程相机能力的能力信息,以指示手机220支持远程相机。When synchronizing the capabilities of the remote camera (i.e., synchronizing the first information), the device management service of the mobile phone 220 can synchronize the device information of the mobile phone 220 (such as the name of the mobile phone 220) and the capability information of the remote camera capabilities to the device management service of the laptop computer 210 to indicate that the mobile phone 220 supports the remote camera.
应理解,如果手机220中的远程相机向设备管理服务注销了远程相机的能力,那么,手机220的设备管理服务也会向笔记本电脑210的设备管理服务同步注销远程相机的能力,相应的,笔记本电脑210的设备管理服务会删除掉手机220支持远程相机的信息,如删除手机220的设备信息以及远程相机能力的能力信息。It should be understood that if the remote camera in the mobile phone 220 unregisters the remote camera capability to the device management service, then the device management service of the mobile phone 220 will also synchronously unregister the remote camera capability to the device management service of the laptop computer 210. Correspondingly, the device management service of the laptop computer 210 will delete the information that the mobile phone 220 supports the remote camera, such as deleting the device information of the mobile phone 220 and the capability information of the remote camera capability.
S5012、笔记本电脑210的通信服务发现(手机220为)近场通信范围内的在线设备。S5012. The communication service of the notebook computer 210 discovers an online device (the mobile phone 220) within the near field communication range.
笔记本电脑210的通信服务(如Magic Link)可以定期扫描并发现笔记本电脑210的近场通信范围内的设备。The communication service of the laptop 210 (such as Magic Link) can periodically scan and discover the Devices within NFC range.
在笔记本电脑210发现手机220之后,笔记本电脑210和手机220可以通过通信服务(如Magic Link)传输数据,如传输调用请求、图像等。After the laptop computer 210 discovers the mobile phone 220, the laptop computer 210 and the mobile phone 220 can transmit data, such as transmitting call requests, images, etc., through a communication service (such as Magic Link).
S5013、笔记本电脑210的通信服务向笔记本电脑210的设备管理服务更新(手机220为)在线设备。S5013. The communication service of the notebook computer 210 updates the online device (the mobile phone 220) to the device management service of the notebook computer 210.
这样,笔记本电脑210的设备管理服务可以确定手机220为在线设备。In this way, the device management service of the laptop computer 210 can determine that the mobile phone 220 is an online device.
在一些实施例中,在笔记本电脑210中,目标应用只有在接入接续服务的情况下,接续服务才能为其提供查询可用设备、跨设备传输调用请求以及图像等数据的服务。In some embodiments, in the laptop computer 210, the connection service can provide the target application with services such as querying available devices, transmitting call requests and data such as images across devices only when the target application is connected to the connection service.
基于此,继续参见图12,在笔记本电脑210中,还包括下述S1204-S1208。应注意,S1204-S1208,与前述S1201-S5013之间并没有严格的先后顺序限制。实际中,只要目标应用冷启动,则会在笔记本电脑210中执行下述S1204-S1208。Based on this, referring to FIG. 12 , the laptop computer 210 further includes the following S1204-S1208. It should be noted that there is no strict order restriction between S1204-S1208 and the aforementioned S1201-S5013. In practice, as long as the target application is cold started, the following S1204-S1208 will be executed in the laptop computer 210.
S1204、响应于笔记本电脑210的目标应用冷启动,向笔记本电脑210的接续服务发送接入请求。S1204 : In response to the target application of the notebook computer 210 being cold started, sending an access request to the connection service of the notebook computer 210 .
其中,接入请求用于请求接入接续服务。接入请求中包括目标应用的应用标识,用于指示目标应用想要接入接续服务。The access request is used to request access to the continuation service. The access request includes an application identifier of the target application, which is used to indicate that the target application wants to access the continuation service.
在笔记本电脑210中,目标应用在冷启动的过程中,可以向接续服务发送接入请求。其中,冷启动是指:在目标应用启动前,笔记本电脑210的系统中没有目标应用的进程。在冷启动的过程中,目标应用向接续服务发送接入请求,则可以重新建立目标应用的进程和接续服务的进程之间的联系,便于后续实现调用远程相机。In the notebook computer 210, the target application can send an access request to the connection service during the cold start process. The cold start means that before the target application is started, there is no process of the target application in the system of the notebook computer 210. During the cold start process, the target application sends an access request to the connection service, and the connection between the process of the target application and the process of the connection service can be re-established, which is convenient for the subsequent call of the remote camera.
S1205、笔记本电脑210的接续服务向笔记本电脑210的应用鉴权服务发送鉴权请求。S1205 . The connection service of the notebook computer 210 sends an authentication request to the application authentication service of the notebook computer 210 .
其中,鉴权请求用于请求对应用鉴权。鉴权请求中包括目标应用的应用标识,用于指示对目标应用进行鉴权。The authentication request is used to request authentication of the application. The authentication request includes an application identifier of the target application, which is used to instruct authentication of the target application.
S1206、笔记本电脑210的应用鉴权服务对目标应用鉴权。S1206. The application authentication service of the notebook computer 210 authenticates the target application.
在目标应用接入接续服务前,先对目标应用的合法性进行校验,如校验目标应用的身份和权限。Before the target application accesses the subsequent service, the legitimacy of the target application is first verified, such as verifying the identity and permissions of the target application.
S1207、笔记本电脑210的应用鉴权服务向笔记本电脑210的接续服务反馈鉴权成功的消息。S1207 . The application authentication service of the notebook computer 210 feeds back a message of successful authentication to the connection service of the notebook computer 210 .
其中,鉴权成功的消息中携带有鉴权成功的目标应用的应用标识,用于指示目标应用鉴权成功。The authentication success message carries the application identifier of the target application that has been successfully authenticated, which is used to indicate that the authentication of the target application has been successful.
S1208、笔记本电脑210的接续服务向笔记本电脑210的目标应用返回接入成功的消息。S1208 . The connection service of the notebook computer 210 returns a message of successful access to the target application of the notebook computer 210 .
在确认目标应用合法的情况下,接续服务才向目标应用返回接入成功的消息,即允许目标应用接入接续服务。从而避免为非法应用提供查询可用设备、跨设备传输调用请求以及图像等数据的服务。Only when the target application is confirmed to be legitimate, the connection service returns a successful access message to the target application, that is, the target application is allowed to access the connection service. This avoids providing services such as querying available devices, cross-device transmission of call requests, and image data to illegal applications.
继续参见图12,在笔记本电脑210中,用户可以在目标应用中执行获取图像的获取操作,相应的,S502具体为S5021:Continuing to refer to FIG. 12 , in the notebook computer 210 , the user can perform an operation of acquiring an image in the target application. Accordingly, S502 is specifically S5021:
S5021、笔记本电脑210的目标应用接收获取图像的获取操作。S5021. The target application of the notebook computer 210 receives an acquisition operation of acquiring an image.
示例性的,获取操作为用户对图7A所示界面701中“图片”702的点击操作。Exemplarily, the acquisition operation is a user clicking operation on “Picture” 702 in the interface 701 shown in FIG. 7A .
继续参见图12,在笔记本电脑210中,S503进一步包括S5031-S5036:Continuing to refer to FIG. 12 , in the notebook computer 210 , S503 further includes S5031 - S5036:
S5031、响应于获取操作,笔记本电脑210的目标应用向笔记本电脑210的接续服务请求查询可用设备。S5031 . In response to the acquisition operation, the target application of the notebook computer 210 queries the connection service of the notebook computer 210 for available devices.
其中,可用设备是指支持远程相机的在线设备。在一些实施例中,同账号设备的设备管理服务之间,不仅会同步远程相机的能力,还会同步远程相机被占用的情况,如正在被占用或未被占用,具体可参见前文图10的相关说明。在本实施例中,可用设备是指支持远程相机、且远程相机未被占用的在线设备。Among them, the available device refers to an online device that supports the remote camera. In some embodiments, the device management services of the same account device will not only synchronize the capabilities of the remote camera, but also synchronize the occupancy of the remote camera, such as being occupied or not occupied. For details, please refer to the relevant description of Figure 10 above. In this embodiment, the available device refers to an online device that supports the remote camera and the remote camera is not occupied.
由于笔记本电脑210中的目标应用已经获得了接续服务的调用信息,则该目标应用可以调用接续服务来查询可用设备。Since the target application in the notebook computer 210 has obtained the calling information of the connection service, the target application can call the connection service to query the available devices.
S5032、笔记本电脑210的接续服务向笔记本电脑210的设备管理服务查询可用设备,可用设备包括手机220。S5032 , the connection service of the notebook computer 210 queries the device management service of the notebook computer 210 for available devices, where the available devices include the mobile phone 220 .
S5033、笔记本电脑210的设备管理服务确定可用设备。S5033. The device management service of the notebook computer 210 determines available devices.
笔记本电脑210的设备管理服务中记录有支持远程相机的设备,以及记录有在线设备。因此,笔记本电脑210的设备管理服务可以将既是支持远程相机的设备,也是在线设备的设备确定为可用设备。The device management service of the notebook computer 210 records the devices supporting the remote camera and the online devices. Therefore, the device management service of the notebook computer 210 can determine the devices that are both the devices supporting the remote camera and the online devices as available devices.
示例性的,支持远程相机的设备包括手机220以及平板230,在线设备为手机220,则可以确定可用设备为手机220。Exemplarily, the devices supporting the remote camera include a mobile phone 220 and a tablet 230 , and if the online device is the mobile phone 220 , then it can be determined that the available device is the mobile phone 220 .
S5034、笔记本电脑210的设备管理服务向笔记本电脑210的接续服务返回可用设备的设备信息。S5034. The device management service of the notebook computer 210 returns the device information of the available devices to the connection service of the notebook computer 210.
S5035、笔记本电脑210的接续服务向笔记本电脑210的目标应用返回可用设备的设备信息。S5035 . The connection service of the notebook computer 210 returns device information of available devices to the target application of the notebook computer 210 .
这样,目标应用就获得了可以调用可用设备的设备信息。In this way, the target application obtains the device information that can be used to call the available devices.
通常情况下,可用设备的设备信息包括可用设备的MAC地址、设备序列号等可以唯一标识各个可用设备的信息。Typically, the device information of an available device includes information such as a MAC address of the available device and a device serial number that can uniquely identify each available device.
而在一些实施例中,为了避免隐私泄露,可用设备的设备信息可以用可用设备的临时身份(identification,ID)来表示。In some embodiments, in order to avoid privacy leakage, the device information of the available device may be represented by a temporary identity (identification, ID) of the available device.
示例性的,手机220不仅提供有远程相机的能力,还提供有其他远程能力(如远程翻译的能力、远程搜索的能力等)可供调用,那么,笔记本电脑210中的一个或多个应用在调用这些能力时,就会发现手机220同时安装有相机应用、翻译应用、搜索应用,造成隐私泄露。例如,如果该一个或多个应用来自同一开发商,则该开发商通过大数据分析,可以构建手机220的画像。For example, the mobile phone 220 not only provides the remote camera capability, but also provides other remote capabilities (such as remote translation capability, remote search capability, etc.) for invocation. Then, when one or more applications in the laptop 210 invoke these capabilities, they will find that the mobile phone 220 has installed a camera application, a translation application, and a search application at the same time, causing privacy leakage. For example, if the one or more applications are from the same developer, the developer can build a portrait of the mobile phone 220 through big data analysis.
具体的,在本实施例中,笔记本电脑210在发现(手机220为)在线设备(如S5012)后,笔记本电脑210的通信服务和各个在线设备(如手机220)的通信服务之间协商出各个设备(如笔记本电脑210和手机220)的临时ID。例如,协商出笔记本电脑210的临时ID为111,手机220的临时ID为222。并且,笔记本电脑210的通信服务可以将各个在线设备的临时ID也发送给笔记本电脑210的设备管理服务。然后,在向目标应用返回可用设备的设备信息(如S5034和S5035)时,可以返回可用设备的临时ID。这样,可以避免因将可用设备的MAC地址、设备序列号等固定不变的标识信息发送给目标应用,而导致隐私泄露。Specifically, in this embodiment, after the laptop computer 210 discovers that (the mobile phone 220 is) an online device (such as S5012), the communication service of the laptop computer 210 and the communication service of each online device (such as the mobile phone 220) negotiate the temporary ID of each device (such as the laptop computer 210 and the mobile phone 220). For example, the negotiated temporary ID of the laptop computer 210 is 111, and the temporary ID of the mobile phone 220 is 222. In addition, the communication service of the laptop computer 210 can also send the temporary ID of each online device to the device management service of the laptop computer 210. Then, when returning the device information of the available device to the target application (such as S5034 and S5035), the temporary ID of the available device can be returned. In this way, it can avoid privacy leakage caused by sending fixed identification information such as the MAC address and device serial number of the available device to the target application.
S5036、笔记本电脑210的目标应用显示可用设备的选项。S5036. The target application of the notebook computer 210 displays options of available devices.
其中,可用设备的设备信息中还可以包括可用设备中登录的用户账号的用户名称(如汤姆、杰尼)、可用设备的设备型号(如A型号、B型号等)和/或设备类型(如手机、平板等)的信息。相应的,目标应用可以在可用设备的选项中显示用户名称、可用设备的设备型号和/或可用设备的设备类型,用于指示各个选项对应的可用设备。The device information of the available devices may also include the user name of the user account logged in to the available device (such as Tom, Jenny), the device model of the available device (such as Model A, Model B, etc.) and/or the device type (such as mobile phone, tablet, etc.). Accordingly, the target application may display the user name, the device model of the available device and/or the device type of the available device in the options of the available devices to indicate the available devices corresponding to each option.
示例性的,笔记本电脑210可以显示图7A所示的界面703,界面703中包括“汤姆的A型号手机的相机”和“汤姆的B型号平板的相机”两个可用设备的选项。Exemplarily, the laptop computer 210 may display the interface 703 shown in FIG. 7A , which includes two available device options: “the camera of Tom's model A mobile phone” and “the camera of Tom's model B tablet”.
继续参见图12,在笔记本电脑210中,S504具体为S5041:Continuing to refer to FIG. 12 , in the notebook computer 210, S504 is specifically S5041:
S5041、笔记本电脑210的目标应用接收用户对手机220的选项的选择操作。S5041 . The target application of the notebook computer 210 receives the user's selection operation on the option of the mobile phone 220 .
示例性的,汤姆的A型号手机即为手机220,则选择操作可以是用户对图7A所示界面703中“汤姆的A型号手机”的点击操作。For example, Tom's model A mobile phone is the mobile phone 220, and the selection operation may be a user clicking operation on "Tom's model A mobile phone" in the interface 703 shown in FIG. 7A.
应理解,用户对手机220的选项执行选择操作,则表示选择手机220的远程相机来拍摄图像。It should be understood that when the user performs a selection operation on an option of the mobile phone 220 , it means selecting the remote camera of the mobile phone 220 to capture an image.
继续参见图12,S505进一步包括S5051-S5054:Continuing to refer to FIG. 12 , S505 further includes S5051-S5054:
S5051、笔记本电脑210的目标应用向笔记本电脑210的接续服务发送调用手机220的远程相机的调用请求。S5051 . The target application of the notebook computer 210 sends a call request for calling the remote camera of the mobile phone 220 to the connection service of the notebook computer 210 .
由于笔记本电脑210中的目标应用已经向接续服务注册成功了,因此目标应用可以调用接续服务来向手机220发送远程相机的调用请求(也可以称为第二请求)。Since the target application in the notebook computer 210 has successfully registered with the connection service, the target application can call the connection service to send a remote camera call request (also referred to as a second request) to the mobile phone 220 .
在笔记本电脑210中,目标应用向接续服务请求调用远程相机时,需要携带手机220的设备信息(如手机220的临时ID)以及远程相机的能力的能力信息,用于指示调用对象为手机220中远程相机的能力。In the laptop computer 210, when the target application requests the connection service to call the remote camera, it needs to carry the device information of the mobile phone 220 (such as the temporary ID of the mobile phone 220) and the capability information of the remote camera, which is used to indicate that the calling object is the capability of the remote camera in the mobile phone 220.
示例性的,目标应用向接续服务发送的调用请求包括如下内容:Exemplarily, the call request sent by the target application to the connection service includes the following content:
{{
MsgType:MsgType.REQUEST_REMOTE_CAMERA_PIC//消息类型:请求调用远程相机;MsgType: MsgType.REQUEST_REMOTE_CAMERA_PIC //Message type: request to call the remote camera;
nodeId:手机220的临时ID(如222)//被调用设备的临时IDnodeId: temporary ID of mobile phone 220 (such as 222) //temporary ID of the called device
}}
这样,可是指示调用手机220的远程相机。In this way, it can be instructed to call the remote camera of the mobile phone 220.
S5052、笔记本电脑210的接续服务向笔记本电脑210的通信服务发送笔记本电脑210的目标应用调用手机220的远程相机的请求。S5052 . The connection service of the notebook computer 210 sends a request for the target application of the notebook computer 210 to call the remote camera of the mobile phone 220 to the communication service of the notebook computer 210 .
在笔记本电脑210中,接续服务向通信服务发送请求(也可以称为第三请求)时,可以携带手机220的设备信息和远程相机的能力的能力信息,用于指示调用对象为手机220中远程相机的能力;并且,还可以携带笔记本电脑210的设备信息(如笔记本电脑210的临时ID),用于指示请求方为笔记本电脑210。In the laptop computer 210, when the connection service sends a request (also called the third request) to the communication service, it can carry the device information of the mobile phone 220 and the capability information of the remote camera, which is used to indicate that the calling object is the capability of the remote camera in the mobile phone 220; and it can also carry the device information of the laptop computer 210 (such as the temporary ID of the laptop computer 210) to indicate that the requesting party is the laptop computer 210.
另外,笔记本电脑210的接续服务在接收到来自目标应用的调用请求后,通过解析可以得到目标应用的应用标识,并将应用标识携带在向通信服务发送的请求中,以进一步指示请求方为目标应用。In addition, after receiving the call request from the target application, the connection service of the notebook computer 210 can obtain the application identifier of the target application through parsing, and carry the application identifier in the request sent to the communication service to further indicate that the requester is the target application.
即,在前述S5051中调用请求的基础上,增加了笔记本电脑210的设备信息和目标应用的应用标识。That is, based on the calling request in the aforementioned S5051, the device information of the notebook computer 210 and the application identifier of the target application are added.
S5053、笔记本电脑210的通信服务向手机220的通信服务发送笔记本电脑210的目标应用调用手机220的远程相机的请求。S5053. The communication service of the notebook computer 210 sends the destination address of the notebook computer 210 to the communication service of the mobile phone 220. The target application calls the request of the remote camera of the mobile phone 220.
在一些实施例中,与S5052相比,S5053中的请求(即第一请求)可以笔记本电脑210的设备信息。In some embodiments, compared with S5052 , the request in S5053 (ie, the first request) may be device information of the laptop computer 210 .
S5054、手机220的通信服务向手机220的接续服务发送笔记本电脑210的目标应用调用远程相机的请求。S5054 . The communication service of the mobile phone 220 sends a request for the target application of the notebook computer 210 to call the remote camera to the connection service of the mobile phone 220 .
在手机220中,通信服务向接续服务发送请求(也可以称为第四请求)时,可以携带远程相机的能力的能力信息,用于指示调用的能力为远程相机的能力;并且,还携带笔记本电脑210的设备信息和目标应用的应用标识,用于指示请求方为笔记本电脑210中的目标应用。即,在前述S5053中调用请求的基础上,可以减少手机220的设备信息。In the mobile phone 220, when the communication service sends a request (also referred to as the fourth request) to the connection service, the capability information of the remote camera capability may be carried to indicate that the called capability is the capability of the remote camera; and the device information of the notebook computer 210 and the application identifier of the target application may be carried to indicate that the requesting party is the target application in the notebook computer 210. That is, based on the calling request in S5053, the device information of the mobile phone 220 may be reduced.
继续参见图12,在手机220中,S506具体为S5061:Continuing to refer to FIG. 12 , in the mobile phone 220 , S506 is specifically S5061:
S5061、手机220的接续服务启动远程相机,并向远程相机发送笔记本电脑210的设备信息和目标应用的应用标识。S5061. The connection service of the mobile phone 220 starts the remote camera and sends the device information of the notebook computer 210 and the application identifier of the target application to the remote camera.
在手机220中,接续服务基于接收到的请求中的能力信息启动远程相机。在启动远程相机后,远程相机可以调用系统相机来拍摄图像。在启动系统相机后,系统相机可以显示取景界面,如显示图8A所示的界面801。In the mobile phone 220, the connection service starts the remote camera based on the capability information in the received request. After starting the remote camera, the remote camera can call the system camera to capture an image. After starting the system camera, the system camera can display a viewfinder interface, such as interface 801 shown in FIG. 8A.
其中,远程相机中记录的笔记本电脑210的设备信息,用于远程相机将系统相机拍摄得到的图像分发给笔记本电脑210。以及,远程相机中记录的目标应用的应用标识,用于笔记本电脑210确定获取图像的目标应用。The device information of the laptop computer 210 recorded in the remote camera is used for the remote camera to distribute the image captured by the system camera to the laptop computer 210. And the application identifier of the target application recorded in the remote camera is used for the laptop computer 210 to determine the target application for acquiring the image.
在一些实施例中,继续参见图12,启动远程相机后的S1101进一步包括S11011-S11012:In some embodiments, referring to FIG. 12 , S1101 after starting the remote camera further includes S11011-S11012:
S11011、手机220的远程相机向设备管理服务更新工作状态为被占用。S11011. The remote camera of the mobile phone 220 updates the working status to the device management service as occupied.
其中,工作状态包括被占用和未被占用两种,可以用两个标签来指示这两种状态。示例性的,第一标签,如1,指示未被占用,第二标签,如0,指示被占用。在手机220中,远程相机可以通过向设备管理服务发送第一标签或者第二标签以指示设备管理服务更新状态。The working status includes occupied and unoccupied, and two tags can be used to indicate the two statuses. For example, a first tag, such as 1, indicates unoccupied, and a second tag, such as 0, indicates occupied. In the mobile phone 220, the remote camera can send the first tag or the second tag to the device management service to instruct the device management service to update the status.
S11012、手机220的设备管理服务通过互联网向同账号设备(如笔记本电脑210)的设备管理服务同步其远程相机的能力的工作状态为被占用。S11012, the device management service of the mobile phone 220 synchronizes the remote camera capability of the device with the same account (such as the laptop computer 210) through the Internet, and the working status is occupied.
手机220中远程相机的状态发生变化时,则会同步给同账号设备,如笔记本电脑210。后续,同账号设备在调用远程相机时,可以不调用处于被占用状态的远程相机,如手机220中的远程相机,避免产生冲突。When the state of the remote camera in the mobile phone 220 changes, it will be synchronized to the same account device, such as the laptop 210. Later, when the same account device calls the remote camera, it may not call the remote camera in the occupied state, such as the remote camera in the mobile phone 220, to avoid conflicts.
以及,远程相机调用系统相机完成图像拍摄后的S1102进一步包括S11021-S11022:And, after the remote camera calls the system camera to complete the image capture, S1102 further includes S11021-S11022:
S11021、手机220的远程相机向设备管理服务更新工作状态为未被占用。S11021. The remote camera of the mobile phone 220 updates the working status to the device management service as unoccupied.
S11022、手机220的设备管理服务通过互联网向同账号设备(如笔记本电脑210)的设备管理服务同步其远程相机的能力的工作状态为未被占用。S11022. The device management service of the mobile phone 220 synchronizes the remote camera capability of the device management service of the same account device (such as the laptop computer 210) via the Internet, and the working status is unoccupied.
后续,同账号设备在调用远程相机时,可以继续调用处于未被占用状态的远程相机,如手机220中的远程相机。Subsequently, when the device with the same account calls a remote camera, it can continue to call a remote camera that is not occupied, such as the remote camera in the mobile phone 220 .
继续参见图12,在手机220中,S507进一步包括S5071-S5075:Continuing to refer to FIG. 12 , in the mobile phone 220 , S507 further includes S5071 - S5075:
S5071、手机220的远程相机向手机220的接续服务发送图像,以及传输接收对象为笔记本电脑210的目标应用。S5071 . The remote camera of the mobile phone 220 sends an image to the connection service of the mobile phone 220 , and transmits a target application whose receiving object is the notebook computer 210 .
在手机220中,远程相机在向接续服务发送图像时,可同步传输远程相机记录的笔记本电脑210的设备信息和目标应用的应用标识,便于接续服务明确传输路径。In the mobile phone 220, when the remote camera sends the image to the follow-up service, the notes recorded by the remote camera can be transmitted synchronously. The device information of the computer 210 and the application identifier of the target application facilitate the connection service to clarify the transmission path.
S5072、手机220的接续服务向手机220的通信服务发送图像,以及传输接收对象为笔记本电脑210的目标应用。S5072 , the connection service of the mobile phone 220 sends the image to the communication service of the mobile phone 220 , and transmits the target application whose receiving object is the notebook computer 210 .
S5073、手机220的通信服务基于接收对象向笔记本电脑210的通信服务发送图像,以及传输接收对象为目标应用(如传输目标应用的应用标识)。S5073. The communication service of the mobile phone 220 sends the image to the communication service of the notebook computer 210 based on the receiving object, and transmits the receiving object as a target application (such as transmitting an application identifier of the target application).
在手机220中,通信服务接收到的接收对象为笔记本电脑210的目标应用,因此,通信服务可以基于接收对象中的设备信息,即笔记本电脑210的设备信息,向笔记本电脑210发送图像。In the mobile phone 220 , the receiving object received by the communication service is the target application of the laptop computer 210 , so the communication service can send the image to the laptop computer 210 based on the device information in the receiving object, that is, the device information of the laptop computer 210 .
S5074、笔记本电脑210的通信服务向笔记本电脑210的接续服务发送图像,以及传输接收对象为目标应用。S5074: The communication service of the notebook computer 210 sends the image to the connection service of the notebook computer 210, and the transmission receiving object is the target application.
S5075、笔记本电脑210的接续服务基于接收对象向笔记本电脑210的目标应用发送图像。S5075 . The connection service of the notebook computer 210 sends the image to the target application of the notebook computer 210 based on the receiving object.
在笔记本电脑210中,接续服务接收到的接收对象为目标应用,因此,接续服务可以基于接收对象中的应用标识,即目标应用的应用标识,向目标应用发送图像。In the notebook computer 210 , the receiving object received by the connection service is the target application. Therefore, the connection service can send the image to the target application based on the application identifier in the receiving object, that is, the application identifier of the target application.
继续参见图12,在笔记本电脑210中,S508具体为S5081:Continuing to refer to FIG. 12 , in the notebook computer 210 , S508 is specifically S5081:
S5081、笔记本电脑210的目标应用显示图像。S5081 . The target application of the notebook computer 210 displays an image.
以图片为例,笔记本电脑210在接收到图片后,可以显示图9所示的界面901,界面901中包括图片902。Taking a picture as an example, after receiving the picture, the laptop computer 210 may display an interface 901 shown in FIG. 9 , where the interface 901 includes a picture 902 .
本申请实施例还提供了一种电子设备,该电子设备可以包括:存储器和一个或多个处理器。存储器和处理器耦合。该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令。当处理器执行计算机指令时,电子设备可执行上述方法实施例中手机执行的各个功能或者步骤。The present application also provides an electronic device, which may include: a memory and one or more processors. The memory and the processor are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute the various functions or steps executed by the mobile phone in the above method embodiment.
本申请实施例还提供一种芯片系统,如图14所示,该芯片系统1400包括至少一个处理器1401和至少一个接口电路1402。处理器1401和接口电路1402可通过线路互联。例如,接口电路1402可用于从其它装置(例如电子设备的存储器)接收信号。又例如,接口电路1402可用于向其它装置(例如处理器1401)发送信号。示例性的,接口电路1402可读取存储器中存储的指令,并将该指令发送给处理器1401。当所述指令被处理器1401执行时,可使得电子设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。The embodiment of the present application also provides a chip system, as shown in Figure 14, the chip system 1400 includes at least one processor 1401 and at least one interface circuit 1402. The processor 1401 and the interface circuit 1402 can be interconnected through lines. For example, the interface circuit 1402 can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit 1402 can be used to send signals to other devices (such as the processor 1401). Exemplarily, the interface circuit 1402 can read the instructions stored in the memory and send the instructions to the processor 1401. When the instructions are executed by the processor 1401, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiment of the present application.
本实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述方法实施例中手机执行的各个功能或者步骤。This embodiment further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes each function or step executed by the mobile phone in the above method embodiment.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述方法实施例中手机执行的各个功能或者步骤。This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer executes each function or step executed by the mobile phone in the above method embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述方法实施例中手机执行的各个功能或者步骤。In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes each function or step performed by the mobile phone in the above method embodiment.
其中,本实施例提供的电子设备、通信系统、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic device, communication system, computer-readable storage medium, and computer program product provided in this embodiment Or chips are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly or all or partly embodied in the form of a software product that contributes to the prior art. The software product is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202380079932.7ACN120202676A (en) | 2023-03-28 | 2023-11-22 | Image shooting method, electronic equipment and system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310344514.8 | 2023-03-28 | ||
| CN202310344514.8ACN118741301A (en) | 2023-03-28 | 2023-03-28 | Image shooting method, electronic equipment and system |
| Publication Number | Publication Date |
|---|---|
| WO2024198409A1true WO2024198409A1 (en) | 2024-10-03 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/133480PendingWO2024198409A1 (en) | 2023-03-28 | 2023-11-22 | Image capture method, electronic device, and system |
| Country | Link |
|---|---|
| CN (2) | CN118741301A (en) |
| WO (1) | WO2024198409A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018195967A (en)* | 2017-05-17 | 2018-12-06 | 国立研究開発法人産業技術総合研究所 | Photographing system, image synthesizing device, image synthesizing method, and image synthesizing program |
| CN114697527A (en)* | 2020-12-29 | 2022-07-01 | 华为技术有限公司 | Shooting method, system and electronic equipment |
| CN114866681A (en)* | 2021-02-04 | 2022-08-05 | 华为技术有限公司 | Cross-device collaborative shooting method, related device and system |
| CN115696020A (en)* | 2021-07-31 | 2023-02-03 | 华为技术有限公司 | Cross-device shooting method, related device and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7490352B2 (en)* | 2019-11-08 | 2024-05-27 | キヤノン株式会社 | COMMUNICATION DEVICE, ITS CONTROL METHOD, AND ITS PROGRAM |
| CN114554464B (en)* | 2020-03-26 | 2022-12-13 | 华为技术有限公司 | A data sharing and instruction operation control method and system |
| CN112969024B (en)* | 2020-06-30 | 2022-03-11 | 华为技术有限公司 | Camera calling method, electronic equipment and camera |
| CN114615362B (en)* | 2020-12-09 | 2023-07-11 | 华为技术有限公司 | Camera control method, device and storage medium |
| CN115225753B (en)* | 2021-04-19 | 2024-07-05 | 华为技术有限公司 | Shooting method, related device and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018195967A (en)* | 2017-05-17 | 2018-12-06 | 国立研究開発法人産業技術総合研究所 | Photographing system, image synthesizing device, image synthesizing method, and image synthesizing program |
| CN114697527A (en)* | 2020-12-29 | 2022-07-01 | 华为技术有限公司 | Shooting method, system and electronic equipment |
| CN114866681A (en)* | 2021-02-04 | 2022-08-05 | 华为技术有限公司 | Cross-device collaborative shooting method, related device and system |
| CN115696020A (en)* | 2021-07-31 | 2023-02-03 | 华为技术有限公司 | Cross-device shooting method, related device and system |
| Publication number | Publication date |
|---|---|
| CN120202676A (en) | 2025-06-24 |
| CN118741301A (en) | 2024-10-01 |
| Publication | Publication Date | Title |
|---|---|---|
| WO2021013158A1 (en) | Display method and related apparatus | |
| WO2019227450A1 (en) | Application function implementation method and electronic device | |
| WO2022063159A1 (en) | File transmission method and related device | |
| WO2020224447A1 (en) | Method and system for adding smart home device to contacts | |
| WO2021233161A1 (en) | Family schedule fusion method and apparatus | |
| CN114567871B (en) | File sharing method, device, electronic device and readable storage medium | |
| WO2022135156A1 (en) | Distributed cross-device collaboration method, and electronic device and communication system | |
| CN111316619B (en) | A photo sharing method and electronic device | |
| KR20210105938A (en) | Image classification method and electronic device | |
| US20240028695A1 (en) | Function Migration Method and Apparatus | |
| CN115515133B (en) | Distributed device authentication method and electronic device | |
| CN117425227A (en) | Method and device for establishing session based on WiFi direct connection | |
| WO2020051916A1 (en) | Method for transmitting information and electronic device | |
| WO2024234712A1 (en) | Data management method and system, electronic device, and computer readable medium | |
| WO2024198409A1 (en) | Image capture method, electronic device, and system | |
| WO2024002137A1 (en) | Communication method, communication system, and electronic device | |
| CN115087134A (en) | A Bluetooth connection method and electronic device | |
| WO2022228214A1 (en) | Device discovery method and system and electronic device | |
| CN116541589A (en) | Play record display method and related equipment | |
| CN116680020B (en) | Multi-device collaborative management method, electronic device and storage medium | |
| CN117499780B (en) | Photographing method, electronic device and collaborative working system | |
| EP4345590A1 (en) | Task synchronization system and method, and device | |
| CN116033592B (en) | Methods and devices for using cellular communication functions | |
| CN117478654B (en) | Abnormal processing method, device and collaborative working system in image data transmission process | |
| CN117478682A (en) | Methods, equipment and collaborative working systems for establishing point-to-point channels |
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application | Ref document number:23929977 Country of ref document:EP Kind code of ref document:A1 | |
| WWE | Wipo information: entry into national phase | Ref document number:202380079932.7 Country of ref document:CN | |
| WWP | Wipo information: published in national office | Ref document number:202380079932.7 Country of ref document:CN |