Data processing method and device, electronic equipment and storage medium

CN122551024APending Publication Date: 2026-08-11ALIBABA DAMOYUAN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-08
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003]本申请实施例提供了一种数据处理方法、装置、电子设备及存储介质,以至少解决相关技术中基于多示例学习对图像块进行全局聚合分类实现医学图像辅助诊断,存在效率比较低的技术问题

Benefits of technology

[0026]In this embodiment, a medical image to be analyzed is acquired; the medical image is then subjected to hierarchical sampling using a target image analysis model to determine a set of target image blocks. The target image analysis model is trained using a sample medical image dataset and a deep neural network through hierarchical reinforcement learning. Hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image; determining a set of target image blocks from multiple image blocks contained within the target image region; determining the method for analyzing the medical image based on the set of target image blocks; and performing hierarchical sampling of the medical image using the target image analysis model trained through hierarchical reinforcement learning to determine a set of target image blocks with discriminative value, thus avoiding redundant sampling and computation and improving sampling efficiency and key information coverage. Analysis is then performed based on the determined set of target image blocks, linking the analysis results to the set of target image blocks, enhancing the traceability and reliability of the analysis results. This achieves the goal of efficient, accurate, and evidence-supported medical image-assisted diagnosis, thereby improving the efficiency and accuracy of medical image-assisted diagnosis. Furthermore, it solves the technical problem of low efficiency in related technologies that use multi-instance learning to perform global aggregation and classification of image blocks for medical image-assisted diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122551024A_ABST
    Figure CN122551024A_ABST
Patent Text Reader

Abstract

This application discloses a data processing method, apparatus, electronic device, and storage medium. Relating to the field of artificial intelligence, the method includes: acquiring a medical image to be analyzed; performing hierarchical sampling of the medical image using a target image analysis model to determine a set of target image patches, wherein the target image analysis model is obtained by training a deep neural network using hierarchical reinforcement learning on a sample medical image dataset; and determining the analysis result of the medical image based on the set of target image patches. This application solves the technical problem of low efficiency in related technologies that use multi-instance learning to perform global aggregation and classification of image patches for medical image-assisted diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more specifically, to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Medical image-assisted diagnosis can provide doctors with data references. Currently, the main technology used in this field is Multiple Instance Learning (MIL) to aggregate global features of image patches in medical images to achieve overall image classification. The sampling process uses random or uniform coverage strategies based on fixed heatmaps. Under limited computing resources, the proportion of redundant information is relatively high, resulting in low inference efficiency and accuracy of assisted diagnosis. Summary of the Invention

[0003] This application provides a data processing method, apparatus, electronic device, and storage medium to at least solve the technical problem in the related art where the efficiency of global aggregation and classification of image blocks based on multi-instance learning to achieve medical image-assisted diagnosis is relatively low.

[0004] According to one aspect of the embodiments of this application, a data processing method is provided, comprising: acquiring a medical image to be analyzed; performing hierarchical sampling on the medical image using a target image analysis model to determine a target image block set, wherein the target image analysis model is obtained by training a deep neural network using a sample medical image dataset through hierarchical reinforcement learning, and the hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image, determining a target image block set from multiple image blocks contained in the target image region; and determining the analysis result of the medical image based on the target image block set.

[0005] Furthermore, the medical image is subjected to hierarchical sampling through a target image analysis model to determine the target image block set, which includes: dividing the medical image into multiple candidate image regions through the preprocessing layer of the target image analysis model; further dividing the candidate image regions into multiple image blocks; extracting features from the image blocks to obtain the feature vectors corresponding to the image blocks; determining the feature vectors corresponding to the candidate image regions based on the feature vectors corresponding to the image blocks; performing nonlinear transformation and normalization on the feature vectors corresponding to the candidate image regions through the first strategy network of the target image analysis model to obtain the probability distributions corresponding to the candidate image regions; and determining the target image region from the multiple candidate image regions based on the probability distributions corresponding to the multiple candidate image regions; and performing nonlinear transformation and normalization on the feature vectors corresponding to the multiple image blocks contained in the target image region through the second strategy network of the target image analysis model to obtain the probability distributions corresponding to the multiple image blocks contained in the target image region; and determining the target image block set from the multiple image blocks contained in the target image region based on the probability distributions corresponding to the multiple image blocks contained in the target image region.

[0006] Furthermore, based on the target image patch set, the analysis results for the medical image are determined as follows: the feature vectors corresponding to the image patches in the target image patch set are weighted and aggregated through the output layer of the target image analysis model to obtain the classification probability corresponding to the medical image; and the analysis results are determined based on the classification probability.

[0007] Further, the target image analysis model is obtained through the following steps: a first deep neural network is trained based on a sample medical image dataset until a first preset convergence condition is met to obtain a classification model; a second deep neural network is trained based on the sample medical image dataset and the classification model until a second preset convergence condition is met to obtain an initial policy network; the sample medical image dataset, the classification model, the initial policy network, and the third deep neural network are jointly trained until a third preset convergence condition is met to obtain a first policy network and a second policy network; the target image analysis model is determined based on the first policy network and the second policy network.

[0008] Further, training the first deep neural network based on the sample medical image dataset until the first preset convergence condition is met to obtain the classification model includes: dividing the sample medical images in the sample medical image dataset to obtain multiple sample image patches corresponding to the sample medical images; extracting features from the sample image patches in the multiple sample image patches through the first deep neural network to obtain the feature vectors corresponding to the sample image patches; performing weighted aggregation on the feature vectors corresponding to the sample image patches to obtain the classification probability corresponding to the sample medical images; and training the first deep neural network based on the classification probability corresponding to the sample medical images, the true labels corresponding to the sample medical images, and the first loss function until the first preset convergence condition is met to obtain the classification model.

[0009] Further, the second deep neural network is trained based on the sample medical image dataset and the classification model until the second preset convergence condition is met, resulting in the initial policy network. This includes: dividing the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images; further dividing the sample candidate image regions within the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; for a first sample candidate image region, extracting features from the sample image blocks within the multiple sample image blocks contained in the first sample candidate image region to obtain the feature vectors corresponding to the sample image blocks; and then performing nonlinear transformation and normalization processing on the feature vectors corresponding to the multiple sample image blocks through the second deep neural network. The probability distributions corresponding to multiple sample image patches contained in the first sample candidate image region are obtained, wherein the first sample candidate image region is any one of the multiple sample candidate image regions; attention weights are calculated for the sample image patches in the multiple sample image patches contained in the first sample candidate image region using a classification model to obtain the attention weight distributions corresponding to the multiple sample image patches contained in the first sample candidate image region; based on the difference between the probability distributions corresponding to the multiple sample image patches contained in the first sample candidate image region and the attention weight distributions corresponding to the multiple sample image patches contained in the first sample candidate image region, and the second loss function, the second deep neural network is trained until the second preset convergence condition is met to obtain the initial policy network.

[0010] Further, the first and second policy networks are jointly trained based on the sample medical image dataset, classification model, initial policy network, and third deep neural network until the third preset convergence condition is met. This process includes: dividing the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images; further dividing the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; extracting features from the sample image blocks among the multiple sample image blocks to obtain feature vectors corresponding to the sample image blocks; determining the feature vectors corresponding to the sample candidate image regions based on the feature vectors corresponding to the sample image blocks; performing nonlinear transformation and normalization on the feature vectors corresponding to the sample candidate image regions among the multiple sample candidate image regions through the third deep neural network to obtain the probability distributions corresponding to the multiple sample candidate image regions; determining the first target sample candidate image region from the multiple sample candidate image regions based on the probability distributions corresponding to the multiple sample candidate image regions; and jointly training the first target sample candidate image region, classification model, initial policy network, and third deep neural network until the third preset convergence condition is met to obtain the first and second policy networks.

[0011] Further, the joint training of the first target sample candidate image region, classification model, initial policy network, and third deep neural network until the third preset convergence condition is met, resulting in the first policy network and the second policy network, includes: performing nonlinear transformation and normalization on the feature vectors corresponding to multiple sample image blocks contained in the first target sample candidate image region through the initial policy network to obtain the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region; determining the first target sample image block set from the multiple sample image blocks contained in the first target sample candidate image region based on the probability distribution; determining the target reward value corresponding to the first target sample image block set through the classification model; and updating the parameters of the initial policy network and the third deep neural network based on the target reward value and the near-end policy optimization algorithm until the third preset convergence condition is met, thus obtaining the first policy network and the second policy network.

[0012] Further, determining the target reward value corresponding to the first target sample image patch set through a classification model includes: weighting and aggregating the feature vectors corresponding to the sample image patches in the first target sample image patch set using a classification model to obtain the classification probability corresponding to the sample medical image, calculating the logarithmic difference between the classification probability corresponding to the sample medical image and the classification probability after the previous round of sampling, and using the logarithmic difference as the first reward value; determining the second reward value based on the number of sample image patches in the first target sample image patch set; calculating the attention weights of the sample image patches in the first target sample image patch set using a classification model to obtain the attention weight distribution corresponding to the sample image patches in the first target sample image patch set, and determining the third reward value based on the attention weight distribution corresponding to the sample image patches in the first target sample image patch set; and calculating the target reward value based on the first reward value, the second reward value, and the third reward value.

[0013] According to another aspect of the embodiments of this application, a data processing method is also provided, comprising: acquiring a medical image to be analyzed uploaded by a client; performing hierarchical sampling on the medical image in a cloud server using a target image analysis model to determine a target image block set, wherein the target image analysis model is obtained by training a deep neural network using a sample medical image dataset through hierarchical reinforcement learning, and the hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image; determining a target image block set from multiple image blocks contained in the target image region; determining the analysis result of the medical image based on the target image block set; and feeding back the analysis result to the client.

