Communication device, control method for communication device, and program

JP2024124182A5Pending Publication Date: 2026-01-09CANON KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023032177
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

When data is transferred using multiple connections, errors can propagate across all connections due to timing differences in response waiting, leading to inefficient recovery from communication issues, particularly in portable devices like cameras where environmental changes frequently disrupt communication.

Method used

A communication device that detects errors in one connection and promptly disconnects not only that connection but also other connections, allowing for immediate reconnection processing to recover from transfer errors.

Benefits of technology

Enables quick recovery from transfer errors by restarting communication functions, ensuring early resumption of data transfer even in challenging environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide a technique for quickly recovering even if transfer errors occur when data is simultaneously transferred in parallel using multiple connections.SOLUTION: A communication device includes connection means for establishing multiple connections for data transfer to an external device, transfer means for transferring data to the external device using the multiple connections, detection means for detecting transfer errors in the transfer means, and control means that, when a transmission error is detected in one of the multiple connections by the detection means, disconnects the one connection and also disconnects the other connections other than the one connection among the multiple connections.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a communication device, a control method and a program for a communication device, and more particularly to a technique for transferring a plurality of files in parallel between communication devices. [Background technology]

[0002] In recent years, many electronic devices, such as personal computers, digital cameras, game consoles, tablet terminals, and mobile phones, are equipped with camera functions and communication functions, and data transmission and reception between these electronic devices has been realized. Some electronic devices are connected to an FTP (File Transfer Protocol) server and transfer image data captured by a camera to the FTP server. Communication between the electronic device and the FTP server is performed using two TCP (Transmission Control Protocol) connections. One is called a control connection and is used to exchange commands for controlling communication, such as logging in and setting the transfer method. The other is called a data connection and is used to send and receive data. By establishing a plurality of these two connections between the electronic device and the FTP server, the amount of data that can be exchanged can be increased and data transfer can be accelerated. Patent Document 1 discloses a method of dividing transfer data into N parts and sending and receiving data through N connections. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Publication No. 8-305643 Summary of the Invention [Problem to be solved by the invention]

[0004] On the other hand, when transferring data over multiple data connections, it is necessary to handle errors accordingly.

[0005] For example, suppose a problem occurs on the communication path between a client and a server, resulting in a situation where the server cannot respond to the client's request. If an error is detected in one connection due to a timeout while waiting for a response, other connections using the same communication path and communicating with the same server will also experience a timeout error while waiting for the server's response. In this case, there is an error in the time from when the first connection becomes an error to when the last connection becomes an error. This is because there is a difference in the start of waiting for a response due to differences in the timing of issuing requests for each connection. If a situation occurs where the server's response cannot be obtained, it may be possible to restore communication with the server by resetting the communication function of the electronic device and restarting the physical connection. In particular, in the case of portable electronic devices such as cameras, communication problems often occur due to changes in the surrounding communication environment, and resetting the communication function is often effective.

[0006] However, to reset the communication function, all connections must be in error. Even if an error is detected in one connection, if other connections are waiting for a response from the server, the electronic device is still in communication and cannot start the reset and reconnection process. For example, sports photographers at newspapers and other places need to transfer photos they have taken at stadiums and other locations to their company's server as quickly as possible, and it is desirable to resolve such communication problems as quickly as possible.

[0007] The present invention has been made in consideration of the above-mentioned problems, and has an object to provide a technique for quickly recovering even if a transfer error occurs when transferring data in parallel using multiple connections. [Means for solving the problem]

[0008] A communication device according to one aspect of the present invention that achieves the above object comprises: a connection means for establishing a plurality of connections for data transfer to an external device; a transfer means for transferring data to the external device using the plurality of connections; a detection means for detecting a transfer error in the transfer means; a control means for disconnecting the one connection and also disconnecting the other connections among the plurality of connections when a transfer error is detected in the one connection by the detection means; The present invention is characterized by comprising: Effect of the Invention

[0009] According to the present invention, even if a transfer error occurs when transferring data in parallel using multiple connections, reconnection processing can be started quickly after disconnection, making it possible to quickly recover from the transfer error. [Brief description of the drawings]

[0010] [Figure 1] FIG. 1 is a block diagram showing a configuration of a digital camera 100 which is an example of a communication device according to an embodiment. [Diagram 2] FIG. 1 is a diagram showing a schematic diagram of a connection between a digital camera 100 and an FTP server 200 according to an embodiment of the present invention; [Diagram 3] 1A and 1B are diagrams showing examples of communication settings according to an embodiment; [Figure 4] 1A to 1F are diagrams showing examples of the display screen of the digital camera 100 when performing FTP image transfer according to one embodiment. [Diagram 5] 1A is a flowchart showing the procedure of processing carried out by the digital camera 100 when carrying out FTP image transfer according to one embodiment; FIG. 1B is a flowchart showing the procedure of transfer processing carried out by the digital camera 100 according to the first embodiment; [Figure 6] 11 is a flowchart showing the procedure of a transfer process performed by the digital camera 100 when communicating with a plurality of external devices according to a second embodiment. [Figure 7] 11 is a flowchart showing the procedure of a connection process performed by the digital camera 100 according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Hereinafter, the embodiments will be described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe a number of features, not all of these features are essential to the invention, and the features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicated descriptions are omitted.

[0012] [Embodiment 1] When communicating with the same destination using multiple connections, if an error occurs in any of the connections, there is a high possibility that a similar error will occur in the other connections. In this embodiment, when the same communication path is used for the same destination, an example will be described in which, when an error occurs in any of the connections, communication of all connections is disconnected as an error has occurred.

[0013] This makes it possible to shorten the time it takes for the response waiting time to time out, and to expedite the reset and restart of the communication function. In this embodiment, a process flow when an error occurs during image transfer processing will be described as an example.

