A graphics card task switching method and device, an ultrasonic device, and a readable storage medium

CN116137014BActive Publication Date: 2026-09-25SONOSCAPE MEDICAL CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111371253.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-18
Publication Date
2026-09-25
Estimated Expiration
2041-11-18

AI Technical Summary

Technical Problem

当前的超声设备在使用过程中容易因显卡异常的原因出现黑屏、死机等故障,使得超声设备的稳定性较差

Benefits of technology

[0003]有鉴于此,本申请的目的在于提供一种显卡任务切换方法、显卡任务切换装置、超声设备及计算机可读存储介质,提高了超声设备的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116137014B_ABST
    Figure CN116137014B_ABST
Patent Text Reader

Abstract

The application discloses a graphics card task switching method and device, an ultrasonic equipment and a computer readable storage medium. The method comprises the following steps: applied to the ultrasonic equipment, determining the candidate order between at least two graphics cards in the ultrasonic equipment according to a preset configuration; determining the task of processing the ultrasonic display information corresponding to each graphics card according to the preset configuration, and executing the corresponding task by using each graphics card; if it is detected that the target graphics card is abnormal, determining the target candidate graphics card by using the candidate order, and executing the target task of the target graphics card by using the target candidate graphics card; through the dynamic switching of the computing resources (i.e. the graphics card) on the task, it can be ensured that each step in the imaging task of displaying the image outward is always executed by the graphics card, even if the graphics card is abnormal, the ultrasonic equipment can still have the ability of imaging outward, and the stability of the ultrasonic equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ultrasonic equipment technology, and in particular to a graphics card task switching method, a graphics card task switching device, an ultrasonic device, and a computer-readable storage medium. Background Technology

[0002] Ultrasound systems, including ultrasound equipment, are widely used in fields such as surgery, where imaging stability is crucial. Current ultrasound equipment is prone to malfunctions such as black screens and system crashes due to graphics card errors, resulting in relatively poor stability. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a graphics card task switching method, a graphics card task switching device, an ultrasonic device, and a computer-readable storage medium, thereby improving the stability of the ultrasonic device.

[0004] To address the aforementioned technical problems, this application provides a graphics card task switching method, applied to an ultrasound device, comprising:

[0005] According to the preset configuration, the candidate order among at least two graphics cards in the ultrasound device is determined;

[0006] According to the preset configuration, the task of processing ultrasonic display information corresponding to each graphics card is determined, and the corresponding task is executed by each graphics card.

[0007] If an anomaly is detected in the target graphics card, a candidate graphics card is determined using the candidate order, and the target task of the target graphics card is executed using the candidate graphics card.

[0008] Optionally, the task of processing ultrasound display information includes ultrasound image display tasks;

[0009] The step of determining the task for processing ultrasonic display information corresponding to each graphics card according to the preset configuration includes:

[0010] If the preset configuration is a task splitting configuration, then a number of sub-tasks are determined based on the task splitting configuration to split the ultrasound image display task.

[0011] The subtasks are assigned to several different graphics cards.

[0012] Optionally, the task of processing ultrasound display information includes an ultrasound image display task, which includes an ultrasound image display subtask and a backup task.

[0013] The step of determining the task for processing ultrasonic display information corresponding to each graphics card according to the preset configuration includes:

[0014] If the preset configuration is a task backup configuration, then the ultrasound image display task is determined to be the task corresponding to the first graphics card, and the backup task is determined to be the task corresponding to the second graphics card.

[0015] Optionally, the step of using the target candidate graphics card to execute the target task of the target graphics card includes:

[0016] Determine whether the first candidate task of the target candidate graphics card has an overlapping part with the target task;

[0017] If there are duplicate parts, the duplicate parts in the first candidate task are removed to obtain the second candidate task;

[0018] The second candidate task and the target task are executed using the target candidate graphics card.

[0019] Optionally, it also includes:

[0020] If the ultrasound device is detected to be activated, at least two initialization threads are constructed; the number of initialization threads is greater than or equal to the number of graphics cards.

[0021] The corresponding graphics cards are initialized in parallel using the respective initialization threads.

[0022] Optionally, after executing the target task of the target graphics card using the candidate target graphics card, the method further includes:

[0023] A task switching record is generated based on the target graphics card and the target candidate graphics card;

[0024] The method further includes:

[0025] If the cause of the abnormality of the target abnormal graphics card is repaired, the current candidate graphics card corresponding to the target abnormal graphics card is determined using the task switching record; the target abnormal graphics card can be any graphics card that has malfunctioned.

[0026] Delete the target candidate task from the current candidate task corresponding to the current candidate graphics card; the target candidate task is a task specified by the preset configuration that belongs exclusively to the target abnormal graphics card;

[0027] The target abnormal graphics card is used to execute the task assigned by the preset configuration.

[0028] Optionally, the cause of the detected abnormality in the target graphics card is fixed, including:

[0029] Determine the anomaly type of the target abnormal graphics card;

[0030] If the anomaly type is a software type, then the software environment of the target abnormal graphics card is reconstructed, and after the software environment is reconstructed, it is determined that the cause of the anomaly has been fixed;

[0031] If the anomaly type is not a software type, then monitor the anomaly status, and determine that the cause of the anomaly has been fixed when the anomaly status returns to normal.

[0032] This application also provides a graphics card task switching device, applied to an ultrasonic device, comprising:

[0033] The determination module is used to determine the candidate order among at least two graphics cards in the ultrasound device according to a preset configuration;

[0034] An execution module is used to determine, according to the preset configuration, the task of processing ultrasonic display information corresponding to each of the graphics cards, and to execute the corresponding task using each of the graphics cards.

[0035] The switching module is used to determine a target candidate graphics card based on the candidate order if an anomaly is detected in the target graphics card, and to execute the target task of the target graphics card using the target candidate graphics card.

[0036] This application also provides an ultrasonic device, including a memory and a processor, wherein:

[0037] The memory is used to store computer programs;

[0038] The processor is used to execute the computer program to implement the above-described graphics card task switching method.

[0039] This application also provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the above-described graphics card task switching method.

[0040] The graphics card task switching method provided in this application is applied to ultrasound equipment. Based on a preset configuration, a candidate order is determined among at least two graphics cards in the ultrasound equipment. Also based on the preset configuration, the task corresponding to each graphics card for processing ultrasound display information is determined, and each graphics card executes its corresponding task. If an anomaly is detected in the target graphics card, a target candidate graphics card is determined using the candidate order, and the target candidate graphics card executes the target task of the target graphics card. Therefore, the ultrasound equipment using this method has at least two graphics cards, and all graphics cards work simultaneously. In the imaging task, display is the last step. The preset configuration sets the candidate order among the graphics cards. By determining the candidate order, a candidate graphics card can be identified to take over the task when one graphics card malfunctions. When the target graphics card malfunctions, to avoid affecting the imaging work of the ultrasound equipment, a target candidate graphics card is determined using the candidate order, and then the target candidate graphics card takes over from the target graphics card to execute the target task originally performed by the target graphics card. By dynamically switching computing resources (i.e. graphics cards) on tasks as described above, it can be ensured that each step in the imaging task of displaying images is always being executed by the graphics card. Even if a graphics card malfunctions, the ultrasound equipment can still have the ability to perform external imaging, thus improving the stability of the ultrasound equipment.

[0041] In addition, this application also provides a graphics card task switching device, an ultrasonic device, and a computer-readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0043] Figure 1 A flowchart of a graphics card task switching method provided in an embodiment of this application;

[0044] Figure 2 This is a schematic diagram of the structure of a graphics card task switching device provided in an embodiment of this application;

[0045] Figure 3 This is a schematic diagram of the structure of an ultrasonic device provided in an embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0047] In one embodiment, the graphics card task switching method provided in this application can be applied to an ultrasound device. The ultrasound device can be configured with a GPGPU and implement graphics card task switching based on the GPGPU. Here, GPGPU stands for General-purpose computing on graphics processing units, a type of computer chip that typically appears in the form of a graphics card. The ultrasound device can obtain and display the corresponding ultrasound images based on the task execution status of the graphics card.

[0048] Please refer to Figure 1 , Figure 1 This is a flowchart of a graphics card task switching method provided in an embodiment of this application.

[0049] The method includes:

[0050] S101: Determine the candidate order among at least two graphics cards in the ultrasound device according to the preset configuration.

[0051] It should be noted that this method is applied to ultrasound equipment. In this application, the ultrasound equipment has at least two graphics cards, which can be of the same or different types. The types of graphics cards can include discrete graphics cards and integrated graphics cards, etc. The hardware parameters and computing power of each graphics card can be the same or different.