[0014] According to another aspect of the embodiments of this application, a data processing apparatus is also provided, comprising: an acquisition unit for acquiring a medical image to be analyzed; a first determination unit for performing hierarchical sampling on the medical image using a target image analysis model to determine a target image block set, wherein the target image analysis model is obtained by hierarchical reinforcement learning training on a deep neural network using a sample medical image dataset, and the hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image, and determining a target image block set from multiple image blocks contained in the target image region; and a second determination unit for determining the analysis result of the medical image based on the target image block set.

[0015] Further, the first determining unit includes: a first processing subunit, used to divide the medical image through the preprocessing layer of the target image analysis model to obtain multiple candidate image regions, and to further divide the candidate image regions among the multiple candidate image regions to obtain multiple image blocks; a second processing subunit, used to extract features from the image blocks among the multiple image blocks to obtain feature vectors corresponding to the image blocks, and to determine the feature vectors corresponding to the candidate image regions based on the feature vectors corresponding to the image blocks; a third processing subunit, used to perform nonlinear transformation and normalization processing on the feature vectors corresponding to the candidate image regions among the multiple candidate image regions through the first strategy network of the target image analysis model to obtain the probability distributions corresponding to the multiple candidate image regions, and to determine the target image region from the multiple candidate image regions based on the probability distributions corresponding to the multiple candidate image regions; and a fourth processing subunit, used to perform nonlinear transformation and normalization processing on the feature vectors corresponding to the multiple image blocks contained in the target image region through the second strategy network of the target image analysis model to obtain the probability distributions corresponding to the multiple image blocks contained in the target image region, and to determine the target image block set from the multiple image blocks contained in the target image region based on the probability distributions corresponding to the multiple image blocks contained in the target image region.

[0016] Furthermore, the second determining unit includes: a first determining subunit, used to perform weighted aggregation of the feature vectors corresponding to the image blocks in the target image block set through the output layer of the target image analysis model to obtain the classification probability corresponding to the medical image; and a second determining subunit, used to determine the analysis result based on the classification probability.

[0017] Furthermore, the device also includes the following units for obtaining a target image analysis model through the following steps: a first training unit for training a first deep neural network based on a sample medical image dataset until a first preset convergence condition is met, thereby obtaining a classification model; a second training unit for training a second deep neural network based on the sample medical image dataset and the classification model until a second preset convergence condition is met, thereby obtaining an initial policy network; a third training unit for jointly training the sample medical image dataset, the classification model, the initial policy network, and the third deep neural network until a third preset convergence condition is met, thereby obtaining a first policy network and a second policy network; and a third determination unit for determining the target image analysis model based on the first policy network and the second policy network.

[0018] Further, the first training unit includes: a first partitioning subunit, used to partition the sample medical images in the sample medical image dataset to obtain multiple sample image patches corresponding to the sample medical images; a first extraction subunit, used to extract features from the sample image patches in the multiple sample image patches using a first deep neural network to obtain feature vectors corresponding to the sample image patches; a first calculation subunit, used to perform weighted aggregation on the feature vectors corresponding to the sample image patches to obtain the classification probability corresponding to the sample medical images; and a first training subunit, used to train the first deep neural network based on the classification probability corresponding to the sample medical images, the true labels corresponding to the sample medical images, and a first loss function until a first preset convergence condition is met to obtain a classification model.

[0019] Further, the second training unit includes: a second partitioning subunit, used to partition the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images, and to partition the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; and a second extraction subunit, used to extract features from the sample image blocks among the multiple sample image blocks contained in the first sample candidate image region to obtain feature vectors corresponding to the sample image blocks, and to perform nonlinear transformation and normalization processing on the feature vectors corresponding to the multiple sample image blocks through a second deep neural network to obtain multiple sample image blocks contained in the first sample candidate image region. The probability distribution is as follows: the first sample candidate image region is any one of the multiple sample candidate image regions; the second calculation subunit is used to calculate the attention weights of the sample image blocks in the multiple sample image blocks contained in the first sample candidate image region through a classification model, so as to obtain the attention weight distribution corresponding to the multiple sample image blocks contained in the first sample candidate image region; the second training subunit is used to train the second deep neural network based on the difference between the probability distribution corresponding to the multiple sample image blocks contained in the first sample candidate image region and the attention weight distribution corresponding to the multiple sample image blocks contained in the first sample candidate image region, and the second loss function, until the second preset convergence condition is met, so as to obtain the initial policy network.

[0020] Further, the third training unit includes: a third partitioning subunit, used to partition the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images, and to partition the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; a third extraction subunit, used to extract features from the sample image blocks among the multiple sample image blocks to obtain feature vectors corresponding to the sample image blocks, and to determine the feature vectors corresponding to the sample candidate image regions based on the feature vectors corresponding to the sample image blocks; a fifth processing subunit, used to perform nonlinear transformation and normalization processing on the feature vectors corresponding to the sample candidate image regions among the multiple sample candidate image regions through a third deep neural network to obtain the probability distributions corresponding to the multiple sample candidate image regions, and to determine the first target sample candidate image region from the multiple sample candidate image regions based on the probability distributions corresponding to the multiple sample candidate image regions; and a third training subunit, used to perform joint training based on the first target sample candidate image region, the classification model, the initial policy network, and the third deep neural network until the third preset convergence condition is met, to obtain the first policy network and the second policy network.

[0021] Further, the third training subunit includes: a first processing module, used to perform nonlinear transformation and normalization processing on the feature vectors corresponding to multiple sample image blocks contained in the first target sample candidate image region through the initial policy network to obtain the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region, and to determine the first target sample image block set from the multiple sample image blocks contained in the first target sample candidate image region based on the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region; a second processing module, used to determine the target reward value corresponding to the first target sample image block set through a classification model, and to update the parameters of the initial policy network and the third deep neural network based on the target reward value and the near-end policy optimization algorithm until the third preset convergence condition is met, to obtain the first policy network and the second policy network.

[0022] Further, the second processing module includes: a first determining submodule, used to perform weighted aggregation of the feature vectors corresponding to the sample image blocks in the first target sample image block set using a classification model to obtain the classification probability corresponding to the sample medical image, and calculate the logarithmic difference between the classification probability corresponding to the sample medical image and the classification probability after the previous round of sampling, and use the logarithmic difference as the first reward value; a second determining submodule, used to determine the second reward value based on the number of sample image blocks in the first target sample image block set; a third determining submodule, used to calculate the attention weights of the sample image blocks in the first target sample image block set using a classification model to obtain the attention weight distribution corresponding to the sample image blocks in the first target sample image block set, and determine the third reward value based on the attention weight distribution corresponding to the sample image blocks in the first target sample image block set; and a fourth determining submodule, used to calculate the target reward value based on the first reward value, the second reward value, and the third reward value.

[0023] According to another aspect of the present invention, an electronic device is also provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the data processing method described above during runtime.

[0024] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein the storage medium stores a program, and the program controls the device where the storage medium is located to execute the data processing method described above when it is running.

[0025] According to another aspect of the present invention, a computer program product is also provided, including a computer program or instructions, which, when executed by a processor, implement the data processing method described above.

[0026] In this embodiment, a medical image to be analyzed is acquired; the medical image is then subjected to hierarchical sampling using a target image analysis model to determine a set of target image blocks. The target image analysis model is trained using a sample medical image dataset and a deep neural network through hierarchical reinforcement learning. Hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image; determining a set of target image blocks from multiple image blocks contained within the target image region; determining the method for analyzing the medical image based on the set of target image blocks; and performing hierarchical sampling of the medical image using the target image analysis model trained through hierarchical reinforcement learning to determine a set of target image blocks with discriminative value, thus avoiding redundant sampling and computation and improving sampling efficiency and key information coverage. Analysis is then performed based on the determined set of target image blocks, linking the analysis results to the set of target image blocks, enhancing the traceability and reliability of the analysis results. This achieves the goal of efficient, accurate, and evidence-supported medical image-assisted diagnosis, thereby improving the efficiency and accuracy of medical image-assisted diagnosis. Furthermore, it solves the technical problem of low efficiency in related technologies that use multi-instance learning to perform global aggregation and classification of image blocks for medical image-assisted diagnosis. Attached Figure Description

[0027] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0028] Figure 1 This is a schematic diagram of a computer terminal provided according to Embodiment 1 of this application;

[0029] Figure 2 This is a flowchart of the data processing method provided according to Embodiment 1 of this application;

[0030] Figure 3 This is a schematic diagram of an optional joint training process provided according to Embodiment 1 of this application;

[0031] Figure 4 This is a flowchart of the data processing method provided according to Embodiment 2 of this application;

[0032] Figure 5 This is a schematic diagram of a data processing apparatus provided according to Embodiment 3 of this application;

[0033] Figure 6 This is a structural block diagram of an electronic device provided according to Embodiment 4 of this application. Detailed Implementation

[0034] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0037] Example 1

[0038] According to an embodiment of this application, a data processing method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0039] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method is shown. Figure 1As shown, the computer terminal (or mobile device) 10 may include a processor set 102 (the processor set 102 may include, but is not limited to, processing devices such as microprocessors (MCUs) or field-programmable gate arrays (FPGAs), and the processor set 102 may include a processor set, Figure 1 The data is illustrated using 102a, 102b, ..., 102n. A memory 104 is used for storing data, and a transmission device 106 is used for communication functions. In addition, it may include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0040] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be wholly or partially embodied in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element within the computer terminal 10 (or mobile device).

[0041] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the aforementioned data processing method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0042] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0043] The display may be a touchscreen LCD display that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0044] The MIL method is widely used in the diagnosis of medical images, such as the diagnostic analysis of whole slide images (WSI), X-ray images, and ultrasound images. This method usually divides medical images into multiple image blocks and outputs the overall classification result by globally aggregating the features of the image blocks. Its sampling process adopts a random or uniform coverage strategy based on a fixed heatmap. Under limited computing resources, it relies on static and disordered image block aggregation, is susceptible to noise instances, and has a high proportion of redundant information processing, resulting in low inference efficiency and accuracy in the diagnosis of medical images. It cannot efficiently and stably locate the decisive lesion area and lacks process interpretability.

