Image management device, control method for image management device, and computer program
Patent Information
- Application Number
- JP2023142031
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-03-13
- Estimated Expiration
- 2043-09-01
AI Technical Summary
【0010】 本発明によれば、画像解析装置と通信を行う画像管理装置において、解析要求のリトライの失敗を減らすことが可能になる。
Smart Images

Figure 2025035166000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image management device that manages images transferred from an image capture device, an image analysis device that analyzes images, a judgment and control method for determining subsequent processing based on the results of analysis processing, and a computer program. [Background technology]
[0002] One software system development technique is "microservices architecture," in which application functions are divided into small "services" and each service is coordinated to run the system. Each service runs in an independent process and is coordinated by remote communication using lightweight mechanisms such as RESTful API. For example, even if a failure occurs in a specific service, the impact can be limited locally, which has the advantage of improving the fault tolerance of the entire application.
[0003] In recent years, applications that use this microservice architecture have become more and more popular. For example, even in image management services that manage images, there are applications that are configured as separate services that perform functions such as analyzing images and transferring images to external storage or SNS. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent Publication No. 2022-109916 Summary of the Invention [Problem to be solved by the invention]
[0005] In applications built on the microservices architecture described above, one service calls another service by communicating via a RESTful API or similar. Calls between services can fail for a variety of reasons, including incorrect settings on the request side, network errors, and failures in the called service. If a service call fails, the application's functions cannot be provided, causing inconvenience to users. For this reason, it is desirable to prevent call failures between services as much as possible.
[0006] Patent Document 1 discloses a technology that increases the likelihood of obtaining a printed product while reducing the burden on users in a printing system that has multiple processing paths between a printer and an information processing device. If processing on the first processing path fails, the system switches to the second processing path and retries printing, thereby reducing the number of print failures.
[0007] However, in Patent Document 1, a retry process is executed when a process fails, regardless of the nature of the failure. Depending on the cause of the failure, there may be cases where the process fails again even if a retry process is executed.
[0008] The present invention has been made to solve the above-mentioned problems, and has an object to reduce failures in retrying an analysis request in an image management device that communicates with an image analysis device. [Means for solving the problem]
[0009] In order to solve the above problems, the present invention is an image management device that manages images, characterized in having a transmitting means for transmitting an image analysis request to an image analysis device that analyzes the image, a receiving means for receiving the analysis result from the image analysis device, a result code determination means for determining a processing result from a result code included in the analysis result, and a subsequent processing determination means for determining subsequent processing related to the analysis of the image based on the result code determination means. Effect of the Invention
[0010] According to the present invention, it is possible to reduce failures in retrying an analysis request in an image management device that communicates with an image analysis device. [Brief description of the drawings]
[0011] [Figure 1] Overall configuration diagram [Diagram 2] FIG. 1 illustrates the hardware configuration of an image management device. [Diagram 3] FIG. 2 is a diagram showing the functional configuration of an image management device. [Figure 4] An example of a result code and information associated with the result code [Diagram 5] A diagram showing the process flow from image transfer to saving the analysis results. [Figure 6] An example of information stored in the analysis image management unit [Figure 7] An example of response information from an image analyzer [Figure 8] An example of information stored in the job management unit DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, the present embodiment will be described in detail with reference to the accompanying drawings. Note that the configurations shown in the following embodiments are merely examples, and the present invention is not limited to the configurations shown in the drawings.
[0013] In this embodiment, an example is described in which an image management device that manages images uploaded from a shooting device communicates with an image analysis device that performs image analysis processing, and determines subsequent processing based on a result code received along with the analysis processing results.
[0014] <Overall composition> The overall configuration of this embodiment will be described with reference to FIG.
[0015] As shown in the figure, the overall configuration includes an image capturing device 101, an image management device 102, and an image analysis device 103. In addition, each of the components is connected via a network 104.
[0016] The photographing device 101 is an information processing device such as a camera, a mobile phone, a smartphone, or a tablet.
[0017] The image management device 102 manages the images transferred from the photographing device 101 .
[0018] The image analysis device 103 accepts the image analysis process and executes the image analysis when a processing request for image analysis is made for an image managed by the image management device 102. After the image analysis process is completed, the image analysis device 103 returns the analysis result to the image management device 102.
[0019] The above is the overall configuration of this embodiment.
[0020] <Hardware configuration> The hardware configuration of the image management device 102 in this embodiment will be described with reference to FIG.
[0021] As shown in the figure, the computer includes at least a CPU 201 , a RAM 202 , a ROM 203 , a network interface 204 , an external storage device 205 , a display device 206 , and an input device 207 .
[0022] The CPU 201 controls the operation of each unit constituting the image management device 102, and is the main body that executes various processes to be described later as those performed by the image management device 102.
[0023] The RAM 202 is a memory that temporarily stores data and control information, and serves as a work area used when the CPU 201 executes various processes.
[0024] The ROM 203 stores fixed operation setting values, operation programs, and the like of the image management device 102.
[0025] The network interface 204 provides a function for connecting to a network and communicating with the network, and allows the image management device 102 to send and receive data to and from external devices.
[0026] The external storage device 205 is a device that stores data, and has an interface that accepts I / O commands for reading and writing data. The external storage device 205 may be a hard disk drive (HDD), a solid state drive (SSD), an optical disk drive, a semiconductor storage device, or other storage devices. The external storage device 205 stores computer programs and data for causing the CPU 201 to execute each process, which will be described later as being performed by the image management device.
[0027] The display device 206 is, for example, an LCD (Liquid Crystal Display) or the like, and displays necessary information to the user.
[0028] The input device 207 is, for example, a keyboard, a mouse, a touch panel, etc., and receives necessary input from the user.
[0029] <Functional configuration> The configuration of the image management device 102 in this embodiment will be described with reference to FIG.
[0030] The image management device 102 in this embodiment has an image management unit 301, a transmission unit 302, a reception unit 303, a result code judgment unit 304, a subsequent processing decision unit 305, a retry control unit 306, an analysis image information management unit 307, a job management unit 308, and an analysis result management unit 309.
[0031] The image management unit 301 stores images. Images transferred from the image capturing device 101 are managed by this image management unit.
[0032] The transmission unit 302 transmits to the image analysis device 103 a processing request for analyzing the images managed by the image management unit.
[0033] The receiving unit 303 receives the results of the image analysis process from the image analysis device 102 .
[0034] A result code determination unit 304 determines whether the process ended normally or abnormally by referring to the result code included in the processing result received by the receiving unit, and if the process ended abnormally, further determines the cause category.
[0035] The subsequent process determination unit 305 determines the subsequent process based on the result of the determination by the result code determination unit.
[0036] The retry control unit 306 determines whether or not to retry depending on the cause classification in the subsequent process determination unit. This retry control unit also determines whether the retry limit set in the system has been reached.
[0037] The analysis image information management unit 307 manages information about the image to be analyzed when an image analysis request is made to the image analysis device 103 .
[0038] The job management unit 308 manages the association between the image to be analyzed and the analysis process when an image analysis request is made to the image analysis device 103. In this embodiment, the analysis process for one image is called a "job", and a job ID that uniquely identifies the job is assigned each time an analysis process is executed.
[0039] The analysis result management unit 309 manages the analysis results received from the image analysis device 103 .
[0040] Next, the result code and information associated with the result code in this embodiment will be described with reference to Fig. 4. The result code is an identification code such as A01-002, and is associated with the cause of failure or the category of the cause of failure.
[0041] 401 is a result code included in the analysis result received from the image analysis device 103 .
[0042] A field 402 indicates the result of the image analysis process, and takes the value of either "normal end" or "abnormal end."
[0043] 403 indicates the cause of the processing failure and indicates the details of the cause of the failure. If the processing result is "successful completion", it has no value.
[0044] A cause category 404 indicates a category for classifying each failure cause. It takes one of the following values: "sender-related," "receiver-related," and "communication path-related."
[0045] The sender-related failure cause category indicates a failure caused on the sender side, and examples of failure causes include missing required parameters, incorrect (invalid) request headers, invalid parameters, and requests not using a specified method.
[0046] The failure cause category "attributed to communication path" indicates a failure caused by the communication path, and causes of failure include a timeout error.
[0047] The receiver side cause of the failure cause category indicates a failure caused on the receiver side, and causes of failure include failure to download the image, the image being in an unsupported format, the image being corrupted, a server error, and the like.
[0048] <Processing flow> In this embodiment, a series of processing steps from when an image is transferred from the photographing device 101 to the image management device 102, when the image analysis device 103 executes analysis processing, and when the image management device 102 stores the analysis results will be described.
[0049] 5 is a flowchart showing a series of steps from when an image is transferred from the photographing device 101 to the image management device 102, when the image analysis device 103 executes analysis processing, until the image management device 102 stores the analysis results. Each step will be explained below with an S added to the beginning of each reference number.
[0050] S501 is a process for transferring an image captured by the imaging device 101 to the image management device 102. This process causes the image to be stored in the image management unit 301. When the image is stored in the image management device 102, an image ID that uniquely identifies the image is assigned. The image analysis process is triggered by the image being stored. First, a process is performed to write information about the image to be analyzed in the analysis image information management unit 307 (S502). An example of the information stored in the analysis image information management unit 307 at this time is shown in FIG. 6.
[0051] It has an image ID 601 of the analysis image, a user ID 602 which is an identifier of the user who is the owner of the image, an image storage location 603 which indicates the storage location of the image, and an image analysis start time 604 which is the time when image analysis is to start. The image storage location 603 is a path on cloud storage or a path of a storage area in the image management device 102, etc. The time when writing was performed in the analysis image information management unit 307 is written as the image analysis start time 604.
[0052] Next, in S503, a signed URL of the image to be analyzed is issued. In this embodiment, the signed URL of the image is sent to the image analyzing device as a request parameter of the image analysis request, and the image is downloaded by the image analyzing device accessing the URL. The method of transferring the image is not limited to the above, and may be a method of directly transmitting image data or a method of placing the image in a storage area accessible by the image analyzing device.
[0053] S504 is a process for requesting the image analyzing device 103 to perform analysis processing. The request parameters include the signed URL issued in S503 and a notification destination (endpoint) for receiving the analysis results. In this embodiment, when an analysis processing request is made to the image analyzing device 103, the image analyzing device 103 responds with two types of responses: a synchronous response and an asynchronous response that returns the analysis results after the analysis processing is completed. Each response includes a job ID and a result code. FIG. 7 shows an example of response information from the image analyzing device 103. (a) to (d) are examples of a synchronous response and an asynchronous response of "normal completion" and "abnormal completion", respectively.
[0054] When a synchronous response is received from the image analysis device 103 (S505), the result code included in the response is judged (S506). In S507 and S508, the result code in Fig. 4 is referenced to judge whether the image analysis process was successful (normal end) or failed (abnormal end). If it further fails, the subsequent process is determined from the failure cause category 404. If the failure cause category is due to the sending side, proceed to S509, otherwise proceed to S508 (S507). If the failure cause category is due to the receiving side or the communication path, proceed to S510, otherwise proceed to S513 (S508).
[0055] In this embodiment, S509 and S510 execute a process of temporarily copying an image stored in image management device 102 to another area in image management device 102. When investigating an image for which image analysis processing has failed, it may happen that an image to be investigated no longer exists due to a user operation to delete an image stored in image management device 102, a user withdrawal, etc. In order to make it possible to investigate an image for which analysis has failed even in such a case, if an error occurs in image analysis processing, a process of temporarily copying an image to another area is executed. At this time, the process contents of S509 and S510 may be different; for example, in S509, a process may be executed to notify an administrator of image management device 102 that an error has occurred.
[0056] After the process of S510, a retry process is performed. In this embodiment, the upper limit of retry times for analysis process for each image is set to three, and if the analysis process fails after three retries, the analysis process is determined to be a "failure." In S511, the number of retries is increased by one, and it is determined whether the number of retries has exceeded the upper limit of three (S512). If it is determined in S512 that the upper limit has not been exceeded, an image analysis request is again sent to the image analysis device 103 in S504.
[0057] S513 is a process performed when the result code of the synchronization response is determined to be "successful," and writes information related to the image and the job to the job management unit 308. An example of the information stored in the job management unit 308 at this time is shown in FIG.
[0058] It has a processing count 803 that indicates the number of times analysis processing has been performed for a combination of job ID 801 and image ID 802. The initial value of the processing count 803 is "1", and the processing count increases with each retry, and when the retry count has reached the upper limit of three, the processing count becomes "4".
[0059] After requesting the analysis process in S504, the image analysis device 103 accesses the received signed URL, downloads the image, and starts the analysis process. When the analysis process is completed, the analysis result is sent as an asynchronous response to the received result notification destination. In S514, the image management device 102 receives the asynchronous response from the image analysis device 103. The job ID included in the received asynchronous response is read from the job management unit 308, and image information and the number of retries are obtained (S515). The result code included in the asynchronous response is also determined (S516). As in S507 and S508, in S517 and S518, the result code in FIG. 4 is referenced to determine whether the image analysis process was successful (normal end) or failed (abnormal end).
[0060] If the result code in the asynchronous response is also "normal completion" and the analysis process is "successful", in S519 the analysis result is stored in the analysis result management unit 307. The received analysis result contains information such as that shown in FIG. 7(c).
[0061] In this embodiment, the number of retries per image is controlled in a series of analysis processes (S504 to S518). For example, assume that analysis process of image ID=002 is started. When the result code of the synchronous response in S508 is "Yes" and a retry is executed, the number of retries becomes "1" (S511). If the result code of the synchronous response is "success" after S504 to S508, the process proceeds to S513, and the number of processing times is written as "2" in the job management unit 308 (job ID=J003 in FIG. 8). After that, when the result code of the asynchronous response in S518 is "Yes" and a retry is executed again, the number of retries becomes "2" (S511). If the result code of the synchronous response is "success" again, the number of processing times is written as "3" in the job management unit 308 in S513 (job ID=J004 in FIG. 8). Similarly, if the result code of the asynchronous response in S518 is again "Yes" and a retry is performed again, the number of retries becomes "3" (S511). If the result code of the synchronous response is repeatedly determined to be "successful", the number of processing times is written to the job management unit 308 as "4" in S513 (job ID=J005 in FIG. 8). Finally, if the result code of the asynchronous response in S518 is again determined to be "Yes", the number of retries becomes "4" (S511), the determination in S512 becomes "Yes", and the analysis process becomes a "failure".
[0062] The above is the flow of a series of processes from when an image is transferred from the photographing device 101 to the image management device 102, when the image analysis device 103 executes the analysis process, and when the image management device 102 stores the analysis results.
[0063] In this embodiment, an example has been shown in which one analysis process is requested of the image analysis device 103, but a configuration in which multiple calls are made in multiple stages may also be used. In that case, a result code for the processing result is issued in the same manner for each of the first analysis process (e.g., object analysis process) and the second analysis process (e.g., face recognition process), and the subsequent processing is determined.
[0064] In this way, in the image management device 102 and image analysis device 103 of this embodiment, the failure cause classification is determined and the subsequent processing is decided based on the result code received together with the image analysis result. This makes it possible to reduce failures in the analysis processing without unnecessary retries when analyzing an image.
[0065] (Other embodiments) The present invention can also be realized by executing the following process: That is, software (programs) that realize the functions of the above-described embodiments are supplied to a system or device via a network or various storage media, and the computer (or CPU, MPU, etc.) of the system or device reads and executes the programs. [Explanation of symbols]
[0066] 101 Imaging Device 102 Image management device 103 Image analysis device 201 CPU 202 RAM 203 ROM 204 Network Interface 205 External storage device 206 Display device 207 Input Device 301 Image Management Department 302 Transmitter 303 Receiving unit 304 Result Code Judgment Section 305 Subsequent Processing Decision Unit 306 Retry control unit 307 Analysis Image Information Management Department 308 Job Management Department 309 Analysis results management department
Claims
1. An image management device that manages images, a transmission means for transmitting an image analysis request to an image analysis device that analyzes the image; A receiving means for receiving an analysis result from the image analyzing device; a result code determination means for determining a processing result from a result code included in the analysis result; a subsequent process determining means for determining a subsequent process related to the analysis of the image based on the result code determining means; An image management device comprising:
2. The image management device described in claim 1, characterized in that when the result code determination means determines that the image analysis has failed, it classifies the failure of the image analysis from the result code into one of a failure caused by the sender of the image analysis request, a failure caused by the communication path, or a failure caused by the receiver of the image analysis request.
3. 2. The image management device according to claim 1, wherein said subsequent process determining means includes a retry control means for determining whether or not to retry said image analysis request.
4. The image management device according to claim 3, characterized in that the retry control means retries the image analysis request when the image analysis failure is classified as a failure caused by the communication path or a failure caused by the receiving side of the image analysis request.
5. 4. The image management device according to claim 3, wherein the retry control means does not retry the image analysis request when the failure in the image analysis is classified as a failure caused by the sender of the image analysis request.
6. 4. The image management device according to claim 3, wherein when said retry control means determines not to retry the image analysis request, said subsequent process decision means decides to notify an administrator as the subsequent process.
7. The image management device according to claim 2, characterized in that the failure caused by the sender of the image analysis request is at least one of the following: missing required parameters, invalid request header, invalid parameter type, non-valid parameters, and non-request using a specified method.
8. 3. The image management device according to claim 2, wherein the failure caused by the communication path is a timeout error.
9. The image management device according to claim 2, characterized in that the failure caused by the receiver of the image analysis request is at least one of the following: failure to download the image, failure to upload the results, the image being in an unsupported format, the image being corrupted, and a server error.
10. 2. The image management device according to claim 1, wherein the result code is an identification code of A01-002, and is configured to be associated with a cause of failure or a category of cause of failure.
11. 2. The image management device according to claim 1, wherein said subsequent process determining means determines that the subsequent process is to copy the image when said result code determining means determines that the process has failed.
12. An image management device that manages images, a transmission means for transmitting an image analysis request to an image analysis device that analyzes the image; A receiving means for receiving an analysis result from the image analyzing device; a result code determination means for determining a processing result from a result code included in the analysis result; a subsequent process determining means for determining a subsequent process related to the analysis of the image based on the result code determining means; 2. A method for controlling an image management device comprising:
13. The computer is an image management device that manages images, a transmission means for transmitting an image analysis request to an image analysis device that analyzes the image; A receiving means for receiving an analysis result from the image analyzing device; a result code determination means for determining a processing result from a result code included in the analysis result; a subsequent process determining means for determining a subsequent process related to the analysis of the image based on the result code determining means; 2. A computer program for causing an image management device to function as an image management device, comprising:
Citation Information
Patent Citations
Data processing apparatus, data processing program, and data processing system
JP2008293282A
Document analysis system, document analyzer, document analysis method, and program
JP2016144001A
Program and printing system
JP2022109916A