[0052] Understandably, the final step in the ultrasound imaging process is the display task, which should be performed by a graphics card, referred to as the primary graphics card. The primary graphics card can be pre-specified, for example, through a preset configuration; or it can be selected according to a selection rule, the specific content of which is not limited, such as random selection. In addition, other graphics cards can perform steps other than the display step; these graphics cards can be referred to as secondary graphics cards. The tasks performed by the primary and secondary graphics cards can be completely different; for example, the primary graphics card may only perform the display task, while all other tasks are performed by the secondary graphics card. Alternatively, the tasks performed by the primary and secondary graphics cards can be partially different; for example, both the primary and secondary graphics cards may perform data acquisition and calculation tasks, but the secondary graphics card does not perform the display task, while the primary graphics card does.

[0053] The preset configuration refers to the settings for the tasks performed by each graphics card in the ultrasound equipment during operation, as well as the relationships between them. Its specific form and content are not limited and can be configured as needed. The relationship between the graphics cards is a candidate order, specifically a directional chain sequence. The nodes in the candidate order are the individual graphics cards, and the direction specifies the preceding and following order relationships between them. By determining the candidate order, if a graphics card malfunctions, another graphics card can be identified to take over the task according to this order, ensuring that the malfunction of a graphics card does not cause the ultrasound equipment to lose its imaging capability.

[0054] Understandably, since ultrasound equipment has at least two graphics cards, and under normal circumstances, all graphics cards are activated and work in parallel during ultrasound equipment operation, the graphics cards need to be initialized during the startup process. Therefore, the following steps may also be included:

[0055] Step 11: If the ultrasound device is detected to be activated, at least two initialization threads are constructed; the number of initialization threads is greater than or equal to the number of graphics cards.

[0056] Step 12: Initialize the corresponding graphics cards in parallel using each initialization thread.

[0057] To reduce the time required for graphics card initialization, this application constructs at least two initialization threads after detecting the start of the ultrasound device, with the number of initialization threads exceeding the number of graphics cards. Each initialization thread works in parallel, initializing its respective graphics card to minimize the time required for graphics card initialization and thus improve the startup speed of the ultrasound device. Preferably, in one embodiment, the number of initialization threads is the same as the number of graphics cards, forming a one-to-one correspondence, maximizing the startup speed of the ultrasound device.

[0058] S102: Based on the preset configuration, determine the task corresponding to each graphics card for processing ultrasonic display information, and use each graphics card to execute the corresponding task.

[0059] Ultrasonic display information refers to the raw ultrasound data used for ultrasound imaging, or intermediate data or image data obtained after processing the raw ultrasound data. Different tasks require different processing methods and the types of ultrasound display information being processed. It should be noted that this embodiment does not limit the specific content of the task corresponding to each graphics card. In one implementation, during external imaging, the entire imaging process may include steps such as data acquisition, preprocessing, calculation, and display (the steps of the imaging process may be simpler or more complex depending on the specific situation), and each step can be assigned as a separate subtask to the graphics card. The preset configuration also specifies the tasks performed by each graphics card; therefore, according to the preset configuration, corresponding tasks can be assigned to each graphics card, and the tasks can be executed by the graphics card after the task assignment is completed. It should be noted that the tasks performed by any two graphics cards can be completely different, only partially the same, or completely identical (for example, the tasks performed by two second graphics cards may be completely identical). According to the preset configuration, a suitable task assignment method can be selected as needed. However, it is understood that the task combination of all graphics cards should be able to include the complete process of ultrasound equipment imaging in order to support the ultrasound equipment in achieving the function of external imaging.

[0060] In one implementation, each graphics card performs a completely different task; that is, all graphics cards cooperate to complete the imaging function. Specifically, the task of processing ultrasound display information includes the ultrasound image display task. In this case, the process of determining the task corresponding to each graphics card according to a preset configuration may include the following steps:

[0061] Step 21: If the preset configuration is task splitting configuration, then determine the several sub-tasks obtained after splitting the ultrasound image display task based on the task splitting configuration.

[0062] Step 22: Assign several subtasks to several different graphics cards.