[0045] Against the above-mentioned technical background, this application provides as follows Figure 2 The data processing method shown. Figure 2 This is a flowchart of a data processing method according to Embodiment 1 of this application. The method includes:

[0046] Step S201: Obtain the medical image to be analyzed.

[0047] Optionally, the system first acquires the medical images to be analyzed, such as pathological WSI, X-ray images, ultrasound images, etc., uploaded by the user through the interactive interface.

[0048] Step S202: The medical image is subjected to hierarchical sampling through the target image analysis model to determine the target image block set. The target image analysis model is obtained by hierarchical reinforcement learning training of a deep neural network using a sample medical image dataset. The hierarchical sampling includes: determining the target image region from multiple candidate image regions obtained by dividing the medical image, and determining the target image block set from multiple image blocks contained in the target image region.

[0049] Optionally, the acquired medical images to be analyzed are input into the target image analysis model for hierarchical sampling to determine the target image patch set. Taking the medical images to be analyzed as pathological WSIs to be diagnosed as an example, the sample medical image dataset can be a sample pathological WSI dataset with slice-level pathological diagnosis labels. The sample pathological WSI dataset is used to train a deep neural network, such as a convolutional neural network or a neural network based on a transformer architecture, through hierarchical reinforcement learning to obtain the target image analysis model.

[0050] Optionally, the hierarchical reinforcement learning architecture includes a high-level decision module (Manager) and a low-level sampling module (Worker). The Manager is responsible for selecting a region index (such as a region identifier (ID)) worth accessing within a coarse-grained candidate image region, such as determining the target cell region from multiple candidate cell regions. The Worker is responsible for performing the operation of selecting several image patches at once within the image region selected by the Manager (non-replacement sampling), such as determining multiple target patches (such as patches containing key pathological features such as tumor cell clusters and structurally disordered areas) within the target cell region.

[0051] Step S203: Determine the analysis results of the medical image based on the target image patch set.

[0052] Optionally, the analysis result of the medical image can be determined by the output layer of the target image analysis model based on the set of target image patches. The output layer can be a pre-trained classifier for type discrimination. For example, the target patch set output by the Worker can be input into the classifier for classification calculation, outputting the specific cancer type (e.g., lung cancer, stomach cancer, lymphoma, etc.) as the classification result. The classification result and its corresponding classification criteria (e.g., the region ID of the target cell region and the IDs of multiple target patches) are then combined to form the analysis result of the medical image. Alternatively, the baseline classification model obtained after joint training during hierarchical reinforcement learning can be used as the classifier. The target patch set output by the Worker can be input into the classifier for classification calculation, outputting the diagnostic probability of having cancer as the classification result. The classification result and its corresponding classification criteria (e.g., the region ID of the target cell region and the IDs of multiple target patches) are then combined to form the analysis result of the medical image.

[0053] In this scheme, a target image analysis model trained by hierarchical reinforcement learning is used to perform hierarchical sampling of medical images, identifying a set of target image patches with discriminative value. This avoids redundant sampling and computation, improving sampling efficiency and key information coverage. Analysis is then performed based on the identified set of target image patches, linking the analysis results to the set and enhancing the traceability and reliability of the results. This achieves the goal of efficient, accurate, and evidence-supported medical image-assisted diagnosis, thereby improving the efficiency and accuracy of medical image-assisted diagnosis. Furthermore, this solves the technical problem of low efficiency in related technologies that use multi-instance learning to globally aggregate and classify image patches for medical image-assisted diagnosis.

[0054] To efficiently locate key diagnostic evidence in medical images, the data processing method provided in Embodiment 1 of this application involves hierarchical sampling of the medical image using a target image analysis model to determine a set of target image blocks. This includes: dividing the medical image into multiple candidate image regions using a preprocessing layer of the target image analysis model; further dividing the candidate image regions into multiple image blocks; extracting features from the image blocks to obtain feature vectors corresponding to the image blocks; determining feature vectors corresponding to candidate image regions based on the feature vectors corresponding to the image blocks; performing nonlinear transformation and normalization on the feature vectors corresponding to the candidate image regions using a first strategy network of the target image analysis model to obtain probability distributions corresponding to the candidate image regions; and determining a target image region from the multiple candidate image regions based on the probability distributions. Finally, performing nonlinear transformation and normalization on the feature vectors corresponding to the multiple image blocks contained in the target image region using a second strategy network of the target image analysis model to obtain probability distributions corresponding to the multiple image blocks contained in the target image region; and determining a set of target image blocks from the multiple image blocks contained in the target image region based on the probability distributions.

[0055] Optionally, during the hierarchical sampling of medical images, the medical images are divided by the preprocessing layer of the target image analysis model to obtain multiple candidate image regions. The candidate image regions among the multiple candidate image regions are then divided to obtain multiple image patches. For example, the pathological WSI to be diagnosed is uniformly divided into multiple coarse-grained candidate image regions of fixed size, and each candidate image region is uniformly divided into multiple fine-grained patches of fixed size. Then, a pre-trained visual encoder is used to extract the feature vector of each patch, and the feature vector corresponding to each candidate image region is obtained by aggregating the feature vectors of each patch.

[0056] Optionally, the first policy network (Manager) of the target image analysis model performs nonlinear transformation and normalization on the feature vectors corresponding to each candidate image region. This policy network, during training, has learned which regions are more likely to contain key lesion features and outputs a selection probability distribution containing the probability of each candidate image region being selected. Then, the candidate image region with the higher probability can be selected as the Region of Interest (ROI), i.e., the target image region. For example, in a pathological WSI analysis scenario, the ROI represents a local area that may contain key lesion information, such as a tumor, inflammation, or a region of atypical cell aggregation.

[0057] Optionally, the second policy network (i.e., Worker) of the target image analysis model performs nonlinear transformation and normalization on the feature vectors corresponding to multiple image patches contained in the target image region. For example, based on the policy learned after training, the Worker performs one-time, non-replacement patch sampling within the ROI determined by the Manager to obtain local evidence with higher diagnostic value. It takes the feature vector of each patch within the ROI as input and outputs a probability distribution of each patch within the ROI, representing the importance score of each patch. Then, the top N patches with higher scores can be selected as target patches, which are considered to be key lesion locations, to obtain the target image patch set, where N is a positive integer.

[0058] By exploring coarse-grained ROIs through a high-level policy network and performing fine-grained patch sampling within selected ROIs through a low-level policy network, the decomposition of the search space based on multi-scale decision-making is achieved, thereby improving the efficiency of medical image-assisted diagnosis.

[0059] To achieve accurate classification and interpretable diagnosis of medical images, the data processing method provided in Embodiment 1 of this application determines the analysis results of medical images based on the target image block set by: weighting and aggregating the feature vectors corresponding to the image blocks in the target image block set through the output layer of the target image analysis model to obtain the classification probability corresponding to the medical image; and determining the analysis results based on the classification probability.

[0060] Optionally, the feature vectors of each patch in the target image patch set are aggregated by attention weighting through the output layer of the target image analysis model to calculate the conditional probability distribution of the medical image belonging to each pathological type or the diagnostic probability distribution of whether the patient has a disease (i.e., classification probability). Then, the category with the larger probability value can be selected as the classification result (i.e., the diagnosis result). For example, the input pathological WSI is lung cancer or the input pathological WSI is cancer. Then, the diagnosis result and the corresponding diagnostic basis (such as the diagnosis path sequence composed of ROI ID and patch ID) are combined to form the analysis result.

[0061] By providing diagnostic results and detailed diagnostic pathways, it can offer doctors traceable and understandable support for decision-making, thereby enhancing trust in human-machine collaborative diagnosis.

[0062] To construct a target image analysis model with hierarchical decision-making capabilities, the data processing method provided in Embodiment 1 of this application obtains the target image analysis model through the following steps: training a first deep neural network based on a sample medical image dataset until a first preset convergence condition is met to obtain a classification model; training a second deep neural network based on the sample medical image dataset and the classification model until a second preset convergence condition is met to obtain an initial policy network; jointly training the sample medical image dataset, the classification model, the initial policy network, and the third deep neural network until a third preset convergence condition is met to obtain a first policy network and a second policy network; and determining the target image analysis model based on the first policy network and the second policy network.

[0063] Optionally, a three-stage training strategy is adopted. First, the baseline classification model is pre-trained. Then, the Worker learns the course based on the expert model (i.e., the trained baseline classification model). Then, the Manager and Worker jointly perform reinforcement learning and jointly optimize the baseline classification model. Optionally, the Proximal Policy Optimization (PPO) algorithm is used to update the policy network parameters.