[0014] <Configuration of Digital Camera 100> 1 is a block diagram showing the configuration of a digital camera 100, which is an example of a communication device according to this embodiment. Note that, although a digital camera is described here as an example of a communication device, the communication device is not limited to this. For example, the communication device may be an information processing device such as a portable media player, a so-called tablet device, or a personal computer.

[0015] The control unit 101 is, for example, one or more CPUs (Central Processing Units), and controls each component of the digital camera 100 in accordance with input signals and programs described below. Note that instead of the control unit 101 controlling the entire device, the entire device may be controlled by multiple hardware devices sharing the processing load.

[0016] The photographing unit 102 is composed of, for example, an optical system capable of controlling the aperture, zoom, focus, etc., and an imaging element for converting light (image) introduced through the optical system into an electrical image signal. As the imaging element, a complementary metal oxide semiconductor (CMOS) or a charge coupled device (CCD) is generally used. Under the control of the control unit 101, the photographing unit 102 converts the subject light imaged by a lens included in the photographing unit 102 into an electrical signal using the imaging element, performs noise reduction processing, etc., and outputs the digital data as image data. In the digital camera 100 of this embodiment, the image data is recorded on the recording medium 110 in accordance with the DCF (Design Rule for Camera File system) standard.

[0017] The non-volatile memory 103 is one or more memories, and is an electrically erasable and recordable non-volatile memory, in which programs and the like executed by the control unit 101 are stored. The working memory 104 is one or more memories, and is used as a buffer memory for temporarily storing image data captured by the imaging unit 102, an image display memory for the display unit 106, a working area for the control unit 101, and the like.

[0018] The operation unit 105 is used to receive instructions for the digital camera 100 from the user. The operation unit 105 includes, for example, a power button for the user to instruct ON / OFF of the power supply of the digital camera 100, a release switch for instructing shooting, and a playback button for instructing playback of image data. The operation unit 105 may further include an operation member such as a dedicated connection button for starting communication with an external device via a communication unit 111 described later. A touch panel formed on a display unit 106 described later may also be included in the operation unit 105. The release switch has SW1 and SW2. When the release switch is in a so-called half-pressed state, SW1 is turned ON. This makes it possible to receive instructions for preparing for shooting, such as AF (autofocus) processing, AE (automatic exposure) processing, AWB (auto white balance) processing, and EF (flash pre-flash) processing. When the release switch is in a so-called full-pressed state, SW2 is turned ON. This makes it possible to receive instructions for shooting.

[0019] The display unit 106 displays a viewfinder image during shooting, displays captured image data, displays characters for interactive operations, etc. Note that the display unit 106 does not necessarily have to be built into the digital camera 100. For example, various displays may be performed via a display unit possessed by an information processing device external to the digital camera 100. In other words, the digital camera 100 is required to be able to connect to an internal or external display unit 106 and to have at least a display control function for controlling the display of the display unit 106.

[0020] The recording medium 110 can record image data output from the imaging unit 102. The recording medium 110 may be configured to be detachable from the digital camera 100, or may be built into the digital camera 100. In other words, it is sufficient for the digital camera 100 to have at least a function for accessing the recording medium 110.

[0021] The communication unit 111 is an interface for connecting to an external device. The communication unit 111 has various communication functions such as USB, IEEE1394, P1284, SCSI, modem, LAN, RS232C, and wireless communication. A connector (in the case of wired communication) or an antenna (in the case of wireless communication) for connecting the digital camera 100 to an external device can be connected to the communication unit 111. The digital camera 100 of this embodiment can exchange data with an external device via the communication unit 111. For example, the digital camera 100 can transmit image data (data items) generated by the photographing unit 102 to the external device via the communication unit 111. In this embodiment, the communication unit 111 includes an interface for communicating with the external device via a so-called wireless LAN in accordance with the IEEE802.11 standard.

[0022] It should be noted that the communication unit 111 does not necessarily have to be built into the digital camera 100. The digital camera 100 is required to be able to connect to an internal or external communication unit 111 and to have at least a communication control function for controlling the communication unit 111. The control unit 101 realizes wireless communication with an external device by controlling the communication unit 111. It should be noted that the communication method is not limited to wireless LAN, and other communication methods such as infrared communication may be used. In this embodiment, the communication unit 111 also includes an interface for communicating with an external device via a wired LAN.

[0023] The short-distance wireless communication unit 112 is composed of, for example, an antenna for wireless communication, and a modulation / demodulation circuit and a communication controller for processing wireless signals. The short-distance wireless communication unit 112 outputs a modulated wireless signal from an antenna, and demodulates a wireless signal received by the antenna. This makes it possible to realize short-distance wireless communication in accordance with the IEEE802.15 standard (so-called Bluetooth (registered trademark)). In this embodiment, the Bluetooth (registered trademark) communication employs version 4.0 of Bluetooth (registered trademark) Low Energy, which has low power consumption. This Bluetooth (registered trademark) communication has a narrower communication range (i.e., a shorter communication distance) than wireless LAN communication. In addition, the communication speed of Bluetooth (registered trademark) communication is slower than wireless LAN communication. On the other hand, Bluetooth (registered trademark) communication consumes less power than wireless LAN communication. The digital camera 100 of this embodiment can exchange data with an external device via the short-distance wireless communication unit 112. For example, when digital camera 100 receives a command to take a photograph from an external device, it controls the photographing unit 102 to perform the photographing operation, and when it receives a command to transmit and receive data via wireless LAN communication, it controls the communication unit 111 to start wireless LAN communication.