[0063] Task splitting configuration refers to the configuration where the ultrasound image display task is broken down into subtasks and assigned to different graphics cards for execution. The specific splitting and assignment methods are not limited. An ultrasound image display task refers to the task of processing ultrasound display information when an ultrasound device displays images. This includes multiple subtasks, the type and number of which vary depending on the splitting method. For example, an ultrasound image display task can be split into two subtasks: calculation and display, or into three subtasks: signal preprocessing, data calculation, and display. After splitting, each subtask is assigned to a different graphics card for execution. This method maximizes the utilization of each graphics card's computing resources. It should be noted that for displaying a single frame of image, the subtasks are executed sequentially to complete the image display. That is, since the execution of each subtask in the ultrasound image display task requires the result of the previous subtask, the subtasks needed to be executed sequentially when displaying a particular frame of image until the display subtask is completed. For multi-frame image display, since the imaging process of each image frame is independent and does not affect each other, subtasks belonging to different image frames can be executed in parallel. For example, while one graphics card is executing the calculation subtask corresponding to image A, another graphics card can execute the data preprocessing subtask of image B.

[0064] In another implementation, one graphics card (e.g., the first graphics card) can perform the entire ultrasound image display task, while the other graphics cards perform other subtasks within the ultrasound image display task, excluding the ultrasound image display subtask itself. This allows the first graphics card to take over and complete the entire ultrasound image display task in case of malfunction. Specifically, the task of processing ultrasound display information includes the ultrasound image display task, which contains ultrasound image display subtasks and backup tasks. In this case, the process of determining the tasks corresponding to each graphics card according to a preset configuration may include:

[0065] Step 31: If the preset configuration is task backup configuration, then the ultrasound image display task is determined to be the task corresponding to the first graphics card, and the backup task is determined to be the task corresponding to the second graphics card.

[0066] A backup task refers to the set of subtasks remaining after removing the ultrasound image display subtasks from the ultrasound image display task. A task backup configuration refers to the task configuration of each graphics card in preparation for executing the complete ultrasound image display task. In this case, the first graphics card performs the ultrasound image display task, while the other graphics cards act as backups, performing the same data processing operations as the first graphics card, but omitting the final ultrasound image display step. Therefore, the tasks performed by each of the second graphics cards are backup tasks.

[0067] It should be noted that the backup task in this application, as well as the subtasks corresponding to the ultrasound image display task mentioned above, can be prepared in advance. That is, before external imaging, the ultrasound image display task can be pre-split to obtain the corresponding subtasks; or the ultrasound image display subtasks in the ultrasound image display task can be pre-removed to obtain the backup task. Alternatively, after determining the specific type of the preset configuration, the steps of splitting to obtain subtasks or removing ultrasound image display subtasks can be performed.

[0068] S103: If an anomaly is detected in the target graphics card, the candidate graphics card is determined using the candidate order, and the target task of the target graphics card is executed using the candidate graphics card.

[0069] The target graphics card can be any graphics card. If the target graphics card malfunctions, in order to ensure that its task can continue to be executed and to avoid interfering with the external imaging function of the ultrasound equipment, a candidate graphics card corresponding to the target graphics card is determined using the candidate sequence, and then the candidate graphics card is used to take over the task of the target graphics card, i.e., the target task.

[0070] It is understandable that, since the target graphics card and the candidate graphics card may have overlapping tasks, in order to avoid wasting computing resources, the process of using the candidate graphics card to execute the target task of the target graphics card may specifically include:

[0071] Step 41: Determine whether the first candidate task of the target candidate graphics card has any overlapping parts with the target task.

[0072] Step 42: If there are duplicate parts, remove the duplicate parts from the first candidate task to obtain the second candidate task.

[0073] Step 43: Execute the second candidate task and the target task using the target candidate graphics card.

[0074] The first candidate task refers to the task executed by the target candidate graphics card before executing the target task. When it is determined that the target task needs to be executed, it is first determined whether there is any overlap between the target task and the first candidate task. If the overlap does not need to be executed repeatedly, the overlap in the first candidate task can be removed to obtain the second candidate task. The target candidate graphics card then executes both the second candidate task and the target task.

[0075] Furthermore, after the faulty graphics card that experienced the anomaly is repaired, it should continue to execute the tasks performed before the anomaly occurred, and the tasks performed by the corresponding candidate graphics card should also be restored to their pre-anomaly state. To accurately identify the current candidate graphics card for the restored target faulty graphics card, the candidate status can be recorded in the task switching log each time a candidate is identified. Specifically, after executing the target task of the target graphics card using the target candidate graphics card, the following steps can also be included:

[0076] Step 51: Generate a task switching record based on the target graphics card and the target candidate graphics card.