[0064] Optionally, a first deep neural network (such as a general medical image representation model, a large pathological visual model, or a medical image multimodal unified encoder) is first trained on a sample medical image dataset (such as labeled sample pathology WSIs in a publicly available pathology dataset) until a first preset convergence condition is met (such as the model's evaluation metric on the validation set being greater than a preset metric threshold), resulting in a trained baseline classification model (i.e., the classification model). Then, a second deep neural network (such as a convolutional neural network or a neural network based on a transformer architecture) is trained on the sample medical image dataset and the classification model until a second preset convergence condition is met (such as the spatial overlap between the patch set sampled by the initial worker and the high attention region generated by the classification model being greater than a preset metric threshold), resulting in an initial worker (i.e., the initial policy network). Then, based on the sample medical image dataset, the baseline classification model, the initial Worker, and the third deep neural network (such as a convolutional neural network or a neural network based on a transformer architecture), joint training is performed until the third preset convergence condition is met (such as the reward convergence of the policy network, the action distribution stabilizing, or the preset number of training rounds). The trained Manager (i.e., the first policy network) and the trained Worker (i.e., the second policy network) are obtained and used as the policy network of the target image analysis model.

[0065] By adopting a three-stage training strategy, the overall training stability and effectiveness are improved. By decoupling global localization and local selection through hierarchical reinforcement learning, training efficiency and strategy autonomy are enhanced.

[0066] To provide a reliable expert baseline for subsequent hierarchical reinforcement learning strategies, the data processing method provided in Embodiment 1 of this application trains a first deep neural network based on a sample medical image dataset until a first preset convergence condition is met to obtain a classification model. This includes: dividing the sample medical images in the sample medical image dataset to obtain multiple sample image blocks corresponding to the sample medical images; extracting features from the sample image blocks in the multiple sample image blocks using the first deep neural network to obtain feature vectors corresponding to the sample image blocks; weighting and aggregating the feature vectors corresponding to the sample image blocks to obtain the classification probability corresponding to the sample medical images; and training the first deep neural network based on the classification probability corresponding to the sample medical images, the true labels corresponding to the sample medical images, and a first loss function until the first preset convergence condition is met to obtain a classification model.

[0067] Optionally, during the pre-training of the baseline classification model, the sample medical images in the sample medical image dataset are divided. For example, the sample pathology WSI is uniformly divided into multiple sample patches. The feature vectors of each sample patch are extracted by the first deep neural network. The feature vectors of all sample patches or the feature vectors of several randomly sampled sample patches are weighted and aggregated to obtain the classification probability corresponding to the sample pathology WSI. The deep learning model (i.e., the first deep neural network) is trained based on the feature vectors of the sample patches, the classification probability, the true label (i.e., the global pathology label of the entire sample pathology WSI), and the first loss function (such as cross-entropy loss) until the first preset convergence condition is met (such as the optimization process continues until the classification accuracy tends to stabilize), and the trained baseline classification model is obtained.

[0068] Optionally, the baseline classification model outputs the pathological diagnosis probability of the entire sample pathology WSI by aggregating the feature vectors of sample patches. The attention weights of the model can characterize the degree of contribution of each sample patch to the diagnostic results, and can provide workers with an expert demonstration that can be imitated. That is, the baseline classification model can be used as an expert model to guide the learning of workers.

[0069] By using a pre-trained baseline classification model, the Worker is provided with an expert demonstration that can be imitated, which lays the foundation for subsequent training assisted by attention pseudo-labels, thereby reducing the reliance on fine annotation.

[0070] To obtain an initial policy network that can accurately mimic the diagnostic sampling preferences of a classification model and possess the ability to prioritize high-confidence image patches, thereby reducing the randomness and training variance in subsequent policy exploration during hierarchical reinforcement learning, the data processing method provided in Embodiment 1 of this application trains a second deep neural network based on a sample medical image dataset and a classification model until a second preset convergence condition is met, thereby obtaining the initial policy network. This includes: dividing the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images; further dividing the sample candidate image regions within the multiple sample candidate image regions to obtain multiple sample image patches corresponding to the sample candidate image regions; and for a first sample candidate image region, extracting features from the sample image patches within the multiple sample image patches contained in the first sample candidate image region to obtain the features corresponding to the sample image patches. The vectors are processed by a second deep neural network, which performs nonlinear transformation and normalization on the feature vectors corresponding to multiple sample image patches to obtain the probability distribution of multiple sample image patches contained in the first sample candidate image region. The first sample candidate image region is any one of the multiple sample candidate image regions. Attention weights are calculated for the sample image patches in the multiple sample image patches contained in the first sample candidate image region through a classification model to obtain the attention weight distribution of the multiple sample image patches contained in the first sample candidate image region. The second deep neural network is trained based on the difference between the probability distribution and the attention weight distribution of the multiple sample image patches contained in the first sample candidate image region, and the second loss function, until the second preset convergence condition is met to obtain the initial policy network.

[0071] Optionally, during the course learning process of the Worker based on the expert model (i.e. the trained baseline classification model), the sample medical images in the sample medical image dataset are divided to obtain multiple sample candidate image regions corresponding to the sample medical images. Then, the sample candidate image regions in the multiple sample candidate image regions are divided to obtain multiple sample image patches corresponding to the sample candidate image regions. For example, the sample pathology WSI is uniformly divided into multiple coarse-grained sample candidate image regions of fixed size, and each sample candidate image region is uniformly divided into multiple fine-grained sample patches of fixed size.

[0072] Optionally, for a given ROI, i.e., the first sample candidate image region (any one of the multiple sample candidate image regions), the feature vector of each sample patch is extracted using a pre-trained visual encoder. Then, the feature vector of each sample patch is nonlinearly transformed and normalized by a second deep neural network (corresponding to Worker) to output a probability distribution (e.g., p_Worker=[0.01, 0.05, ..., 0.003]).

[0073] Optionally, attention weights can be calculated for each sample patch in a given ROI using a pre-trained baseline classification model to obtain the attention weight distribution for each sample patch. These weights are normalized and used as pseudo-labels to represent the discriminative importance of each sample patch in the current ROI.

[0074] Optionally, with the goal of minimizing the difference between the probability distribution of the second deep neural network output and the attention weight distribution of the trained baseline classification model, a second loss function (such as cross-entropy loss) is used to train the second deep neural network until a second preset convergence condition (such as the cross-entropy loss value being less than a preset value) is met, thus obtaining the initial Worker.

[0075] By learning from the lessons demonstrated by the Worker based on the expert model (i.e., the pre-trained baseline classification model), the Worker can quickly acquire the ability to filter local evidence, providing stable and predictable low-level behavioral support for high-order decision-making. This effectively reduces the exploration difficulty of subsequent reinforcement learning, reduces exploration noise, and accelerates network convergence.

[0076] To obtain a trained Manager and a trained Worker, the data processing method provided in Embodiment 1 of this application involves joint training based on a sample medical image dataset, a classification model, an initial policy network, and a third deep neural network until a third preset convergence condition is met, resulting in a first policy network and a second policy network. This includes: dividing the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images; further dividing the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; extracting features from the sample image blocks among the multiple sample image blocks to obtain feature vectors corresponding to the sample image blocks; determining the feature vectors corresponding to the sample candidate image regions based on the feature vectors corresponding to the sample image blocks; performing nonlinear transformation and normalization on the feature vectors corresponding to the sample candidate image regions among the multiple sample candidate image regions using the third deep neural network to obtain the probability distributions corresponding to the multiple sample candidate image regions; and determining a first target sample candidate image region from the multiple sample candidate image regions based on the probability distributions corresponding to the multiple sample candidate image regions; and jointly training the first target sample candidate image region, the classification model, the initial policy network, and the third deep neural network until the third preset convergence condition is met, resulting in a first policy network and a second policy network.

[0077] Optionally, during the joint reinforcement learning of Manager and Worker and the joint optimization of the baseline classification model, the sample medical images in the sample medical image dataset are divided to obtain multiple sample candidate image regions corresponding to the sample medical images. The sample candidate image regions in the multiple sample candidate image regions are further divided to obtain multiple sample image patches corresponding to the sample candidate image regions. For example, the sample pathology WSI is uniformly divided into multiple coarse-grained sample candidate image regions of fixed size, and each sample candidate image region is uniformly divided into multiple fine-grained sample patches of fixed size.

[0078] Optionally, a pre-trained visual encoder is used to extract the feature vectors of each sample patch. The feature vectors of each sample patch are aggregated to obtain the feature vectors corresponding to the candidate image regions of each sample. Then, a third deep neural network (corresponding to the Manager) is used to perform nonlinear transformation and normalization on the feature vectors corresponding to the candidate image regions of each sample to obtain the probability distribution of the candidate image regions of each sample, which represents the probability of each candidate image region being selected. Then, the candidate image regions with higher probabilities can be selected as the sample ROI (i.e., the first target sample candidate image region). The sample ROI, the baseline classification model, the initial Worker and the third deep neural network are jointly trained until the third preset convergence condition is met, and the trained Manager (i.e., the first policy network) and the trained Worker (i.e., the second policy network) are obtained.

[0079] By simulating the coarse-to-fine diagnostic process of pathology experts through hierarchical reinforcement learning, and using baseline classification models to assist learning to achieve weak supervision, the efficiency and accuracy of assisted diagnosis are effectively improved, and efficient, accurate and interpretable weakly supervised classification of medical images is achieved.

[0080] To obtain a trained Manager and a trained Worker, the data processing method provided in Embodiment 1 of this application involves joint training based on a first target sample candidate image region, a classification model, an initial policy network, and a third deep neural network until a third preset convergence condition is met, resulting in the first policy network and the second policy network. This includes: performing nonlinear transformation and normalization on the feature vectors corresponding to multiple sample image blocks contained in the first target sample candidate image region through the initial policy network to obtain the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region; determining a first target sample image block set from the multiple sample image blocks contained in the first target sample candidate image region based on the probability distribution; determining the target reward value corresponding to the first target sample image block set through the classification model; and updating the parameters of the initial policy network and the third deep neural network based on the target reward value and the near-end policy optimization algorithm until the third preset convergence condition is met, thus obtaining the first policy network and the second policy network.

[0081] Optionally, during joint training, the initial worker performs nonlinear transformation and normalization on the feature vectors of each sample patch contained in the sample ROI to obtain the probability distribution corresponding to each sample patch, representing the importance score of each sample patch. For example, based on the policy learned from the baseline classification model, the initial worker performs one-time, non-replacement sample patch sampling within the sample ROI to obtain local evidence samples with higher diagnostic value. For example, several sample patches with higher scores are selected as the target sample patch set (i.e., the first target sample image patch set). Then, the target reward value corresponding to the target sample patch set is determined by the baseline classification model. Based on the target reward value and the PPO algorithm, the parameters of the initial worker and the third deep neural network are updated until the third preset convergence condition is met, resulting in a trained Manager (i.e., the first policy network) and a trained Worker (i.e., the second policy network).

[0082] Through hierarchical reinforcement learning, reward mechanisms, and weakly supervised training, an efficient, stable, and practical end-to-end evidence-seeking mechanism was achieved, which can reliably capture decisive lesion evidence and meet the evidence-based needs of clinical diagnosis.

[0083] To provide the dense reward signal required for policy network optimization in hierarchical reinforcement learning, the data processing method provided in Embodiment 1 of this application determines the target reward value corresponding to the first target sample image block set through a classification model, including: weighting and aggregating the feature vectors corresponding to the sample image blocks in the first target sample image block set using a classification model to obtain the classification probability corresponding to the sample medical image, calculating the logarithmic difference between the classification probability corresponding to the sample medical image and the classification probability after the previous round of sampling, and using the logarithmic difference as the first reward value; determining the second reward value based on the number of sample image blocks in the first target sample image block set; calculating the attention weights of the sample image blocks in the first target sample image block set using a classification model to obtain the attention weight distribution corresponding to the sample image blocks in the first target sample image block set, and determining the third reward value based on the attention weight distribution corresponding to the sample image blocks in the first target sample image block set; and calculating the target reward value based on the first reward value, the second reward value, and the third reward value.

[0084] Optionally, the target reward value consists of three parts: procedural intermediate reward, penalty (sampling cost), and attention pseudo-label reward. Each part can have a corresponding adjustable weight. The procedural intermediate reward is the incremental improvement (log probability difference) of the confidence of the target category by the currently selected new patch set.

[0085] Optionally, the feature vectors corresponding to each sample patch in the target sample patch set are weighted and aggregated using a baseline classification model to obtain the classification probability corresponding to the sample pathology WSI. The logarithmic difference between the classification probability corresponding to the sample pathology WSI and the classification probability after the previous round of sampling (i.e., the classification probability corresponding to the sample pathology WSI of the previous round of sampling) is calculated. That is, the difference is calculated after taking the logarithm of the two classification probabilities respectively, and the intermediate reward (i.e., the first reward value) is obtained. If it is the first round, only the confidence improvement after the first sampling is calculated.

[0086] Optionally, a second reward value can be determined based on the number of sample patches in the target sample patch set. For example, when a worker selects a patch, a fixed small penalty is deducted, such as 0.1 points. If 5 patches are selected at once, 0.5 points are deducted.

[0087] Optionally, attention weights can be calculated for the patches selected by the Worker (i.e., sample patches in the target sample patch set) using a baseline classification model to obtain the attention weight distribution, which is then used as a pseudo-label reward (i.e., the third reward value). For example, if the attention weight of a patch selected by the Worker is 0.92, it indicates that it is likely to be cancer and is greater than the corresponding threshold (e.g., 0.8), then a reward is given, such as adding 1 point; if the attention weight is low, no points are added, or even a slight deduction is made.

[0088] Optionally, the target reward value can be obtained by calculating, such as summing or weighted summing, based on the first reward value, the second reward value, and the third reward value, and used as the reward signal of the PPO algorithm.

[0089] Optionally, the PPO algorithm is employed, constrained by a fixed patch budget (e.g., allowing a total of 30 patches to be sampled). Multiple rounds of interactive sampling are performed. First, a pathological WSI sample is sampled from the training dataset, and feature vectors of all coarse-grained candidate image regions are extracted to construct an initial state representation, including the visited ROI set (initially empty), the remaining patch budget (set to a fixed value, e.g., 30), and the initial reward (set to zero). In each round of interaction, the Manager outputs the probability distribution of each sample candidate image region being selected based on the current state (selected ROI set, remaining budget, historical rewards), and samples an action from this distribution: selecting the next ROI index to be explored. The Manager then passes the selected ROI index to the Worker. The Worker performs a one-time, non-replacement sampling within this ROI, selecting a preset number of patches (e.g., 5). The patch features obtained by the Worker are input into the baseline classification model, outputting the current diagnostic probability. Then, based on the aforementioned reward calculation process, the current total reward value is calculated as the reward signal for the PPO algorithm. The PPO algorithm calculates a dominance function and updates the policy network parameters of the Manager and Workers, enabling them to work together to locate decisive lesion evidence more quickly and accurately. This interaction process is repeated until a preset patch budget limit is reached or all available ROIs are traversed.

[0090] Optionally, to avoid the problem of the classifier lagging due to policy deviation, the baseline classification model is also fine-tuned at this stage. For example, the baseline classification model is fine-tuned every few rounds, using the current set of all sampled patches as new training samples to update its parameters, ensuring that the baseline classification model evolves in sync with the policy.

[0091] By designing diagnostic-oriented process-based intermediate rewards, the access trajectory has a logical structure that steadily increases diagnostic confidence. Each step on the path can be interpreted as a positive contribution to the diagnostic result, which has good interpretability. This alleviates the problem of reward sparsity in traditional reinforcement learning training and improves learning stability. As a result, it achieves the coupling of capabilities: Manager learns macro-level navigation, Worker masters micro-level focus, and baseline classification model evolves synchronously.

[0092] In an alternative embodiment, the following can be employed: Figure 3 The diagram shown illustrates how joint training can be achieved. Figure 3 This is a schematic diagram of the optional joint training process provided in Embodiment 1 of this application, as follows: Figure 3As shown, the data input is pathological WSI, which undergoes feature preprocessing, i.e., pre-extracting patch features. Then, the high-level decision module Manager selects the ROI of the cell region, and the low-level selection module Worker selects a set of local patches within the selected region. The classification model performs discriminant analysis on the selected patches, calculates the reward value, and optimizes the policy parameters. Multiple iterations (hierarchical reinforcement learning training) are performed to form a feedback loop to optimize the model, resulting in the target image analysis model. The target image analysis model outputs the diagnostic path and classification results. For specific implementation details, please refer to the aforementioned embodiment, which will not be repeated here.

[0093] In this embodiment, a medical image to be analyzed is acquired; the medical image is then subjected to hierarchical sampling using a target image analysis model to determine a set of target image blocks. The target image analysis model is trained using a sample medical image dataset and a deep neural network through hierarchical reinforcement learning. Hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image; determining a set of target image blocks from multiple image blocks contained within the target image region; determining the method for analyzing the medical image based on the set of target image blocks; and performing hierarchical sampling of the medical image using the target image analysis model trained through hierarchical reinforcement learning to determine a set of target image blocks with discriminative value, thus avoiding redundant sampling and computation and improving sampling efficiency and key information coverage. Analysis is then performed based on the determined set of target image blocks, linking the analysis results to the set of target image blocks, enhancing the traceability and reliability of the analysis results. This achieves the goal of efficient, accurate, and evidence-supported medical image-assisted diagnosis, thereby improving the efficiency and accuracy of medical image-assisted diagnosis. Furthermore, it solves the technical problem of low efficiency in related technologies that use multi-instance learning to perform global aggregation and classification of image blocks for medical image-assisted diagnosis.

[0094] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0096] Example 2