[0024] The near field communication unit 113 is composed of, for example, an antenna for wireless communication, and a modulation / demodulation circuit and a communication controller for processing wireless signals. The near field communication unit 113 outputs a modulated wireless signal from an antenna, and demodulates a wireless signal received by the antenna. This enables the near field communication unit 113 to realize non-contact near field communication in accordance with the ISO / IEC 18092 standard (so-called NFC: Near Field Communication). The near field communication unit 113 of this embodiment is disposed on the side of the digital camera 100.

[0025] The digital camera 100 and the smart device (not shown) start communication and become connected by bringing their close proximity wireless communication units into close proximity to each other. When making a connection using the close proximity wireless communication units, it is not necessary to bring the close proximity wireless communication units into contact with each other. Since close proximity wireless communication units can communicate even if they are apart by a certain distance, in order to connect the devices to each other, it is sufficient to bring the devices into close proximity to the range where close proximity wireless communication is possible. In the following description, bringing the devices into close proximity to the range where close proximity wireless communication is possible is also referred to as "bringing them into close proximity."

[0026] Furthermore, if the proximity wireless communication units are in a range where proximity wireless communication is not possible, communication is not started. Furthermore, when the proximity wireless communication units are in a range where proximity wireless communication is possible and a communication connection is established, if the proximity wireless communication units move away from each other into a range where proximity wireless communication is not possible, the communication connection is released. Note that the non-contact proximity communication realized by the proximity wireless communication unit 113 is not limited to NFC, and other wireless communication standards may be adopted. For example, the non-contact proximity communication realized by the proximity wireless communication unit 113 may be non-contact proximity communication according to the ISO / IEC 14443 standard.

[0027] In this embodiment, the communication speed of the communication realized by the communication unit 111 is faster than the communication speed of the communication realized by the close-proximity wireless communication unit 113. Furthermore, the communication realized by the communication unit 111 has a wider communication range than the communication by the close-proximity wireless communication unit 113. Instead, the communication by the close-proximity wireless communication unit 113 can limit the communication partner due to the narrowness of the communication range, and therefore does not require processing such as exchanging encryption keys that is required for the communication realized by the communication unit 111. That is, communication can be performed more easily than when the communication unit 111 is used.

[0028] The communication unit 111 of the digital camera 100 in this embodiment has an AP mode in which it operates as an access point in infrastructure mode, and a CL mode in which it operates as a client in infrastructure mode. By operating the communication unit 111 in the CL mode, the digital camera 100 in this embodiment can operate as a CL device in infrastructure mode. When the digital camera 100 operates as a CL device, it can connect to a nearby AP device and participate in a network formed by the AP device.

[0029] Furthermore, by operating communication unit 111 in AP mode, digital camera 100 in this embodiment can also operate as a simple AP (hereinafter, simple AP) with more limited functions, although it is a type of AP. When digital camera 100 operates as a simple AP, digital camera 100 forms a network by itself. Peripheral devices of digital camera 100 recognize digital camera 100 as an AP device, and are able to participate in the network formed by digital camera 100. As described above, it is assumed that a program for operating digital camera 100 is held in non-volatile memory 103.

[0030] Although the digital camera 100 in this embodiment is a type of AP, it is a simple AP that does not have a gateway function for transferring data received from a CL device to an Internet provider, etc. Therefore, even if the digital camera 100 receives data from another device participating in the network that the digital camera 100 has formed, it cannot transfer the data to a network such as the Internet.

[0031] <Connection type overview> A use case where an image captured by the digital camera 100 is to be transferred to an external device can be considered. In this embodiment, an example of transferring an image from the digital camera 100 to an FTP server using the FTP (File Transfer Protocol) is shown. FTP is one of the communication protocols for transferring files over a network.

[0032] FIG. 2 is a diagram schematically showing the connection form between the digital camera 100 and the FTP server 200 in this embodiment. The digital camera 100 and the FTP server 200 participate in a wireless LAN network formed by an external access point 300 which is an example of an external relay device. The digital camera 100 can establish an FTP connection with the FTP server 200 by specifying and connecting to the FTP server 200.

[0033] Note that in FIG. 2, an example of connecting the digital camera 100 and the FTP server 200 via a wireless LAN network is shown, but it is also possible to connect the digital camera 100 and the FTP server 200 via a wired LAN. After the FTP connection is completed, the user can transfer an image to the FTP server 200 by specifying the image to be transferred in the digital camera 100 and instructing the start of the transfer.

[0034] In addition to the transfer by specifying an image, there are functions such as automatically transferring the image captured at the time of shooting and a function of transferring only that image when the user presses the determination button during image playback. In this embodiment, the digital camera 100 and the FTP server 200 establish a plurality of connections by establishing a plurality of control connections and a plurality of data connections corresponding to each of them. Then, a plurality of image transfers are simultaneously performed in parallel from the digital camera 100 to the FTP server 200 using the plurality of connections.

[0035] <Mechanism of Connection to FTP Server and Image Transfer> Next, the flow of processing for connecting the digital camera 100 to the FTP server 200 will be described with reference to Figures 3(a), 3(b) and 4(a). Figure 3(a) is a diagram showing an example of communication settings stored in the non-volatile memory 103. In this embodiment, it is assumed that 20 communication settings, SET1 to SET20, can be stored. The communication settings include the communication mode, LAN type, wireless settings, TCP / IP settings, FTP settings, etc.