[0077] The task switching record refers to a record that documents the candidate relationship between the target graphics card and the target candidate graphics card. When a target candidate graphics card malfunctions as the new target graphics card, its candidate relationship with the corresponding new target candidate graphics card also needs to generate a task switching record. The two task switching records can form a chain relationship, ensuring that each malfunctioning graphics card can find the current candidate graphics card executing its task based on the task switching record.

[0078] Based on this, the following steps may also be included:

[0079] Step 52: If the cause of the abnormality of the target abnormal graphics card is fixed, use the task switching record to determine the current candidate graphics card corresponding to the target abnormal graphics card;

[0080] Step 53: Delete the target candidate task from the current candidate task corresponding to the current candidate graphics card; the target candidate task is a task specified by the preset configuration and belongs exclusively to the target abnormal graphics card;

[0081] Step 54: Utilize the target abnormal graphics card to execute the task assigned by the preset configuration.

[0082] The target faulty graphics card refers to any graphics card that malfunctions. Since the task of the target faulty graphics card may switch multiple times, its corresponding candidate graphics card may also malfunction after the target faulty graphics card malfunctions. If the cause of the malfunction is detected to be fixed, the corresponding current candidate graphics card can be determined based on the task switching record.

[0083] After identifying the current candidate graphics card, the target candidate task in its corresponding current candidate task is deleted. The target candidate task corresponds to the portion of the target abnormal graphics card. If the target abnormal graphics card has recovered, there is no need to continue executing the target candidate task using the current candidate graphics card. Furthermore, the task originally assigned to the target abnormal graphics card by the default configuration is executed using the target abnormal graphics card. It should be noted that the target candidate task and the task assigned to the target abnormal graphics card by the default configuration may be the same or different. For example, if the current candidate graphics card is also acting as a candidate graphics card for another abnormal graphics card and has executed its corresponding task, and there is overlap between the tasks of that abnormal graphics card and the target abnormal graphics card, then the current candidate graphics card must still act as a candidate graphics card for that other abnormal graphics card and continue executing the overlapping part of the task; it cannot be deleted from the current candidate task. Therefore, the deleted target candidate task is the task specified by the default configuration that corresponds to the target abnormal graphics card and is unique to the target abnormal graphics card.

[0084] Understandably, there are various reasons that could cause graphics card malfunctions, and different methods are needed to detect and fix different types of malfunctions. Specifically, the process of detecting and fixing the cause of the target malfunctioning graphics card includes:

[0085] Step 61: Determine the anomaly type of the target abnormal graphics card.

[0086] Step 62: If the exception type is software type, then reconstruct the software environment of the target abnormal graphics card, and determine the cause of the exception has been fixed after the software environment reconstruction is completed.

[0087] Step 63: If the exception type is not software type, monitor the exception status and determine that the cause of the exception has been fixed when the exception status returns to normal.

[0088] Here, "software type" refers to the type of graphics card malfunction caused by abnormal operation of the graphics card software. If the malfunction type is software-related, it needs to be repaired from a software perspective, i.e., the software environment of the target malfunctioning graphics card needs to be reconstructed. After the software environment is reconstructed and returned to a normal state, the graphics card malfunction caused by the software environment abnormality is repaired. Therefore, after the software environment reconstruction is completed, it is determined that the cause of the malfunction has been repaired. This embodiment does not limit the specific method of software reconstruction. For example, a watchdog program can be set up. After the graphics card disconnects due to software factors, the watchdog program is automatically triggered after detecting the malfunction type, thereby repairing the software environment of the disconnected graphics card and notifying the ultrasonic equipment after the repair is completed.

[0089] If the exception type is not software-related, it indicates that the graphics card malfunction is caused by other reasons. In this case, the cause of the malfunction cannot be directly repaired; instead, it is necessary to wait for the cause of the malfunction to be resolved through other means. For example, if an unstable power supply voltage causes the graphics card malfunction, the voltage cannot be directly adjusted. In this situation, the abnormal status can be monitored. An abnormal status refers to a state that is not in a valid state due to an abnormal cause; for example, this could be the power supply voltage status of the graphics card. If the abnormal status returns to a normal state (i.e., a valid state), then it can be determined that the cause of the malfunction has been resolved.