[0097] According to embodiments of this application, a data processing method is also provided, such as... Figure 4 As shown, the method includes:

[0098] Step S401: Obtain the medical image to be analyzed uploaded by the client;

[0099] Step S402: In the cloud server, the medical image is subjected to hierarchical sampling using a target image analysis model to determine the target image block set. The target image analysis model is obtained by training a deep neural network using a sample medical image dataset through hierarchical reinforcement learning. The hierarchical sampling includes: determining the target image region from multiple candidate image regions obtained by dividing the medical image; determining the target image block set from multiple image blocks contained in the target image region; and determining the analysis result of the medical image based on the target image block set.

[0100] Step S403: Feedback the analysis results to the client.

[0101] The above scheme uses a target image analysis model trained by hierarchical reinforcement learning to perform hierarchical sampling of medical images, identifying a set of target image blocks with discriminative value. This avoids redundant sampling and computation, improving sampling efficiency and key information coverage. Analysis is then performed based on the identified set of target image blocks, linking the analysis results to the set and enhancing the traceability and reliability of the results. This achieves the goal of efficient, accurate, and evidence-supported medical image-assisted diagnosis, thereby improving the efficiency and accuracy of medical image-assisted diagnosis. Furthermore, it solves the technical problem of low efficiency in related technologies that use multi-instance learning to perform global aggregation and classification of image blocks for medical image-assisted diagnosis.

[0102] The specific methods for data processing on the cloud server are the same as those in Example 1, and will not be repeated here.

[0103] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0104] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0105] Example 3

[0106] According to embodiments of this application, a data processing apparatus for implementing the above-described data processing method is also provided, such as... Figure 5 As shown, the device includes: an acquisition unit 501, a first determination unit 502, and a second determination unit 503.

[0107] Acquisition unit 501 is used to acquire the medical image to be analyzed;

[0108] The first determining unit 502 is used to perform hierarchical sampling of medical images through a target image analysis model to determine a set of target image blocks. The target image analysis model is obtained by hierarchical reinforcement learning training of a deep neural network using a sample medical image dataset. The hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image, and determining a set of target image blocks from multiple image blocks contained in the target image region.

[0109] The second determining unit 503 is used to determine the analysis results of the medical image based on the target image block set.

[0110] In the data processing apparatus provided in Embodiment 3 of this application, the medical image to be analyzed is acquired by the acquisition unit 501; the first determination unit 502 performs hierarchical sampling on the medical image through a target image analysis model to determine the target image block set, wherein the target image analysis model is obtained by hierarchical reinforcement learning training of a deep neural network using a sample medical image dataset, and the hierarchical sampling includes: determining the target image region from multiple candidate image regions obtained by dividing the medical image, and determining the target image block set from multiple image blocks contained in the target image region; the second determination unit 503 determines the analysis result of the medical image based on the target image block set. In this scheme, a target image analysis model trained by hierarchical reinforcement learning is used to perform hierarchical sampling of medical images, identifying a set of target image patches with discriminative value. This avoids redundant sampling and computation, improving sampling efficiency and key information coverage. Analysis is then performed based on the identified set of target image patches, linking the analysis results to the set and enhancing the traceability and reliability of the results. This achieves the goal of efficient, accurate, and evidence-supported medical image-assisted diagnosis, thereby improving the efficiency and accuracy of medical image-assisted diagnosis. Furthermore, this solves the technical problem of low efficiency in related technologies that use multi-instance learning to globally aggregate and classify image patches for medical image-assisted diagnosis.

