Methods for constructing distributed convolutional models, case retrieval methods, and related equipment.
By constructing a distributed convolutional model, the problem of limited computing resources in medical display equipment is solved, enabling the deployment of AI-assisted medical image diagnosis models on limited resources while maintaining functionality and improving the accuracy and speed of case retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU SHIYUAN ELECTRONICS CO LTD
- Filing Date
- 2021-11-23
- Publication Date
- 2026-06-02
Smart Images

Figure CN116167409B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of model building technology, and in particular to a method for constructing a distributed convolutional model, a case retrieval method, and related equipment. Background Technology
[0002] AI-assisted medical image diagnosis utilizes artificial intelligence's image processing capabilities to achieve functions such as lesion detection, target organ segmentation, risk assessment, lesion type classification, and organ and tissue labeling and segmentation. This aims to meet clinical assistance needs such as lesion identification and labeling, disease type classification, 3D image reconstruction, and even automatic delineation of radiotherapy target areas, providing aids and references for doctors in image interpretation and delineation. Deploying AI-assisted medical image diagnosis systems on medical displays will become a new trend in future products. However, the limited computing resources of medical displays and the high computational cost of the convolutional network models upon which AI-assisted medical image diagnosis relies present a dilemma in combining the two. Summary of the Invention
[0003] The purpose of this disclosure is to provide a method for constructing a distributed convolutional model, a case retrieval method, and related equipment. The distributed convolutional model constructed based on the distributed convolutional layer has low computational overhead and can be deployed on medical display equipment with limited computing resources.
[0004] To achieve the above objectives, this disclosure adopts the following technical solution: a method for constructing a distributed convolutional model, wherein the distributed convolutional model includes multiple distributed convolutional layers, and the construction method includes:
[0005] Perform model initialization to obtain the scale parameter, shift parameter, and first weight parameter of each of the distributed convolutional layers;
[0006] During model training, in the forward convolution stage, the first weight parameters corresponding to each of the distributed convolutional layers are reparameterized using the scale parameter and the shift parameter respectively, to obtain the second weight parameters corresponding to each of the distributed convolutional layers.
[0007] During model training, in the backward gradient update phase, a preset standard loss function and random variables are called, and the gradient update parameters are obtained by calculating the derivative based on the preset standard loss function, the random variables, the first weight parameter and the second weight parameter.
[0008] The distribution of the model is optimized by updating the parameters according to the gradient, and the model training continues until the distributed convolution model converges.
[0009] This disclosure also provides an image-based case retrieval method, including:
[0010] Obtain medical images;
[0011] Feature extraction is performed on the case images using a distributed convolutional model, and the images are mapped to low-dimensional vectors. The distributed convolutional model is a deep learning model constructed using any of the distributed convolutional model construction methods described above.
[0012] Search the preset database for a number of first case information that have a first similarity of more than a first threshold with the low-dimensional vector, and output each first case information to the display interface.
[0013] This disclosure also provides an apparatus for constructing a distributed convolutional model, the distributed convolutional model including multiple distributed convolutional layers, the construction apparatus comprising:
[0014] An initialization module is used to initialize the model and obtain the scale parameter, shift parameter, and first weight parameter of each of the distributed convolutional layers.
[0015] The convolution module is used for model training. In the forward convolution stage, the first weight parameters corresponding to each of the distributed convolutional layers are reparameterized using the scale parameter and the shift parameter respectively to obtain the second weight parameters corresponding to each of the distributed convolutional layers.
[0016] The gradient update module is used for model training. In the backward gradient update stage, it calls a preset standard loss function and random variables, and calculates the gradient update parameters by performing derivative calculations based on the preset standard loss function, the random variables, the first weight parameter and the second weight parameter.
[0017] The training module is used to update the parameters of the model according to the gradient, optimize the distribution of the model, and continue to train the model until the distributed convolution model converges.
[0018] This disclosure also provides an image-based case retrieval device, comprising:
[0019] The acquisition module is used to acquire case images;
[0020] The mapping module is used to extract features from the case images using a distributed convolutional model and map them into low-dimensional vectors. The distributed convolutional model is a deep learning model constructed using any of the distributed convolutional model construction methods described above.
[0021] The first filtering module is used to search for a number of first case information that have a first similarity of more than a first threshold with the low-dimensional vector from a preset database, and output each first case information to the display interface.
[0022] This disclosure also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above.
[0023] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0024] This disclosure provides a method for constructing a distributed convolutional model, a case retrieval method, and related equipment. The distributed convolutional model includes multiple distributed convolutional layers. During model construction, model initialization is first performed to obtain the scale parameters, shift parameters, and first weight parameters for each distributed convolutional layer. Then, model training is performed. In the forward convolution stage, the first weight parameters for each distributed convolutional layer are reparameterized using the scale and shift parameters respectively, resulting in second weight parameters for each layer. Next, model training continues. In the backward gradient update stage, a preset standard loss function and random variables are called, and the derivatives of the preset standard loss function, random variables, first weight parameters, and second weight parameters are calculated to obtain gradient update parameters. Finally, the model distribution is optimized based on the gradient update parameters, and model training continues until the distributed convolutional model converges. The distributed convolutional model constructed based on this disclosure can significantly compress the convolutional model, reducing its complexity, thus allowing the distributed convolutional model to be deployed on medical displays with limited computing resources without affecting its functionality. When performing case retrieval, the user-input case image is mapped into a low-dimensional vector using a distributed convolution model. Then, information on several first cases with a first similarity of more than a first threshold to the low-dimensional vector is searched from a preset database. This method is convenient, fast, and highly accurate. Attached Figure Description
[0025] Figure 1 This is a schematic diagram illustrating the steps of constructing a distributed convolutional model in one embodiment of this disclosure;
[0026] Figure 2 This is a schematic diagram of the steps of an image-based case retrieval method in one embodiment of the present disclosure;
[0027] Figure 3 This is an overall structural block diagram of the apparatus for constructing a distributed convolutional model in one embodiment of the present disclosure;
[0028] Figure 4 This is an overall structural block diagram of an image-based medical record retrieval device according to an embodiment of the present disclosure.
[0029] Figure 5 This is a schematic block diagram of the structure of a computer device according to an embodiment of the present disclosure.
[0030] The realization of the purpose, functional features and advantages of this disclosure will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this disclosure.
[0032] Reference Figure 1 This disclosure provides a method for constructing a distributed convolutional model, the distributed convolutional model including multiple distributed convolutional layers, the construction method including:
[0033] S1: Perform model initialization to obtain the scale parameter, shift parameter, and first weight parameter of each distributed convolutional layer;
[0034] S2: Perform model training. In the forward convolution stage, use the scale parameter and shift parameter corresponding to each of the distributed convolutional layers to reparameterize the first weight parameter corresponding to each of the distributed convolutional layers to obtain the second weight parameter corresponding to each of the distributed convolutional layers.
[0035] S3: Perform model training. In the backward gradient update stage, call the preset standard loss function and random variables, and calculate the gradient update parameters by taking the derivative of the preset standard loss function, the random variables, the first weight parameter and the second weight parameter.
[0036] S4: Optimize the model distribution by updating the parameters according to the gradient, and continue training the model until the distributed convolution model converges.
[0037] In this implementation, the distributed convolutional model contains multiple distributed convolutional layers (compared to existing convolutional models, the distributed convolutional model does not contain standard convolutional layers; it can be simply understood as replacing all standard convolutional layers with distributed convolutional layers in an existing convolutional model, resulting in the distributed convolutional model of this embodiment). When constructing the distributed convolutional model, the construction system first initializes the model, obtaining the scale parameter, shift parameter, and first weight parameter for each distributed convolutional layer. The first weight parameter includes the mean and variance of the Gaussian distribution followed by the distributed convolutional layer, as well as the corresponding weights of that layer. Specifically, it is assumed that the distributed convolutional model contains m distributed convolutional layers, and the weights of these m layers follow n Gaussian distributions, meaning m / n distributed convolutional layers follow the same Gaussian distribution; m / n is greater than 2, meaning the model is compressed by at least 2 times, effectively reducing the number of model parameters. The construction system constructs n Gaussian distributions and initializes the mean and variance of each Gaussian distribution. Then, random variables are retrieved, and weights are sampled based on the mean and variance of the Gaussian distribution followed by the random variables and the weights of each distributed convolutional layer, thereby calculating the weights corresponding to each distributed convolutional layer. After model initialization, the model training phase begins. During the forward convolution phase of model training, the system reparameterizes the scale parameter, shift parameter, and first weight parameter corresponding to each distributed convolutional layer, thereby obtaining the second weight parameter corresponding to each distributed convolutional layer. This achieves parameter differentiation among the distributed convolutional layers, ensuring that each reparameterized distributed convolutional layer has learning capabilities (before reparameterization, the first weight parameters of m / n distributed convolutional layers following the same Gaussian distribution are identical, obviously lacking learning capabilities). Then, at the backward gradient update node of model training, the model construction system calls a preset standard loss function (the preset standard loss function is the loss function of the standard convolutional layer) and random variables. It then calculates the derivatives of the preset standard loss function, random variables, first weight parameters, and second weight parameters to obtain the gradient values for the four parameters corresponding to the distributed convolutional layer: scale parameter, shift parameter, mean of the Gaussian distribution, and variance. These four gradient values constitute the gradient update parameters. During model training, the system optimizes the model distribution based on the gradient update parameters and continues training until the distributed convolutional model converges, completing the construction of the distributed convolutional model (i.e., the distributed convolutional model training is complete).
[0038] This embodiment is based on a distributed convolution model, which can significantly compress the convolution model and reduce its complexity. This allows the distributed convolution model to be deployed on medical displays with limited computing resources without affecting its functionality.
[0039] Furthermore, the distributed convolutional model includes m distributed convolutional layers, and the step of initializing the model to obtain the first weight parameters of each distributed convolutional layer includes:
[0040] S101: Construct n Gaussian distributions and initialize the mean and variance of each Gaussian distribution, wherein the weights of m distributed convolutional layers follow the n Gaussian distributions and m / n is greater than 2;
[0041] S102: Retrieve the random variable, and perform weight sampling based on the mean and variance of the Gaussian distribution that the random variable and the weights of each distributed convolutional layer follow, to obtain the weights corresponding to each distributed convolutional layer;
[0042] S103: By combining the mean and variance of the Gaussian distribution followed by the weights of each distributed convolutional layer, and the weights of each distributed convolutional layer, the first weight parameter corresponding to each distributed convolutional layer is obtained.
[0043] In this embodiment, it is assumed that the distributed convolutional model includes m distributed convolutional models, and these m distributed convolutional models follow n Gaussian distributions. Therefore, the parameter compression ratio of the distributed convolutional model is m / n. For example, if the distributed convolutional model contains 8 distributed convolutional layers and constructs 4 Gaussian distributions, the parameter compression ratio is 2, indicating that every two distributed convolutional layers follow the same Gaussian distribution. The specific value of the parameter compression ratio depends on the prior settings of the specific task and is not specifically limited here. The system constructs n Gaussian distributions and initializes the mean and variance of each Gaussian distribution as follows: and Assuming the j-th convolutional layer follows the i-th Gaussian distribution, then the weights of this convolutional layer follow the following distribution: After initializing the Gaussian distributions, the weight parameters of each distributed convolutional layer can be obtained from these n Gaussian distributions. Specifically, the system retrieves a random variable within a certain variance range for sampling. The system then calculates the weights based on the mean and variance of the Gaussian distributions followed by the random variable and the weights of each distributed convolutional layer, thus obtaining the weights corresponding to each distributed convolutional layer. Each weight in a distributed convolutional layer has two parameters: mean and variance, while each weight in a standard convolutional layer has only one parameter. Therefore, to reduce the number of parameters in the convolutional model, m / n must be at least greater than 2, i.e., a compression of more than 2 times. The mean, variance, and weights of the distributed convolutional layers are combined to form the first weight parameter.
[0044] Further, the step of retrieving the random variable and sampling the weights according to the mean and variance of the Gaussian distribution followed by the random variable and the weights of each distributed convolutional layer to obtain the weights corresponding to each distributed convolutional layer includes:
[0045] S1021: Select n first distribution convolutional layers from m distributed convolutional layers, where each first distribution convolutional layer corresponds to a single Gaussian distribution;
[0046] S1022: Substitute the random variable, the mean and variance of the Gaussian distribution into the weight sampling formula to calculate the weights corresponding to each of the first distribution convolutional layers, wherein the weight sampling formula is: , For the weight, The mean of the Gaussian distribution is given. Let V be the variance of the Gaussian distribution. Let be the random variable, representing a random variable within the variance range;
[0047] S1023: According to the Gaussian distribution that each of the distributed convolutional layers follows, the weights of the remaining distributed convolutional layers are set with the weights corresponding to each of the first distributed convolutional layers, so as to obtain the weights corresponding to each of the distributed convolutional layers.
[0048] In this embodiment, to reduce the number of parameters, the system selects n first-distribution convolutional layers from m distributed convolutional layers, corresponding to n Gaussian distributions; that is, a single first-distribution convolutional layer corresponds to a single Gaussian distribution. The system substitutes the random variable, the mean and variance of the Gaussian distribution corresponding to each first-distribution convolutional layer into the weight sampling formula: In the process, the weights corresponding to each first-distribution convolutional layer are calculated; where, These are the weights of the first distributed convolutional layer. The mean of a Gaussian distribution is given. Let V be the variance of the Gaussian distribution. Let be a random variable, representing a random variable within the variance range. Each distributed convolutional layer following the same Gaussian distribution has the same first weight parameter. Therefore, the system is constructed by assigning each distributed convolutional layer a Gaussian distribution and then, based on the weights of each of the first distributed convolutional layers after weight sampling, setting the weights of the remaining distributed convolutional layers to obtain the weights corresponding to each distributed convolutional layer. Since it is not necessary to calculate the weights for all distributed convolutional layers (i.e., m distributed convolutional layers), it is only necessary to initialize and sample the weights of n first distributed convolutional layers (for example, if the first to fourth distributed convolutional layers follow a Gaussian distribution a, and the fifth to eighth distributed convolutional layers follow a Gaussian distribution b, then it is only necessary to randomly select one of the first to fourth distributed convolutional layers as the first distributed convolutional layer a, and randomly select one of the fifth to eighth distributed convolutional layers as the first distributed convolutional layer b; after calculating the weights of the two first distributed convolutional layers, the weights of the first to fourth distributed convolutional layers are the same as those of the first distributed convolutional layer a, and the weights of the fifth to eighth distributed convolutional layers are the same as those of the first distributed convolutional layer b), thereby significantly reducing the number of parameters and improving the speed of model initialization.
[0049] Furthermore, the step of performing model training, in the forward convolution stage, reparameterizing the first weight parameters corresponding to each of the distributed convolutional layers using the scale parameter and shift parameter respectively, to obtain the second weight parameters corresponding to each of the distributed convolutional layers, includes:
[0050] S201: Substitute the scale parameter, the shift parameter, and the first weight parameter corresponding to the distributed convolutional layer into the reparameterization calculation formula to calculate the second weight parameter, wherein the reparameterization calculation formula is: , This is the second weight parameter. For the scale parameter, The shift parameter; The weights are those corresponding to the distributed convolutional layer.
[0051] In this embodiment, during model initialization, the construction system initializes m scale parameters and shift parameters, assumed to be... and The weights are assigned to the corresponding m distributed convolutional layers. The scale and shift parameters are used to fine-tune the weight parameters of each distributed convolutional layer during model training, thereby differentiating the weight parameters of each distributed convolutional layer. Specifically, in the forward convolution stage of model training, the system substitutes the scale parameter, shift parameter, and first weight parameter corresponding to each distributed convolutional layer into the reparameterization calculation formula to reparameterize the first weight parameter and calculate the second weight parameter corresponding to each distributed convolutional layer. The second weight parameter is then used in the model's convolution operation. The reparameterization calculation formula is: , This is the second weighting parameter. For the scale parameter, For the shift parameter; These represent the weights corresponding to the distributed convolutional layers. Although the first weight parameters of m / n distributed convolutional layers following the same Gaussian distribution are the same, the scale and shift parameters of each distributed convolutional layer are different. Therefore, after reparameterizing the first weight parameters using the scale and shift parameters, the second weight parameters of each distributed convolutional layer are different, enabling each distributed convolutional layer to have learning capabilities.
[0052] Furthermore, the step of performing model training, in the backward gradient update stage, involves calling a preset standard loss function and random variables, and calculating the gradient update parameters by performing derivative calculations based on the preset standard loss function, the random variables, the first weight parameter, and the second weight parameter, including:
[0053] S301: In the backward gradient update stage of model training, the gradient values corresponding to the scale parameter, shift parameter, mean, and variance of the Gaussian distribution followed by the distributed convolutional layer are calculated by performing derivative calculations based on the preset standard loss function, the random variable, the first weight parameter, and the second weight parameter.
[0054] S302: The calculation logic for the gradient value corresponding to the mean of the Gaussian distribution is as follows: Substitute the scale parameter, the second weight parameter, and the preset standard loss function into the first gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the mean of the Gaussian distribution, wherein the first gradient calculation formula is: , The gradient value corresponding to the mean of the Gaussian distribution is... The preset standard loss function;
[0055] S304: The calculation logic for the gradient value corresponding to the variance of the Gaussian distribution is as follows: Substitute the scale parameter, the second weight parameter, the preset standard loss function, and the random variable into the second gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the variance of the Gaussian distribution, wherein the second gradient calculation formula is: , The gradient value corresponding to the variance of the Gaussian distribution;
[0056] S305: The calculation logic for the gradient value corresponding to the scale parameter is as follows: Substitute the preset standard loss function, the first weight parameter, and the second weight parameter into the third gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the scale parameter, wherein the third gradient calculation formula is: , The gradient value corresponding to the scale parameter;
[0057] S306: The calculation logic for the gradient value corresponding to the shift parameter is as follows: Substitute the preset standard loss function and the second weight parameter into the fourth gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the shift parameter, wherein the fourth gradient calculation formula is: , This is the gradient value corresponding to the shift parameter.
[0058] In this embodiment, as shown above, after the combined model initialization and forward convolution reparameterization, the weight parameters of n distributed convolutions and the scale and shift parameters of m distributed convolutions are used to satisfy the operation of m distributed convolutional layers. The weight sampling formula for the combined model initialization is... Reparameterization formula for forward convolution It can be seen that, ,in, These are random variables and do not participate in gradient updates. During the backward gradient update phase of model training, the system calculates the gradient values corresponding to the scale parameter, shift parameter, mean, and variance of the Gaussian distribution followed by the distributed convolutional layer by performing derivative calculations based on the preset standard loss function, the random variable, the first weight parameter, and the second weight parameter. These gradient values constitute the gradient update parameters. Specifically, the system substitutes the scale parameter, the second weight parameter, and the preset standard loss function into the first gradient calculation formula to obtain the gradient value corresponding to the mean of the Gaussian distribution; where the first gradient calculation formula is: , Let be the gradient value corresponding to the mean of the Gaussian distribution. The system constructs a system by substituting the scale parameter, the second weight parameter, the preset standard loss function, and the random variable into the second gradient calculation formula and performing differentiation to obtain the gradient value corresponding to the variance of the Gaussian distribution; wherein, the second gradient calculation formula is: , Let be the gradient value corresponding to the variance of the Gaussian distribution. The system constructs the system by substituting the preset standard loss function, the first weight parameter, and the second weight parameter into the third gradient calculation formula and performing differentiation to obtain the gradient value corresponding to the scale parameter; where the third gradient calculation formula is: , This represents the gradient value corresponding to the scale parameter. The system constructs the system by substituting the preset standard loss function and the second weight parameter into the fourth gradient calculation formula and performing differentiation to obtain the gradient value corresponding to the shift parameter; where the fourth gradient calculation formula is: , This is the gradient value corresponding to the shift parameter.
[0059] The system utilizes the calculated gradients to update parameters, thus learning a weight distribution suitable for the dataset. Preferably, in practical applications, L distributed convolutional layers share the i-th Gaussian distribution. The number of weight parameters in these L distributed convolutional layers is different because the input and output channels, as well as the kernel size, will vary. In this case, sampling should be performed according to the maximum number of parameters, and then randomly assigned to each distributed convolutional layer.
[0060] Reference Figure 2 This disclosure also provides an image-based case retrieval method, including:
[0061] A1: Obtain medical images;
[0062] A2: The case images are feature extracted using a distributed convolutional model and mapped to low-dimensional vectors. The distributed convolutional model is a deep learning model constructed using the method described in any of the above embodiments.
[0063] A3: Search the preset database for a number of first case information that have a first similarity of more than a first threshold with the low-dimensional vector, and output each first case information to the display interface.
[0064] In this embodiment, the retrieval system acquires the patient's image (e.g., X-ray) input by the user, and then inputs the image into a distributed convolutional model for feature extraction, mapping the image into a low-dimensional vector (preferably a one-dimensional vector). The distributed convolutional model used in this embodiment is a deep learning model constructed using the aforementioned method (i.e., model training employs deep learning principles, and all convolutional layers within the model are distributed convolutional layers). The retrieval system calls upon historical case information stored in a preset database (which can be a local database or a cloud database, preferably a cloud database). This historical case information includes historical low-dimensional vectors corresponding to historical patient images. The system then calculates the similarity between the low-dimensional vector of the patient image and each historical low-dimensional vector, obtaining a first similarity between the low-dimensional vector and each historical low-dimensional vector. The retrieval system selects several first case information entries with a first similarity exceeding a first threshold, or selects the first preset number of first case information entries arranged in descending order of first similarity (e.g., selecting the 5 first case information entries with the closest first similarity to the low-dimensional vector). Finally, the retrieval system outputs the information of each first case to the display interface of the medical display device (preferably, the retrieval system sorts the information of each first case in descending order according to their respective first similarity and then outputs it to the display interface for display), so that users can quickly retrieve the historical case information (i.e., first case information) that is closest to the current case image, which is conducive to the user's rapid diagnosis of the disease.
[0065] In this embodiment, the distributed convolutional model used by the retrieval system has reduced model complexity, making it suitable for deployment on resource-constrained display devices. Furthermore, the distributed convolutional model is trained based on deep learning principles, enabling it to accurately learn discriminative visual information (such as the texture of lesion areas) in images, effectively improving the accuracy of image recognition (i.e., high accuracy in feature extraction from case images). This allows for accurate and rapid retrieval of historical case information with high similarity to the currently input case image.
[0066] Furthermore, the first case information includes historical case text. Following the step of searching a preset database for several case information entries with a first similarity to the low-dimensional vector exceeding a first threshold, and outputting each of the first case information entries to the display interface, the method further includes:
[0067] A4: Receives the patient's medical record text input by the user;
[0068] A5: Calculate the similarity between the case text and each of the historical case texts, select several second case information from each of the first case information that have a second similarity of more than a second threshold with the case text, and display each of the second case information in descending order on the display interface according to their respective second similarity.
[0069] In this embodiment, to further improve the accuracy of historical case information retrieval or reduce the number of currently retrieved first case information entries, users can perform secondary searches using case text. Specifically, users input the case text corresponding to the case image (i.e., a textual description of the case, such as descriptive information about the disease's characteristics) into the retrieval system. After receiving the case text, the retrieval system calculates the similarity between the case text and the historical case texts of each first case information entry. From the first case information entries, it selects several second case information entries whose second similarity to the case text reaches a second threshold or higher, thereby reducing the number of first case information entries and further improving the accuracy of case retrieval. The retrieval system then displays each second case information entry in descending order according to its corresponding second similarity on the display interface of the medical display device.
[0070] Preferably, the retrieval system can also search the preset database based on the case text and calculate the similarity of all historical case texts. Its retrieval logic is the same as the retrieval logic described above, and will not be repeated here.
[0071] Reference Figure 3 An embodiment of this disclosure also provides a construction apparatus for a distributed convolutional model, the distributed convolutional model including multiple distributed convolutional layers, the construction apparatus comprising:
[0072] Initialization module 1 is used to initialize the model and obtain the scale parameter, shift parameter and first weight parameter of each of the distributed convolutional layers;
[0073] Convolution module 2 is used for model training. In the forward convolution stage, the first weight parameters corresponding to each of the distributed convolutional layers are reparameterized using the scale parameter and shift parameter respectively to obtain the second weight parameters corresponding to each of the distributed convolutional layers.
[0074] The gradient update module 3 is used for model training. In the backward gradient update stage, it calls a preset standard loss function and random variables, and calculates the gradient update parameters by performing derivative calculations based on the preset standard loss function, the random variables, the first weight parameter and the second weight parameter.
[0075] Training module 4 is used to update the parameters of the model according to the gradient, optimize the distribution of the model, and continue to train the model until the distributed convolution model converges.
[0076] Furthermore, the distributed convolutional model includes m distributed convolutional layers, and the initialization module 1 includes:
[0077] A construction unit is used to construct n Gaussian distributions and initialize the mean and variance of each Gaussian distribution, wherein the weights of m distributed convolutional layers follow the n Gaussian distributions and m / n is greater than 2;
[0078] The sampling unit is used to retrieve the random variable and perform weight sampling based on the mean and variance of the Gaussian distribution that the random variable and the weights of each distributed convolutional layer follow, so as to obtain the weights corresponding to each distributed convolutional layer.
[0079] The synthesis unit is used to synthesize the mean and variance of the Gaussian distribution that the weights of each distributed convolutional layer follow, as well as the weights of each distributed convolutional layer, to obtain the first weight parameter corresponding to each distributed convolutional layer.
[0080] Furthermore, the sampling unit includes:
[0081] The selection subunit is used to select n first distribution convolutional layers from m distribution convolutional layers, where each first distribution convolutional layer corresponds to a single Gaussian distribution;
[0082] The first calculation subunit is used to substitute the random variable, the mean and variance of the Gaussian distribution into the weight sampling formula to calculate the weights corresponding to each of the first distribution convolutional layers, wherein the weight sampling formula is: , For the weight, The mean of the Gaussian distribution is given. Let V be the variance of the Gaussian distribution. Let be the random variable, representing a random variable within the variance range;
[0083] A subunit is set up to set the weights of the remaining distributed convolutional layers according to the Gaussian distribution that each of the distributed convolutional layers follows, using the weights corresponding to each of the first distributed convolutional layers, so as to obtain the weights corresponding to each of the distributed convolutional layers.
[0084] Furthermore, the convolution module 2 includes:
[0085] The first calculation unit is used to substitute the scale parameter, the shift parameter, and the first weight parameter corresponding to the distributed convolutional layer into the reparameterization calculation formula to calculate the second weight parameter, wherein the reparameterization calculation formula is: , This is the second weight parameter. For the scale parameter, The shift parameter; The weights are those corresponding to the distributed convolutional layer.
[0086] Furthermore, the gradient update module 3 includes:
[0087] The second calculation unit is used in the backward gradient update stage of model training to perform derivative calculations based on the preset standard loss function, the random variable, the first weight parameter, and the second weight parameter, respectively, to calculate the gradient values corresponding to the scale parameter, shift parameter, and the mean and variance of the Gaussian distribution followed by the distributed convolutional layer. The second calculation unit includes:
[0088] The second calculation subunit is used to substitute the scale parameter, the second weight parameter, and the preset standard loss function into the first gradient calculation formula to perform differentiation calculation, thereby obtaining the gradient value corresponding to the mean of the Gaussian distribution, wherein the first gradient calculation formula is: , The gradient value corresponding to the mean of the Gaussian distribution is... The preset standard loss function;
[0089] The third calculation subunit is used to substitute the scale parameter, the second weight parameter, the preset standard loss function, and the random variable into the second gradient calculation formula to perform differentiation calculation, thereby obtaining the gradient value corresponding to the variance of the Gaussian distribution, wherein the second gradient calculation formula is: , The gradient value corresponding to the variance of the Gaussian distribution;
[0090] The fourth calculation subunit is used to substitute the preset standard loss function, the first weight parameter, and the second weight parameter into the third gradient calculation formula to perform differentiation calculation, thereby obtaining the gradient value corresponding to the scale parameter, wherein the third gradient calculation formula is: , The gradient value corresponding to the scale parameter;
[0091] The fifth calculation subunit is used to substitute the preset standard loss function and the second weight parameter into the fourth gradient calculation formula to perform differentiation calculation, thereby obtaining the gradient value corresponding to the shift parameter, wherein the fourth gradient calculation formula is: , This is the gradient value corresponding to the shift parameter.
[0092] In this embodiment, each module, unit, and subunit in the distributed convolution model construction device is used to perform each step in the above-described distributed convolution model construction method, and its specific implementation process will not be described in detail here.
[0093] Reference Figure 4 An embodiment of this disclosure also provides an image-based medical record retrieval device, comprising:
[0094] Module 5 is used to acquire case images;
[0095] Mapping module 6 is used to extract features from the case images using a distributed convolutional model and map them into low-dimensional vectors. The distributed convolutional model is a deep learning model constructed using any of the distributed convolutional model construction methods described above.
[0096] The first screening module 7 is used to search for a number of first case information that have a first similarity to the low-dimensional vector that reaches a first threshold or above from a preset database, and output each first case information to the display interface.
[0097] Furthermore, the first case information includes historical case text, and the case retrieval device further includes:
[0098] Receiver module 8 is used to receive the medical record text input by the user;
[0099] The second filtering module 9 is used to calculate the similarity between the case text and each of the historical case texts, filter out a number of second case information that have a second similarity of more than a second threshold with the case text from each of the first case information, and display each of the second case information in descending order on the display interface according to their respective second similarity.
[0100] In this embodiment, each module in the image-based case retrieval device is used to perform the corresponding steps in the image-based case retrieval method described above, and the specific implementation process is not described in detail here.
[0101] This embodiment provides a device for constructing a distributed convolutional model and a case retrieval device. The distributed convolutional model includes multiple distributed convolutional layers. During model construction, model initialization is first performed to obtain the scale parameters, shift parameters, and first weight parameters for each distributed convolutional layer. Then, model training is performed. In the forward convolution stage, the first weight parameters for each distributed convolutional layer are reparameterized using the scale and shift parameters respectively, resulting in second weight parameters for each distributed convolutional layer. Next, model training continues. In the backward gradient update stage, a preset standard loss function and random variables are called, and the derivatives of the preset standard loss function, random variables, first weight parameters, and second weight parameters are calculated to obtain gradient update parameters. Finally, the distribution of the model is optimized based on the gradient update parameters, and model training continues until the distributed convolutional model converges. The distributed convolutional model constructed based on this disclosure can significantly compress the convolutional model, reducing its complexity, thereby enabling the distributed convolutional model to be deployed on medical displays with limited computing resources without affecting its functionality. When performing case retrieval, the user-input case image is mapped into a low-dimensional vector using a distributed convolution model. Then, information on several first cases with a first similarity of more than a first threshold to the low-dimensional vector is searched from a preset database. This method is convenient, fast, and highly accurate.
[0102] Reference Figure 5 This disclosure also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data such as historical case information. The network interface allows communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for constructing a distributed convolutional model and an image-based case retrieval method.
[0103] The processor described above executes the following steps in constructing the distributed convolutional model:
[0104] S1: Perform model initialization to obtain the scale parameter, shift parameter, and first weight parameter of each distributed convolutional layer;
[0105] S2: Perform model training. In the forward convolution stage, use the scale parameter and shift parameter corresponding to each of the distributed convolutional layers to reparameterize the first weight parameter corresponding to each of the distributed convolutional layers to obtain the second weight parameter corresponding to each of the distributed convolutional layers.
[0106] S3: Perform model training. In the backward gradient update stage, call the preset standard loss function and random variables, and calculate the gradient update parameters by taking the derivative of the preset standard loss function, the random variables, the first weight parameter and the second weight parameter.
[0107] S4: Optimize the model distribution by updating the parameters according to the gradient, and continue training the model until the distributed convolution model converges.
[0108] Furthermore, the distributed convolutional model includes m distributed convolutional layers, and the step of initializing the model to obtain the first weight parameters of each distributed convolutional layer includes:
[0109] S101: Construct n Gaussian distributions and initialize the mean and variance of each Gaussian distribution, wherein the weights of m distributed convolutional layers follow the n Gaussian distributions and m / n is greater than 2;
[0110] S102: Retrieve the random variable, and perform weight sampling based on the mean and variance of the Gaussian distribution that the random variable and the weights of each distributed convolutional layer follow, to obtain the weights corresponding to each distributed convolutional layer;
[0111] S103: By combining the mean and variance of the Gaussian distribution followed by the weights of each distributed convolutional layer, and the weights of each distributed convolutional layer, the first weight parameter corresponding to each distributed convolutional layer is obtained.
[0112] Further, the step of retrieving the random variable and sampling the weights according to the mean and variance of the Gaussian distribution followed by the random variable and the weights of each distributed convolutional layer to obtain the weights corresponding to each distributed convolutional layer includes:
[0113] S1021: Select n first distribution convolutional layers from m distributed convolutional layers, where each first distribution convolutional layer corresponds to a single Gaussian distribution;
[0114] S1022: Substitute the random variable, the mean and variance of the Gaussian distribution into the weight sampling formula to calculate the weights corresponding to each of the first distribution convolutional layers, wherein the weight sampling formula is: , For the weight, The mean of the Gaussian distribution is given. Let V be the variance of the Gaussian distribution. Let be the random variable, representing a random variable within the variance range;
[0115] S1023: According to the Gaussian distribution that each of the distributed convolutional layers follows, the weights of the remaining distributed convolutional layers are set with the weights corresponding to each of the first distributed convolutional layers, so as to obtain the weights corresponding to each of the distributed convolutional layers.
[0116] Furthermore, the step of performing model training, in the forward convolution stage, reparameterizing the first weight parameters corresponding to each of the distributed convolutional layers using the scale parameter and shift parameter respectively, to obtain the second weight parameters corresponding to each of the distributed convolutional layers, includes:
[0117] S201: Substitute the scale parameter, the shift parameter, and the first weight parameter corresponding to the distributed convolutional layer into the reparameterization calculation formula to calculate the second weight parameter, wherein the reparameterization calculation formula is: , This is the second weight parameter. For the scale parameter, The shift parameter; The weights are those corresponding to the distributed convolutional layer.
[0118] Furthermore, the step of performing model training, in the backward gradient update stage, involves calling a preset standard loss function and random variables, and calculating the gradient update parameters by performing derivative calculations based on the preset standard loss function, the random variables, the first weight parameter, and the second weight parameter, including:
[0119] S301: In the backward gradient update stage of model training, the gradient values corresponding to the scale parameter, shift parameter, mean, and variance of the Gaussian distribution followed by the distributed convolutional layer are calculated by performing derivative calculations based on the preset standard loss function, the random variable, the first weight parameter, and the second weight parameter.
[0120] S302: The calculation logic for the gradient value corresponding to the mean of the Gaussian distribution is as follows: Substitute the scale parameter, the second weight parameter, and the preset standard loss function into the first gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the mean of the Gaussian distribution, wherein the first gradient calculation formula is: , The gradient value corresponding to the mean of the Gaussian distribution is... The preset standard loss function;
[0121] S304: The calculation logic for the gradient value corresponding to the variance of the Gaussian distribution is as follows: Substitute the scale parameter, the second weight parameter, the preset standard loss function, and the random variable into the second gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the variance of the Gaussian distribution, wherein the second gradient calculation formula is: , The gradient value corresponding to the variance of the Gaussian distribution;
[0122] S305: The calculation logic for the gradient value corresponding to the scale parameter is as follows: Substitute the preset standard loss function, the first weight parameter, and the second weight parameter into the third gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the scale parameter, wherein the third gradient calculation formula is: , The gradient value corresponding to the scale parameter;
[0123] S306: The calculation logic for the gradient value corresponding to the shift parameter is as follows: Substitute the preset standard loss function and the second weight parameter into the fourth gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the shift parameter, wherein the fourth gradient calculation formula is: , This is the gradient value corresponding to the shift parameter.
[0124] The processor described above executes the steps of the image-based case retrieval method described above:
[0125] A1: Obtain medical images;
[0126] A2: The case images are feature extracted using a distributed convolutional model and mapped to low-dimensional vectors. The distributed convolutional model is a deep learning model constructed using the method described in any of the above embodiments.
[0127] A3: Search the preset database for a number of first case information that have a first similarity of more than a first threshold with the low-dimensional vector, and output each first case information to the display interface.
[0128] Furthermore, the first case information includes historical case text. Following the step of searching a preset database for several case information entries with a first similarity to the low-dimensional vector exceeding a first threshold, and outputting each of the first case information entries to the display interface, the method further includes:
[0129] A4: Receives the patient's medical record text input by the user;
[0130] A5: Calculate the similarity between the case text and each of the historical case texts, select several second case information from each of the first case information that have a second similarity of more than a second threshold with the case text, and display each of the second case information in descending order on the display interface according to their respective second similarity.
[0131] An embodiment of this disclosure also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for constructing a distributed convolutional model and an image-based case retrieval method. The method for constructing the distributed convolutional model specifically includes:
[0132] S1: Perform model initialization to obtain the scale parameter, shift parameter, and first weight parameter of each distributed convolutional layer;
[0133] S2: Perform model training. In the forward convolution stage, use the scale parameter and shift parameter corresponding to each of the distributed convolutional layers to reparameterize the first weight parameter corresponding to each of the distributed convolutional layers to obtain the second weight parameter corresponding to each of the distributed convolutional layers.
[0134] S3: Perform model training. In the backward gradient update stage, call the preset standard loss function and random variables, and calculate the gradient update parameters by taking the derivative of the preset standard loss function, the random variables, the first weight parameter and the second weight parameter.
[0135] S4: Optimize the model distribution by updating the parameters according to the gradient, and continue training the model until the distributed convolution model converges.
[0136] Furthermore, the distributed convolutional model includes m distributed convolutional layers, and the step of initializing the model to obtain the first weight parameters of each distributed convolutional layer includes:
[0137] S101: Construct n Gaussian distributions and initialize the mean and variance of each Gaussian distribution, wherein the weights of m distributed convolutional layers follow the n Gaussian distributions and m / n is greater than 2;
[0138] S102: Retrieve the random variable, and perform weight sampling based on the mean and variance of the Gaussian distribution that the random variable and the weights of each distributed convolutional layer follow, to obtain the weights corresponding to each distributed convolutional layer;
[0139] S103: By combining the mean and variance of the Gaussian distribution followed by the weights of each distributed convolutional layer, and the weights of each distributed convolutional layer, the first weight parameter corresponding to each distributed convolutional layer is obtained.
[0140] Further, the step of retrieving the random variable and sampling the weights according to the mean and variance of the Gaussian distribution followed by the random variable and the weights of each distributed convolutional layer to obtain the weights corresponding to each distributed convolutional layer includes:
[0141] S1021: Select n first distribution convolutional layers from m distributed convolutional layers, where each first distribution convolutional layer corresponds to a single Gaussian distribution;
[0142] S1022: Substitute the random variable, the mean and variance of the Gaussian distribution into the weight sampling formula to calculate the weights corresponding to each of the first distribution convolutional layers, wherein the weight sampling formula is: , For the weight, The mean of the Gaussian distribution is given. Let V be the variance of the Gaussian distribution. Let be the random variable, representing a random variable within the variance range;
[0143] S1023: According to the Gaussian distribution that each of the distributed convolutional layers follows, the weights of the remaining distributed convolutional layers are set with the weights corresponding to each of the first distributed convolutional layers, so as to obtain the weights corresponding to each of the distributed convolutional layers.
[0144] Furthermore, the step of performing model training, in the forward convolution stage, reparameterizing the first weight parameters corresponding to each of the distributed convolutional layers using the scale parameter and shift parameter respectively, to obtain the second weight parameters corresponding to each of the distributed convolutional layers, includes:
[0145] S201: Substitute the scale parameter, the shift parameter, and the first weight parameter corresponding to the distributed convolutional layer into the reparameterization calculation formula to calculate the second weight parameter, wherein the reparameterization calculation formula is: , This is the second weight parameter. For the scale parameter, The shift parameter; The weights are those corresponding to the distributed convolutional layer.
[0146] Furthermore, the step of performing model training, in the backward gradient update stage, involves calling a preset standard loss function and random variables, and calculating the gradient update parameters by performing derivative calculations based on the preset standard loss function, the random variables, the first weight parameter, and the second weight parameter, including:
[0147] S301: In the backward gradient update stage of model training, the gradient values corresponding to the scale parameter, shift parameter, mean, and variance of the Gaussian distribution followed by the distributed convolutional layer are calculated by performing derivative calculations based on the preset standard loss function, the random variable, the first weight parameter, and the second weight parameter.
[0148] S302: The calculation logic for the gradient value corresponding to the mean of the Gaussian distribution is as follows: Substitute the scale parameter, the second weight parameter, and the preset standard loss function into the first gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the mean of the Gaussian distribution, wherein the first gradient calculation formula is: , The gradient value corresponding to the mean of the Gaussian distribution is... The preset standard loss function;
[0149] S304: The calculation logic for the gradient value corresponding to the variance of the Gaussian distribution is as follows: Substitute the scale parameter, the second weight parameter, the preset standard loss function, and the random variable into the second gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the variance of the Gaussian distribution, wherein the second gradient calculation formula is: , The gradient value corresponding to the variance of the Gaussian distribution;
[0150] S305: The calculation logic for the gradient value corresponding to the scale parameter is as follows: Substitute the preset standard loss function, the first weight parameter, and the second weight parameter into the third gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the scale parameter, wherein the third gradient calculation formula is: , The gradient value corresponding to the scale parameter;
[0151] S306: The calculation logic for the gradient value corresponding to the shift parameter is as follows: Substitute the preset standard loss function and the second weight parameter into the fourth gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the shift parameter, wherein the fourth gradient calculation formula is: , This is the gradient value corresponding to the shift parameter.
[0152] The image-based case retrieval method is as follows:
[0153] A1: Obtain medical images;
[0154] A2: The case images are feature extracted using a distributed convolutional model and mapped to low-dimensional vectors. The distributed convolutional model is a deep learning model constructed using the method described in any of the above embodiments.
[0155] A3: Search the preset database for a number of first case information that have a first similarity of more than a first threshold with the low-dimensional vector, and output each first case information to the display interface.
[0156] Furthermore, the first case information includes historical case text. Following the step of searching a preset database for several case information entries with a first similarity to the low-dimensional vector exceeding a first threshold, and outputting each of the first case information entries to the display interface, the method further includes:
[0157] A4: Receives the patient's medical record text input by the user;
[0158] A5: Calculate the similarity between the case text and each of the historical case texts, select several second case information from each of the first case information that have a second similarity of more than a second threshold with the case text, and display each of the second case information in descending order on the display interface according to their respective second similarity.
[0159] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media provided in this disclosure and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0160] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, first object, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, first object, or method. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, first object, or method that includes that element.
[0161] The above description is only a preferred embodiment of this disclosure and does not limit the patent scope of this disclosure. Any equivalent structural or procedural changes made based on the content of this disclosure and its drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this disclosure.
Claims
1. A method for constructing a distributed convolutional model, wherein, The distributed convolutional model includes multiple distributed convolutional layers, and the construction method includes: Perform model initialization to obtain the scale parameter, shift parameter, and first weight parameter of each of the distributed convolutional layers; During model training, in the forward convolution stage, the first weight parameters corresponding to each of the distributed convolutional layers are reparameterized using the scale parameter and the shift parameter respectively, to obtain the second weight parameters corresponding to each of the distributed convolutional layers. During model training, in the backward gradient update phase, a preset standard loss function and random variables are called, and the gradient update parameters are obtained by calculating the derivative based on the preset standard loss function, the random variables, the first weight parameter and the second weight parameter. The distribution of the model is optimized by updating the parameters according to the gradient, and the model training continues until the distributed convolution model converges. The distributed convolutional model includes m distributed convolutional layers. The step of initializing the model and obtaining the first weight parameters of each distributed convolutional layer includes: Construct n Gaussian distributions and initialize the mean and variance of each Gaussian distribution, wherein the weights of m distributed convolutional layers follow the n Gaussian distributions and m / n is greater than 2; The random variable is retrieved, and the weights are sampled according to the mean and variance of the Gaussian distribution that the random variable and the weights of each distributed convolutional layer follow, so as to obtain the weights corresponding to each distributed convolutional layer. By combining the mean and variance of the Gaussian distribution followed by the weights of each distributed convolutional layer, and the weights of each distributed convolutional layer, the first weight parameter corresponding to each distributed convolutional layer is obtained.
2. The method for constructing a distributed convolutional model according to claim 1, wherein, The step of retrieving the random variable and sampling the weights according to the mean and variance of the Gaussian distribution followed by the random variable and the weights of each distributed convolutional layer to obtain the weights corresponding to each distributed convolutional layer includes: From the m distributed convolutional layers, n first distributed convolutional layers are selected, and each first distributed convolutional layer corresponds to a single Gaussian distribution; Substituting the random variable, the mean, and the variance of the Gaussian distribution into the weight sampling formula, the weights corresponding to each of the first distribution convolutional layers are calculated, wherein the weight sampling formula is: , For the weight, The mean of the Gaussian distribution is given. Let V be the variance of the Gaussian distribution. Let be the random variable, representing a random variable within the variance range; According to the Gaussian distribution that each of the distributed convolutional layers follows, the weights of the remaining distributed convolutional layers are set with the weights corresponding to each of the first distributed convolutional layers, so as to obtain the weights corresponding to each of the distributed convolutional layers.
3. The method for constructing a distributed convolutional model according to claim 2, wherein, The step of training the model, in the forward convolution stage, reparameterizing the first weight parameters corresponding to each of the distributed convolutional layers using the scale parameter and shift parameter respectively, to obtain the second weight parameters corresponding to each of the distributed convolutional layers, includes: Substituting the scale parameter, shift parameter, and first weight parameter corresponding to the distributed convolutional layer into the reparameterization calculation formula, the second weight parameter is calculated, wherein the reparameterization calculation formula is: , This is the second weight parameter. For the scale parameter, The shift parameter; The weights are those corresponding to the distributed convolutional layer.
4. The method for constructing a distributed convolutional model according to claim 3, wherein, The step of performing model training, in the backward gradient update phase, involves calling a preset standard loss function and random variables, and calculating the gradient update parameters by performing derivative calculations based on the preset standard loss function, the random variables, the first weight parameter, and the second weight parameter. This includes: During the backward gradient update phase of model training, derivatives are calculated based on the preset standard loss function, the random variable, the first weight parameter, and the second weight parameter to obtain the gradient values corresponding to the scale parameter, shift parameter, mean, and variance of the Gaussian distribution followed by the distributed convolutional layer. The calculation logic for the gradient value corresponding to the mean of the Gaussian distribution is as follows: Substitute the scale parameter, the second weight parameter, and the preset standard loss function into the first gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the mean of the Gaussian distribution. The first gradient calculation formula is: , The gradient value corresponding to the mean of the Gaussian distribution is... The preset standard loss function; The calculation logic for the gradient value corresponding to the variance of the Gaussian distribution is as follows: Substitute the scale parameter, the second weight parameter, the preset standard loss function, and the random variable into the second gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the variance of the Gaussian distribution. The second gradient calculation formula is: , The gradient value corresponding to the variance of the Gaussian distribution; The calculation logic for the gradient value corresponding to the scale parameter is as follows: Substitute the preset standard loss function, the first weight parameter, and the second weight parameter into the third gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the scale parameter. The third gradient calculation formula is: , The gradient value corresponding to the scale parameter; The calculation logic for the gradient value corresponding to the shift parameter is as follows: Substitute the preset standard loss function and the second weight parameter into the fourth gradient calculation formula and perform differentiation to obtain the gradient value corresponding to the shift parameter. The fourth gradient calculation formula is: , This is the gradient value corresponding to the shift parameter.
5. An image-based case retrieval method, wherein, include: Obtain medical images; Feature extraction is performed on the case images using a distributed convolutional model, and the images are mapped to low-dimensional vectors. The distributed convolutional model is a deep learning model constructed using the method described in any one of claims 1 to 4. Search the preset database for a number of first case information that have a first similarity of more than a first threshold with the low-dimensional vector, and output each first case information to the display interface.
6. The image-based case retrieval method according to claim 5, wherein, The first case information includes historical case text. Following the step of searching a preset database for several case information entries with a first similarity score exceeding a first threshold that matches the low-dimensional vector, and then outputting each of the first case information entries to the display interface, the process includes: Receive patient medical record text input by the user; The similarity between the case text and each of the historical case texts is calculated. Several second case information that have a second similarity of more than a second threshold with the case text are selected from each of the first case information. The second case information is then arranged in descending order on the display interface according to their respective second similarity.
7. A device for constructing a distributed convolutional model, wherein, The distributed convolutional model includes multiple distributed convolutional layers, and the construction device includes: An initialization module is used to initialize the model and obtain the scale parameter, shift parameter, and first weight parameter of each of the distributed convolutional layers. The convolution module is used for model training. In the forward convolution stage, the first weight parameters corresponding to each of the distributed convolutional layers are reparameterized using the scale parameter and the shift parameter respectively to obtain the second weight parameters corresponding to each of the distributed convolutional layers. The gradient update module is used for model training. In the backward gradient update stage, it calls a preset standard loss function and random variables, and calculates the gradient update parameters by performing derivative calculations based on the preset standard loss function, the random variables, the first weight parameter and the second weight parameter. The training module is used to update the parameters of the model according to the gradient, optimize the distribution of the model, and continue to train the model until the distributed convolution model converges. The distributed convolutional model includes m distributed convolutional layers. The step of initializing the model and obtaining the first weight parameters of each distributed convolutional layer includes: Construct n Gaussian distributions and initialize the mean and variance of each Gaussian distribution, wherein the weights of m distributed convolutional layers follow the n Gaussian distributions and m / n is greater than 2; The random variable is retrieved, and the weights are sampled according to the mean and variance of the Gaussian distribution that the random variable and the weights of each distributed convolutional layer follow, so as to obtain the weights corresponding to each distributed convolutional layer. By combining the mean and variance of the Gaussian distribution followed by the weights of each distributed convolutional layer, and the weights of each distributed convolutional layer, the first weight parameter corresponding to each distributed convolutional layer is obtained.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein... When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.