[0036] The "communication mode" includes FTP transfer, PC transfer, Smartphone, HTTP server, etc., and indicates which communication mode is used to connect to an external device. The "LAN type" indicates whether the LAN is wireless LAN or wired LAN. The "wireless setting" includes information such as the SSID, authentication method, encryption type, encryption key, and channel used when communicating via wireless LAN. According to this "wireless setting", for example, a Wi-Fi (registered trademark) connection can be established with an external access point. Wi-Fi (registered trademark) is an international standard for wireless communication, and is wireless communication using the IEEE802.11 series (IEEE802.11a / IEEE802.11b / IEEE802.11g / IEEE802.11n / IEEE802.11ac, etc.). The "wireless setting" may hold multiple settings so that it can be connected to any one of multiple external access points. The "TCP / IP setting" includes TCP / IP information of the digital camera 100 when communicating with an external device. Specifically, information such as an IP address, gateway, and DNS (Domain Name System) is included.

[0037] Figure 3(b) shows an example of "FTP settings" used in the communication settings. "FTP settings" include information such as the FTP mode (FTP / FTPS), FTP server identification information (IP address, URL, etc.), login information (user name, password), and the maximum number of images to be transferred simultaneously. FTPS stands for File Transfer Protocol over SSL / TLS. The maximum number of images to be transferred simultaneously is the maximum number of images that can be transferred in parallel to one FTP server, and the number of control connections and data connections to be established with the FTP server are determined by this maximum number.

[0038] When the digital camera 100 newly connects to an external device, it stores the communication settings as shown in Figures 3(a) and 3(b) and uses them for the second and subsequent connections, making it possible to easily connect to the same (corresponding) external device. In this embodiment, it is assumed that the digital camera 100 has in advance the communication settings as shown in Figures 3(a) and 3(b).

[0039] Fig. 4(a) is a diagram showing an example of a connection setting list screen for allowing a user to select which SET's communication settings to use when connecting to an external device using the communication settings shown in Fig. 3(a) and Fig. 3(b). By selecting a desired connection destination from among the SETs displayed in the list, the user can connect the digital camera 100 to the connection destination of the selected SET.

[0040] <Processing> Next, the flow from the process of connecting the digital camera 100 to the FTP server 200 to the process of transferring images will be described with reference to FIGS. 4(a) to 4(f) and FIG. 5(a).

[0041] In step S500 in Fig. 5(a), the control unit 101 selects the communication settings to be used by the digital camera 100. The communication settings can be selected by the control unit 101 displaying a screen such as that shown in Fig. 4(a) on the display unit 106 and accepting a selection from the user. In this embodiment, it is assumed that SET1 is selected. Once the communication settings are selected, the process proceeds to step S501.

[0042] In step S501, the control unit 101 performs a series of connection processes, such as connection processing from the physical layer to the network layer according to the selected communication settings and control connection establishment processing. The control unit 101 acquires the communication settings corresponding to the selected SET1 from the communication settings stored in the non-volatile memory 103 and starts the connection processing. In the connection processing, the communication unit 111 is started according to the "LAN type", and a connection to a wireless device according to the "wireless setting" is performed. Then, the setting of the own IP address according to the "TCP / IP setting", establishment of a control connection to an FTP server according to the "FTP setting", and login processing (user authentication processing) are performed. When the "LAN type" is a wireless LAN, for example, the Wi-Fi (registered trademark) function is turned on between the digital camera 100 and the external access point 300. The number of control connections to be established with the FTP server is determined according to the "maximum number of images to be transferred simultaneously" to the FTP server, which is specified in the "FTP setting". As described above, the "maximum number of images to be transferred simultaneously" is the maximum number of images to be transferred in parallel to one FTP server at the same time. For example, when transferring two images at the same time, two control connections are established. The maximum number of images to be transferred simultaneously is designated in advance by the user when creating the communication settings, and is saved as part of the above-mentioned "FTP settings."When the connection process is complete, the process proceeds to step S502.

[0043] In step S502, the control unit 101 checks the result of the connection process. If the connection process is successful, the process proceeds to step S503. On the other hand, if the connection process is unsuccessful, the process proceeds to step S506.

[0044] In step S503, the control unit 101 accepts the selection of images to be transferred to the FTP server 200. The selectable images are those stored in the recording medium 110, and the user operates the selection screen to select from among them. Selection methods include selecting images one by one, specifying a range of images in a list, specifying a folder in which images are saved, and selecting all images saved in the camera. FIG. 4(b) shows an example in which three images have been selected for transfer. The number of selected images is displayed as the number of "images to transfer." When the transfer button 401 is pressed, the acceptance of image selection is completed, and the process proceeds to step S504.

[0045] In step S504, the control unit 101 performs a transfer process for the selected image. During the transfer process, a screen such as that shown in Fig. 4(c) is displayed, so that the progress of the image transfer can be seen. The detailed process of step S504 will be described later with reference to Fig. 5(b). When the transfer process is completed, the process proceeds to step S505.

[0046] In step S505, the control unit 101 checks the result of the transfer process. If the transfer process is successful, the process ends. If the transfer process is successful, a screen such as that shown in FIG. 4(d) is displayed. The number of successfully transferred images is displayed as the number of "transferred images." After the process ends, the communication function may be terminated as in step S506 described below, or the process may return to step S503 and wait for the selection of the next image to transfer while maintaining the connection with the server. On the other hand, if the transfer process fails, the process proceeds to step S506.

[0047] In step S506, the control unit 101 stops the communication unit 111 and ends the communication function. For example, the communication is disconnected by turning off the Wi-Fi (registered trademark) function. After that, a screen is displayed indicating that an error (for example, an error caused by a timeout) has occurred and that a retransfer process is to be performed, as shown in FIG. 4(e). Then, the process returns to step S501, the Wi-Fi (registered trademark) function is turned on again, and a reconnection process to the FTP server 200 is started.