[0111] Optionally, in the data processing apparatus provided in Embodiment 3 of this application, the first determining unit 502 includes: a first processing subunit, configured to divide a medical image into multiple candidate image regions by a preprocessing layer of a target image analysis model, and further divide the candidate image regions into multiple image blocks; a second processing subunit, configured to extract features from the image blocks in the multiple image blocks to obtain feature vectors corresponding to the image blocks, and determine the feature vectors corresponding to the candidate image regions based on the feature vectors corresponding to the image blocks; and a third processing subunit, configured to extract features from the multiple candidate image regions using a first strategy network of the target image analysis model. The feature vectors corresponding to the candidate image regions are subjected to nonlinear transformation and normalization to obtain the probability distributions corresponding to multiple candidate image regions. Based on the probability distributions corresponding to multiple candidate image regions, the target image region is determined from the multiple candidate image regions. The fourth processing subunit is used to perform nonlinear transformation and normalization on the feature vectors corresponding to multiple image blocks contained in the target image region through the second strategy network of the target image analysis model to obtain the probability distributions corresponding to multiple image blocks contained in the target image region. Based on the probability distributions corresponding to multiple image blocks contained in the target image region, the target image block set is determined from the multiple image blocks contained in the target image region.

[0112] Optionally, in the data processing apparatus provided in Embodiment 3 of this application, the second determining unit 503 includes: a first determining subunit, used to perform weighted aggregation of the feature vectors corresponding to the image blocks in the target image block set through the output layer of the target image analysis model to obtain the classification probability corresponding to the medical image; and a second determining subunit, used to determine the analysis result based on the classification probability.

[0113] Optionally, in the data processing apparatus provided in Embodiment 3 of this application, the apparatus further includes the following units for obtaining a target image analysis model through the following steps: a first training unit for training a first deep neural network based on a sample medical image dataset until a first preset convergence condition is met, thereby obtaining a classification model; a second training unit for training a second deep neural network based on the sample medical image dataset and the classification model until a second preset convergence condition is met, thereby obtaining an initial policy network; a third training unit for jointly training the sample medical image dataset, the classification model, the initial policy network, and the third deep neural network until a third preset convergence condition is met, thereby obtaining a first policy network and a second policy network; and a third determining unit for determining the target image analysis model based on the first policy network and the second policy network.

[0114] Optionally, in the data processing apparatus provided in Embodiment 3 of this application, the first training unit includes: a first partitioning subunit, used to partition the sample medical images in the sample medical image dataset to obtain multiple sample image blocks corresponding to the sample medical images; a first extraction subunit, used to extract features from the sample image blocks in the multiple sample image blocks through a first deep neural network to obtain feature vectors corresponding to the sample image blocks; a first calculation subunit, used to perform weighted aggregation on the feature vectors corresponding to the sample image blocks to obtain the classification probability corresponding to the sample medical images; and a first training subunit, used to train the first deep neural network based on the classification probability corresponding to the sample medical images, the true labels corresponding to the sample medical images, and a first loss function until a first preset convergence condition is met to obtain a classification model.

[0115] Optionally, in the data processing apparatus provided in Embodiment 3 of this application, the second training unit includes: a second partitioning subunit, used to partition the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images, and to partition the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; and a second extraction subunit, used to extract features from the sample image blocks among the multiple sample image blocks contained in the first sample candidate image region to obtain feature vectors corresponding to the sample image blocks, and to perform nonlinear transformation and normalization processing on the feature vectors corresponding to the multiple sample image blocks through a second deep neural network to obtain the feature vectors contained in the first sample candidate image region. The probability distributions corresponding to multiple sample image patches are defined, wherein the first sample candidate image region is any one of the multiple sample candidate image regions; the second calculation subunit is used to calculate the attention weights of the sample image patches in the multiple sample image patches contained in the first sample candidate image region through a classification model, so as to obtain the attention weight distributions corresponding to the multiple sample image patches contained in the first sample candidate image region; the second training subunit is used to train the second deep neural network based on the difference between the probability distributions corresponding to the multiple sample image patches contained in the first sample candidate image region and the attention weight distributions corresponding to the multiple sample image patches contained in the first sample candidate image region, and the second loss function, until the second preset convergence condition is met, so as to obtain the initial policy network.

[0116] Optionally, in the data processing apparatus provided in Embodiment 3 of this application, the third training unit includes: a third partitioning subunit, used to partition the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images, and to partition the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; a third extraction subunit, used to extract features from the sample image blocks among the multiple sample image blocks to obtain feature vectors corresponding to the sample image blocks, and to determine the feature vectors corresponding to the sample candidate image regions based on the feature vectors corresponding to the sample image blocks; a fifth processing subunit, used to perform nonlinear transformation and normalization processing on the feature vectors corresponding to the sample candidate image regions among the multiple sample candidate image regions through a third deep neural network to obtain the probability distributions corresponding to the multiple sample candidate image regions, and to determine the first target sample candidate image region from the multiple sample candidate image regions based on the probability distributions corresponding to the multiple sample candidate image regions; and a third training subunit, used to perform joint training based on the first target sample candidate image region, the classification model, the initial policy network, and the third deep neural network until the third preset convergence condition is met, to obtain the first policy network and the second policy network.

[0117] Optionally, in the data processing apparatus provided in Embodiment 3 of this application, the third training subunit includes: a first processing module, configured to perform nonlinear transformation and normalization processing on the feature vectors corresponding to multiple sample image blocks contained in the first target sample candidate image region through an initial policy network to obtain the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region, and determine a first target sample image block set from the multiple sample image blocks contained in the first target sample candidate image region based on the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region; and a second processing module, configured to determine the target reward value corresponding to the first target sample image block set through a classification model, and update the parameters of the initial policy network and the third deep neural network based on the target reward value and the near-end policy optimization algorithm until the third preset convergence condition is met, thereby obtaining the first policy network and the second policy network.

[0118] Optionally, in the data processing apparatus provided in Embodiment 3 of this application, the second processing module includes: a first determining submodule, used to perform weighted aggregation on the feature vectors corresponding to sample image blocks in the first target sample image block set through a classification model to obtain the classification probability corresponding to the sample medical image, and calculate the logarithmic difference between the classification probability corresponding to the sample medical image and the classification probability after the previous round of sampling, and use the logarithmic difference as a first reward value; a second determining submodule, used to determine a second reward value based on the number of sample image blocks in the first target sample image block set; a third determining submodule, used to perform attention weight calculation on the sample image blocks in the first target sample image block set through a classification model to obtain the attention weight distribution corresponding to the sample image blocks in the first target sample image block set, and determine a third reward value based on the attention weight distribution corresponding to the sample image blocks in the first target sample image block set; and a fourth determining submodule, used to calculate a target reward value based on the first reward value, the second reward value, and the third reward value.

[0119] It should be noted that the aforementioned acquisition unit 501, first determination unit 502, and second determination unit 503 correspond to steps S201 to S203 in Embodiment 1. The instances and application scenarios implemented by the aforementioned units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the aforementioned modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.

[0120] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.

[0121] Example 4

[0122] Embodiments of this application may provide an electronic device, which may be any one of a group of electronic devices. Optionally, in this embodiment, the aforementioned electronic device may also be replaced by a terminal device such as a mobile terminal.

[0123] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0124] In this embodiment, the above-mentioned electronic device can execute the program code of the following steps in the data processing method: acquiring the medical image to be analyzed; performing hierarchical sampling on the medical image through a target image analysis model to determine the target image block set, wherein the target image analysis model is obtained by hierarchical reinforcement learning training of a deep neural network using a sample medical image dataset, and the hierarchical sampling includes: determining the target image region from multiple candidate image regions obtained by dividing the medical image, determining the target image block set from multiple image blocks contained in the target image region; and determining the analysis result of the medical image based on the target image block set.

[0125] The aforementioned electronic device can also execute the program code for the following steps in the data processing method: dividing the medical image through the preprocessing layer of the target image analysis model to obtain multiple candidate image regions, and further dividing the candidate image regions among the multiple candidate image regions to obtain multiple image blocks; extracting features from the image blocks among the multiple image blocks to obtain the feature vectors corresponding to the image blocks, and determining the feature vectors corresponding to the candidate image regions based on the feature vectors corresponding to the image blocks; performing nonlinear transformation and normalization processing on the feature vectors corresponding to the candidate image regions among the multiple candidate image regions through the first strategy network of the target image analysis model to obtain the probability distributions corresponding to the multiple candidate image regions, and determining the target image region from the multiple candidate image regions based on the probability distributions corresponding to the multiple candidate image regions; performing nonlinear transformation and normalization processing on the feature vectors corresponding to the multiple image blocks contained in the target image region through the second strategy network of the target image analysis model to obtain the probability distributions corresponding to the multiple image blocks contained in the target image region, and determining the target image block set from the multiple image blocks contained in the target image region based on the probability distributions corresponding to the multiple image blocks contained in the target image region.

[0126] The aforementioned electronic device can also execute program code for the following steps in the data processing method: weighted aggregation of the feature vectors corresponding to the image blocks in the target image block set through the output layer of the target image analysis model to obtain the classification probability corresponding to the medical image; and determining the analysis result based on the classification probability.

[0127] The aforementioned electronic device can also execute program code for the following steps in the data processing method: training a first deep neural network based on a sample medical image dataset until a first preset convergence condition is met to obtain a classification model; training a second deep neural network based on the sample medical image dataset and the classification model until a second preset convergence condition is met to obtain an initial policy network; jointly training the sample medical image dataset, the classification model, the initial policy network, and the third deep neural network until a third preset convergence condition is met to obtain a first policy network and a second policy network; and determining a target image analysis model based on the first policy network and the second policy network.

