An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, is configured to implement a voter-based operation of controlling a redundancy, comprising:
- acquiring a redundancy mode adopted for a target hardware and a voter corresponding to the redundancy mode, wherein the redundancy mode comprises an N-modular redundancy in which an N-modular voter connected to N redundant branches is adopted for the target hardware, or a double modular redundancy in which a double modular voter connected to two redundant branches is adopted for the target hardware, wherein N>2 and N is an integer;
- acquiring a processing element array in the target hardware, in a case that the N-modular redundancy is adopted as the redundancy mode;
- switching, in a case that the double modular redundancy is adopted as the redundancy mode, the redundancy mode adopted for the target hardware to the N-modular redundancy in response to a message indicating a fault state of a redundant branch connected to a detected double modular voter;
- acquiring the processing element array in the target hardware, wherein the processing element array comprises a plurality of processing elements;
- selecting a plurality of groups of processing elements from the processing element array so as to generate a voter set, wherein a corresponding voter is generated for each group of the plurality of groups of processing elements, and the corresponding voter is configured to perform a voting operation in a redundancy control;
- and
- acquiring, in response to a message indicating a fault state of a detected voter, a target voter from the voter set to replace the detected voter, and re-performing the voting operation in the redundancy control by using the target voter.