[0090] For example, in one specific implementation, the ultrasound device has two graphics cards: graphics card A is a discrete graphics card, and graphics card B is an integrated graphics card. Using OpenCL technology, both graphics cards A and B are used simultaneously for computational tasks other than the display portion of the ultrasound image display. The computational results from both are selected for display, i.e., one graphics card is designated as the primary graphics card. For instance, when both graphics cards A and B are working normally, graphics card A is used as the primary graphics card for display and computation. When graphics card A malfunctions, the display and computation process switches to graphics card B.

[0091] Specifically, in one implementation, if graphics card A and graphics card B perform different tasks, they are used to execute different sub-tasks within the ultrasound image display task. For example, graphics card A executes the ultrasound image display sub-task and the calculation sub-task, while graphics card B executes the data acquisition sub-task and the data preprocessing sub-task. When graphics card A malfunctions, graphics card B will take over and continue executing the ultrasound image display sub-task and the calculation sub-task, enabling the ultrasound equipment to continue providing imaging services.

[0092] In another implementation, graphics card A performs the complete ultrasound image display task, while graphics card B performs the corresponding backup task. When graphics card A malfunctions, graphics card B processes the same data as graphics card A and uses the same data processing method. Therefore, after completing its data processing, graphics card B performs the ultrasound image display sub-task that graphics card A cannot perform, taking over the image display operation and continuing to provide imaging services.

[0093] Therefore, since the data submitted for calculation and display to both graphics cards A and B is identical each time they are working normally, there will be no system crashes or black screens during switching. Only acceptable phenomena such as a decrease in ultrasound frame rate due to differences in hardware parameters and computing power between graphics cards A and B will occur, but the ultrasound equipment will still be able to provide images.

[0094] The graphics card task switching method provided in this application embodiment includes an ultrasound device with at least two graphics cards, each working simultaneously. In the imaging task, display is the final step. Based on a preset configuration, one graphics card can be selected as the first graphics card to perform the display process in the imaging task. The preset configuration sets a replacement order among the graphics cards. By determining the replacement order, a replacement graphics card can be identified to take over the task when a graphics card malfunctions. For example, if the first graphics card malfunctions, the task it performs for image display will be taken over by the replacement graphics card. After assigning tasks to each graphics card, it executes the corresponding task. When the target graphics card malfunctions, to avoid affecting the imaging work of the ultrasound device, a target replacement graphics card is determined and takes over the target task originally performed by the target graphics card. Through the dynamic task switching of computing resources (i.e., graphics cards) described above, it can be ensured that there is always a graphics card performing each step in the imaging task of displaying images externally. Even if a graphics card malfunctions, the ultrasound device can still maintain its imaging capability, improving the stability of the ultrasound device.

[0095] The graphics card task switching device provided in the embodiments of this application is described below. The graphics card task switching device described below and the graphics card task switching method described above can be referred to in correspondence.

[0096] Please refer to Figure 2 , Figure 2 A schematic diagram of a graphics card task switching device provided in this application embodiment includes:

[0097] The determining module 110 is used to determine the candidate order among at least two graphics cards in the ultrasound device according to a preset configuration;

[0098] The execution module 120 is used to determine the tasks corresponding to each graphics card according to the preset configuration, and to use each graphics card to execute the corresponding task of processing the ultrasonic display information.

[0099] The switching module 130 is used to determine the target candidate graphics card by using the candidate order if an abnormality is detected in the target graphics card, and to use the target candidate graphics card to execute the target task of the target graphics card.

[0100] Optionally, the task of processing ultrasound display information includes an ultrasound image display task, and the execution module 120 includes:

[0101] The splitting unit is used to determine, based on the task splitting configuration, several sub-tasks obtained after splitting the ultrasound image display task, if the preset configuration is a task splitting configuration.

[0102] The first allocation unit is used to assign several subtasks to several different graphics cards.

[0103] Optionally, the task of processing ultrasound display information includes an ultrasound image display task, which includes an ultrasound image display subtask and a backup task. The execution module 120 includes:

[0104] The second allocation unit is used to determine the ultrasound image display task as the task corresponding to the first graphics card and the backup task as the task corresponding to the second graphics card if the preset configuration is the task backup configuration.

[0105] Optionally, the switching module 130 includes:

[0106] The duplicate detection unit is used to determine whether the first candidate task of the target candidate graphics card has a duplicate part with the target task;

[0107] The duplicate removal unit is used to remove the duplicate parts in the first candidate task if there are duplicate parts, so as to obtain the second candidate task.

[0108] The backup execution unit is used to execute the second backup task and the target task using the target backup graphics card.

