Processing method and processing system

The method optimizes data transmission from edge devices to cloud servers by adaptively sending compressed data based on confidence levels, ensuring high inference accuracy and reducing bandwidth usage.

JP7552911B2Active Publication Date: 2024-09-18NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023534526
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-07-14
Publication Date
2024-09-18
Estimated Expiration
2041-07-14

AI Technical Summary

Technical Problem

Existing systems face challenges in optimizing the amount of information sent to the cloud side for inference processing, leading to either low reliability of inference results or excessive transmission capacity usage.

Method used

A method and system that performs inference processing in both edge and server devices, where the edge device transmits irreversibly compressed data based on confidence levels, allowing for adaptive data transmission and subsequent inference in the server device to maintain high accuracy.

Benefits of technology

Optimizes data transmission while maintaining high accuracy of inference results by adaptively sending additional data from the edge device to the server device when needed, reducing unnecessary bandwidth usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007552911000014
    Figure 0007552911000014
  • Figure 0007552911000008
    Figure 0007552911000008
  • Figure 0007552911000016
    Figure 0007552911000016
Patent Text Reader

Abstract

In this processing method, a processing system (100) performs inference processing at an edge device (20) and a server device (30), the method including a first transmission step in which the edge device (20) transmits first data based on data to be inferred to a server device that performs a first inference, and a second transmission step in which the edge device (20), in accordance with a request from the server device (30), transmits second data based on the data to be inferred to an execution unit that performs a second inference. The request from the server device (30) is made if the result of the first inference performed at the server device (30) is at or below a predetermined confidence level.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a processing method and a processing system. [Background technology]

[0002] A technology has been proposed that adaptively divides inference processing between the edge and the cloud. For example, in the technology described in Non-Patent Document 1, if the confidence level of the inference result at the edge is equal to or lower than a predetermined value, data is sent to the cloud side and inference is performed in the cloud. On the other hand, in the technology described in Non-Patent Document 1, if the confidence level exceeds a predetermined value, the result of the inference performed at the edge is returned to the user. [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] Shohei Enomoto, Takeharu Eda, “Accelerating Deep Learning Inference Using Model Cascade”, IEICE Technical Report vol. 119, Number 481, 2020., [online], [Retrieved June 30, 2021], Internet <URL:https: / / ipsj.ixsq.nii.ac.jp / ej / index.php?active_action=repository_view_main_item_detail&page_id=13&block_id=8&item_id=204109&item_no=1> Summary of the Invention [Problem to be solved by the invention]

[0004] However, there is still a problem as to how much information should be sent to the cloud side when it is decided to perform inference on the cloud side. Here, since the transmission path is finite, it is desirable to send as little information as possible to the server device on the cloud side, but if there is insufficient information, the confidence level of the inference result on the cloud side will be low. On the other hand, if more information than is necessary and sufficient is sent to the cloud side, the confidence level of the inference result on the cloud side will be high, but more transmission capacity than necessary will be used.

[0005] The present invention has been made in consideration of the above, and aims to provide a processing method and processing system that can optimize the amount of transmission from an edge device to a cloud-side server device while maintaining high accuracy of the inference results in the cloud-side server device. [Means for solving the problem]

[0006] In order to solve the above-mentioned problems and achieve the object, the processing method of the present invention is a processing method for performing inference processing in an edge device and a server device, and includes a first transmission step in which the edge device transmits first data based on data to be inferred to a server device that performs the first inference, and a second transmission step in which the edge device transmits second data based on the data to be inferred to an execution unit that performs the second inference in response to a request from the server device, and is characterized in that the request from the server device is made when the result of the first inference performed in the server device is below a predetermined certainty.

[0007] Furthermore, the processing system according to the present invention is a processing system that performs inference processing in an edge device and a server device, wherein the server device has an inference unit that, when receiving first data based on data to be inferred from the edge device, performs a first inference based on the first data using a first model, and a request unit that, when the result of the inference is equal to or lower than a predetermined degree of certainty, requests second data based on the data to be inferred from the edge device, and is characterized in that, when receiving the second data, the inference unit performs a second inference based on the second data using a second model. Effect of the Invention

