Electronic device, control method thereof, and program
Patent Information
- Application Number
- JP2022156462
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-09-22
AI Technical Summary
Conventional communication systems fail to account for the load status of the receiving device during burst mode data transfer, potentially inhibiting high-priority functions due to excessive data processing loads.
An electronic device capable of alternating between acknowledged and unacknowledged communication methods, dynamically adjusting data sizes based on load conditions to ensure high-priority processing is maintained during data reception.
Enables high-throughput data reception while prioritizing critical functions, even under heavy load conditions, by optimizing data transfer using acknowledged and unacknowledged communication strategies.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a data communication technique that combines messages with and without Ack. [Background technology]
[0002] 2. Description of the Related Art Conventionally, there is a communication system that uses both a communication method with Ack (Acknowledge) and a communication method without Ack when communicating between devices.
[0003] In communication with Ack, if a sending device does not receive an Ack from a receiving device within a certain period of time after sending the message, the sending device resends the same message. The sending device repeats this process until an Ack is received, thereby ensuring that the message is received reliably by the receiving device.
[0004] In Ackless communication, even if the sending device sends a message to the receiving device, it proceeds to the next process without waiting for an Ack. This improves communication throughput. However, it is unclear whether the message has been delivered to the receiving device. In other words, Ackless communication does not guarantee that the message will be received by the receiving device.
[0005] Patent document 1 discloses a system that transfers image data in burst mode (communication without Ack) and transfers control data such as operation instructions in single mode (communication with Ack), and uses different communication methods depending on the type of data being transmitted. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Patent No. 04525342 Summary of the Invention [Problem to be solved by the invention]
[0007] However, the conventional technology disclosed in the above-mentioned Patent Document 1 does not grasp the load status of the receiving device during image data transmission in burst mode. Therefore, if the amount of data transferred in burst mode exceeds the capacity of the receiving device, there is a possibility that other high-priority functions in the receiving device will be hindered.
[0008] The present invention has been made in consideration of such problems, and aims to provide a technology that enables an electronic device to execute prioritized processing even when the electronic device is receiving data from an external device, and to perform data reception with high throughput. [Means for solving the problem]
[0009] In order to solve this problem, for example, an electronic device according to the present invention has the following configuration. An electronic device having a communication means capable of communicating using an Ack communication message and an Ackless communication message, a data amount receiving means for receiving information indicating the amount of data to be transferred from a data source external device by using the Ack communication message; a determining means for determining a data size to be received using the no-Ack message and notifying the external device of a message indicating the determined data size using the Ack message; a data receiving means for repeating the data receiving process for one set of data until data equivalent to the data amount received by the data amount receiving means is received, when the data receiving process for one set of data includes receiving data equivalent to the data size determined by the determining means from the external device as the no-Ack communication message and transmitting a message indicating whether or not the data size has been received as the Ack message to the external device; The determining means includes means for changing the data size in accordance with a load on the electronic device when the data receiving means is performing a data receiving process. Effect of the Invention
[0010] According to the present invention, even when the electronic device is receiving data from an external device, the electronic device can execute a process that should be prioritized, and can also receive data with a high throughput. [Brief description of the drawings]
[0011] [Figure 1] 1A is a block diagram of a digital camera according to a first embodiment, and FIGS. [Diagram 2] FIG. 2 is a block diagram of a smart device according to the first embodiment. [Figure 3A] 4 is a diagram showing an image data transfer sequence between the digital camera and the smart device according to the first embodiment. [Figure 3B] 11 is a diagram showing an image data transfer sequence when a shooting instruction is input to the digital camera during image data transfer; [Figure 4] 5A to 5C are views showing examples of UI screens displayed on the digital camera according to the first embodiment. [Diagram 5] FIG. 4 is a diagram illustrating an example of a UI screen displayed on the smart device according to the first embodiment. [Figure 6] 4 is a process flow of the digital camera according to the first embodiment. [Figure 7] 4 is a processing flow of a smart device according to the first embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] 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.
[0013] [First embodiment] <Digital camera configuration> 1(a) is a block diagram of a digital camera 100 as a communication device to which this embodiment is applied. Note that, although a digital camera is used as an example of a communication device here, 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. Please understand that this is merely an example for ease of understanding.
[0014] The digital camera 100 includes a control unit 101, an imaging unit 102, a non-volatile memory 103, a working memory 104, an operation unit 105, a display unit 106, a storage medium 107, and a communication unit .
[0015] The control unit 101 is composed of one or more CPUs (processors) and controls each unit 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 imaging unit 102 is composed of, for example, an optical system composed of an optical lens unit (including a zoom lens and a focus lens) and an aperture, and an imaging element for converting an optical image formed through the optical lens unit into an electrical signal (video signal). As the imaging element, a complementary metal oxide semiconductor (CMOS) sensor or a charge coupled device (CCD) sensor is generally used. Under the control of the control unit 101, the imaging unit 102 converts the subject light formed by the lens included in the imaging unit 102 into an electrical signal by the imaging element, performs A / D conversion, noise reduction processing, etc., and outputs it as digital image data. The digital camera 100 of this embodiment records image data in the storage medium 107 in accordance with the DCF (Design Rule for Camera File system) standard.
[0017] The non-volatile memory 103 is an electrically erasable and recordable non-volatile memory, and stores programs executed by the control unit 101, which will be described later.
[0018] The working memory 104 is used as a buffer memory for temporarily storing image data captured by the imaging unit 102, as an image display memory for the display unit 106, a working area for the control unit 101, and the like.
[0019] The operation unit 105 is used to receive instructions from the user to the digital camera 100. The operation unit 105 includes, for example, a power switch for the user to instruct ON / OFF of the power supply of the digital camera 100, a release button for instructing shooting, and a playback button for instructing playback of image data. Furthermore, the operation unit 105 includes operation members such as a dedicated connection button for starting communication with an external device via a communication unit 108 described later. Furthermore, the operation unit 105 includes a touch panel formed on a display unit 106 described later. The release button has two switches SW1 and SW2. When the release button is pressed halfway, the switch SW1 is turned ON. This causes the control unit 101 to perform preparations 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 button is pressed all the way, the switch SW2 is turned ON. As a result, the control unit 101 performs processing for photographing and recording.
[0020] The display unit 106 displays a viewfinder image during shooting, displays captured image data, and displays text for interactive operations such as menus. Note that the display unit 106 does not necessarily have to be built into the digital camera 100. The digital camera 100 can be connected to an internal or external display unit 106, and it is sufficient that the digital camera 100 has at least a display control function for controlling the display of the display unit 106.
[0021] Storage medium 107 can record image data output from imaging unit 102. Storage medium 107 may be a storage medium detachable from digital camera 100, such as an SD card, or may be built into digital camera 100. In other words, digital camera 100 only needs to have a configuration for at least accessing storage medium 107.
[0022] The communication unit 108 is composed of, for example, an antenna for wireless communication, and a modulation / demodulation circuit and a communication controller for processing wireless signals. The communication unit 108 outputs modulated wireless signals from the antenna and demodulates wireless signals received by the antenna, thereby achieving short-distance wireless communication, for example, in accordance with the IEEE802.15 standard (so-called Bluetooth (trademark)). Note that the communication method of the communication unit 108 is not limited to Bluetooth (trademark), and may be other communication methods (for example, Wi-Fi communication, infrared communication, etc.). The communication unit 108 is an example of a wireless communication means.
[0023] 1(b) and (c) are diagrams showing an example of the external appearance of the digital camera 100. The release switch 105a, playback button 105b, directional keys 105c, power switch 105d, and menu button 105e are operation members included in the above-mentioned operation unit 105. In addition, an image obtained as a result of imaging by the imaging unit 102 is displayed on the display unit 106. The basic configuration of the digital camera 100 in this embodiment has been described above.
[0024] <Smart device configuration> Next, the configuration and functions of a smart device 200 to which this embodiment is applied will be described with reference to Fig. 2. Note that in this embodiment, a smart device will be described as an example of an external device, but the external device is not limited to this and may be a digital camera with a wireless function, a smartphone which is a type of mobile phone, a tablet device, a wearable computer, or the like.
[0025] The smart device 200 of this embodiment has a control unit 201, an imaging unit 202, a non-volatile memory 203, a working memory 204, an operation unit 205, a display unit 206, a recording medium 210, a connection unit 211, a short-range wireless communication unit 212, a public network connection unit 213, a microphone 214, and a speaker 215.
[0026] The control unit 201 is composed of one or more CPUs (processors) and controls each part of the smart device 200 according to input signals and programs described below. Note that instead of the control unit 201 controlling the entire device, the entire device may be controlled by multiple hardware devices sharing the processing.
[0027] The non-volatile memory 203 stores an OS (operating system), which is basic software executed by the control unit 201, and applications that cooperate with the OS to realize applied functions. In this embodiment, the non-volatile memory 203 also stores a camera application for realizing communication processing and control processing between the non-volatile memory 203 and the digital camera 100.
[0028] The processing of the smart device 200 during communication with and control of the digital camera 100 of this embodiment is realized by reading and executing software provided by an application.
[0029] It should be noted that the application has software for utilizing basic functions of the OS installed in the smart device 200. It should be noted that the OS of the smart device 200 may have software for implementing the processing in this embodiment.
[0030] The connection unit 211 includes a wireless LAN communication interface for wirelessly communicating with an external device such as the digital camera 100. The control unit 201 controls the connection unit 211 to realize wireless communication with the external device. The connection unit 211 may be directly connected to the digital camera 100 or may be configured to be connected via an access point. As a protocol for communicating data, for example, PTP / IP (Picture Transfer Protocol over Internet Protocol) via a wireless LAN can be used. Note that communication with the digital camera 100 is not limited to this, and may include, for example, an infrared communication interface, a wireless communication interface such as Wireless USB, etc. Furthermore, wired connection means such as a USB cable, HDMI (registered trademark), or IEEE1394 may be used.
[0031] The short-distance wireless communication unit 212 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 212 outputs modulated wireless signals from an antenna and demodulates wireless signals received by the antenna to realize short-distance wireless communication in accordance with the IEEE802.15 standard (Bluetooth (registered trademark)). Note that the short-distance wireless communication with the digital camera 100 is not limited to this.
[0032] The public network connection unit 213 is an interface used when performing wireless communication via a wide area network (WAN) such as 3G / LTE. The smart device 200 can make calls and perform data communication with other devices via the public network connection unit 213. During a call, the control unit 201 inputs and outputs voice signals via the microphone 214 and the speaker 215. In this embodiment, the public network connection unit 213 is not limited to 3G or LTE, and other communication methods such as WiMAX, ADSL, and FTTH may be used. In this embodiment, the public network connection unit 213 is an antenna, and the control unit 201 can connect to the public network via the antenna. Note that the connection unit 211 and the public network connection unit 213 can also be combined into one antenna. Note that the connection unit 211 and the public network connection unit 213 do not necessarily have to be configured as independent hardware, and for example, they can also be combined into one antenna.
[0033] <Explanation of Bluetooth (trademark) Low Energy Attribute Communication> In this embodiment, an example of using Bluetooth (trademark) Low Energy as a communication method between devices will be described. Two communication devices that communicate using Bluetooth (trademark) Low Energy play the roles of central and peripheral, respectively. Also, message transmission and reception at the application level of Bluetooth (trademark) Low Energy are performed through attribute communication using a general protocol called GATT (General Attribute protocol).
[0034] In GATT, application-level messages for communication between two devices are registered in a configuration of services and characteristics. A service represents the function of a peripheral device, and in this embodiment, one service is defined as the "image acquisition function from a smart device". A characteristic is an attribute for reading and writing internal states, operation instructions, state values of sensors, etc. of a peripheral device, and is composed of a property and a descriptor that define the access method.
[0035] A GATT client can send a message to a GATT server by writing a value to this characteristic. Writing to GATT can be done using two methods: Write with Response (with Ack) and Write without Response (without Ack). In addition, messages can be sent from a peripheral device (GATT server) to a central device (client) using two methods: Notification, which is communication without Ack, and Indication, which is communication with Ack.
[0036] Bluetooth (trademark) packets always contain a field called CRC (Cyclic Redundancy Check). CRC is an error detection method that can be used to detect missing or altered data during communication. Packets that are detected as abnormal by CRC inspection are discarded, so even in the case of Write without Response and Notification, which are messages sent without Ack, the authenticity of the message that was received is guaranteed.
[0037] Messages with ACK are sent and received between the central device and peripheral device at the connection interval (CI) period determined by the central device when connected via Bluetooth (trademark) Low Energy. Peripheral devices can request a change in CI, so it is possible to shorten the CI only when it is desired to increase throughput, but since the CI decision is in the hands of the central device, the CI does not necessarily become what is requested. Furthermore, it is necessary to wait until the next CI before being able to notify an ACK indicating completion of reception, meaning that the expected throughput cannot be obtained.
[0038] Therefore, by using Ackless message transmission, messages can be sent without being affected by CI, improving throughput. When transferring large amounts of data between devices connected with Bluetooth(TM) Low Energy, a possible method to improve throughput is to hand over to a communication method that allows high-speed communication, such as wireless LAN. However, since the handover itself takes several seconds, it is most efficient to use Bluetooth(TM) Low Energy's Ackless message for data of around a few kilobytes.
[0039] <Image data transfer processing between digital cameras and smart devices> Next, high-speed image data transfer processing by the digital camera 100 and smart device 200 of this embodiment will be described with reference to FIGS. 3A, 4, and 5. FIG.
[0040] Fig. 3A shows a sequence in which the digital camera 100 of this embodiment communicates with the smart device 200 to perform high-speed image data transfer. Fig. 4 shows an example of a UI screen displayed on the digital camera 100 of this embodiment. Fig. 5 shows an example of a UI screen displayed on the smart device 200 of this embodiment.
[0041] It is assumed that the digital camera 100 and smart device 200 are already paired and connected via Bluetooth (trademark) Low Energy. Pairing via Bluetooth (trademark) refers to the process in which two Bluetooth (trademark) devices register with each other, and identify each other using a method defined by the Bluetooth (trademark) standard.
[0042] The following describes a sequence process for transferring image data at high speed from the smart device 200 to the digital camera 100. In Fig. 3A, it should be understood that S307 uses a notification message without Ack, and all other than S307 use a communication message with Ack. For example, the message sent from the smart device 200 to the digital camera in S302 is a communication message with Ack. The control unit 101 of the digital camera 100 that receives this actually returns an Ack message, but please note that this is not shown in the figure to avoid complicating the drawing. It should be understood that the same applies to Fig. 3B, which will be described later.
[0043] When the user presses the menu button 105e of the digital camera 100, the control unit 101 of the digital camera 100 displays the menu screen 401 of FIG.
[0044] In S301, when the control unit 101 detects a user's selection operation (touch) of the "receive image button" 450 on the menu screen 401, the control unit 101 displays the image receiving screen 402 in FIG. 4B on the display unit 106. Then, in S302, the control unit 101 transmits an image reception standby state notification to the smart device 200 via the communication unit 108.
[0045] 5A shows a state in which a main screen 501 of an image transfer application running on the smart device 200 is displayed. In S302, upon receiving an image reception standby state notification, the control unit 201 of the smart device 200 activates a "Send image to camera" button 550 on the main screen 501 of the display unit 206, making it possible for the user to start an image transfer procedure.
[0046] When the control unit 201 of the smart device 200 detects a selection operation of the "Send image to camera" button 550 by the user via the operation unit 205, the control unit 201 displays a transfer image selection screen 502 of FIG. 5B on the display unit 206. Then, the control unit 201 reads out some or all of the images stored in the non-volatile memory 203 to the working memory 204, and displays the transfer image selection screen 502 including thumbnails of transfer candidate images on the display unit 206 as shown in FIG. 5B. As shown in the figure, the control unit 201 displays a check box 561 for designating an image as a transfer target image near the thumbnail of the transfer candidate image, and provides the user with a means for designating the transfer image via the operation unit 205. The user can select one or more transfer target images by performing a selection operation (touch operation) on this check box.
[0047] In S303, when the control unit 201 detects the selection of the send button 551 on the transfer image selection screen 502 of Fig. 5(b) by the user via the operation unit 205, the control unit 201 starts the transfer procedure of the selected image. Specifically, the control unit 201 of the smart device 200 displays the image sending screen 503 of Fig. 5(c) on the display unit 206, and notifies the digital camera 100 of the number of images to be transferred in S304.
[0048] S321 includes a repetition of the processes of S305 to S313, and indicates a process in which the number of images selected by the smart device 200 is transferred to the digital camera 100.
[0049] When the control unit 201 of the smart device 200 notifies the number of images to be transferred in S304, the process proceeds to S305. In S305, the control unit 201 displays an image sending screen 503 of Fig. 5(c) on the display unit 206, and transmits an image data transfer preparation request message to the digital camera 100 via the short-range wireless communication unit 212. More specifically, the control unit 201 notifies the digital camera 100 of the data size of one image file that is about to be transferred.
[0050] S322 indicates that the processes indicated by S306 to S310 are repeated. In other words, when the process of transferring one block of data from the smart device 200 to the digital camera 100 is regarded as one set of processes, S322 indicates a step in which this set of processes is repeatedly executed until the transfer of one image file is completed.
[0051] In S305, when the control unit 101 of the digital camera 100 receives an image data transfer preparation request (including size information of the image file to be received), it prepares for reception. Then, when it becomes preparation for reception, in S306, the control unit 101 transmits a message indicating that reception preparation is OK to the smart device 200. In this S306, the control unit 101 notifies the smart device 200 of the block data size, which is the transfer unit. If the reception preparation is NG, the smart device 200 is notified of the reception preparation NG, but here, the description will be continued assuming that the smart device 200 has received the reception preparation OK. The above-mentioned block data size refers to the size of data that the control unit 201 of the smart device 200 transfers at one time by continuously transmitting a no-Ack message when dividing and transferring image data. The size of the partial data transferred by one no-Ack message is a fixed length because it is defined in advance by the characteristic. Therefore, the block data size is an integer multiple of the size of the partial data defined by the characteristic. During block data transfer, the control unit on the receiving side is in a high load state. For this reason, in this embodiment, the control unit 101 of the digital camera 100 on the receiving side determines a processable size and specifies this size as the block data size.
[0052] S323 represents the process of block data transfer in which data of the block data size specified in S306 is repeatedly sent as a partial data notification, which is a message without Ack. By using a message without Ack, the partial data notification shown in S307 can be sent continuously without being affected by the CI, enabling high-speed data communication.
[0053] In S307, the control unit 201 of the smart device 200 transmits a plurality of partial data notifications for one block data size in a message of Ack-less communication. After that, in S308, the control unit 201 transmits a block data transmission completion notification message.
[0054] In S308, the control unit 101 of the digital camera 100 recognizes that the block data transfer is complete by receiving a block data transmission completion notification. The control unit 101 then checks whether or not all of the partial data notified in the message without Ack has been received. As described above, in Bluetooth, the accuracy of the data is guaranteed if a message can be received, so it is sufficient to simply check whether the expected data size has been received. Therefore, in S309, the control unit 101 checks whether the size of the partial data received in the block data transfer S323 is equal to the block data size specified in S306.
[0055] If the control unit 101 of the digital camera 100 determines in S309 that the data size received in the partial data is equal to the block data size specified in S306, it considers that data reception was successful. Therefore, in S310, the control unit 101 notifies the smart device 200 of a message indicating that the block data reception result is OK.
[0056] Upon receiving this notification, the control unit 201 of the smart device 200 repeats S322 to perform the transmission process for one block of data to be transmitted next.
[0057] If the control unit 101 of the digital camera 100 determines in S309 that the data size received in the partial data does not match the block data size specified in S306, this means that reception of the immediately preceding block of data was unsuccessful. In this case, the control unit 101 notifies the smart device 200 of a message indicating that the block data reception result was NG in S310. Having received this message indicating NG, the control unit 201 of the smart device 200 resumes retransmission processing from the block of data that was NG in S307. The control unit 201 of the smart device 200 then repeats the processing of S322 as long as there is untransferred data.
[0058] In this way, the process of S322 is repeated, and the transfer of one image file is completed. Here, a supplementary explanation is given. The size of one image file to be transferred is not necessarily an integer multiple of one block data size. However, the sizes of the image files to be transferred are mutually known, and the block sizes are also determined. Therefore, both the sending side and the receiving side can calculate how many partial data transfers are required for the last block of the image file. Also, the amount of significant data contained in the last partial data may not be sufficient for the size of that partial data. In this case, the control unit 201 of the smart device 200 adds dummy data following the significant data so that the size of the partial data becomes the default size. The control unit 101 of the receiving digital camera 100 joins together the data of each block in the order of reception, and when the joined data reaches the file size, discards the data after that as dummy data and performs a save process as an image file.
[0059] In the above S323, high-speed data communication is made possible by using communication without Ack. However, since messages without Ack in S307 are continuously sent from the smart device 200, a high load is placed on the reception process of the control unit 101 of the digital camera 100. A method for alleviating this high load state will be described later in <Alleviating Load During High-Speed Image Transfer>.
[0060] When the transmission of one image data frame is completed by the repeated processing of S322, the control unit 201 of the smart device 200 notifies the digital camera 100 of the completion of image data transmission in S311. Upon receiving the image data transmission completion notification from the smart device 200, the control unit 101 of the digital camera 100 stores the received image data in the non-volatile memory 103 in S312. Thereafter, the control unit 101 of the digital camera 100 notifies the smart device 20 of the completion of image data reception in S313.
[0061] When the control unit 201 of the smart device 200 receives a notification that image data reception has been completed from the digital camera, it determines whether or not there are any image files that have not been transferred, and if there are any image files that have not been transferred, executes the process of S321.
[0062] Once the repeated process of S321 has ended and the transfer of all image files has been completed, the control unit 201 of the smart device 200 displays an image transmission completion screen 504 of Fig. 5(d) on the display unit 206. Furthermore, upon completing the reception process for the set number of image files, the control unit 101 of the digital camera 100 displays an image transmission completion screen 403 of Fig. 4(c) on the display unit 106.
[0063] In this manner, the digital camera 100 communicates with the smart device 200 and executes high-speed image transfer processing.
[0064] <Relieving the load during high-speed image transfer> As described above, even when the digital camera 100 is receiving multiple images or a large-sized image from the smart device 200, it is preferable that the image transfer be performed in the background so that the user can continue shooting operations with the digital camera 100. When shooting video or high-speed continuous shooting is performed with the digital camera 100 while image transfer is being performed in the background, the digital camera 100 enters a high-load state (particularly the internal bus bandwidth becomes constrained). Therefore, for ease of understanding, in this embodiment, image transfer during video shooting will be described as an example of the digital camera 100 entering a high-load state.
[0065] A method for adjusting the block data size when transferring data from the smart device 200 to the digital camera 100 in this embodiment will be described with reference to Figures 3B, 4, and 5. It should be understood that Figure 3B is a diagram for explaining in detail the repetitive processing of S322 in Figure 3A.
[0066] Now, the control unit 101 of the digital camera 100 displays an image receiving screen 402 of FIG. 4(b) on the display unit 106, and the control unit 201 of the smart device 200 displays an image sending screen 503 of FIG. 5(c) on the display unit 206 of the smart device 200. In this state, when the user operates the back button 451 on the image receiving screen 403 of FIG. 4(b), the control unit 101 detects the operation and displays a live view screen 404 of FIG. 4(d) on the display unit 106. Also, an icon 460 indicating that an image is being received on the live view screen 404 indicates that the digital camera 100 is receiving image data from the smartphone 200. In this way, the user can perform a shooting operation while the control unit 101 of the digital camera 100 notifies the user that image reception is continuing in the background.
[0067] After a request to prepare for image data transfer (not shown) and before the notification of ready to receive in S346, the control unit 101 confirms in S345 that video recording is not in progress, and in S346 the control unit 101 specifies the normal block data size in the notification of ready to receive and sends it.
[0068] S346 is equivalent to S306. S347 is equivalent to S307. S348 is equivalent to S308. S349 is equivalent to S309. S350 is equivalent to S310.
[0069] In S371, when the user inputs an instruction to shoot a video from the operation unit 105, the control unit 101 of the digital camera 100 starts shooting a video. At this time, the control unit 101 of the digital camera 100 displays the live view video shooting screen 405 of Fig. 4(e) on the display unit 106, and displays an image receiving icon 461 and a video shooting icon 471 superimposed on the live image.
[0070] S355 is equivalent to S345, and the control unit 101 of the digital camera 100 confirms that moving image shooting is in progress and determines that the load is high. In addition to the fact that moving image shooting is in progress, if the load of communication without Ack is applied for a long period of time, it is possible that the imaging system functions that should be prioritized are hindered. Therefore, in S356, the control unit 101 of the digital camera 100 notifies the smart device 200 of the block size that is a size that is obtained by reducing the low-load block size by a preset size.
[0071] S356 is equivalent to S306. S357 is equivalent to S307. S358 is equivalent to S308. S359 is equivalent to S309. S360 is equivalent to S310.
[0072] When all image data files have been received, the control unit 101 of the digital camera 100 displays the live view screen 406 of Fig. 4(f) on the display unit, and displays an image reception completion icon 462 superimposed on the live video. Note that the image reception completion icon 462 may be hidden after being displayed for a preset time (e.g., 5 seconds).
[0073] Comparing S347 and S357, it can be seen that the period of high load during transmission without Ack is relatively long in S347 and short in S357.
[0074] In this manner, when the control unit 101 of the digital camera 100 is in a high load state, the load due to communication can be reduced by reducing the specified size of the block data in S356.
[0075] <Processing flow of the digital camera 100> Next, a process of acquiring (receiving) one image file from the smart device 200 by the control unit 101 of the digital camera 100 will be described with reference to the flowchart in Fig. 6. This process corresponds to S306 to S311 in Fig. 3. In other words, it is assumed that the user has already selected the images to be transferred and has input instructions related to image transfer in both the digital camera 100 and the smart device 200.
[0076] In S601, the control unit 101 of the digital camera 100 receives an image data transfer preparation request (including the number of image files to be transferred) from the smart device 200 via the communication unit 108 in Ack communication while the control unit 101 is in an image transfer standby state.
[0077] In S602, the control unit 101 determines whether or not a moving image is being captured. If the control unit 101 determines that a moving image is not being captured, the process proceeds to S603. If the control unit 101 determines that a moving image is being captured, the process proceeds to S604. In S603, the control unit 101 sets the block data size to a normal size. On the other hand, in S604, the control unit 101 sets the block data size to a size smaller than normal (for example, half the normal size). Then, in S605, the control unit 101 notifies the smart device 200 via the communication unit 108 of a reception preparation OK message including the determined block data size as a message with Ack (S605).
[0078] In S606, the control unit 101 performs a block data reception process to acquire partial data of the image by repeatedly receiving a message of Ack-less communication from the smart device 200 via the communication unit 108. Since the characteristic data length that can be used as standard in attribute communication of Bluetooth (trademark) Low Energy is only 20 bytes, the control unit 101 acquires data for the block data size specified in S605 by repeatedly receiving partial data (S607) and saving the partial data (S608) via the communication unit 108.
[0079] The data size sent and received in one partial data reception (S607) can be agreed upon between the sender and receiver by defining the GATT service and characteristics. Also, the last block data transfer of an image file may be smaller than the block data size specified in S605, but as explained above, the number of partial data transfers required for the last block data can be calculated from the file size and block size, and the size of the significant data included in the last partial data can also be calculated, so no particular problem occurs.
[0080] Furthermore, since the partial data reception in S607 is received by Write Without Response, if a bit error occurs in the received data due to deterioration of the radio wave conditions or the like, the message may be discarded by the communication unit 108 and may not reach the control unit 101. For this reason, the control unit 201 of the smart device 200 transmits a block data transmission completion notification by Write with Response after completing the transmission of the block data.
[0081] In S609, the control unit 101 of the digital camera 100 recognizes that the block data transfer is complete by receiving the block data transmission completion notification, and compares whether the size of the received block data matches the size of the block data to be received. If the received sizes match, this indicates that one block of data has been received successfully. Then, in S612, the control unit 101 notifies the smart device 200 via the communication unit 108 of a block data reception OK notification. If the size of the received block data is smaller than the size of the block data to be received, in S611, the control unit 101 notifies the smart device 200 via the communication unit 108 that block data reception is NG, and prompts the smart device 200 to resend the block data that failed in the previous reception process.
[0082] In S613, the control unit 101 determines whether or not reception of all partial data of the image file of interest has been completed. If the control unit 101 determines that reception is incomplete, the process returns to S602 and the control unit 101 receives subsequent data. On the other hand, if the control unit 101 determines that reception of all partial data of the image file of interest has been completed, the control unit 101 notifies the smart device 200 via the communication unit 108 that reception of one image file has been completed (S614).
[0083] The processing of the control unit 101 of the digital camera 100 has been described above.
[0084] <Processing flow of smart device 200> Next, the process of the control unit 201 of the smart device 200 to transmit one image file to the digital camera 100 (corresponding to S305 to S313 in FIG. 3) will be described with reference to the flowchart in FIG.
[0085] When the digital camera 100 is in an image reception standby state, the user selects an image to be transferred on an application in the smart device and presses the send button, which starts the image transfer procedure.
[0086] In S701, the control unit 201 of the smart device 200 transmits an image data transfer preparation request, including the size of the image file to be transferred, to the digital camera 100 via the short-range wireless communication unit 212 using communication with Ack. Upon receiving this, the control unit 101 of the digital camera 100 transmits a message indicating that reception preparation is OK, including the data size of one block, using communication with Ack. In S702, the control unit 201 acquires the block data size included in the received message.
[0087] In S703, the control unit 201 transfers one block of data using Ack-less communication via the short-range wireless communication unit 212. In S703, the block data transmission process shown in S704 for transmitting partial data of the image data file to be transferred using Write without Response is repeatedly executed until the block data size is reached. When the transmission of one block of data is completed, the control unit 201 advances the process to S705.
[0088] In S705, the control unit 201 transmits a block data transmission completion notification to the digital camera 100 using communication with Ack via the short-range wireless communication unit 212. Next, in S706, the control unit 201 receives a block data reception result notification from the digital camera 100 via the short-range wireless communication unit 212 using communication with Ack.
[0089] Then, in S707, the control unit 201 determines whether the block data reception result from the digital camera 100 was OK or NG. If the control unit 201 determines that the reception result indicates NG, this means that the block data was not transferred correctly to the digital camera 100, so the control unit 201 returns to S703 and resends the same block data. If the control unit 201 determines that the block data reception result from the digital camera 100 indicates OK, the process proceeds to S708.
[0090] In S708, the control unit 201 determines whether or not transmission of all partial data of the image file of interest has been completed. If the control unit 201 determines that transmission has not been completed, the process returns to S703 to transmit the next block of data. On the other hand, if the control unit 201 determines that data transfer of all blocks of the image file of interest has been completed, the process proceeds to S709. In S709, the control unit 201 transmits an image data transmission completion notification to the digital camera 100 via the short-range wireless communication unit 212 using communication with Ack. Then, in S710, the control unit 201 receives an Ack, i.e., an image data reception completion notification, from the digital camera 100 via the short-range wireless communication unit 212.
[0091] This concludes the description of the processing flow of the smart device 200.
[0092] As described above, by dynamically adjusting the block data size, even when image data is being received, it is possible to continue receiving the image data while minimizing the effect on high-priority processing.
[0093] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and various modifications and changes are possible within the scope of the gist of the present invention.
[0094] In the above embodiment, a smart device is used as an example of the electronic device that supplies image data, and a digital camera is used as an example of the electronic device that receives image data, but the types of these two devices do not matter, and they may be the same type of device. In short, the electronic device that receives data may be any device that may have an increased load due to a type of processing that should be prioritized other than the processing related to data reception / storage processing.
[0095] In the embodiment, in the flowchart of FIG. 6, the digital camera selects one of two types of block sizes depending on whether or not a video image is being captured. However, when there are many operation modes with different loads, the block size may be changed to a unique one for each operation mode. In other words, the block size is made smaller for an operation mode with a higher load. In this way, the throughput related to receiving image data can be maintained at a maximum without affecting the operation mode being executed.
[0096] (Other Examples) 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.
[0097] The disclosure of this specification includes the following electronic device, and a control method and program thereof. (Item 1) An electronic device having a communication means capable of communicating using an Ack communication message and an Ackless communication message, a data amount receiving means for receiving information indicating the amount of data to be transferred from a data source external device by using the Ack communication message; a determining means for determining a data size to be received using the no-Ack message and notifying the external device of a message indicating the determined data size using the Ack message; a data receiving means for repeating the data receiving process for one set of data until data equivalent to the data amount received by the data amount receiving means is received, when the data receiving process for one set of data includes receiving data equivalent to the data size determined by the determining means from the external device as the no-Ack communication message and transmitting a message indicating whether or not the data size has been received as the Ack message to the external device; The determining means includes means for changing the data size in accordance with a load on the electronic device when the data receiving means is performing a data receiving process. 1. An electronic device comprising: (Item 2) The communication means is a communication means conforming to Bluetooth (trademark) Low Energy, The determining means determines, as the data size, a value that is an integer multiple of a characteristic data length used in attribute communication. Item 1, the electronic device according to item 1 (Item 3) 3. The electronic device according to item 1 or 2, wherein the determining unit reduces the data size as the load on the electronic device increases. (Item 4) The data receiving means includes: a determination means for determining whether or not the data size has been received when an Acknowledgement message indicating completion of transmission of the data size is received from the external device; When the result of the judgment by the judging means indicates that the data of the data size has been received, information indicating that the data of the next data size can be received is When the result of the judgment by the judgment means indicates that the data size cannot be received, information indicating that a retransmission of data of the immediately preceding data size is requested is provided, The Acknowledged message is transmitted to the external device. 4. The electronic device according to any one of items 1 to 3. (Item 5) The electronic device is an imaging device, The data size determination means, in response to an instruction for imaging from a user while the data receiving means is performing a data reception process from the external device, changes the data size to a preset value smaller than the size before the instruction for imaging is given. 5. The electronic device according to any one of items 1 to 4. (Item 6) A method for controlling an electronic device having a communication means capable of communicating using an Ack communication message and an Ackless communication message, comprising: a data amount receiving step of receiving information indicating the amount of data to be transferred from the external device that is a data source by using the Ack communication message; a determining step of determining a data size to be received using the no-Ack message and notifying the external device of a message indicating the determined data size using the Ack message; a data receiving step of repeating the data receiving step for one set of data until data equivalent to the amount of data received in the data amount receiving step is received, when receiving data equivalent to the amount of data determined in the determining step from the external device as the no-ACK communication message and transmitting a message indicating whether or not the data equivalent to the amount of data has been received as the Ack message to the external device is one set of data receiving processing, The determining step includes a step of changing the data size in accordance with a load on the electronic device when the data receiving step is performing a data receiving process. 23. A method for controlling an electronic device comprising: (Item 7) A program that, when read and executed by a computer, causes the computer to function as each of the means possessed by the device described in any one of items 1 to 5.
[0098] 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]
[0099] 100... digital camera, 101... control unit, 102... imaging unit, 103... non-volatile memory, 104... working memory, 105... operation unit, 106... display unit, 107... storage medium, 108... communication unit, 200... smart device, 201... control unit, 204... working memory, 210... storage medium, 212... short-range wireless communication unit
Claims
1. An electronic device having a communication means capable of communicating using an ACK-containing communication message and an ACK-less communication message, a data amount receiving means for receiving information indicating the amount of data to be transferred from the external device that is a data source, using the Ack-included communication message; a determining means for determining a data size to be received using the message without an Ack and notifying the external device of a message indicating the determined data size using the message with an Ack; a data receiving means for repeating the data receiving process for one set of data until the data amount received by the data amount receiving means is received, when receiving data of the data size determined by the determining means from the external device as the communication message without ACK and transmitting a message to the external device indicating whether or not the data size has been received as the message with ACK is one set of data receiving process, The determining means includes means for changing the data size in accordance with a load on the electronic device when the data receiving means is performing a data receiving process. An electronic device characterized by:
2. The communication means is a communication means conforming to Bluetooth (trademark) Low Energy, The determining means determines a value that is an integral multiple of a characteristic data length used in attribute communication as the data size.
2. The electronic device according to claim 1, wherein the electronic device is a semiconductor device.
3. 2. The electronic device according to claim 1, wherein the determining unit reduces the data size as the load on the electronic device increases.
4. The data receiving means a determination means for determining whether or not the data size has been received when an Ack message indicating completion of transmission of the data size has been received from the external device; If the result of the determination by the determination means indicates that the data of the data size has been received, information indicating that the next data size of data can be received is If the result of the determination by the determination means indicates that the data size has not been received, information indicating that a retransmission of the immediately preceding data size is requested is provided, The message with Ack is transmitted to the external device.
2. The electronic device according to claim 1, wherein the electronic device is a semiconductor device.
5. the electronic device is an imaging device, The determining means, in response to an instruction for image capture from a user while the data receiving means is performing a data reception process from the external device, changes the data size to a preset value smaller than the size before the instruction for image capture was given.
2. The electronic device according to claim 1, wherein the electronic device is a semiconductor device.
6. A method for controlling an electronic device having a communication means capable of communicating using an ACK-containing communication message and an ACK-less communication message, comprising: a data amount receiving step of receiving information indicating the amount of data to be transferred from the external device that is a data source, using the communication message with Ack; a determining step of determining a data size to be received using the message without an Ack and notifying the external device of a message indicating the determined data size using the message with an Ack; a data receiving step of repeating the data receiving step for one set of data until the data amount received in the data amount receiving step is received, when receiving data of the data size determined in the determining step from the external device as the communication message without ACK and transmitting a message indicating whether or not the data size has been received as the message with ACK to the external device is one set of data receiving processing, The determining step includes a step of changing the data size in accordance with a load on the electronic device when the data receiving step is performing data reception processing. A method for controlling an electronic device.
7. A program that, when read and executed by a computer, causes the computer to execute each step of the method for controlling an electronic device according to claim 6.