[0109] Optionally, it also includes:

[0110] The thread building module is used to build at least two initialization threads if the ultrasound device is detected to be activated; the number of initialization threads is greater than or equal to the number of graphics cards.

[0111] The parallel initialization module is used to initialize the corresponding graphics card in parallel using various initialization threads.

[0112] Optionally, it also includes:

[0113] The record generation module is used to generate a task switching record based on the target graphics card and the target candidate graphics card after the target graphics card performs the target task of the target graphics card using the target candidate graphics card;

[0114] Also includes:

[0115] The current candidate graphics card determination module is used to determine the current candidate graphics card corresponding to the target abnormal graphics card by utilizing the task switching record if the cause of the abnormality of the target abnormal graphics card is repaired; the target abnormal graphics card is any graphics card that has malfunctioned.

[0116] The first task recovery module is used to delete the target candidate task from the current candidate task corresponding to the current candidate graphics card; the target candidate task is a task specified by the preset configuration and belongs exclusively to the target abnormal graphics card;

[0117] The second task recovery module is used to execute tasks assigned by a preset configuration using the target abnormal graphics card.

[0118] Optionally, the current candidate determination module includes:

[0119] Anomaly type determination unit is used to determine the anomaly type of the target abnormal graphics card;

[0120] The environment repair unit is used to reconstruct the software environment of the target abnormal graphics card if the abnormality type is software type, and to determine the cause of the abnormality and repair it after the software environment reconstruction is completed.

[0121] The anomaly monitoring unit is used to monitor the abnormal state if the anomaly type is not software type, and to determine that the cause of the anomaly has been fixed when the abnormal state returns to normal.

[0122] The ultrasonic device provided in the embodiments of this application is described below. The ultrasonic device described below and the graphics card task switching method described above can be referred to each other.

[0123] Please refer to Figure 3 , Figure 3This is a schematic diagram of the structure of an ultrasonic device provided in an embodiment of this application. The ultrasonic device 100 may include a processor 101 and a memory 102, and may further include one or more of the following: a multimedia component 103, an information input / output (I / O) interface 104, and a communication component 105.

[0124] The processor 101 controls the overall operation of the ultrasound device 100 to complete all or part of the steps in the aforementioned graphics card task switching method. The memory 102 stores various types of data to support the operation of the ultrasound device 100. This data may include, for example, instructions for any application or method operating on the ultrasound device 100, as well as application-related data. The memory 102 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as one or more of Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0125] Multimedia component 103 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 102 or transmitted via communication component 105. The audio component also includes at least one speaker for outputting audio signals. I / O interface 104 provides an interface between processor 101 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 105 is used for wired or wireless communication between ultrasound device 100 and other devices. Wireless communication may include Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of these. Therefore, the corresponding communication component 105 may include a Wi-Fi component, a Bluetooth component, and an NFC component.

[0126] The ultrasound device 100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the graphics card task switching method given in the above embodiments.

[0127] The following describes the computer-readable storage medium provided in the embodiments of this application. The computer-readable storage medium described below can be referred to in correspondence with the graphics card task switching method described above.

[0128] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described graphics card task switching method.

[0129] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0130] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0131] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0132] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0133] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "include," "contain," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0134] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for switching graphics card tasks, characterized in that, Used in ultrasonic equipment, including: According to the preset configuration, the candidate order among at least two graphics cards in the ultrasound device is determined, wherein the preset configuration represents the configuration of setting the tasks executed by each graphics card and the relationship between the graphics cards when the ultrasound device is running; According to the preset configuration, the task of processing ultrasonic display information corresponding to each graphics card is determined, and the corresponding task is executed by each graphics card. If an anomaly is detected in the target graphics card, a candidate graphics card is determined using the candidate order, and the target task of the target graphics card is executed using the candidate graphics card. Also includes: If the cause of the abnormality of the target abnormal graphics card is fixed, the current candidate graphics card corresponding to the target abnormal graphics card is determined using the task switching record; the target abnormal graphics card can be any graphics card that has malfunctioned. Delete the target candidate task from the current candidate task corresponding to the current candidate graphics card; the target candidate task is a task specified by the preset configuration that belongs exclusively to the target abnormal graphics card; The target abnormal graphics card is used to execute the task assigned by the preset configuration; If the current candidate graphics card is also serving as a candidate graphics card for other abnormal graphics cards and is executing the tasks corresponding to those other abnormal graphics cards, and there is overlap between the tasks of the other abnormal graphics cards and the target abnormal graphics card, then the current candidate graphics card must continue to serve as a candidate graphics card for those other abnormal graphics cards and continue to execute the overlapping tasks, without removing it from the current candidate tasks.