[0008] According to the present invention, it is possible to optimize the amount of data transmitted from an edge device to a cloud-side server device while maintaining high accuracy of the inference results in the cloud-side server device. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a diagram for explaining an outline of a processing method of the processing system according to the first embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of a configuration of the processing system according to the first embodiment. [Diagram 3] FIG. 3 is a diagram illustrating an example of a processing flow in the processing system illustrated in FIG. [Figure 4] FIG. 4 is a sequence diagram showing the procedure of the processing method according to the first embodiment. [Diagram 5] FIG. 5 shows the results of performing inference only once using DNN-1. [Figure 6] FIG. 6 shows the results of two-stage inference using DNN-1 and DNN-2. [Figure 7] FIG. 7 shows the results of two-stage inference using DNN-1 and DNN-2. [Figure 8] FIG. 8 shows the results of two-stage inference using DNN-1 and DNN-2. [Figure 9] FIG. 9 is a diagram illustrating an example of a configuration of a processing system according to the first modification of the first embodiment. In FIG. [Figure 10] FIG. 10 is a diagram illustrating an example of a configuration of a processing system according to the second modification of the first embodiment. In FIG. [Figure 11] FIG. 11 is a sequence diagram showing the procedure of a processing method according to the second modification of the first embodiment. [Figure 12] FIG. 12 is a diagram illustrating an example of a configuration of a processing system according to the second embodiment. As shown in FIG. [Figure 13]FIG. 13 is a sequence diagram showing the procedure of a processing method according to the second embodiment. [Figure 14] FIG. 14 is a diagram illustrating an example of a configuration of a processing system according to a modification of the second embodiment. In FIG. [Figure 15] FIG. 15 is a sequence diagram showing the procedure of a processing method according to a modification of the second embodiment. [Figure 16] FIG. 16 is a diagram illustrating an example of the configuration of a processing system according to the third embodiment. As shown in FIG. [Figure 17] FIG. 17 is a sequence diagram showing the procedure of a processing method according to the third embodiment. [Figure 18] FIG. 18 is a diagram illustrating an example of a computer that realizes an edge device, a server device, and a setting device by executing a program. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to this embodiment. In addition, in the description of the drawings, the same parts are indicated by the same reference numerals.

[0011] [Embodiment 1] A first embodiment will be described. In the first embodiment, a processing system that performs inference processing using a trained model will be described. Note that the processing system of the first embodiment will be described taking as an example a case where a DNN (Deep Neural Network) is used as a model used in the inference processing. In the processing system of the first embodiment, any neural network may be used, and signal processing with a predetermined amount of calculation may be used instead of the trained model.

[0012] The processing system of the first embodiment is premised on the premise that inference is performed stepwise in a server device on the cloud side, rather than in edge devices which are IoT devices and various terminal devices. When data to be inferred is input to the edge device, the edge device transmits the data to the server device, and when the confidence level of the inference result is less than a predetermined value as a result of the inference, the server device requests additional information from the edge device and performs the inference again.

[0013] [Outline of the processing method according to the first embodiment] Fig. 1 is a diagram for explaining an outline of a processing method of the processing system according to the first embodiment. As shown in Fig. 1, when data to be inferred is input, the edge device transmits first data based on the data to be inferred to the server device. Specifically, the edge device lossily compresses the input data ((1) in Fig. 1) and transfers it as the first data.

[0014] The server device decodes the transferred first data and performs inference (first inference) in DNN-1 ((2) in FIG. 1). The server device calculates the confidence of the inference result of DNN-1 ((3) in FIG. 1). The confidence is a value for determining whether the data to be processed should be further processed in DNN-2. The confidence is the degree of certainty that the inference result by DNN-1 is correct. For example, when DNN-1 performs object recognition, the confidence is the degree of certainty that the result of object recognition is correct. The confidence may also be the probability of the class of the object appearing in the image output by DNN-1, for example the probability of the highest class.

[0015] If the confidence level is equal to or higher than a predetermined threshold, the server device outputs the inference result of the DNN-1 ((4) in FIG. 1). If the confidence level is lower than the predetermined threshold, the server device requests the edge device to transmit additional second data ((5) in FIG. 1).

[0016] In response to a request from the server device, the edge device transmits second data based on the data to be inferred to the server device. Specifically, the edge device lossily compresses the input data at a compression rate lower than the compression rate for the first data ((6) in FIG. 1). At this time, the edge device subtracts redundant information also contained in the first data from the compressed data before transferring it as the second data ((7) in FIG. 1), thereby reducing the amount of data transmitted from the edge device to the server device. The second data does not include any area common to the first data.

[0017] The server device integrates the second data and the first data. Therefore, the second data and the first data, when used simultaneously, more accurately represent the data to be inferred than either one of the data. The server device inputs the integrated data to DNN-2 to perform inference (second inference) ((8) in FIG. 1), and outputs the inference result of DNN-2 ((9) in FIG. 1).

[0018] In this way, when the degree of certainty is less than a predetermined threshold, the server device retains the degree of certainty of the inference result by making an inference further using the additional second data transferred from the edge device.

[0019] [Processing system] 2 is a diagram illustrating an example of a configuration of a processing system according to embodiment 1. The processing system 100 according to embodiment 1 includes an edge device 20 and a server device 30.

[0020] The edge device 20 is an IoT device and various terminal devices that are located in a place that is physically and logically close to a user, and has fewer resources than the server device 30. The server device 30 is a device that is located in a place that is logically farther away than the edge device 20. The server device 30 and the edge device 20 are connected via a network N. The network N is, for example, the Internet.

[0021] The edge device 20 transmits first data based on data of an inference target (an image in the example of FIG. 2) to the server device. The edge device 20 transmits the first data obtained by quantizing the data of the inference target with a first quantization bit rate to the server device 30. The edge device 20 transmits second data based on the inference target to the server device in response to a request from the server device 30. When the edge device 20 receives a transmission request for second data from the server device 30, it transmits the second data obtained by quantizing the data of the inference target with a second quantization bit rate that is larger than the first quantization bit rate to the server device 30. The edge device 20 may transmit, as the second data, data obtained by subtracting overlapping data with the first data from data obtained by quantizing an input image with the second quantization bit rate.