[0048] The communication settings used in the reconnection process are the ones previously selected in step S500. If the reconnection process is successful, the process proceeds to image selection in step S503 via step S502, but here the user is not prompted to select an image, and images that have not been transferred are automatically selected from those previously selected by the user. For example, if the user selects three images and two of the images are successfully transferred, but an error occurs during the transfer of the third image, only the third image is automatically selected. Finally, the process proceeds to step S504, where the transfer process is performed in the same manner, allowing the process to resume from where it left off last time.

[0049] When an error occurs, the processes of steps S506 and S501 are performed, which causes the communication unit 111 to restart (for example, the Wi-Fi (registered trademark) function is reset). The problem may be solved simply by restarting the communication unit 111 (by turning the Wi-Fi (registered trademark) function on and off), or by connecting to another external access point if multiple external access point settings are stored in the wireless settings. The problem may also be solved by reassigning IP addresses using an external DHCP server.

[0050] Pressing the transfer stop button 402 on the transfer in progress screen shown in Fig. 4(c) or the transfer stop button 403 on the re-transfer waiting screen shown in Fig. 4(e) will stop the process and terminate the operation of the communication function. In this case, a screen like that shown in Fig. 4(f) is displayed. Fig. 4(f) shows an example when all selected images have failed to be transferred. The number of images that have failed to be transferred is displayed as the number of "transfer failed images." In the example shown, there are three "transfer failed images."

[0051] <Error handling during transfer process> Next, a detailed flow of the transfer process in this embodiment will be described with reference to Fig. 5(b). This process is the details of the process in step S504 described with reference to Fig. 5(a).

[0052] In step S510, the control unit 101 establishes a data connection between the digital camera 100 and the FTP server 200. There are two ways to establish a data connection. When the connection mode is the passive mode, the data connection can be established by acquiring a port number from the server (FTP server 200) and connecting the client (digital camera 100) to that port. When the connection mode is the active mode, the data connection can be established by notifying the server (FTP server 200) of the port number of the client (digital camera 100) and connecting the server to that port. The connection mode is specified and the port number is sent and received using a control connection. The number of data connections to be established is at least the number of control connections established in step S501 of FIG. 5(a). For example, when the number of control connections established in step S501 is two, the number of data connections to be established can be set to two. This allows two connections to be established between the digital camera 100 and the FTP server 200. When the data connections have been established, the process proceeds to step S511.

[0053] In step S511, the control unit 101 transfers data using the data connection established in step S510. Communication of the start and end of data transfer is performed using the control connection. When a file transfer request is issued from the client (digital camera 100) to the server (FTP server 200) and transfer permission is returned from the server to the client, the client starts transferring image data using the data connection. At this time, if two data connections have been established, the image data will be transferred via each of these two data connections.

[0054] Next, in step S512, the control unit 101 checks whether an error has occurred during data transfer. If an error has occurred in any of the multiple data connections and multiple control connections established between the digital camera 100 and the FTP server 200, the process proceeds to step S513. Here, not only the state of the data connection but also the state of the control connection is monitored, and if an error has occurred in at least either the control connection or the data connection, the process proceeds to step S513. On the other hand, if no error has occurred in any of the connections, the process proceeds to step S515.

[0055] In step S513, the control unit 101 disconnects the connection in which the error has occurred, and also disconnects other connections established between the digital camera 100 and the FTP server 200. For example, if two connections are established, the control unit 101 disconnects the first connection in which the error has occurred, and also disconnects the second connection in which no error has occurred. More specifically, it is assumed that an error has occurred in at least one of a control connection and a data connection for a first connection (session) corresponding to a pair of a control connection and a data connection. In this case, the control unit 101 disconnects the first connection (session), and also disconnects a second connection (another session) in which no error has occurred, corresponding to another pair of a control connection and a data connection. Thereafter, the process proceeds to step S514, where the transfer process result "failed" is returned, and the process ends.

[0056] In step S515, the control unit 101 checks whether the data transfer is complete. If the data transfer is not complete, the process returns to step S511 and continues the data transfer process. On the other hand, if the data transfer is complete, the process proceeds to step S516, where the transfer process result "success" is returned and the process ends.

[0057] As described above, in this embodiment, if a transfer error occurs in one of the connections during image transfer processing by the digital camera 100 using multiple connections, the digital camera 100 disconnects the connection as well as the other connections. This makes it possible to immediately terminate the communication function and start reconnection processing. Therefore, for example, when image transfer becomes impossible due to a problem in the communication environment, it becomes possible to quickly resume the transfer processing. Even if a transfer error occurs when transferring data in parallel using multiple connections, the digital camera 100 can quickly recover by stopping the Wi-Fi (registered trademark) function and retrying.

[0058] [Embodiment 2] In the first embodiment, error handling when transferring images to one external device was described using Fig. 5(a) and Fig. 5(b). In contrast, in the present embodiment, error handling when transferring images to multiple external devices in parallel will be described. As in the above-described embodiment, multiple connections are established to each external device in order to improve the transfer speed. For example, multiple first connections are established to a first external device, and multiple second connections are established to a second external device.

[0059] In order to transmit images to a plurality of external devices in parallel, a connection is established to each of the plurality of external devices, and image data is transferred in parallel using the established connection. When an error is detected during transfer, if all connections established to the plurality of external devices are disconnected as in the first embodiment, there is a possibility that the connection through which the transfer is being performed will also be disconnected. When the communication paths to the respective external devices are different, even if an error is detected in one of the connections, the same error does not necessarily occur in all the connections. For example, consider a case where a plurality of first connections (control connection and data connection) are established to a first external device, and a plurality of second connections (control connection and data connection) are established to a second external device. In this case, even if an error occurs in one of the plurality of first connections established to the first external device, an error does not necessarily occur in the plurality of second connections established to the second external device.