2. The graphics card task switching method according to claim 1, characterized in that, The task of processing ultrasound display information includes ultrasound image display tasks; The step of determining the task for processing ultrasonic display information corresponding to each graphics card according to the preset configuration includes: If the preset configuration is a task splitting configuration, then a number of sub-tasks are determined based on the task splitting configuration to split the ultrasound image display task. The subtasks are assigned to several different graphics cards.

3. The graphics card task switching method according to claim 1, characterized in that, The task of processing ultrasound display information includes an ultrasound image display task, which contains an ultrasound image display subtask and a backup task. The step of determining the task for processing ultrasonic display information corresponding to each graphics card according to the preset configuration includes: If the preset configuration is a task backup configuration, then the ultrasound image display task is determined to be the task corresponding to the first graphics card, and the backup task is determined to be the task corresponding to the second graphics card.

4. The graphics card task switching method according to claim 1, characterized in that, The step of using the candidate target graphics card to execute the target task of the target graphics card includes: Determine whether the first candidate task of the target candidate graphics card has an overlapping part with the target task; If there are duplicate parts, the duplicate parts in the first candidate task are removed to obtain the second candidate task; The second candidate task and the target task are executed using the target candidate graphics card.

5. The graphics card task switching method according to claim 1, characterized in that, Also includes: If the ultrasound device is detected to be activated, at least two initialization threads are constructed; the number of initialization threads is greater than or equal to the number of graphics cards. The corresponding graphics cards are initialized in parallel using the respective initialization threads.

6. The graphics card task switching method according to any one of claims 1 to 5, characterized in that, After executing the target task of the target graphics card using the candidate target graphics card, the method further includes: A task switching record is generated based on the target graphics card and the target candidate graphics card.

7. The graphics card task switching method according to claim 6, characterized in that, The cause of the detected abnormality in the target graphics card has been fixed, including: Determine the anomaly type of the target abnormal graphics card; If the anomaly type is a software type, then the software environment of the target abnormal graphics card is reconstructed, and after the software environment is reconstructed, it is determined that the cause of the anomaly has been fixed; If the anomaly type is not a software type, then monitor the anomaly status, and determine that the cause of the anomaly has been fixed when the anomaly status returns to normal.

8. A graphics card task switching device, characterized in that, Used in ultrasonic equipment, including: The determination module is used to determine the candidate order among at least two graphics cards in the ultrasound device according to a preset configuration, wherein the preset configuration represents the configuration of setting the tasks executed by each graphics card and the relationship between the graphics cards when the ultrasound device is running; An execution module is used to determine, according to the preset configuration, the task of processing ultrasonic display information corresponding to each of the graphics cards, and to execute the corresponding task using each of the graphics cards. The switching module is used to determine a target candidate graphics card based on the candidate order if an abnormality is detected in the target graphics card, and to execute the target task of the target graphics card using the target candidate graphics card. The current candidate graphics card determination module is used to determine the current candidate graphics card corresponding to the target abnormal graphics card by utilizing the task switching record if the cause of the abnormality of the target abnormal graphics card is repaired; the target abnormal graphics card can be any graphics card that has malfunctioned. The first task recovery module is used to delete the target candidate task from the current candidate task corresponding to the current candidate graphics card; the target candidate task is a task specified by the preset configuration that belongs exclusively to the target abnormal graphics card; The second task recovery module is used to execute the task allocated by the preset configuration using the target abnormal graphics card; If the current candidate graphics card is also serving as a candidate graphics card for other abnormal graphics cards and is executing the tasks corresponding to those other abnormal graphics cards, and there is overlap between the tasks of the other abnormal graphics cards and the target abnormal graphics card, then the current candidate graphics card must continue to serve as a candidate graphics card for those other abnormal graphics cards and continue to execute the overlapping tasks, without removing it from the current candidate tasks.

9. An ultrasonic device, characterized in that, Includes memory and processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to implement the graphics card task switching method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the graphics card task switching method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Distribution type multi-core heterogeneous system

    CN110001660A

  • Display card switching method and electronic equipment

    CN111258672A

  • Multi-GPU communication method and device, storage medium and electronic device

    CN112328532A