[0022] The server device 30 adaptively performs inference processing on the data to be inferred transmitted from the edge device 20 using DNN-1 and DNN-2. The server device 30 inputs first data to DNN-1 and performs inference processing. When the confidence of the inference result of DNN-1 is less than a predetermined threshold, the server device 30 requests the edge device 20 to transmit second data. The server device 30 inputs the second data to DNN-2 and performs inference processing. In this embodiment, as an example, a case will be described in which DNN-1 and DNN-2 perform inference related to the same task.

[0023] The edge device 20 and the server device 30 are realized by loading a predetermined program into a computer or the like including a ROM (Read Only Memory), a RAM (Random Access Memory), a CPU (Central Processing Unit), etc., and the CPU executes the predetermined program. Also, so-called accelerators such as a GPU, a VPU (Vision Processing Unit), an FPGA (Field Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), or a dedicated AI (Artificial Intelligence) chip are also used. The edge device 20 and the server device 30 each have a NIC (Network Interface Card) or the like, and can communicate with other devices via electric communication lines such as a LAN (Local Area Network) or the Internet.

[0024] [Edge device] As shown in FIG. 2, the edge device 20 includes a quantization unit 21 and a subtraction unit 22.

[0025] The quantization unit 21 performs a first quantization process to generate first data by quantizing data of an inference target (e.g., an image) with a first quantization bit rate, and transmits the first data to the server device 30. Furthermore, upon receiving a transmission request for second data from the server device 30, the quantization unit 21 performs a second quantization process to quantize the data of an inference target with a second quantization bit rate that is larger than the first quantization bit rate.

[0026] The subtraction unit 22 generates second data by subtracting redundant information common to the first data from the quantized data quantized by the second quantization process, and transmits the second data to the server device 30. Note that the edge device 20 may quantize the first data and the second data, encode them, and transmit them to the server device 30.

[0027] [Server device] The server device 30 includes an inference unit 31 , a judgment unit 32 , and an integration unit 33 .

[0028] The inference unit 31 performs inference using trained DNN-1 and DNN-2. DNN-1 and DNN-2 include information such as model parameters. When the inference unit 31 receives first data, it restores (dequantizes) the first data, inputs it to DNN-1, and performs inference on the data to be inferred. When the inference unit 31 receives input of integrated data obtained by integrating the first data and the second data from the integration unit 33 (described later), it dequantizes the integrated data, inputs it to DNN-2, and performs inference on the data to be inferred.

[0029] In addition, DNN-1 and DNN-2 may dequantize the data. In addition, if DNN-1 and DNN-2 themselves are quantized, dequantization is not necessary. In addition, DNN-1 and DNN-2 may have different inference accuracy or may have the same inference accuracy. In addition, DNN-1 and DNN-2 may be models that have been retrained according to the number of quantization bits of the input data in order to further improve accuracy. In addition, DNN-2 may be omitted, and inference based on the first data or integrated data may be performed only by DNN-1.

[0030] The determination unit 32 calculates the confidence level of the inference result using DNN-1. If the confidence level is equal to or greater than a predetermined threshold, the determination unit 32 outputs the inference result using DNN-1. On the other hand, if the confidence level is less than the predetermined threshold, the determination unit 32 requests the edge device 20 to transmit additional second data. Then, if the inference is performed using DNN-2, the determination unit 32 outputs the inference result using DNN-2.

[0031] When the integration unit 33 receives the second data from the edge device 20, the integration unit 33 integrates the second data with the first data and outputs the integrated data to the inference unit 31.

[0032] [Processing flow] The following describes a process flow in the processing system 100. Fig. 3 is a diagram for explaining an example of a process flow in the processing system 100 shown in Fig. 2. In Fig. 3, for ease of explanation, the data to be inferred will be explained as 8-bit data "11100110".

[0033] When the edge device 20 receives the original data "11100110", it quantizes it into 3 bits, for example, and transmits the quantized data "111" to the server device 30 as the first data ((1) and (2) in FIG. 3).

[0034] In the server device 30, the first data "111" is dequantized to obtain "11100000" and then inputted to the DNN-1 to perform inference ((3) and (4) in FIG. 3). If the confidence level is equal to or higher than a predetermined threshold, the server device 30 outputs the inference result using the DNN-1. On the other hand, if the confidence level is less than the predetermined threshold, the server device 30 requests the edge device 20 to transmit additional second data.

[0035] When the edge device 20 receives a request to send the second data, the original data "11100110" is quantized, for example, into 6 bits to obtain "111001", and the common part "111" with the first data "111" is subtracted from the quantized data to obtain "001", which is then transmitted to the server device 30 as the second data ((5) to (7) in FIG. 3).

[0036] The server device 30 integrates the first data "111" and the second data "001", and inputs the integrated data "111001" dequantized to "11100100" into the DNN-2 to perform inference ((8) to (10) in FIG. 3). The server device 30 outputs the inference result of the DNN-2.

