CN115168079B - Dual-processor device and control method thereof - Google Patents
Dual-processor device and control method thereof Download PDFInfo
- Publication number
- CN115168079B CN115168079B CN202211094823.6A CN202211094823A CN115168079B CN 115168079 B CN115168079 B CN 115168079B CN 202211094823 A CN202211094823 A CN 202211094823A CN 115168079 B CN115168079 B CN 115168079B
- Authority
- CN
- China
- Prior art keywords
- processor
- shared memory
- turn
- dual
- state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/442—Shutdown
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Hardware Redundancy (AREA)
- Programmable Controllers (AREA)
- Safety Devices In Control Systems (AREA)
Abstract
The present disclosure provides a dual processor apparatus and a control method thereof, wherein the method includes: if the occurrence of the arc is detected, controlling the processor to execute a turn-off operation; and the turn-off indication mark in the shared memory is set to be in a turn-off state, the operation processor skips obtaining first equipment operation data according to the state of the turn-off indication mark, and the first equipment operation data is the equipment operation data obtained by the control processor during the generation of the electric arc, so that the problem of data correctness between the control processor and the operation processor caused by the asynchrony of the control processor and the operation processor in the prior art is solved.
Description
Technical Field
The invention relates to the technical field of equipment control, in particular to dual-processor equipment and a control method thereof.
Background
In a conventional PID control scheme based on dual processors, a processor a is used for controlling a circuit and detecting an arc, a processor B performs PID operation to provide a control circuit operation parameter for the processor a, and when the processor a detects the occurrence of the arc, DISABLE control (DISABLE) is performed to immediately disconnect the circuit or stop signal output, but the PID operation cannot be interrupted, so that, when the processor a performs the DISABLE control, the processor B continues to perform PID operation and feed back the control circuit operation parameter to the processor a, and for the processor a, the operation parameter fed back by the processor B is redundant, useless and erroneous, and in addition to the fact that the DISABLE control of the processor a is abrupt, the operation parameter fed back by the processor B may not allow the processor a to join subsequent monitoring data, thereby causing the failure of the entire control data set.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the problem in the prior art that when performing PID control between two processors, the control processor control circuit immediately executes an interrupt, while the operation processor continues to perform PID operation, resulting in data correctness between the control processor and the operation processor. Thereby providing a dual processor apparatus and a control method thereof.
To solve the above technical problem, the embodiments of the present disclosure provide at least a dual processor device and a control method thereof.
In a first aspect, an embodiment disclosed in the present invention provides a method for controlling a dual-processor device, where the dual-processor device includes a control processor, an arithmetic processor, and a shared memory, where the shared memory is provided with a shutdown indicator, and the method is implemented by the control processor, and the method includes:
if the arc is detected to occur, executing a turn-off operation;
and setting the turn-off indication identifier in the shared memory to be in a turn-off state, so that the arithmetic processor skips acquiring first equipment operation data according to the state of the turn-off indication identifier, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation.
Optionally, before the detecting that the arc occurs, the method further comprises: acquiring second equipment operation data; and sending the second device operation data to the operation processor through the shared memory.
Optionally, the sending, by the shared memory, the second device operation data to the arithmetic processor includes: and storing the second device operation data into the shared memory so that the operation processor can acquire the second device operation data from the shared memory.
Optionally, after performing the shutdown operation, the method further includes: entering a sleep state.
Optionally, the method further comprises: restarting when the restarting condition is met; setting a shutdown indication mark in the shared memory to be in a normal state; recovering and acquiring the second equipment operation data; and resuming to send the second device operating data to the arithmetic processor through the shared memory, so that the arithmetic processor can acquire the second device operating data from the shared memory according to the state of the turn-off indication identifier.
Optionally, the restart condition includes: whether the turn-off time meets the preset turn-off duration or not; and/or whether restart indication information is received.
Optionally, before the entering the sleep state, the method further comprises: the equipment operating data during arc generation is frozen.
In a second aspect, an embodiment of the present disclosure further provides a method for controlling a dual-processor device, where the dual-processor device includes a control processor arithmetic processor and a shared memory, and a shutdown indicator is set in the shared memory, and the method is implemented by the arithmetic processor, and the method includes:
acquiring the state of the turn-off indication mark in the shared memory;
and if the turn-off indication mark is in a turn-off state, skipping to acquire first equipment operation data according to the state of the turn-off indication mark, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation period.
Optionally, the method further comprises: if the turn-off indication mark is in a normal state, acquiring first equipment operation data from the shared memory; calculating control parameters according to the first equipment operation data; and sending the calculated control parameters to the control processor through the shared memory.
Optionally, the method further comprises: and entering a dormant state when the turn-off indication mark is in the turn-off state.
Optionally, before the obtaining the state of the shutdown indication flag in the shared memory, the method further includes: restarting when the restarting condition is met; the state of the turn-off indication mark in the shared memory is acquired as follows: and recovering and acquiring the state of the shutdown indication mark in the shared memory.
Optionally, before the entering the sleep state, the method further comprises: the equipment operating data during arc generation is frozen.
In a third aspect, an embodiment of the present disclosure further provides a dual-processor device, where the dual-processor device includes a control processor, an arithmetic processor, and a shared memory, where the shared memory is provided with a shutdown indicator, and the control processor includes:
the shutdown indicating module is used for executing shutdown operation when the occurrence of the electric arc is detected;
and the turn-off state setting module is used for setting the turn-off indication identifier in the shared memory to be in a turn-off state, so that the operation processor skips acquiring first equipment operation data according to the state of the turn-off indication identifier, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation period.
In a fourth aspect, an embodiment of the present disclosure further provides a dual-processor device, where the dual-processor device includes a control processor, an arithmetic processor, and a shared memory, where the shared memory is provided with a shutdown indicator, and the arithmetic processor includes:
a shutdown indicator obtaining module, configured to obtain a state of the shutdown indicator in the shared memory;
and the turn-off data processing module is used for skipping to acquire first equipment operation data according to the state of the turn-off indication mark if the turn-off indication mark is in the turn-off state, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation period.
In a fourth aspect, an embodiment of the disclosure further provides a dual-processor device, including a shared memory, a control processor in the dual-processor device, and an operation processor in the dual-processor device, where the shared memory is provided with a shutdown indicator.
In a fifth aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect, the second aspect, or any possible implementation of the first aspect or the second aspect.
In a sixth aspect, the disclosed embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored, and the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the PID control process based on the dual processors, if the control processor detects that an arc occurs, a turn-off operation is executed; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment operation data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode which can be still read by the CPU of the other party even if the CPU of one party writes in the generation region protection is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data and the working state of the CPU of the other party from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the phenomenon that the operation processor of the other party still executes unnecessary operation when the circuit of the control processor is shut down is avoided, the integral circuit is disordered to run, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart illustrating a dual processor device control method provided by a disclosed embodiment of the invention;
FIG. 2 is a flow chart illustrating another dual-processor device control method provided by the disclosed embodiment of the invention;
FIG. 3 is a flow chart illustrating a method for controlling a dual processor device according to an embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a method for controlling a dual processor device according to another embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating a control processor in a dual processor device according to an embodiment of the disclosure;
FIG. 6 is a schematic diagram illustrating an architecture of an arithmetic processor in another dual-processor device according to an embodiment of the disclosure;
FIG. 7 is a schematic diagram illustrating a dual processor device architecture provided by the disclosed embodiments;
FIGS. 8, 9, and 10 are timing diagrams illustrating a method for controlling a dual processor device according to a disclosed embodiment of the invention;
fig. 11 shows a schematic structural diagram of a computer device according to an embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the summary of the invention.
Example 1
As shown in fig. 1, a flowchart of a method for controlling a dual-processor device according to an embodiment of the present disclosure is provided, where the dual-processor device includes a control processor, an arithmetic processor, and a shared memory, and the shared memory is provided with a shutdown indicator, and the method is implemented by the control processor, and the method includes:
s11: if the arc is detected to occur, executing a turn-off operation;
s12: and setting the turn-off indication mark in the shared memory to be in a turn-off state so that the arithmetic processor skips acquiring first equipment operation data according to the state of the turn-off indication mark, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation.
It can be understood that, in the PID control process based on the dual processors, if the control processor detects that an arc occurs, the shutdown operation is performed; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment operation data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode that even if one CPU is written into the generation region for protection, the other CPU can still read is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data and the working state of the other CPU from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the operation processor at the other end can be prevented from executing unnecessary operation when the circuit of the control processor is shut down, the disordered operation of the whole circuit is caused, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
Example 2
As an improvement of embodiment 1, as shown in fig. 2, a flowchart of another dual-processor device control method provided in the embodiment of the present disclosure is a method for controlling a dual-processor device, where the dual-processor device includes a control processor, an arithmetic processor, and a shared memory, and a shutdown indicator is set in the shared memory, and the method is implemented by the control processor, and the method includes:
s21: the control processor acquires second equipment operation data;
s22: the control processor sends second equipment operation data to the operation processor through the shared memory;
s23: if the occurrence of the electric arc is detected, controlling the processor to execute a turn-off operation;
s24: the control processor sets a turn-off indication mark in the shared memory to be in a turn-off state, so that the operation processor skips acquiring first equipment operation data according to the state of the turn-off indication mark, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation period;
s25: the control processor freezes the device operating data during arc generation;
s26: controlling the processor to enter a sleep state;
s27: when the restarting condition is met, controlling the processor to restart;
s28: the control processor sets the shutdown indication flag in the shared memory to the normal state, and resumes executing S21.
In some alternative embodiments, the control processor stores the second device operating data in the shared memory so that the computing processor can retrieve the second device operating data from the shared memory.
In some optional embodiments, the restart condition comprises: whether the turn-off time meets the preset turn-off duration or not; and/or whether restart indication information is received.
It should be noted that the embodiments described in the present embodiment are only exemplary descriptions of specific implementations under the concept of the present invention, the execution sequence of the steps in each embodiment is not limited to the embodiments provided herein, and in specific engineering practice, a person skilled in the art may adjust the execution sequence of each step according to actual situations, for example, there is no necessary causal relationship and precedence relationship between S21 and S27, and the restart operation of S27 may also be described as after the second device operation data is acquired in S21.
It can be understood that, in the PID control process based on the dual processor, if the control processor detects that an arc occurs, the shutdown operation is performed according to the technical solution provided in this embodiment; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment operation data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode that even if one CPU is written into the generation region for protection, the other CPU can still read is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data and the working state of the other CPU from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the operation processor at the other end can be prevented from executing unnecessary operation when the circuit of the control processor is shut down, the disordered operation of the whole circuit is caused, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
Example 3
As shown in fig. 3, an embodiment of the present invention further provides a method for controlling a dual-processor device, where the dual-processor device includes a control processor arithmetic processor and a shared memory, and the shared memory is provided with a shutdown indicator, and the method is implemented by the arithmetic processor, and the method includes:
s31: acquiring the state of a turn-off indication mark in a shared memory;
s32: and if the turn-off indication mark is in the turn-off state, skipping to acquire first equipment operation data according to the state of the turn-off indication mark, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation.
It can be understood that, in the PID control process based on the dual processors, if the control processor detects that an arc occurs, the shutdown operation is performed; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment running data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode which can be still read by the CPU of the other party even if the CPU of one party writes in the generation region protection is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data or the working state of the CPU of the other party from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the phenomenon that the operation processor of the other party still executes unnecessary operation when the circuit of the control processor is shut down is avoided, the integral circuit is disordered to run, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
Example 4
As an improvement of embodiment 3, as shown in fig. 4, an embodiment of the present invention further provides a method for controlling a dual-processor device, where the dual-processor device includes a control processor arithmetic processor and a shared memory, and a shutdown indicator is set in the shared memory, and the method is implemented by the arithmetic processor, and the method includes:
s41: when the restarting condition is met, the arithmetic processor is restarted and resumes to execute S42;
s42: the method comprises the steps that an arithmetic processor obtains the state of a turn-off indication mark in a shared memory;
s43: if the turn-off indication mark is in a normal state, the operation processor acquires the running data of the first equipment from the shared memory;
s44: the operation processor calculates control parameters according to the first equipment operation data;
s45: the operation processor sends the calculated control parameters to the control processor through the shared memory;
s46: if the turn-off indication mark is in a turn-off state, the operation processor skips acquiring first equipment operation data according to the state of the turn-off indication mark, wherein the first equipment operation data is equipment operation data acquired by the control processor during the arc generation period;
s47: the arithmetic processor freezes the equipment operation data during the arc generation;
s48: and when the shutdown indication mark is in a shutdown state, the operation processor enters a dormant state and waits for the triggering of a restart condition.
It can be understood that, in the PID control process based on the dual processor, if the control processor detects that an arc occurs, the shutdown operation is performed according to the technical solution provided in this embodiment; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment operation data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode that even if one CPU is written into the generation region for protection, the other CPU can still read is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data and the working state of the other CPU from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the operation processor at the other end can be prevented from executing unnecessary operation when the circuit of the control processor is shut down, the disordered operation of the whole circuit is caused, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
Example 5
An embodiment of the present invention further provides a dual-processor device, where the dual-processor device includes a control processor, an arithmetic processor, and a shared memory, and a turn-off indicator is set in the shared memory, as shown in fig. 5, where the control processor includes:
and a shutdown indication module 51, configured to perform a shutdown operation when the occurrence of the arc is detected.
And the turn-off state setting module 52 is configured to set the turn-off indication flag in the shared memory to the turn-off state, so that the arithmetic processor skips acquiring the first device operation data according to the state of the turn-off indication flag, where the first device operation data is the device operation data acquired by the control processor during the arc generation.
In some alternative embodiments, as shown in the dotted line part, the apparatus may further include:
and an operation data obtaining module 53, configured to obtain second device operation data.
And an operation data sending module 54, configured to send the second device operation data to the operation processor through the shared memory, resume obtaining, and send the second device operation data to the operation processor through the shared memory, so that the operation processor obtains the second device operation data from the shared memory according to the state of the shutdown indicator.
A first data freezing module 55 for freezing the device operating data during arc generation.
A first hibernate module 56 for entering a hibernate state.
A first restarting module 57, configured to restart when a restarting condition is satisfied.
And a shared flag setting module 58, configured to set the shutdown indicator in the shared memory to a normal state.
In some optional embodiments, the restart condition comprises: whether the turn-off time meets the preset turn-off duration or not; and/or whether restart indication information is received.
It can be understood that, in the PID control process based on the dual processor, if the control processor detects that an arc occurs, the shutdown operation is performed according to the technical solution provided in this embodiment; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment operation data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode which can be still read by the CPU of the other party even if the CPU of one party writes in the generation region protection is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data and the working state of the CPU of the other party from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the phenomenon that the operation processor of the other party still executes unnecessary operation when the circuit of the control processor is shut down is avoided, the integral circuit is disordered to run, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
Example 6
An embodiment of the present invention further provides a dual-processor device, where the dual-processor device includes a control processor, an arithmetic processor, and a shared memory, and a turn-off indicator is set in the shared memory, as shown in fig. 6, where the arithmetic processor includes:
and a shutdown flag obtaining module 61, configured to obtain a state of a shutdown indicator in the shared memory.
And the shutdown data processing module 62 is configured to skip obtaining of first device operation data according to the state of the shutdown indication flag if the shutdown indication flag is in the shutdown state, where the first device operation data is device operation data obtained by the control processor during the arc generation.
In some alternative embodiments, as shown in phantom, the apparatus further comprises:
and the running data extracting module 63 is configured to, if the shutdown indicator is in a normal state, obtain the first device running data from the shared memory, and after the shared memory is restarted, resume obtaining the state of the shutdown indicator in the shared memory.
And the control parameter operation module 64 is used for calculating the control parameters according to the first equipment operation data.
And a control parameter sending module 65, configured to send the calculated control parameter to the control processor through the shared memory.
A second sleep module 66 configured to enter the sleep state when the shutdown indicator is identified as the shutdown state.
And a second restart module 67, configured to restart when a restart condition is met.
A second data freezing module 68 for freezing the plant operating data during arc generation.
It can be understood that, in the PID control process based on the dual processors, if the control processor detects that an arc occurs, the shutdown operation is performed; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment operation data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode that even if one CPU is written into the generation region for protection, the other CPU can still read is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data and the working state of the other CPU from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the operation processor at the other end can be prevented from executing unnecessary operation when the circuit of the control processor is shut down, the disordered operation of the whole circuit is caused, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
Example 7
As shown in fig. 7, an embodiment of the present invention further provides a dual-processor device, which includes a shared memory 71, a control processor 72 and an operation processor 73 in the dual-processor device, where the shared memory 71 is provided with a shutdown indicator.
For the convenience of the reader to understand, the following describes in detail the dual-processor apparatus with reference to the timing diagrams of fig. 8, fig. 9, and fig. 10, CPUA is a control processor, CPUB is an operation processor, RAM is a shared memory, and FLAG is an off indication FLAG:
in a general mode, the dual-processor device PID control comprises the following processes:
the CPUA does not detect the electric arc, and does not rewrite the working FLAG of the CPUA in the RAM;
CPUA transmits PID operation necessary data to be written into RAM;
the CPUB reads the working FLAG of the CPUA in the RAM and judges the working FLAG as ENABLE;
the CPUB reads the RAM to obtain data and carries out PID operation;
the CPUB writes the circuit control parameters generated by the operation into the RAM;
CPUA reads RAM acquisition parameters to control circuit operation and power output.
With the shared stored pattern, dual processor device PID control includes the following processes:
timing sequence 1:
detecting an electric arc by using the CPUA, and rewriting a working FLAG of the CPUA in the RAM to DISABLE;
the CPUA executes the cut-off output;
CPUB reads the working FLAG of CPUA in RAM and judges it as DISABLE;
CPUB does not read RAM and does not perform PID operation of the current time sequence.
Further, data may be frozen, CPUB or dual CPU may enter limited sleep.
At the Nth time sequence, N >1 integer:
the CPUA restarts the control circuit to output power;
the CPUA rewrites the working FLAG of the CPUA in the RAM;
CPUA transmits PID operation necessary data to be written into RAM;
the CPUB reads the working FLAG of the CPUA in the RAM and judges the working FLAG as ENABLE;
the CPUB reads the RAM to obtain data and carries out PID operation;
CPUB writes the circuit control parameters generated by the operation into RAM.
It can be understood that, in the PID control process based on the dual processor, if the control processor detects that an arc occurs, the shutdown operation is performed according to the technical solution provided in this embodiment; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment operation data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode that even if one CPU is written into the generation region for protection, the other CPU can still read is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data and the working state of the other CPU from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the operation processor at the other end can be prevented from executing unnecessary operation when the circuit of the control processor is shut down, the disordered operation of the whole circuit is caused, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
Example 8
Based on the same technical concept, an embodiment of the present application further provides a computer device, which includes a memory 1 and a processor 2, as shown in fig. 11, where the memory 1 stores a computer program, and the processor 2 implements any one of the dual-processor device control methods when executing the computer program.
The memory 1 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 1 may in some embodiments be an internal storage unit of the OTT video traffic monitoring system, e.g. a hard disk. The memory 1 may also be an external storage device of the OTT video service monitoring system in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 1 may also include both an internal storage unit and an external storage device of the OTT video service monitoring system. The memory 1 may be used to store not only application software installed in the OTT video service monitoring system and various data, such as codes of OTT video service monitoring programs, but also temporarily store data that has been output or is to be output.
The processor 2 may be a Central Processing Unit (cpu), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for running program codes stored in the memory 1 or Processing data, for example, executing OTT video service monitoring program and the like.
It can be understood that, in the PID control process based on the dual processor, if the control processor detects that an arc occurs, the shutdown operation is performed according to the technical solution provided in this embodiment; the shutdown indication mark in the shared memory is set to be in a shutdown state, the operation processor skips over to obtain the equipment operation data obtained by the control processor during the arc generation period according to the state of the shutdown indication mark, and the data sharing mode that even if one CPU is written into the generation region for protection, the other CPU can still read is utilized through the shared memory, so that the CPUs of the two parties can obtain the changed data and the working state of the other CPU from the high-speed storage unit at the first time when executing any operation, the stability and the consistency of data transmission between the control processor and the operation processor are ensured, the operation processor at the other end can be prevented from executing unnecessary operation when the circuit of the control processor is shut down, the disordered operation of the whole circuit is caused, and the data correctness between the control processor and the operation processor is effectively ensured when the arc is generated.
The disclosed embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the dual-processor device control method described in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The computer program product of the dual-processor device control method provided in the embodiments disclosed in the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the steps of the dual-processor device control method described in the above method embodiments, which may be referred to in the above method embodiments specifically, and are not described herein again.
The disclosed embodiments also provide a computer program which, when executed by a processor, implements any one of the methods of the preceding embodiments. The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar contents in other embodiments may be referred to for the contents which are not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps in the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following technologies, which are well known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer-readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Claims (16)
1. A dual-processor device control method is characterized in that the dual-processor device comprises a control processor, an operation processor and a shared memory, wherein a turn-off indication mark is arranged in the shared memory, the method is realized by the control processor, and the method comprises the following steps:
acquiring second equipment operation data;
sending the second device operating data to the arithmetic processor through the shared memory;
if the arc is detected to occur, executing a turn-off operation;
and setting the turn-off indication identifier in the shared memory to be in a turn-off state, so that the arithmetic processor skips acquiring first equipment operation data according to the state of the turn-off indication identifier, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation.
2. The dual-processor device control method according to claim 1, wherein the sending the second device operation data to the arithmetic processor through the shared memory comprises:
and storing the second device operation data into the shared memory so that the operation processor can acquire the second device operation data from the shared memory.
3. The dual-processor device control method according to claim 2, wherein after performing a shutdown operation, the method further comprises: entering a sleep state.
4. The dual-processor device control method according to claim 3, further comprising:
restarting when the restarting condition is met;
setting a shutdown indication mark in the shared memory to be in a normal state;
recovering and acquiring the second equipment operation data;
and resuming to send the second device operating data to the arithmetic processor through the shared memory, so that the arithmetic processor acquires the second device operating data from the shared memory according to the state of the turn-off indication identifier.
5. The dual-processor device control method according to claim 4, wherein the restart condition includes:
whether the turn-off time meets the preset turn-off duration or not; and/or the presence of a gas in the atmosphere,
whether restart indication information is received.
6. The dual-processor device control method of claim 5, wherein prior to the entering the sleep state, the method further comprises: the equipment operating data during arc generation is frozen.
7. A dual-processor device control method is characterized in that the dual-processor device comprises a control processor arithmetic processor and a shared memory, wherein a turn-off indication mark is arranged in the shared memory, the method is realized by the arithmetic processor, and the method comprises the following steps:
acquiring the state of the turn-off indication mark in the shared memory;
if the turn-off indication mark is in a turn-off state, skipping to acquire first equipment operation data according to the state of the turn-off indication mark, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation period;
and if the turn-off indication mark is in a normal state, acquiring the running data of the first equipment from the shared memory.
8. The dual-processor device control method according to claim 7, further comprising:
calculating control parameters according to the first equipment operation data;
and sending the calculated control parameters to the control processor through the shared memory.
9. The dual-processor device control method according to claim 8, further comprising: and entering a dormant state when the turn-off indication mark is in the turn-off state.
10. The dual-processor device control method according to claim 8, wherein before the obtaining the state of the shutdown indication flag in the shared memory, the method further comprises:
restarting when the restarting condition is met;
the state of the turn-off indication mark in the shared memory is acquired as follows: and recovering and acquiring the state of the shutdown indication mark in the shared memory.
11. The dual-processor device control method according to claim 9, wherein before said entering into the sleep state, the method further comprises: the equipment operating data during arc generation is frozen.
12. A dual processor device, comprising a control processor, an arithmetic processor, and a shared memory, wherein a shutdown indicator is provided in the shared memory, and wherein the control processor comprises:
the operation data acquisition module is used for acquiring operation data of the second equipment;
the operation data sending module is used for sending the second equipment operation data to the operation processor through the shared memory;
the shutdown indicating module is used for executing shutdown operation when the occurrence of the electric arc is detected;
and the turn-off state setting module is used for setting the turn-off indication identifier in the shared memory to be in a turn-off state, so that the operation processor skips acquiring first equipment operation data according to the state of the turn-off indication identifier, wherein the first equipment operation data is the equipment operation data acquired by the control processor during the arc generation period.
13. A dual processor device, comprising a control processor, an arithmetic processor, and a shared memory, wherein a shutdown indicator is provided in the shared memory, and wherein the arithmetic processor comprises:
a shutdown indicator obtaining module, configured to obtain a state of the shutdown indicator in the shared memory;
a shutdown data processing module, configured to skip obtaining first device operation data according to a state of the shutdown indicator if the shutdown indicator is in a shutdown state, where the first device operation data is device operation data obtained by the control processor during an arc generation period;
and the running data extraction module is used for acquiring the running data of the first equipment from the shared memory if the turn-off indication mark is in a normal state.
14. A dual processor device comprising a shared memory, a control processor of the dual processor device of claim 12, and an operation processor of the dual processor device of claim 13, wherein the shared memory has a shutdown indicator.
15. A computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when a computer device is running, the machine-readable instructions when executed by the processor performing the dual-processor device control method of any of claims 1 to 11.
16. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs a dual-processor device control method as claimed in any one of claims 1 to 11.
Priority Applications (6)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211094823.6A CN115168079B (en) | 2022-09-08 | 2022-09-08 | Dual-processor device and control method thereof |
| TW112130362A TWI850061B (en) | 2022-09-08 | 2023-08-11 | A dual processor device and control method thereof |
| KR1020257003086A KR20250044865A (en) | 2022-09-08 | 2023-08-15 | Dual processor device and its control method and processor |
| JP2025503497A JP2025528026A (en) | 2022-09-08 | 2023-08-15 | Dual processor device, its control method, and processor |
| PCT/CN2023/112998 WO2024051450A1 (en) | 2022-09-08 | 2023-08-15 | Dual-processor device and control method therefor, and processor |
| DE112023002615.7T DE112023002615T5 (en) | 2022-09-08 | 2023-08-15 | DUAL PROCESSOR DEVICE AND ITS CONTROL METHOD AND PROCESSOR |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211094823.6A CN115168079B (en) | 2022-09-08 | 2022-09-08 | Dual-processor device and control method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115168079A CN115168079A (en) | 2022-10-11 |
| CN115168079B true CN115168079B (en) | 2022-12-02 |
Family
ID=83482437
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211094823.6A Active CN115168079B (en) | 2022-09-08 | 2022-09-08 | Dual-processor device and control method thereof |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN115168079B (en) |
| TW (1) | TWI850061B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20250044865A (en) * | 2022-09-08 | 2025-04-01 | 선전 씨에스엘 배큐엄 사이언스 앤드 테크놀로지 컴퍼니 리미티드 | Dual processor device and its control method and processor |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110908844A (en) * | 2019-10-24 | 2020-03-24 | 珠海格力电器股份有限公司 | Arc fault detection method and device, computer readable storage medium and socket |
| CN113687944A (en) * | 2021-07-29 | 2021-11-23 | 山东云海国创云计算装备产业创新中心有限公司 | Task execution method, device, equipment and medium for baseboard management control chip |
Family Cites Families (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101919011A (en) * | 2007-09-25 | 2010-12-15 | 鲍尔马特有限公司 | Inductive power transmission platform |
| US7944654B2 (en) * | 2008-11-10 | 2011-05-17 | Scott Gary W | Multiple-pole circuit breaker with shared current sensor for arcing fault detection |
| US9043039B2 (en) * | 2011-02-24 | 2015-05-26 | Tigo Energy, Inc. | System and method for arc detection and intervention in solar energy systems |
| CN102605139A (en) * | 2011-10-31 | 2012-07-25 | 中冶赛迪工程技术股份有限公司 | Digital electric arc furnace electrode control method and system based on network transmission |
| FR3043222B1 (en) * | 2015-11-04 | 2018-11-16 | Commissariat A L'energie Atomique Et Aux Energies Alternatives | METHOD FOR PARALLEL SIMULATION OF ELECTRONIC SYSTEM LEVEL WITH DETECTION OF CONFLICTS OF ACCESS TO A SHARED MEMORY |
| CN105630732B (en) * | 2015-12-17 | 2018-09-14 | 西北工业大学 | A kind of hot change-over method of duplication redundancy microprocessor |
| CN109840241B (en) * | 2017-11-27 | 2023-05-26 | 西安翔腾微电子科技有限公司 | Inter-core communication circuit of heterogeneous dual-core processor |
| US10831978B2 (en) * | 2018-06-29 | 2020-11-10 | Taiwan Semiconductor Manufacturing Company Ltd. | Method of regulating integrated circuit timing and power consumption |
| CN110134638B (en) * | 2019-05-09 | 2023-05-23 | 中国航空工业集团公司西安航空计算技术研究所 | Dual-processor data exchange method |
| EP4050483A4 (en) * | 2019-10-24 | 2022-12-14 | Stream Computing Inc | DATA PROCESSING METHOD, EQUIPMENT, ELECTRONIC DEVICE AND COMPUTER-READABLE STORAGE MEDIA |
| US11536755B2 (en) * | 2020-05-29 | 2022-12-27 | Mks Instruments, Inc. | System and method for arc detection using a bias RF generator signal |
| US20220247163A1 (en) * | 2021-02-01 | 2022-08-04 | Siemens Industry, Inc. | Arc fault detection by accumulation of machine learning classifications in a circuit breaker |
| US12087528B2 (en) * | 2021-02-01 | 2024-09-10 | Ge Infrastructure Technology Llc | Enhanced switchgear monitoring and diagnostics in a protection relay |
-
2022
- 2022-09-08 CN CN202211094823.6A patent/CN115168079B/en active Active
-
2023
- 2023-08-11 TW TW112130362A patent/TWI850061B/en active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110908844A (en) * | 2019-10-24 | 2020-03-24 | 珠海格力电器股份有限公司 | Arc fault detection method and device, computer readable storage medium and socket |
| CN113687944A (en) * | 2021-07-29 | 2021-11-23 | 山东云海国创云计算装备产业创新中心有限公司 | Task execution method, device, equipment and medium for baseboard management control chip |
Also Published As
| Publication number | Publication date |
|---|---|
| TWI850061B (en) | 2024-07-21 |
| TW202411839A (en) | 2024-03-16 |
| CN115168079A (en) | 2022-10-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8677185B2 (en) | Information processing apparatus | |
| CN107315656B (en) | Multi-core embedded PLC software recovery method and PLC | |
| CN115237644B (en) | System fault processing method, central operation unit and vehicle | |
| JP2001101033A (en) | Fault monitoring method for operating system and application program | |
| CN110825495A (en) | Container cloud platform recovery method, device, equipment and readable storage medium | |
| CN101882085A (en) | System starting method and embedded equipment | |
| CN115168079B (en) | Dual-processor device and control method thereof | |
| CN102637139A (en) | Method, device and single panel for feeding watchdog by embedded system | |
| WO2022267812A1 (en) | Software recovery method, electronic device, and storage medium | |
| CN120255970B (en) | Baseboard management controller starting method, computer equipment, medium and product | |
| TWI857744B (en) | A dual processing module device and control method thereof | |
| CN115167933B (en) | Dual-processor equipment, control method thereof and processor | |
| CN102317921A (en) | High reliability computer system and constructive method thereof | |
| CN102169451B (en) | The method and apparatus that a kind of monitoring CPU is run | |
| CN115904793B (en) | Memory transfer method, system and chip based on multi-core heterogeneous system | |
| CN111221683A (en) | Double-flash hot backup method, system, terminal and storage medium for data center switch | |
| JP2004310514A (en) | Information processing terminal and history information storage method | |
| CN116428166A (en) | Compressor state control method, electronic device and readable storage medium | |
| JP2025528026A (en) | Dual processor device, its control method, and processor | |
| CN107179911A (en) | A kind of method and apparatus for restarting management engine | |
| CN217767427U (en) | Watchdog control circuit and electronic equipment | |
| CN112416104A (en) | A device and recovery method for realizing the last state of a general server power supply | |
| JP2000172575A (en) | Memory backup system | |
| JPWO2016166900A1 (en) | Information processing apparatus, information processing method, and information processing program | |
| CN118567961A (en) | Log information storage realization system, method, vehicle and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: 518102 Room 101, 201, 301, Building B, Functional Support Area, Taohuayuan Zhichuang Town, Tiegang Community, Xixiang Street, Baoan District, Shenzhen, Guangdong Province Patentee after: Shenzhen Hengyunchang Vacuum Technology Co.,Ltd. Address before: Room 101, 201, 301, Building B, Functional Supporting Area, Taohuayuan Zhichuang Town, Tiegang Community, Xixiang Street, Baoan District, Shenzhen, Guangdong 518100 Patentee before: SHENZHEN HENGYUNCHANG VACUUM TECHNOLOGY CO.,LTD. |