[0128] The aforementioned electronic device can also execute program code for the following steps in the data processing method: dividing the sample medical images in the sample medical image dataset to obtain multiple sample image blocks corresponding to the sample medical images; extracting features from the sample image blocks in the multiple sample image blocks using a first deep neural network to obtain feature vectors corresponding to the sample image blocks; performing weighted aggregation on the feature vectors corresponding to the sample image blocks to obtain the classification probability corresponding to the sample medical images; and training the first deep neural network based on the classification probability corresponding to the sample medical images, the true labels corresponding to the sample medical images, and the first loss function until the first preset convergence condition is met to obtain a classification model.

[0129] The aforementioned electronic device can also execute program code for the following steps in the data processing method: dividing the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images, and further dividing the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; for a first sample candidate image region, extracting features from the sample image blocks among the multiple sample image blocks contained in the first sample candidate image region to obtain feature vectors corresponding to the sample image blocks, and performing nonlinear transformation and normalization processing on the feature vectors corresponding to the multiple sample image blocks through a second deep neural network to obtain multiple sample image blocks contained in the first sample candidate image region. The probability distribution corresponding to each sample image patch is given, wherein the first sample candidate image region is any one of the multiple sample candidate image regions. Attention weights are calculated for the sample image patches in the multiple sample image patches contained in the first sample candidate image region through a classification model to obtain the attention weight distribution corresponding to the multiple sample image patches contained in the first sample candidate image region. The second deep neural network is trained based on the difference between the probability distribution and the attention weight distribution of the multiple sample image patches contained in the first sample candidate image region, and the second loss function, until the second preset convergence condition is met to obtain the initial policy network.

[0130] The aforementioned electronic device can also execute the program code for the following steps in the data processing method: dividing the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images, and further dividing the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; extracting features from the sample image blocks among the multiple sample image blocks to obtain feature vectors corresponding to the sample image blocks, and determining the feature vectors corresponding to the sample candidate image regions based on the feature vectors corresponding to the sample image blocks; performing nonlinear transformation and normalization processing on the feature vectors corresponding to the sample candidate image regions among the multiple sample candidate image regions through a third deep neural network to obtain the probability distributions corresponding to the multiple sample candidate image regions, and determining the first target sample candidate image region from the multiple sample candidate image regions based on the probability distributions corresponding to the multiple sample candidate image regions; and jointly training the first target sample candidate image region, the classification model, the initial policy network, and the third deep neural network until the third preset convergence condition is met to obtain the first policy network and the second policy network.

[0131] The aforementioned electronic device can also execute the program code for the following steps in the data processing method: performing nonlinear transformation and normalization on the feature vectors corresponding to multiple sample image blocks contained in the first target sample candidate image region through an initial policy network to obtain the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region; determining the first target sample image block set from the multiple sample image blocks contained in the first target sample candidate image region based on the probability distribution; determining the target reward value corresponding to the first target sample image block set through a classification model; and updating the parameters of the initial policy network and the third deep neural network based on the target reward value and the near-end policy optimization algorithm until the third preset convergence condition is met, thereby obtaining the first policy network and the second policy network.

[0132] The aforementioned electronic device can also execute the program code for the following steps in the data processing method: weighted aggregation of the feature vectors corresponding to sample image blocks in the first target sample image block set using a classification model to obtain the classification probability corresponding to the sample medical image; calculating the logarithmic difference between the classification probability corresponding to the sample medical image and the classification probability after the previous round of sampling; and using the logarithmic difference as the first reward value; determining the second reward value based on the number of sample image blocks in the first target sample image block set; calculating the attention weights of the sample image blocks in the first target sample image block set using a classification model to obtain the attention weight distribution corresponding to the sample image blocks in the first target sample image block set; and determining the third reward value based on the attention weight distribution corresponding to the sample image blocks in the first target sample image block set; and calculating the target reward value based on the first reward value, the second reward value, and the third reward value.

[0133] Optionally, Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 6 As shown, the electronic device 60 may include: one or more ( Figure 6 (Only one is shown in the image) Processor 602 and memory 604. The electronic device 60 may also include a memory controller to control and manage the memory 604; the electronic device 60 may also include a peripheral interface to connect to a radio frequency module, an audio module, and a display screen, etc.

[0134] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the data processing method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the aforementioned data processing method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0135] The processor can access information and applications stored in memory via a transmission device to perform the following steps: acquiring the medical image to be analyzed; performing hierarchical sampling on the medical image using a target image analysis model to determine a set of target image blocks, wherein the target image analysis model is obtained by training a deep neural network using a sample medical image dataset through hierarchical reinforcement learning; the hierarchical sampling includes: determining the target image region from multiple candidate image regions obtained by dividing the medical image; determining the set of target image blocks from multiple image blocks contained in the target image region; and determining the analysis result of the medical image based on the set of target image blocks.

[0136] Optionally, the processor may also execute program code for the following steps: dividing the medical image into multiple candidate image regions through the preprocessing layer of the target image analysis model, and further dividing the candidate image regions into multiple image blocks; extracting features from the image blocks to obtain feature vectors corresponding to the image blocks, and determining the feature vectors corresponding to the candidate image regions based on the feature vectors corresponding to the image blocks; performing nonlinear transformation and normalization on the feature vectors corresponding to the candidate image regions through the first strategy network of the target image analysis model to obtain the probability distributions corresponding to the candidate image regions, and determining the target image region from the multiple candidate image regions based on the probability distributions corresponding to the multiple candidate image regions; performing nonlinear transformation and normalization on the feature vectors corresponding to the multiple image blocks contained in the target image region through the second strategy network of the target image analysis model to obtain the probability distributions corresponding to the multiple image blocks contained in the target image region, and determining the target image block set from the multiple image blocks contained in the target image region based on the probability distributions corresponding to the multiple image blocks contained in the target image region.

[0137] Optionally, the processor may also execute program code that performs the following steps: weighted aggregation of the feature vectors corresponding to the image patches in the target image patch set through the output layer of the target image analysis model to obtain the classification probability of the medical image; and determines the analysis result based on the classification probability.

[0138] Optionally, the processor may also execute program code for the following steps: training a first deep neural network based on a sample medical image dataset until a first preset convergence condition is met to obtain a classification model; training a second deep neural network based on the sample medical image dataset and the classification model until a second preset convergence condition is met to obtain an initial policy network; jointly training the sample medical image dataset, the classification model, the initial policy network, and the third deep neural network until a third preset convergence condition is met to obtain a first policy network and a second policy network; and determining a target image analysis model based on the first policy network and the second policy network.

[0139] Optionally, the processor may also execute program code for the following steps: dividing the sample medical images in the sample medical image dataset to obtain multiple sample image blocks corresponding to the sample medical images; extracting features from the sample image blocks in the multiple sample image blocks using a first deep neural network to obtain feature vectors corresponding to the sample image blocks; performing weighted aggregation on the feature vectors corresponding to the sample image blocks to obtain the classification probability corresponding to the sample medical images; and training the first deep neural network based on the classification probability corresponding to the sample medical images, the true labels corresponding to the sample medical images, and the first loss function until the first preset convergence condition is met to obtain a classification model.

[0140] Optionally, the processor may also execute program code for the following steps: dividing the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images; further dividing the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; for a first sample candidate image region, extracting features from the sample image blocks among the multiple sample image blocks contained in the first sample candidate image region to obtain feature vectors corresponding to the sample image blocks; and performing nonlinear transformation and normalization processing on the feature vectors corresponding to the multiple sample image blocks through a second deep neural network to obtain multiple sample image blocks contained in the first sample candidate image region. The probability distribution corresponding to this image patch, wherein the first sample candidate image region is any one of the multiple sample candidate image regions; the attention weights of the sample image patches in the multiple sample image patches contained in the first sample candidate image region are calculated by the classification model to obtain the attention weight distribution corresponding to the multiple sample image patches contained in the first sample candidate image region; the second deep neural network is trained based on the difference between the probability distribution corresponding to the multiple sample image patches contained in the first sample candidate image region and the attention weight distribution corresponding to the multiple sample image patches contained in the first sample candidate image region, and the second loss function, until the second preset convergence condition is met to obtain the initial policy network.

[0141] Optionally, the processor may also execute program code for the following steps: dividing the sample medical images in the sample medical image dataset to obtain multiple sample candidate image regions corresponding to the sample medical images, and further dividing the sample candidate image regions among the multiple sample candidate image regions to obtain multiple sample image blocks corresponding to the sample candidate image regions; extracting features from the sample image blocks among the multiple sample image blocks to obtain feature vectors corresponding to the sample image blocks, and determining the feature vectors corresponding to the sample candidate image regions based on the feature vectors corresponding to the sample image blocks; performing nonlinear transformation and normalization on the feature vectors corresponding to the sample candidate image regions among the multiple sample candidate image regions through a third deep neural network to obtain the probability distributions corresponding to the multiple sample candidate image regions, and determining the first target sample candidate image region from the multiple sample candidate image regions based on the probability distributions corresponding to the multiple sample candidate image regions; and jointly training the first target sample candidate image region, the classification model, the initial policy network, and the third deep neural network until the third preset convergence condition is met to obtain the first policy network and the second policy network.

[0142] Optionally, the processor may also execute program code for the following steps: performing nonlinear transformation and normalization on the feature vectors corresponding to multiple sample image blocks contained in the first target sample candidate image region through the initial policy network to obtain the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region; determining the first target sample image block set from the multiple sample image blocks contained in the first target sample candidate image region based on the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region; determining the target reward value corresponding to the first target sample image block set through a classification model; and updating the parameters of the initial policy network and the third deep neural network based on the target reward value and the near-end policy optimization algorithm until the third preset convergence condition is met, thereby obtaining the first policy network and the second policy network.