[0037] [Processing system procedure] FIG. 4 is a sequence diagram showing the procedure of the processing method according to the first embodiment.

[0038] As shown in FIG. 4, first, when the edge device 20 receives input of data to be inferred (e.g., an image) (step S1), the quantization unit 21 performs a first quantization process to generate first data by quantizing the data to be inferred with a first quantization bit rate (step S2), and transmits the first data to the server device 30 (steps S3 and S4).

[0039] In the server device 30, the inference unit 31 inputs the first data to the DNN-1 and performs inference (step S5). When the inference result of the DNN-1 is input (step S6), the judgment unit 32 calculates the confidence of the inference result using the DNN-1 (step S7). Then, the judgment unit 32 judges whether the confidence is equal to or greater than a predetermined threshold (step S8).

[0040] In the server device 30, if the confidence level is equal to or higher than a predetermined threshold (step S8: Yes), the determination unit 32 outputs an inference result using DNN-1 (step S9). On the other hand, if the confidence level is lower than the predetermined threshold (step S8: No), the determination unit 32 requests the edge device 20 to transmit additional second data (step S10).

[0041] When the edge device 20 receives a transmission request for the second data from the server device 30, the quantization unit 21 performs a second quantization process to quantize the data to be inferred with a second quantization bit rate (steps S11 and S12). The subtraction unit 22 generates second data by subtracting redundant information common to the first data from the quantized data quantized by the second quantization process (step S13), and transmits the second data to the server device 30 (step S14).

[0042] In the server device 30, the integration unit 33 integrates the received second data with the first data (step S15) and outputs the integrated data to the inference unit 31 (step S16). The inference unit 31 inputs the integrated data to DNN-2 to perform inference (step S17). The judgment unit 32 outputs the inference result using DNN-2 (steps S18 and S9).

[0043] [Effects of the embodiment] [Evaluation experiment] Here, ResNet-50 was used as DNN-1 and DNN-2 to evaluate the inference accuracy and the number of bits of data transmitted from the edge device 20 to the server device 30. Fig. 5 shows the results of performing inference only once using DNN-1. Figs. 6 to 8 show the results of performing two-stage inference using DNN-1 and DNN-2.

[0044] As shown in FIG. 5, the greater the number of quantization bits in the edge device 20, the higher the inference accuracy of DNN-1 becomes, but the number of bits of data transmitted from the edge device 20 to the server device 30 tends to increase.

[0045] Here, when a two-stage inference is performed based on the first data and the second data quantized with the first quantization bit rate set to 3, 4 or 5 and the second quantization bit rate set to 4, 5 or 6 (see FIG. 6), it is found that the two-stage inference shows higher accuracy when compared with a one-time inference performed using each data quantized with the quantization bit rate of 3, 4 or 5 (see FIG. 5). In addition, when the two-stage inference is performed (see FIG. 6), the number of bits of data transmitted from the edge device 20 to the server device 30 can be reduced compared with a one-time inference performed using each data quantized with the quantization bit rate of 4, 5 or 6 (see FIG. 5).

[0046] Therefore, according to embodiment 1, in two-stage inference in server device 30, by setting the second quantization bit rate to a bit rate greater than the first quantization bit rate and transmitting the first data and the second data, it is possible to improve the inference accuracy and optimize the amount of data transmitted from edge device 20 to server device 30.

[0047] 7 and 8, there is a tendency that the accuracy can be more stably maintained by making the second number of quantization bits about 2 bits larger than the first number of quantization bits. When applying the first embodiment, an evaluation like this example is performed, and the first number of quantization bits, the second number of quantization bits, and the confidence threshold value are set in a trade-off between the inference accuracy and the number of bits of data transmitted from the edge device 20 to the server device 30.

[0048] [First Modification of First Embodiment] In the first embodiment, the case where two-stage inference is performed in the server device has been described as an example, but multi-stage inference is also possible. Fig. 9 is a diagram showing an example of the configuration of a processing system according to a first modification of the first embodiment.

[0049] 9, the server device 30A executes multi-stage inference using i DNN-1 to DNN-i. The edge device 20 may perform quantization by sequentially increasing the number of quantization bits according to the number of data transmissions by the server device 30A.

[0050] The server device 30A has an inference unit 31A having i pieces of DNN-1 to DNN-i. The judgment unit 32 calculates the confidence of the inference results input in the order of DNN-1 to DNN-(i-1) and outputs the inference result whose confidence is equal to or greater than a predetermined threshold. When the inference result of DNN-i is input, the judgment unit 32 outputs this inference result. When the second data to the i-th data are input, the integration unit 33 integrates the first data with the second data to the i-th data input up to that point.

[0051] In this way, in the processing system 100A, by executing multi-stage inference using DNN-1 to DNN-i, it is possible to realize the maintenance of more stable inference accuracy.

[0052] [Modification 2 of the First Embodiment] Moreover, the second inference may be performed in an edge device. Fig. 10 is a diagram illustrating an example of a configuration of a processing system according to a second modification of the first embodiment.