[0060] If it is desired to restart the communication unit early, all connections to multiple external devices may be disconnected, but if it is desired to prioritize the continuation of transfer over the restart of the communication unit, it is desired to continue the transfer without disconnecting connections where no errors have occurred. In this embodiment, the connection to the external device where the transfer error occurred is disconnected, and other connections established with the external device that established the connection where the transfer error occurred are disconnected. An example will be described in which the transfer is continued for the connections of the other external devices that can transfer.

[0061] The system configuration and device configuration are the same as those in the first embodiment, so the description will be omitted.

[0062] <Processing> The flow of processing performed by the digital camera 100 according to this modified embodiment will be described with reference to FIG. 5(a) and FIG.

[0063] In step S500, the control unit 101 selects a communication setting to be used by the digital camera 100. At this time, the user is prompted to select a plurality of communication settings for a plurality of external devices. For example, the selection of a plurality of SETs is accepted from a screen such as that shown in FIG. 4(a) and connection processing is started. Here, it is assumed that SET1 and SET2 are selected. For example, it is assumed that SET1 is selected for connection with a first external device, and SET2 is selected for connection with a second external device. After the communication setting is selected, the process proceeds to step S501.

[0064] In step S501, the control unit 101 acquires the communication settings corresponding to SET1 and SET2 selected in step S500 from the communication settings stored in the non-volatile memory 103, and starts the connection process. For example, the connection process with the first external device is started using the communication settings corresponding to SET1, and the connection process with the second external device is started using the communication settings corresponding to SET2. The details of the connection process are as described in the first embodiment. When the connection process is completed, the process proceeds to step S502.

[0065] The process of step S502 is the same as that of embodiment 1, and therefore a detailed description thereof will be omitted. Here, if both the connection process with the first external device and the connection process with the second external device are successful, the process proceeds to step S503. On the other hand, if at least one of these processes fails, the process proceeds to step S506.

[0066] In step S503, the control unit 101 accepts the selection of an image to be transferred. Images to be transferred to each external device may be selected individually, or an image to be transferred commonly to a plurality of external devices may be selected. When the transfer button 401 shown in FIG. 4(b) is pressed, the process proceeds to step S504.

[0067] In step S504, the control unit 101 performs a transfer process for the selected image. The details of the transfer process will be described later with reference to FIG. 6. When the transfer process ends, the process proceeds to step S505. The processes in steps S505 and S506 are the same as those in the first embodiment, and therefore the description thereof will be omitted.

[0068] Next, the transfer process of S504 according to this embodiment will be described in detail with reference to Fig. 6. In step S600, the control unit 101 establishes a data connection between the digital camera 100 and each external device. The process described in step S510 is performed for each external device. For example, a plurality of first data connections are established with a first external device, and a plurality of second data connections are established with a second external device. When the data connections to each external device have been established, the process proceeds to step S601.

[0069] In step S601, the control unit 101 performs data transfer to each external device using the established data connections. The process of step S511 described with reference to Fig. 5(b) in the first embodiment is performed for each external device. For example, data transfer is performed using a plurality of first data connections established with a first external device, and data transfer is performed using a plurality of second data connections established with a second external device.

[0070] In step S602, the control unit 101 checks whether an error has occurred during data transfer. For example, if an error has occurred in either the connection established with the first external device or the connection established with the second external device, the process proceeds to step S603. For example, it is assumed that a plurality of first connections have been established with the first external device (a plurality of sets of control connections and data connections have been established). Furthermore, it is assumed that a plurality of second connections have been established with the second external device (e.g., a plurality of sets of control connections and data connections have been established). At this time, if an error has occurred in at least one of the control connection or data connection for one of the plurality of first connections with the first external device, the process proceeds to step S603. On the other hand, if an error has not occurred in any of the connections, the process proceeds to step S606.

[0071] In step S603, the control unit 101 disconnects the connection in which the error occurred, and also disconnects other connections established with the external device that had established the connection in which the error occurred. For example, if an error occurs in one of the multiple first connections established with the first external device, the connection in which the error occurred is disconnected. Then, all other connections of the multiple first connections established with the first external device are also disconnected. On the other hand, the multiple second connections established with the second external device are not disconnected. This is because the causes of errors differ between the types of LAN, wireless LAN (SET1) and wired LAN (SET2), and errors do not necessarily occur in both.

[0072] In addition, even if a connection is established with the same external device, if a connection established using a different communication setting exists, the connection may be controlled not to be disconnected. Specifically, consider a case where multiple connections are established with one external device using both a first communication setting (for example, SET1) and a second communication setting (for example, SET2). In this case, assume that an error occurs in one of the multiple connections based on the first communication setting (SET1). In this case, the connection in which the error occurred among the multiple connections established with the external device based on the first communication setting is disconnected, and all other connections among the multiple connections established with this external device based on the first communication setting are also disconnected. However, the multiple second connections established with this external device based on the second communication setting may be controlled not to be disconnected. This is because, similarly, the causes of errors occurring differ between the types of LAN, wireless LAN (SET1) and wired LAN (SET2), and errors do not necessarily occur in both. When the connection is disconnected in this step, the process proceeds to step S604.

[0073] In step S604, the control unit 101 checks whether or not a connection has been established. If no connection has been established, the process proceeds to step S605, where the transfer process result "failure" is returned and the process ends. On the other hand, if a connection has been established, the process proceeds to step S606.

[0074] In step S606, the control unit 101 checks whether the data transfer process is complete. If the data transfer process is not complete, the process returns to step S601 and continues the data transfer process. On the other hand, if the data transfer process is complete, the process proceeds to step S607.