[0143] Optionally, the processor may also execute program code for the following steps: weighted aggregation of feature vectors corresponding to sample image blocks in the first target sample image block set using a classification model to obtain the classification probability corresponding to the sample medical image, and calculating the logarithmic difference between the classification probability corresponding to the sample medical image and the classification probability after the previous round of sampling, and using the logarithmic difference as the first reward value; determining the second reward value based on the number of sample image blocks in the first target sample image block set; calculating attention weights for sample image blocks in the first target sample image block set using a classification model to obtain the attention weight distribution corresponding to the sample image blocks in the first target sample image block set, and determining the third reward value based on the attention weight distribution corresponding to the sample image blocks in the first target sample image block set; and calculating the target reward value based on the first reward value, the second reward value, and the third reward value.

[0144] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 6 This does not limit the structure of the aforementioned electronic device. For example, electronic device 60 may also include components that are more... Figure 6 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 6 The different configurations shown.

[0145] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0146] Example 5

[0147] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the data processing method provided in Embodiment 1.

[0148] Optionally, in this embodiment, the storage medium may be located in any one of the electronic devices in the group of electronic devices in the computer network, or in any one of the mobile terminals in the group of mobile terminals.

[0149] Example 6

[0150] Embodiments of this application also provide a computer program product. Optionally, in this embodiment, the computer program product may include a computer program that, when executed by a processor, implements the data processing method provided in Embodiment 1.

[0151] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0152] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0153] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of units or modules may be electrical or other forms.

[0154] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0155] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0156] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0157] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A data processing method, characterized in that, include: Acquire medical images to be analyzed; The medical image is subjected to hierarchical sampling by a target image analysis model to determine a set of target image blocks. The target image analysis model is obtained by hierarchical reinforcement learning training of a deep neural network using a sample medical image dataset. The hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image, and determining the set of target image blocks from multiple image blocks contained in the target image region. Based on the target image patch set, the analysis results of the medical image are determined.

2. The method according to claim 1, characterized in that, The medical image is subjected to hierarchical sampling using a target image analysis model to determine the target image patch set, which includes: The medical image is divided by the preprocessing layer of the target image analysis model to obtain multiple candidate image regions, and then the candidate image regions among the multiple candidate image regions are divided to obtain multiple image blocks; Feature extraction is performed on the image blocks among the plurality of image blocks to obtain the feature vectors corresponding to the image blocks, and the feature vectors corresponding to the candidate image regions are determined based on the feature vectors corresponding to the image blocks; The first strategy network of the target image analysis model performs nonlinear transformation and normalization on the feature vectors corresponding to the candidate image regions among the multiple candidate image regions to obtain the probability distributions corresponding to the multiple candidate image regions, and determines the target image region from the multiple candidate image regions based on the probability distributions corresponding to the multiple candidate image regions. The second strategy network of the target image analysis model performs nonlinear transformation and normalization on the feature vectors corresponding to multiple image blocks contained in the target image region to obtain the probability distribution corresponding to the multiple image blocks contained in the target image region. Based on the probability distribution corresponding to the multiple image blocks contained in the target image region, the target image block set is determined from the multiple image blocks contained in the target image region.

3. The method according to claim 1, characterized in that, Based on the target image patch set, the analysis results for the medical image are determined as follows: The output layer of the target image analysis model performs weighted aggregation on the feature vectors corresponding to the image blocks in the target image block set to obtain the classification probability of the medical image. The analysis result is determined based on the classification probability.

4. The method according to claim 1, characterized in that, The target image analysis model is obtained through the following steps: The first deep neural network is trained based on the sample medical image dataset until the first preset convergence condition is met, thus obtaining a classification model. The second deep neural network is trained based on the sample medical image dataset and the classification model until the second preset convergence condition is met, thus obtaining the initial policy network. The first policy network and the second policy network are obtained by jointly training the sample medical image dataset, the classification model, the initial policy network and the third deep neural network until the third preset convergence condition is met. The target image analysis model is determined based on the first policy network and the second policy network.

5. The method according to claim 4, characterized in that, The first deep neural network is trained based on the sample medical image dataset until a first preset convergence condition is met, resulting in a classification model including: The sample medical images in the sample medical image dataset are divided to obtain multiple sample image blocks corresponding to the sample medical images; The first deep neural network is used to extract features from the sample image blocks in the plurality of sample image blocks to obtain the feature vectors corresponding to the sample image blocks; The feature vectors corresponding to the sample image blocks are weighted and aggregated to obtain the classification probability of the sample medical image. Based on the classification probability corresponding to the sample medical image, the true label corresponding to the sample medical image, and the first loss function, the first deep neural network is trained until the first preset convergence condition is met, thereby obtaining the classification model.

6. The method according to claim 4, characterized in that, The second deep neural network is trained based on the sample medical image dataset and the classification model until the second preset convergence condition is met, resulting in an initial policy network including: The sample medical images in the sample medical image dataset are divided to obtain multiple sample candidate image regions corresponding to the sample medical images, and the sample candidate image regions in the multiple sample candidate image regions are further divided to obtain multiple sample image blocks corresponding to the sample candidate image regions; For a first sample candidate image region, feature extraction is performed on the sample image blocks among the multiple sample image blocks contained in the first sample candidate image region to obtain the feature vector corresponding to the sample image block. Then, the feature vector corresponding to the multiple sample image blocks is subjected to nonlinear transformation and normalization processing through the second deep neural network to obtain the probability distribution corresponding to the multiple sample image blocks contained in the first sample candidate image region. Here, the first sample candidate image region is any one of the multiple sample candidate image regions. The attention weights of the sample image blocks in the multiple sample image blocks contained in the first sample candidate image region are calculated using the classification model to obtain the attention weight distribution corresponding to the multiple sample image blocks contained in the first sample candidate image region. The second deep neural network is trained based on the difference between the probability distribution of multiple sample image blocks contained in the first sample candidate image region and the attention weight distribution of multiple sample image blocks contained in the first sample candidate image region, and the second loss function, until the second preset convergence condition is met, thus obtaining the initial policy network.

7. The method according to claim 4, characterized in that, Based on the sample medical image dataset, the classification model, the initial policy network, and the third deep neural network, joint training is performed until the third preset convergence condition is met, resulting in the first policy network and the second policy network, including: The sample medical images in the sample medical image dataset are divided to obtain multiple sample candidate image regions corresponding to the sample medical images, and the sample candidate image regions in the multiple sample candidate image regions are further divided to obtain multiple sample image blocks corresponding to the sample candidate image regions; Feature extraction is performed on the sample image blocks among the plurality of sample image blocks to obtain the feature vectors corresponding to the sample image blocks, and the feature vectors corresponding to the sample candidate image regions are determined based on the feature vectors corresponding to the sample image blocks. The third deep neural network performs nonlinear transformation and normalization on the feature vectors corresponding to the multiple candidate image regions to obtain the probability distributions corresponding to the multiple candidate image regions. Based on the probability distributions corresponding to the multiple candidate image regions, the first target candidate image region is determined from the multiple candidate image regions. The first target sample candidate image region, the classification model, the initial policy network, and the third deep neural network are jointly trained until the third preset convergence condition is met, thereby obtaining the first policy network and the second policy network.

8. The method according to claim 7, characterized in that, Joint training is performed based on the first target sample candidate image region, the classification model, the initial policy network, and the third deep neural network until the third preset convergence condition is met, resulting in the first policy network and the second policy network, including: The initial policy network performs nonlinear transformation and normalization on the feature vectors corresponding to multiple sample image blocks contained in the first target sample candidate image region to obtain the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region. Based on the probability distribution corresponding to the multiple sample image blocks contained in the first target sample candidate image region, the first target sample image block set is determined from the multiple sample image blocks contained in the first target sample candidate image region. The target reward value corresponding to the first target sample image patch set is determined by the classification model, and the parameters of the initial policy network and the third deep neural network are updated according to the target reward value and the near-end policy optimization algorithm until the third preset convergence condition is met, so as to obtain the first policy network and the second policy network.

9. The method according to claim 8, characterized in that, The target reward value corresponding to the first target sample image patch set is determined by the classification model, including: The classification model is used to perform weighted aggregation on the feature vectors corresponding to the sample image blocks in the first target sample image block set to obtain the classification probability corresponding to the sample medical image. The logarithmic difference between the classification probability corresponding to the sample medical image and the classification probability after the previous round of sampling is calculated, and the logarithmic difference is used as the first reward value. The second reward value is determined based on the number of sample image blocks in the first target sample image block set; The attention weights of the sample image blocks in the first target sample image block set are calculated using the classification model to obtain the attention weight distribution corresponding to the sample image blocks in the first target sample image block set, and the third reward value is determined based on the attention weight distribution corresponding to the sample image blocks in the first target sample image block set. The target reward value is obtained by calculating based on the first reward value, the second reward value, and the third reward value.

10. A data processing method, characterized in that, include: Retrieve medical images uploaded by the client for analysis; In a cloud server, the medical image is subjected to hierarchical sampling using a target image analysis model to determine a set of target image patches. The target image analysis model is obtained by training a deep neural network using hierarchical reinforcement learning on a sample medical image dataset. The hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image; determining the set of target image patches from multiple image patches contained in the target image region; and determining the analysis result of the medical image based on the set of target image patches. The analysis results are then fed back to the client.

11. A data processing apparatus, characterized in that, include: The acquisition unit is used to acquire the medical image to be analyzed. The first determining unit is used to perform hierarchical sampling on the medical image through a target image analysis model to determine a set of target image blocks. The target image analysis model is obtained by hierarchical reinforcement learning training of a deep neural network using a sample medical image dataset. The hierarchical sampling includes: determining a target image region from multiple candidate image regions obtained by dividing the medical image, and determining the set of target image blocks from multiple image blocks contained in the target image region. The second determining unit is used to determine the analysis result of the medical image based on the target image block set.

12. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the data processing method of any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the data processing method of any one of claims 1 to 10.

14. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the data processing method according to any one of claims 1 to 10.