[0053] As shown in FIG. 10, a processing system 100B according to the second modification of the first embodiment includes an edge device 20B and a server device 30B.

[0054] The edge device 20B includes a reception unit 23B that distributes input data to be inferred (an image in the figure) to a quantization unit 21 or an inference unit 24B, and an inference unit 24B that has a DNN-2 and performs a second inference.

[0055] The server device has an inference unit 31B and a judgment unit 32B. The inference unit 31B has DNN-1 and performs a first inference. If the confidence level of the first inference result using DNN-1 is equal to or higher than a predetermined threshold, the judgment unit 32B outputs the inference result using DNN-1. On the other hand, if the confidence level is less than the predetermined threshold, the judgment unit 32B requests the edge device 20 to perform a second inference.

[0056] [Processing system procedure] FIG. 11 is a sequence diagram showing the procedure of a processing method according to the second modification of the first embodiment.

[0057] 11, first, when the edge device 20B receives input of data of an inference target (e.g., an image) (step S21), the receiving unit 23B outputs the data of the inference target to the quantization unit 21 (step S22). The quantization unit 21 performs a first quantization process to generate first data by quantizing the data of the inference target with a first quantization bit rate (step S23), and transmits the first data to the server device 30B (step S24).

[0058] In the server device 30, the inference unit 31B inputs the first data to the DNN-1 and performs a first inference (step S25). When the inference result of the DNN-1 is input (step S26), the judgment unit 32B calculates the confidence of the inference result using the DNN-1 (step S27). Then, the judgment unit 32 judges whether the confidence is equal to or greater than a predetermined threshold (step S28).

[0059] In the server device 30B, if the confidence level is equal to or higher than a predetermined threshold (step S28: Yes), the determination unit 32B outputs an inference result using DNN-1 (step S29). On the other hand, if the confidence level is lower than the predetermined threshold (step S28: No), the determination unit 32B requests the edge device 20 to execute a second inference (step S30).

[0060] When the edge device 20 receives a request to execute the second inference from the server device 30, the reception unit 23B transmits data of the inference target to the inference unit 24B (step S31). The inference unit 24B inputs the data of the inference target to DNN-2 to execute the second inference (step S32), and outputs the inference result (step S33). When the inference result is to be output from the server device 30B, the edge device 20B may transmit the inference result by DNN-2 to the server device 30B.

[0061] As in this processing system 100B, the DNN-2 that performs the second inference may be provided in the edge device 20B. The DNN-2 performs inference using uncompressed data, so it can perform highly accurate inference. In addition, in the processing system 100B, it is not necessary to transmit the second data from the edge device 20B to the server device 30B for the second inference, so the amount of communication between the edge device 20B and the server device 30B can be reduced.

[0062] [Embodiment 2] Next, a description will be given of embodiment 2. In embodiment 2, a case in which embodiment 1 is applied to a cascade model will be described.

[0063] Fig. 12 is a diagram illustrating an example of the configuration of a processing system according to embodiment 2. The processing system 200 according to embodiment 2 has an edge device 220 that performs inference using DNN-E1, which is a lightweight model compared to DNN-1 and DNN-2, instead of the edge device 20 illustrated in Fig. 2.

[0064] The edge device 220 includes an inference unit 224 , an edge side determination unit 225 , a quantization unit 21 , and a subtraction unit 22 .

[0065] The inference unit 224 performs inference (third inference) using DNN-E1, which is a trained lightweight model. DNN-E1 includes information such as model parameters. DNN-E1 may perform inference processing related to the same task as DNN-1 and DNN-2, or may perform inference processing related to a different task.

[0066] The edge side determination unit 225 determines whether to adopt the inference result of the edge device 220 or the server device 30 by comparing the confidence of the inference result using the DNN-E1 with a predetermined threshold. If the confidence is equal to or greater than the predetermined threshold, the edge side determination unit 225 outputs the inference result inferred by the inference unit 224.

[0067] On the other hand, when the confidence level is less than the predetermined threshold, the edge side determination unit 225 inputs the data of the inference target to the quantization unit 21. As a result, the data of the inference target is quantized with a first quantization bit rate and transmitted to the server device 30 as first data. The server device 30 executes two-stage inference using the first data and the second data transmitted from the edge device 220. Note that the threshold used by the edge side determination unit 225 for determination may be a different value from the threshold used by the determination unit 32, or may be the same value.

[0068] [Processing system procedure] FIG. 13 is a sequence diagram showing the procedure of a processing method according to the second embodiment.

[0069] 13, first, when the edge device 220 receives input of data to be inferred (e.g., an image) (step S201), the inference unit 224 performs inference using DNN-E1 (step S202) and outputs the inference result to the edge side determination unit 225 (step S203). The edge side determination unit 225 determines whether the confidence level is equal to or higher than a predetermined threshold (step S204).

[0070] If the confidence level is equal to or higher than a predetermined threshold (step S205: Yes), the edge side determination unit 225 outputs the inference result inferred by the inference unit 224 (step S206). If the confidence level is lower than a predetermined threshold (step S205: No), the edge side determination unit 225 inputs the data to be inferred to the quantization unit 21 (step S207). Steps S208 to S224 are the same processes as steps S2 to S18 shown in FIG.