[0075] In step S607, the control unit 101 checks whether all the planned data has been transferred. If a transfer error occurs and all the data has not been transferred, the process proceeds to step S605, where a transfer process result of "failure" is returned and the process ends. Here, the transfer process result may include information about the external device or image for which the transfer process failed. On the other hand, if all the data has been transferred, the process proceeds to step S608, where a transfer process result of "success" is returned and the process ends.

[0076] As described above, in this embodiment, the connection in which the transfer error occurred and other connections established with the external device that established the connection in which the error occurred are disconnected, and the transfer is continued through the connections available for the other external devices. This makes it possible, when transferring images to multiple external devices, to prioritize the transfer process to the external devices available for transfer, while quickly resuming the transfer when transfer to all external devices becomes impossible.

[0077] In this embodiment, the continuation of transfer is prioritized, but if the recovery of the communication path where the transfer error occurred is prioritized, the communication function may be controlled to be restarted at the time of detecting the error as in embodiment 1. The user may be allowed to select in advance which of the continuation of transfer and the recovery of the communication path is to be prioritized.

[0078] [Embodiment 3] <Modification of connection process> In this embodiment, a process will be described for a case where all of the multiple control connections cannot be established in the connection process in step S501 in each of the above-mentioned embodiments. In each of the above-mentioned embodiments, if control connections for the maximum number of images to be transferred simultaneously cannot be established, the connection process is determined to have failed in step S502, and the transfer process is not continued. On the other hand, some FTP servers impose a limit on the number of connections that can be established simultaneously. To deal with such a limit, it is necessary to change the settings so that the number of control connections that the client establishes simultaneously is reduced, but this is a cumbersome task for the user.

[0079] In this embodiment, even if it is not possible to establish all control connections in the connection process, an example in which transfer processing is continued using the control connections that have been established will be described with reference to the flowchart in Fig. 7. Note that the system configuration and device configuration are the same as those in the first embodiment, and therefore description thereof will be omitted.

[0080] <Processing> Fig. 7 is a diagram showing detailed processing of the connection processing in step S501 in Fig. 5(a). In step S700, the control unit 101 starts up the communication unit 111 according to the "LAN type" of the communication settings. When the start-up of the communication unit 111 is completed, the process proceeds to step S701.

[0081] In step S701, the control unit 101 connects to an external device. Specifically, the control unit 101 connects to an external access point according to the "wireless settings" in the communication settings, sets its own IP address according to the "TPC / IP settings" in the communication settings, and connects up to the transport layer to an FTP server according to the "FTP settings" in the communication settings. In this step, a Wi-Fi (registered trademark) connection is established between the digital camera 100 and the external access point 300. When the connection is complete, the process proceeds to step S702.

[0082] In step S702, the control unit 101 establishes a control connection to an external device (FTP server 200). Here, the number of control connections to be established is determined according to the "maximum number of images to be transferred simultaneously (to the FTP server)" included in the "FTP settings" of the communication settings (see FIG. 3(b)). After the control connection is established, the process proceeds to step S703.

[0083] In step S703, the control unit 101 performs a login process to the external device using the established control connection. The login process is performed using FTP commands. The user name and password used in the login process are stored in the "FTP settings" of the communication settings (see FIG. 3(b)). When the login process is completed, the process proceeds to step S704.

[0084] In step S704, the control unit 101 checks whether any connection has been successful up to the login process. If the process has not been successful for all connections, the process proceeds to step S705, where the connection process result "failed" is returned and the process ends. On the other hand, if the process has been successful for at least any connection, the process proceeds to step S706, where the connection process result "successful" is returned and the process ends.

[0085] As described above, in this embodiment, even if all control connections cannot be established in the connection process, the transfer process is executed and continued using the partially established control connections. This makes it possible to transfer images to an FTP server that has a limit on the number of connections that can be established simultaneously. For example, assume that another communication device has already established two connections to an external device that can establish three connections simultaneously. In this case, even if the communication device (digital camera 100) connects to this external device and attempts to establish multiple connections, there is only one free connection (3-2=1). Therefore, it is a situation in which only one connection can be connected. In such a case, it is possible to transfer images by executing and continuing the transfer process using the partially established control connections.

[0086] The disclosure of this specification includes the following communication device, a control method for a communication device, and a program.

[0087] (Item 1) a connection means for establishing a plurality of connections for data transfer to an external device; a transfer means for transferring data to the external device using the plurality of connections; a detection means for detecting a transfer error in the transfer means; a control means for disconnecting the one connection and also disconnecting the other connections among the plurality of connections when a transfer error is detected in the one connection by the detection means; A communication device comprising:

[0088] (Item 2) the connection means establishes a plurality of first connections for data transfer to a first external device, and establishes a plurality of second connections for data transfer to a second external device; the transfer means transfers data to the first external device using the plurality of first connections and transfers data to the second external device using the plurality of second connections; When a transfer error is detected in one of the first connections by the detection means, the control means disconnecting the one connection and also disconnecting other connections among the plurality of first connections other than the one connection; not disconnecting the second connections established with the second external device 2. The communication device according to item 1,

[0089] (Item 3) The communication device described in item 2, characterized in that the connection means establishes the multiple first connections to the first external device based on a first communication setting, and establishes the multiple second connections to the second external device based on a second communication setting different from the first communication setting.

[0090] (Item 4) the connection means establishes a plurality of first connections for data transfer to the external device based on a first communication setting, and establishes a plurality of second connections for data transfer to the external device based on a second communication setting; the transfer means transfers data to the external device using the plurality of first connections and the plurality of second connections; When a transfer error is detected in one of the first connections by the detection means, the control means disconnecting the one connection and also disconnecting other connections among the plurality of first connections other than the one connection; The plurality of second connections are not disconnected. 2. The communication device according to item 1,