[0071] [Effects of the second embodiment] As shown in the second embodiment, the first embodiment may be applied to a cascade model to perform multi-stage inference in the server device 30, thereby making it possible to maintain stable inference accuracy.

[0072] [Modification of the second embodiment] Moreover, the second inference may be performed in an edge device. Fig. 14 is a diagram illustrating an example of a configuration of a processing system according to a modification of the second embodiment.

[0073] As shown in FIG. 14, a processing system 200A according to the modification of the second embodiment includes an edge device 220A and a server device 230A.

[0074] The edge device 220A is configured by removing the subtraction unit 22 compared to the edge device 220. The edge device 220A is configured by removing the subtraction unit 22 compared to the edge device 220. The edge device 220A is configured by a reception unit 23B that distributes input data to be inferred (an image in the figure) to the quantization unit 21, the inference unit 224, or the inference unit 224A, and an inference unit 224B that has a DNN-2 and performs a second inference.

[0075] The server device has an inference unit 231A and a judgment unit 32B. The inference unit 231B has DNN-1 and performs a first inference. If the confidence level of the first inference result using DNN-1 is equal to or higher than a predetermined threshold, the judgment unit 32B outputs the inference result using DNN-1. On the other hand, if the confidence level is less than the predetermined threshold, the judgment unit 32B requests the edge device 220A to perform a second inference.

[0076] [Processing system procedure] FIG. 15 is a sequence diagram showing the procedure of a processing method according to a modification of the second embodiment.

[0077] As shown in Fig. 15, first, when the edge device 220A receives input of data (e.g., an image) to be inferred (step S231), the receiving unit 23B outputs the data to be inferred to the inference unit 224 (step S232). Steps S233 to S239 in Fig. 15 are the same processes as steps S202 to S208. The quantization unit 21 transmits the first data to the server device 230A (step S240).

[0078] In the server device 230A, the inference unit 231A inputs the first data to the DNN-1 and performs a first inference (step S241). When the inference result of the DNN-1 is input (step S242), the judgment unit 32B calculates the confidence of the inference result using the DNN-1 (step S243). Then, the judgment unit 32 judges whether the confidence is equal to or greater than a predetermined threshold (step S244).

[0079] In the server device 230A, if the confidence level is equal to or higher than a predetermined threshold (step S244: Yes), the determination unit 32B outputs an inference result using DNN-1 (step S245). On the other hand, if the confidence level is lower than the predetermined threshold (step S244: No), the determination unit 32B requests the edge device 220A to execute a second inference (step S246).

[0080] When the edge device 220A receives a request to execute the second inference from the server device 230A, the reception unit 23B transmits data of the inference target to the inference unit 224A (step S247). The inference unit 224A inputs the data of the inference target to the DNN-2 to execute the second inference (step S248), and outputs the inference result (step S249). When the inference result is to be output from the server device 230A, the edge device 220A may transmit the inference result by the DNN-2 to the server device 230A.

[0081] As in the processing system 200A, a configuration in which the DNN-2 that performs the second inference is provided in the edge device 220A may be applied to the cascade model. According to the processing system 200A, the DNN-2 performs inference using uncompressed data, so that it is possible to perform highly accurate inference. In addition, in the processing system 200A, since it is not necessary to transmit the second data from the edge device 220A to the server device 230A for the second inference, it is possible to reduce the amount of communication between the edge device 220A and the server device 230A.

[0082] [Embodiment 3] Next, a description will be given of a third embodiment. In the third embodiment, a case will be described in which the first embodiment is applied to an edge-clout system in which a feature map, which is an intermediate output value of a model on the edge device side, can be shared between an edge device and a server device.

[0083] 16 is a diagram illustrating an example of a configuration of a processing system according to embodiment 3. The processing system 300 according to embodiment 3 includes an edge device 320 that performs inference (fourth inference) using a lightweight model DNN-E2, and a server device 330 that has non-lightweight models DNN-C1 and DNN-C2.

[0084] The edge device 320 includes an inference unit 324 , an edge side determination unit 325 , a quantization unit 21 , and a subtraction unit 22 .

[0085] The inference unit 324 performs inference on the data to be inferred using DNN-E2, which is a trained lightweight model. DNN-E2 includes information such as model parameters. The inference unit 324 inputs the data to be inferred (an image in the example of FIG. 16) to the DNN-E2 to obtain an inference result. In the inference unit 31, the feature extraction layer of the DNN-E2 extracts the feature amount of the data to be inferred and outputs it as a feature map, and the detection layer of the DNN-E2 performs inference on the data to be inferred based on the feature map.

[0086] 12, the edge side determination unit 325 determines whether to adopt the inference result of the edge device 320 or the server device 330 by comparing the confidence of the inference result using DNN-E2 with a predetermined threshold. If the confidence is equal to or greater than the predetermined threshold, the edge side determination unit 325 outputs the inference result inferred by the inference unit 324.

[0087] On the other hand, when the confidence level is less than a predetermined threshold, the edge side determination unit 325 inputs a feature map, which is an intermediate output value of DNN-E2, to the quantization unit 21. Note that the threshold used by the edge side determination unit 325 for determination may be a value different from the threshold used by the determination unit 32, or may be the same value.

[0088] In the third embodiment, the processing target of the quantization unit 21 and the subtraction unit 22 is a feature map. The feature map is quantized as in the first embodiment and then transmitted to the server device 330 as first data or second data. The quantization unit 21 transmits the feature map quantized with the first quantization bit rate to the server device 330 as the first data. The subtraction unit 22 transmits data obtained by subtracting redundant information common to the first data from the feature map quantized by the quantization unit 21 with the second quantization bit rate to the server device 330 as the second data. The server device 330 executes two-stage inference using the first data and the second data based on the feature map transmitted from the edge device 320.

[0089] [Server device] The server device 330 includes an inference unit 331 , a determination unit 332 , and an integration unit 333 .

[0090] The inference unit 331 uses DNN-C1 or DNN-C2 to perform inference processing on the data to be inferred based on the feature map of the data to be inferred output from the edge device 320. DNN-C1 and DNN-C2 perform inference using the feature map as input. DNN-C1 performs inference (first inference) using the feature map quantized with the first quantization bit rate as input. DNN-C2 performs inference (second inference) using integrated data obtained by integrating the feature map quantized with the first quantization bit rate and the feature map quantized with the second quantization bit rate as input.

[0091] When the integration unit 33 receives a feature map quantized with the second quantization bit rate from the edge device 320, it integrates the feature map quantized with the first quantization bit rate and outputs the integrated data to the inference unit 331.

[0092] [Processing system procedure] FIG. 17 is a sequence diagram showing the procedure of a processing method according to the third embodiment.

[0093] As shown in FIG. 17, first, when the edge device 320 receives input of data (e.g., an image) to be inferred (step S301), the inference unit 324 inputs the data (e.g., an image) to be inferred to the DNN-E2. In the DNN-E2, the feature extraction layer extracts the feature amount of the data to be inferred as a feature map (step S302) and outputs it to the edge side determination unit 325 (step S303). In the DNN-E2, the detection layer executes inference on the data to be inferred based on the feature map (step S304) and outputs the inference result to the determination unit 32 (step S305).

[0094] The edge side determination unit 325 determines whether the confidence level is equal to or greater than a predetermined threshold (step S307). If the confidence level is equal to or greater than the predetermined threshold (step S307: Yes), the edge side determination unit 325 outputs the inference result inferred by the inference unit 324 (step S308). If the confidence level is less than the predetermined threshold (step S307: No), the edge side determination unit 325 inputs the feature map to the quantization unit 21 (step S309). Steps S310 to S325 are the same processes as steps S2 to S18 shown in FIG. 4, except that the data input to the quantization unit 21 is the feature map.

[0095] [Effects of the third embodiment] As shown in embodiment 3, by applying embodiment 1 to an edge-clout system in which a feature map, which is the intermediate output value of the model on the edge device side, can be shared, multi-stage inference can be performed in the server device 330, making it possible to maintain stable inference accuracy.

[0096] In the third embodiment, the second inference can also be performed in the edge device. In this case, the server device has a configuration in which the integration unit 33 and the DNN-C2 are deleted, and has a determination unit 32B instead of the determination unit 32, as compared with the server device 330. The edge device further has a second inference unit having the DNN-C2, as compared with the edge device 320. When the edge device receives a request to execute the second inference from the determination unit 32B in the server device, the feature map, which is an intermediate output value of the DNN-E2, is input to the DNN-C2 of the second inference unit to perform the second inference, and the inference result is output.

[0097] In the first to third embodiments, the data transmitted from the edge devices 20, 20B, 220, 220A, and 320 to the server devices 30, 30A, 30B, 230A, and 330 is quantized, but the present invention is not limited to this. If the data is image data to be inferred, progressive coding may be applied. In the second modification of the first embodiment and the second modification of the second embodiment, a compression method such as normal image coding or video coding may be used.

[0098] In addition, in this embodiment, there may be multiple edge devices 20, 20B, 220, 220A, 320 or multiple server devices 30, 30A, 30B, 230A, 330, and there may be multiple edge devices 20, 20B, 220, 220A, 320 and multiple server devices 30, 30A, 30B, 230A, 330.

[0099] [System configuration, etc.] Each component of each device shown in the figure is a functional concept, and does not necessarily have to be physically configured as shown in the figure. In other words, the specific form of distribution and integration of each device is not limited to that shown in the figure, and all or a part of it can be functionally or physically distributed and integrated in any unit according to various loads, usage conditions, etc. Furthermore, each processing function performed by each device can be realized in whole or in any part by a CPU and a program analyzed and executed by the CPU, or can be realized as hardware using wired logic.

[0100] Furthermore, among the processes described in this embodiment, all or part of the processes described as being performed automatically can be performed manually, or all or part of the processes described as being performed manually can be performed automatically by a known method. In addition, the information including the processing procedures, control procedures, specific names, various data and parameters shown in the above documents and drawings can be changed arbitrarily unless otherwise specified.