[0091] (Item 5) the first communication setting includes information indicating that the type of LAN is a wireless LAN; the second communication setting includes information indicating that the type of the LAN is a wired LAN; 5. The communication device according to item 3 or 4,

[0092] (Item 6) the detection means is capable of detecting an error in a connection process in which the connection means establishes the plurality of connections to the external device, The communication device described in item 1, characterized in that when connecting to an external device that has a limit on the number of connections that can be established simultaneously, the control means terminates communication operation if the detection means detects an error in the connection processing for all of the multiple connections.

[0093] (Item 7) The communication device described in item 6, characterized in that when connecting to an external device in which a limit is set on the number of connections that can be established simultaneously, if the detection means does not detect an error in the connection processing for at least one of the multiple connections, the control means continues the communication operation.

[0094] (Item 8) A selection means for accepting a selection of communication settings from a user is further provided, 2. The communication device according to item 1, wherein the connection means establishes the plurality of connections to the external device based on the communication settings.

[0095] (Item 9) The communication device described in item 1 or 8, characterized in that when the control means disconnects all of the multiple connections including the one connection and the other connection, the connection means executes a reconnection process to re-establish the multiple connections to the external device.

[0096] (Item 10) The communication device according to any one of items 1 to 9, wherein the transfer means uses FTP (File Transfer Protocol) or FTPS (File Transfer Protocol over SSL / TLS) as a transfer protocol.

[0097] (Item 11) A method for controlling a communication device, comprising: a connection step of establishing a plurality of connections for data transfer to external devices; a transfer step of transferring data to the external device using the plurality of connections; a detection step of detecting a transfer error in the transfer step; a control step of disconnecting one connection and disconnecting other connections among the plurality of connections when a transfer error is detected in one connection among the plurality of connections by the detection step; 13. A method for controlling a communication device, comprising:

[0098] (Item 12) 12. A program for causing a computer to execute the method for controlling a communication device according to claim 11.

[0099] (Other embodiments) The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.

[0100] The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]

[0101] 100: digital camera, 101: control unit, 111: communication unit, 200: FTP server, 300: external access point, 401: transfer start button, 402: transfer stop button, 403: transfer stop button

Claims

1. A communication device having a communication interface, a connection means for establishing a plurality of connections to external devices for data transfer; a transfer means for transferring data to the external device using the plurality of connections; a detection means for detecting a transfer error in the transfer means; a control means for executing a disconnection process when a transfer error is detected in one of the plurality of connections by the detection means, which disconnects the one connection and also disconnects other connections of the plurality of connections other than the one connection that have not experienced an error, without waiting for a timeout of the other connection; a reconnection unit that restarts the communication interface when the disconnection process is executed, and attempts to re-establish multiple connections to the external device when the restart process is completed; Equipped with A communication device characterized in that the transfer means uses FTP (File Transfer Protocol) or FTPS (File Transfer Protocol over SSL / TLS) as a transfer protocol.

2. the connection means establishes a plurality of first connections for data transfer to a first external device and establishes a plurality of second connections for data transfer to a second external device; the transfer means transfers data to the first external device using the plurality of first connections and transfers data to the second external device using the plurality of second connections; When the detection means detects a transfer error in one of the plurality of first connections, the control means disconnecting the one connection and also disconnecting other connections among the plurality of first connections other than the one connection; The second connections established with the second external device are not disconnected.

2. The communication device according to claim 1.

3. The communication device according to claim 2, characterized in that the connection means establishes the plurality of first connections to the first external device based on a first communication setting, and establishes the plurality of second connections to the second external device based on a second communication setting different from the first communication setting.

4. the connection means establishes a plurality of first connections for data transfer to the external device based on a first communication setting, and establishes a plurality of second connections for data transfer to the external device based on a second communication setting; the transfer means transfers data to the external device using the plurality of first connections and the plurality of second connections; When the detection means detects a transfer error in one of the plurality of first connections, the control means disconnecting the one connection and also disconnecting other connections among the plurality of first connections other than the one connection; The plurality of second connections are not disconnected.

2. The communication device according to claim 1.

5. the first communication setting includes information indicating that the type of LAN is a wireless LAN; the second communication setting includes information indicating that the type of the LAN is a wired LAN; 4. The communication device according to claim 3.

6. the detection means is capable of detecting an error in a connection process in which the connection means establishes the plurality of connections with the external device; The communication device according to claim 1, characterized in that, when connecting to an external device that has a limit on the number of connections that can be established simultaneously, the control means terminates communication operations if the detection means detects a connection processing error in all of the multiple connections.

7. The communication device described in claim 6, characterized in that when connecting to an external device that has a limit on the number of connections that can be established simultaneously, the control means continues the communication operation if the detection means does not detect an error in the connection processing for at least one of the multiple connections.

8. further comprising a selection means for accepting a selection of communication settings from a user; 8. The communication device according to claim 1, wherein the connection unit establishes the plurality of connections to the external device based on the communication settings.

9. A method for controlling a communication device having a communication interface, comprising: a connection step of establishing a plurality of connections to external devices for data transfer; a transfer step of transferring data to the external device using the plurality of connections; a detection step of detecting a transfer error in the transfer step; a control step of executing a disconnection process when a transfer error is detected in one of the plurality of connections by the detection step, in which the one connection is disconnected and other connections of the plurality of connections other than the one connection that have not experienced an error are also disconnected without waiting for a timeout of the other connections; a reconnection step of restarting the communication interface in response to the execution of the disconnection step, and attempting to re-establish multiple connections to the external device in response to completion of the restarting step; and A method for controlling a communication device, wherein the transferring step uses FTP (File Transfer Protocol) or FTPS (File Transfer Protocol over SSL / TLS) as a transfer protocol.

10. A program for causing a computer to execute the communication device control method according to claim 9.