[0101] [program] 18 is a diagram showing an example of a computer in which edge devices 20, 20B, 220, 220A, and 320 and server devices 30, 30A, 30B, 230A, and 330 are realized by executing a program. The computer 1000 has, for example, a memory 1010 and a CPU 1020. The computer 1000 may also have the accelerator described above to assist in calculations. The computer 1000 also has a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.

[0102] The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to a hard disk drive 1090. The disk drive interface 1040 is connected to a disk drive 1100. A removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1110 and a keyboard 1120, for example. The video adapter 1060 is connected to a display 1130, for example.

[0103] The hard disk drive 1090 stores, for example, an OS (Operating System) 1091, an application program 1092, a program module 1093, and program data 1094. That is, a program that specifies each process of the edge devices 20, 20B, 220, 220A, and 320 and the server devices 30, 30A, 30B, 230A, and 330 is implemented as a program module 1093 in which computer-executable code is written. The program module 1093 is stored, for example, in the hard disk drive 1090. For example, the program module 1093 for executing the same process as the functional configuration in the edge devices 20, 20B, 220, 220A, and 320 and the server devices 30, 30A, 30B, 230A, and 330 is stored in the hard disk drive 1090. The hard disk drive 1090 may be replaced by an SSD (Solid State Drive).

[0104] Furthermore, setting data used in the processing of the above-described embodiment is stored as program data 1094, for example, in the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads out the program module 1093 or the program data 1094 stored in the memory 1010 or the hard disk drive 1090 into the RAM 1012 as necessary, and executes them.

[0105] Note that the program module 1093 and the program data 1094 are not limited to being stored in the hard disk drive 1090, but may be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network (such as a local area network (LAN) or wide area network (WAN)). The program module 1093 and the program data 1094 may then be read by the CPU 1020 from the other computer via the network interface 1070.

[0106] Although the embodiments of the present invention have been described above, the present invention is not limited by the descriptions and drawings that form part of the disclosure of the present invention according to the present embodiments. In other words, other embodiments, examples, and operation techniques made by those skilled in the art based on the present embodiments are all included in the scope of the present invention. [Explanation of symbols]

[0107] 20, 20B, 220, 220A, 320 Edge device 21 Quantization section 22 Subtraction section 23B Reception 24B,31,31A,31B,224,224A,231A,324,331 Inference part 30, 30A, 30B, 230A, 330 Server device 32,32B Judgment part 33 Integration Department 100, 100A, 100B, 200, 200A, 300 Processing System 225,325 Edge side judgment section

Claims

1. A processing method for performing inference processing in an edge device and a server device, comprising: a first transmission step in which the edge device transmits first data based on data to be inferred to a server device that performs a first inference; a second transmission step in which the edge device transmits second data based on the data of the inference target to an execution unit that performs a second inference in response to a request from the server device; Including, A processing method according to claim 1, wherein the request from the server device is made when the result of the first inference performed in the server device is equal to or lower than a predetermined degree of certainty.

2. The server device performs the second inference together with the first inference, the second data does not include an area common to the first data, 2. The processing method according to claim 1, wherein the first data and the second data are used simultaneously to better express the data to be inferred.

3. the first data and the second data are compressed and then transmitted to the server device; 3. The method according to claim 2, wherein the second data is compressed at a lower compression rate than the first data, and then a region common to the first data is subtracted from the second data.

4. a step of the server device performing the first inference based on the first data; When the server device receives the second data, the server device integrates the first data and the second data; a step of performing the second inference by the server device based on the data integrated in the integration step; The method according to claim 2 or 3, further comprising:

5. A step in which the edge device performs a second inference using the data of the inference target. The method of claim 1 further comprising:

6. The edge device performs a third inference on the data to be inferred. Further comprising: The processing method described in any one of claims 1 to 5, characterized in that the first transmission step comprises the edge device transmitting the first data to the server device when the result of the third inference is equal to or lower than a predetermined degree of certainty.

7. The method further includes a step of extracting a feature amount of the data to be inferred, and performing a fourth inference on the data to be inferred based on the extracted feature amount, the first transmission step includes transmitting, to the server device, the first data based on the feature amount when a result of the fourth inference is equal to or lower than a predetermined degree of certainty, The processing method according to any one of claims 1 to 5, characterized in that the second transmission step comprises the edge device transmitting the second data based on the feature to an execution unit that performs the second inference in response to a request from the server device.

8. A processing system for performing inference processing in an edge device and a server device, The server device includes: an inference unit that, when receiving first data based on data to be inferred from the edge device, performs a first inference based on the first data by using a first model; a request unit that requests second data based on the data of the inference target from the edge device when a result of the first inference is equal to or lower than a predetermined degree of certainty; having The processing system, wherein the inference unit, upon receiving the second data, uses a second model to perform a second inference based on the second data.

Citation Information

Patent Citations

  • Recognition device, recognition system, recognition method, and program

    JP2018045369A