CN109240976A - Two take two voting process method, apparatus and electronic equipment - Google Patents
Two take two voting process method, apparatus and electronic equipment Download PDFInfo
- Publication number
- CN109240976A CN109240976A CN201810887598.9A CN201810887598A CN109240976A CN 109240976 A CN109240976 A CN 109240976A CN 201810887598 A CN201810887598 A CN 201810887598A CN 109240976 A CN109240976 A CN 109240976A
- Authority
- CN
- China
- Prior art keywords
- data
- processor
- voting
- default
- data packet
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/163—Interprocessor communication
- G06F15/173—Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
- G06F15/17306—Intercommunication techniques
- G06F15/17325—Synchronisation; Hardware support therefor
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention provides one kind two and takes two voting process method, apparatus and electronic equipment, is related to computer data processing technology field.This method comprises: first processor or second processor carry out data from received second data of signal source from received first data of signal source and second processor to first processor and synchronize;First processor and second processor interact voting to the first data and the second data according to default voting rule respectively;The first data voting is passed through in first processor, and first processor receives after second processor passes through the second data voting, first processor exports the data packet obtained to the first data or the second data according to default packing rule.This programme is cooperated by first processor and second processor, realizes that two take two votings, is facilitated the hardware configuration for simplifying electronic equipment, is reduced equipment cost.
Description
Technical field
The present invention relates to computer data processing technology field, in particular to one kind two take two voting process methods,
Device and electronic equipment.
Background technique
In double 2-vote-2 system, two take two basic technologies being realized be voting.That is, identical in two completions
When the basic unit of predetermined function is agreed, defined non-limiting function can be executed, safe condition is otherwise oriented to, with
It avoids equipment from continuing to execute the function when inconsistent, and increases its issuable risk, both this judgements are agreed
Process, referred to as two take two votings.
In the prior art, realize that two take two votings that a voting machines usually are arranged independently of two basic units.Table
Certainly device is only compared or assembles to the output of two basic units, and without logical process, does not generate new output content.
For example in the design for taking two communications to export two, two processors execute logical operations, generate output data respectively, then be arranged one
A third party's device: being such as FPGA, respectively takes a part for the output data packet to both of the aforesaid processor, is assembled into one
Output data packet takes two output as two, and which hardware configuration is complicated, is unfavorable for the miniaturization of equipment, in addition more
Software and hardware also increases the cost of product.
Summary of the invention
In order to overcome the deficiencies in the prior art described above, the present invention provide one kind two take two voting process method, apparatus and
Electronic equipment.
To achieve the goals above, technical solution provided by the embodiment of the present invention is as follows:
The embodiment of the present invention provides one kind two and takes two voting process methods, is applied to electronic equipment, the electronic equipment packet
The second processor for including first processor and being connect with the first processor;The described method includes:
The first processor or the second processor are to the first processor from received first data of signal source
And the second processor carries out data from received second data of the signal source and synchronizes;
The first processor and the second processor count first data and second according to default voting rule
According to interacting voting respectively;
First data voting is passed through in the first processor, and the first processor receives described second
After processor passes through second data voting, the first processor output is to first data or second data
The data packet obtained according to default packing rule.
Optionally, above-mentioned first processor and the second processor according to default voting rule to first data and
Second data interact voting respectively, comprising:
The first processor puts to the vote to obtain the first table to first data according to the first default voting rule
Certainly as a result, and after first voting result is voted through, first data are packaged with obtain first number
According to packet;
The second processor puts to the vote to second data according to the described first default voting rule to obtain
Two voting results, and after second voting result is voted through, second data are packaged to obtain
Two data packets;
The first processor receives second voting result that the second processor is sent and counts with described second
According to corresponding the second dynamic locking data for being indicated to second voting result;
First data packet is sent to the second processor by the first processor, and receives the second processing
Second data packet that device is sent;
The second processor receives first voting result that the first processor is sent and counts with described first
According to corresponding the first dynamic locking data for being indicated to first voting result;
Second data packet is sent to the first processor by the second processor, and receives first processing
First data packet that device is sent;
The first processor carries out check voting to first data packet and second data packet, and obtains third
Voting result, and the third voting result is sent to the second processor;
The second processor carries out check voting to above-mentioned first data packet and second data packet, and obtains the 4th
Voting result, and the 4th voting result is sent to the first processor.
Optionally, above-mentioned first processor puts to the vote to obtain to first data according to the first default voting rule
To the first voting result, comprising:
The first processor judges whether corresponding first fixed code of first data is the first default fixed code,
In, when corresponding first fixed code of first data is not the first default fixed code, obtain indicating that voting does not pass through
The first voting result, alternatively, being obtained when corresponding first fixed code of first data is the first default fixed code
The first voting result voted through.
Optionally, above-mentioned second processor puts to the vote to second data according to the described first default voting rule
To obtain the second voting result, comprising:
The second processor judges whether corresponding second fixed code of second data is the second default fixed code,
In, when corresponding second fixed code of second data is not the second default fixed code, obtain indicating that voting does not pass through
The second voting result, alternatively, being obtained when corresponding second fixed code of second data is the second default fixed code
The second voting result voted through.
Optionally, above-mentioned first processor output is to first data or second data according to default packing rule
Obtained data packet, comprising:
When the third voting result and the 4th voting result are voted through, the first processor is connect
The key data that the second processor is sent is received, and exports the key data and first data packet or second number
According to packet.
Optionally, above-mentioned first processor output is to first data or second data according to default packing rule
After obtained data packet, the method also includes:
The data packet is verified according to default verification rule, and is verifying the obstructed out-of-date deletion data packet.
Second aspect, the embodiment of the present invention provide one kind two and take two voting process devices, are applied to electronic equipment, the electricity
Sub- equipment includes first processor and the second processor that connect with the first processor;Described device includes:
Data synchronisation unit, for the first processor from received first data of signal source and the second processing
Device carries out data from received second data of the signal source and synchronizes;
Unit is decided by vote, for interacting table respectively to first data and the second data according to default voting rule
Certainly;
Output unit, for passing through in the first processor to first data voting, and the first processor
It receives after the second processor passes through second data voting, the first processor output is to first data
Or the data packet that second data are obtained according to default packing rule.
Optionally, above-mentioned voting unit is also used to:
According to the first default voting rule, put to the vote to first data to obtain the first voting result, and in institute
It states after the first voting result votes through, first data is packaged to obtain the first data packet;
According to the described first default voting rule, put to the vote to second data to obtain the second voting result, and
After second voting result is voted through, second data are packaged to obtain the second data packet;
Receive second voting result that the second processor is sent and it is corresponding with second data for pair
The second dynamic locking data that second voting result is indicated;
First data packet is sent to the second processor, and receives that the second processor sends described the
Two data packets;
Receive first voting result that the first processor is sent and it is corresponding with first data for pair
The first dynamic locking data that first voting result is indicated;
Second data packet is sent to the first processor, and receives that the first processor sends described the
One data packet;
Check voting is carried out to first data packet and second data packet, and obtains third voting result, and will
The third voting result is sent to the second processor;
Check voting is carried out to above-mentioned first data packet and second data packet, and obtains the 4th voting result, and will
4th voting result is sent to the first processor.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, including first processor and with it is described first processing
The second processor of device connection, in which:
The first processor or the second processor, for the first processor from signal source received first
Data and the second processor carry out data from received second data of the signal source and synchronize;
The first processor and the second processor, be also used to according to default voting rule to first data and
Second data interact voting respectively;
First data voting is passed through in the first processor, and the first processor receives described second
After processor passes through second data voting, the first processor output is to first data or second data
The data packet obtained according to default packing rule.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, deposit in the readable storage medium storing program for executing
Computer program is contained, when the computer program is run on computers, so that the computer executes above-mentioned two and takes
Two voting process methods.
In terms of existing technologies, provided by the invention two two voting process method, apparatus and electronic equipment are taken at least
It has the advantages that this method comprises: first processor or second processor are received from signal source to first processor
First data and second processor carry out data from received second data of signal source and synchronize;First processor and second processor
Voting is interacted respectively to the first data and the second data according to default voting rule;In first processor to the first tables of data
Certainly pass through, and first processor receives after second processor passes through the second data voting, first processor is exported to first
The data packet that data or the second data are obtained according to default packing rule.This programme passes through first processor and second processor phase
Mutually cooperation realizes that two take two votings, facilitates the hardware configuration for simplifying electronic equipment, reduces equipment cost.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, the embodiment of the present invention is cited below particularly, and match
Appended attached drawing is closed, is described in detail below.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described.It should be appreciated that the following drawings illustrates only certain embodiments of the present invention, therefore it is not construed as pair
The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the block diagram of electronic equipment provided in an embodiment of the present invention.
Fig. 2 is provided in an embodiment of the present invention two flow diagrams for taking two voting process methods.
Fig. 3 is the interaction schematic diagram of first processor provided in an embodiment of the present invention and second processor voting.
Fig. 4 is provided in an embodiment of the present invention two block diagrams for taking two voting process devices.
Icon: 10- electronic equipment;11- first processor;12- second processor;13- storage unit;14- communication bus;
100- bis- takes two voting process devices;110- data synchronisation unit;120- decides by vote unit;130- output unit.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description.Obviously, described embodiment is only a part of the embodiments of the present invention, instead of all the embodiments.It is logical
The component for the embodiment of the present invention being often described and illustrated herein in the accompanying drawings can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed
The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art
Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.In addition, term " the
One ", " second " etc. is only used for distinguishing description, is not understood to indicate or imply relative importance.
With reference to the accompanying drawing, it elaborates to some embodiments of the present invention.In the absence of conflict, following
Feature in embodiment and embodiment can be combined with each other.
Fig. 1 is please referred to, is the block diagram of electronic equipment 10 provided in an embodiment of the present invention.The embodiment of the present invention provides
Electronic equipment 10 can be used for executing each step that following two take two voting process methods, the electronic equipment 10 structure letter
It is single, it can be realized two and take two voting process, facilitate the miniaturization manufacture of device hardware cost and equipment.
Understandably, in railway territory, two votings are taken by two, can guarantee that the data of signal source output are correct nothing
Data accidentally avoid increasing because of the data of mistake to improve the reliability and safety of the corresponding operating based on the data
The risk of operation.Its signal source can be acquisition module, for example, signal source is the velocity pick-up for acquiring train running rate
Device.
In the present embodiment, electronic equipment 10 may include first processor 11, second processor 12, storage unit 13 with
And two take two voting process devices 100, first processor 11, second processor 12, storage unit 13 and two take at two votings
It is directly or indirectly electrically connected between the reason each element of device 100, to realize the transmission or interaction of data.For example, these yuan
Part can be realized by one or more communication bus or signal wire be electrically connected between each other.
In the present embodiment, first processor 11 and second processor 12 can be the processor of same model.The processing
Device may be a kind of IC chip, the processing capacity with signal.For example, the processor can be central processing unit
At (Central Processing Unit, CPU), graphics processor (Graphics Processing Unit, GPU), network
Manage device (Network Processor, NP) etc.;Can also be digital signal processor (DSP), specific integrated circuit (ASIC),
Field programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hard
Part component.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.
Storage unit 13 may be, but not limited to, random access memory, read-only memory, programmable read only memory,
Erasable Programmable Read Only Memory EPROM, electrically erasable programmable read-only memory etc..In the present embodiment, storage unit 13 can be with
For storing the first data, the second data of signal source transmission.Certainly, storage unit 13 can be also used for storage program, first
Processor 11, second processor 12 execute the program after receiving and executing instruction.
Further, two to take two voting process devices 100 include that at least one can be with software or firmware (firmware)
Form is stored in storage unit 13 or is solidificated in the software in 10 operating system of electronic equipment (operating system, OS)
Functional module.First processor 11, second processor 12 are for executing the executable module stored in storage unit 13, such as two
Take software function module and computer program etc. included by two voting process devices 100.
It is understood that structure shown in FIG. 1 is only a kind of structural schematic diagram of electronic equipment 10, electronic equipment 10 is also
It may include than more components shown in Fig. 1.Each component shown in Fig. 1 can be realized using hardware, software, or its combination.
Incorporated by reference to referring to Fig. 2 and Fig. 3, wherein Fig. 2 is provided in an embodiment of the present invention two streams for taking two voting process methods
Journey schematic diagram, Fig. 3 are that first processor 11 (M-CPU) provided in an embodiment of the present invention and second processor 12 (C-CPU) decide by vote
Interaction schematic diagram.Provided in an embodiment of the present invention two take two voting process methods to can be applied to above-mentioned electronic equipment 10,
The two each steps for taking two voting process methods are executed by the electronic equipment 10.This method can simplify the hardware knot of electronic equipment 10
Structure, and the data that can be exported to signal source are put to the vote, to ensure the correctness and reliability of signal source output data.
Each step of two voting process methods will be taken to be described in detail to shown in Fig. 2 two below, in the present embodiment
In, two take two voting process methods may comprise steps of:
Step S210, first processor 11 or second processor 12 count first processor 11 from signal source received first
According to and second processor 12 from received second data of signal source to carry out data synchronous.
In the present embodiment, first processor 11 can be counted with second processor 12 from the reception of same signal source is corresponding
According to, wherein the data that first processor 11 is received from signal source connect as the first data, second processor 12 from the signal source
The data received are as the second data.First processor 11 or second processor 12 can be synchronous by data, in order to same
Data after step are put to the vote.
Step S220, first processor 11 and second processor 12 are according to default voting rule to the first data and the second number
According to interacting voting respectively.
In the present embodiment, default voting rule can be configured according to the actual situation, take two votings for realizing two.
Wherein interaction voting can be regarded as: first processor 11 is for putting to the vote to the first data, and first processor 11 is also used to
The second data packet corresponding with the second data sent to second processor 12 is put to the vote.Second processor 12 is used for second
Data are put to the vote, and corresponding first data packet of the first data that second processor 12 is also used to send first processor 11
Put to the vote so that data are not decided by vote by an independent processor, guarantee effective output be two take two as a result, rather than single
It is that one channel voluntarily generates as a result, avoid issuable random error in calculating process, thus improve data reliability and
Safety.
Optionally, step S220 may include:
First processor 11 puts to the vote to the first data according to the first default voting rule to obtain the first voting knot
Fruit, and after the first voting result is voted through, the first data are packaged to obtain the first data packet;
Second processor 12 puts to the vote to the second data according to the first default voting rule to obtain the second voting knot
Fruit, and after the second voting result is voted through, the second data are packaged to obtain the second data packet;
First processor 11 receives the second voting result and corresponding with the second data be used for that second processor 12 is sent
The second dynamic locking data that second voting result is indicated;First data packet is sent to second by first processor 11
Processor 12, and receive the second data packet of the transmission of second processor 12;Wherein, the second dynamic locking data it is to be understood that by
The data that second processor 12 is generated by randomizer, the second dynamic locking data can be attached to the second voting result
In, to play mark action to the second voting result;Wherein, the second dynamic locking can also be attached to data to be output (the first number
According to or the second data) after, for cooperating identified key data after final voting to export together, for recipient (its elsewhere
Manage device or other equipment) secondary verification inspection is carried out, in order to determine the integrality of data to be output according to the second dynamic locking.
Second processor 12 receives the first voting result and corresponding with the first data be used for that first processor 11 is sent
The first dynamic locking data that first voting result is indicated;First dynamic locking data can be led to by first processor 11
Randomizer generation is crossed, function is similar with the second dynamic locking data;
Second data packet is sent to first processor 11 by second processor 12, and receives the of the transmission of first processor 11
One data packet;
First processor 11 carries out check voting to the first data packet and the second data packet, and obtains third voting result,
And third voting result is sent to second processor 12;
Second processor 12 carries out check voting to above-mentioned first data packet and the second data packet, and obtains the 4th voting knot
Fruit, and the 4th voting result is sent to first processor 11.
In the present embodiment, when treating output data and putting to the vote, indicate that the identity code voted through can be fixed code
(for example being 32 certain numbers).When putting to the vote to the subsequent data packet (the first data packet, the second data packet) being packaged into,
The identity code voted through can be dynamic locking data.
In the present embodiment, first processor 11 puts to the vote to obtain to the first data according to the first default voting rule
It may include: that first processor 11 judges whether corresponding first fixed code of the first data is first pre- to the first voting result
If fixed code, wherein when corresponding first fixed code of the first data is not or not first default fixed code, obtain indicating that voting is obstructed
The first voting result crossed, alternatively, obtaining expression table when corresponding first fixed code of the first data is the first default fixed code
The first voting result certainly passed through.
Understandably, first processor 11 can be based on the first data, determine that obtaining corresponding with the first data first consolidates
Determine code.Wherein, the first default fixed code can be specific number, such as can be 32 specific numbers, and number can root
It is configured according to actual conditions, is not especially limited here.
In the present embodiment, second processor 12 puts to the vote to obtain to the second data according to the first default voting rule
It may include: that second processor 12 judges whether corresponding second fixed code of the second data is second pre- to the second voting result
If fixed code, wherein when corresponding second fixed code of the second data is not or not second default fixed code, obtain indicating that voting is obstructed
The second voting result crossed, alternatively, obtaining expression table when corresponding second fixed code of the second data is the second default fixed code
The second voting result certainly passed through.
Understandably, second processor 12 can be based on the second data, determine that obtaining corresponding with the second data second consolidates
Determine code.Wherein, the second default fixed code can be specific number, such as can be 32 specific numbers, and number can root
It is configured according to actual conditions, can be identical as the first default fixed code, it can also be different, be not especially limited here.
Step S230 passes through the first data voting in first processor 11, and first processor 11 receives at second
After reason device 12 passes through the second data voting, the first data or the second data are advised in the output of first processor 11 according to default encapsulation
The data packet then obtained.
Understandably, first processor 11 can be by carrying out cyclic redundancy check (Cyclic to the first data
Redundancy Check, CRC), cyclic redundancy check is obtained, then cyclic redundancy check is attached in the first data, and is packaged into
First data packet.Similarly, the second data can also be carried out similar processing by second processor 12 to obtain the second data packet, this
In repeat no more.For example, first processor 11 exports data packet to recipient by communication bus 14.Recipient can be electricity
Other processors in sub- equipment 10, are also possible to other equipment.
Optionally, step S230 includes: when third voting result and the 4th voting result are voted through first
Processor 11 receives the key data that second processor 12 is sent, and exports key data and the first data packet or the second data
Packet.
In the present embodiment, key data can be generated at random by random number generator by second processor 12 and be obtained.
Wherein, which can be used for verifying the second data packet.Such as with CRC to key data (random number) at
Reason generates dynamic locking data.Dynamic locking data are identity code of determining as secondary instrument, whole to seal after being also attached to data to be output
Packet (data to be output and dynamic locking data calculate verification data as a whole, formation data packet, thereafter additional key data again,
Recipient should check the verification of data packet, also calculate lock data with key data, and after correct, side uses number to be output
According to.
Optionally, after step S230, method further include: data packet is verified according to default verification rule, and
Verifying obstructed out-of-date deletion data packet.
For example, the module (can be other processors) of received data packet can verify data packet twice.For example,
Dynamic locking data are verified by above-mentioned key data, and by verifying the data in data packet with packet data check code
(including effective output data and lock data).Wherein, at the beginning of verification, correct key data can be with dynamic locking data phase
Match, correct packet data check code can match with the lock data in packet.In addition, any verification failure, then abandon or delete
Data packet.Based on this, the reliability of output data can be improved, avoid increasing safety wind because output is unsatisfactory for the data of verification
Danger.
It is worth noting that during voting, if either step is not voted through, in process, shutdown communication are total here
Line 14, for example, cut-off communication power supply.For example, first processor 11 ignores the voting failure information of second processor 12, alone
When continuing to output, second processor 12 can disconnect communication bus 14 by control, to prevent the output of non-voted data.Separately
Outside, in the above method, first processor 11 and the function of second processor 12 can be replaced mutually.
Referring to figure 4., the block diagram for taking two voting process devices 100 for provided in an embodiment of the present invention two.This hair
The two of bright embodiment offer take two voting process devices 100 to can be applied to above-mentioned electronic equipment 10, take two for executing two
Each step of voting process method can simplify the hardware configuration of electronic equipment 10, and can carry out to the data that signal source exports
Voting, to ensure the correctness and reliability of signal source output data.Wherein, this two takes two voting process devices 100 can wrap
Include data synchronisation unit 110, voting unit 120 and output unit 130.
Data synchronisation unit 110, for first processor 11 from received first data of signal source and second processor
12, which carry out data from received second data of signal source, synchronizes.
Unit 120 is decided by vote, for interacting voting respectively to the first data and the second data according to default voting rule.
Optionally, voting unit 120 is also used to: according to the first default voting rule, being put to the vote the first data to obtain
To the first voting result, and after the first voting result is voted through, the first data are packaged to obtain the first number
According to packet;According to the first default voting rule, put to the vote to the second data to obtain the second voting result, and in the second voting knot
After fruit is voted through, the second data are packaged to obtain the second data packet;Receive second processor 12 is sent the
Two voting results and the second dynamic locking data for being indicated to second voting result corresponding with the second data;It will
First data packet is sent to second processor 12, and receives the second data packet of the transmission of second processor 12;Receive the first processing
The first voting result and first for being indicated to first voting result corresponding with the first data that device 11 is sent
Dynamic locking data;Second data packet is sent to first processor 11, and receives the first data packet of the transmission of first processor 11;
Check voting is carried out to the first data packet and the second data packet, and obtains third voting result, and third voting result is sent
To second processor 12;Check voting is carried out to above-mentioned first data packet and the second data packet, and obtains the 4th voting result, and
4th voting result is sent to first processor 11.
Optionally, voting unit 120 is also used to: judging whether corresponding first fixed code of the first data is first default solid
Determine code, wherein when corresponding first fixed code of the first data is not or not first default fixed code, obtain indicating that voting is unacceptable
First voting result, alternatively, obtaining indicating that voting is logical when corresponding first fixed code of the first data is the first default fixed code
The first voting result crossed.
Optionally, voting unit 120 is also used to: whether second processor 12 judges corresponding second fixed code of the second data
For the second default fixed code, wherein when corresponding second fixed code of the second data is not or not second default fixed code, indicated
Unacceptable second voting result is decided by vote, alternatively, obtaining when corresponding second fixed code of the second data is the second default fixed code
To the second voting result voted through.
Output unit 130, for passing through in first processor 11 to the first data voting, and first processor 11 receives
After second processor 12 passes through the second data voting, the output of first processor 11 is to the first data or the second data according to default
The data packet that packing rule obtains.
Optionally, output unit 130 is also used to: being voted through in third voting result and the 4th voting result
When, the key data that second processor 12 is sent is received, and export key data and the first data packet or the second data packet.
Optionally, two to take two voting process devices 100 can also include verification unit, in the output of output unit 130 to the
After the data packet that one data or the second data are obtained according to default packing rule, verification unit is used for regular according to default verification
Data packet is verified, and is verifying obstructed out-of-date deletion data packet.
It is apparent to those skilled in the art that for convenience and simplicity of description, the two of foregoing description take
The specific work process of two voting process devices, can be with reference to the corresponding treatment process of each step in preceding method, herein not
It is repeated after more.
The embodiment of the present invention also provides a kind of computer readable storage medium.Computer journey is stored in readable storage medium storing program for executing
Sequence, when computer program is run on computers, so that computer is executed as above-mentioned as described in the examples two take two votings
Processing method.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can lead to
Hardware realization is crossed, the mode of necessary general hardware platform can also be added to realize by software, based on this understanding, this hair
Bright technical solution can be embodied in the form of software products, which can store in a non-volatile memories
In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions are used so that a computer equipment (can be
Personal computer, server or network equipment etc.) execute method described in each implement scene of the present invention.
In conclusion the present invention, which provides one kind two, takes two voting process method, apparatus and electronic equipment.This method comprises:
First processor or second processor are to first processor from received first data of signal source and second processor from signal source
It is synchronous that received second data carry out data;First processor and second processor according to default voting rule to the first data and
Second data interact voting respectively;The first data voting is passed through in first processor, and first processor receives
After two processors pass through the second data voting, the first data or the second data are advised in first processor output according to default encapsulation
The data packet then obtained.This programme is cooperated by first processor and second processor, is realized that two take two votings, is facilitated
Simplify the hardware configuration of electronic equipment, reduces equipment cost.
In embodiment provided by the present invention, it should be understood that disclosed devices, systems, and methods can also lead to
Other modes are crossed to realize.Devices, systems, and methods embodiment described above is only schematical, for example, in attached drawing
Flow chart and block diagram show that the system of multiple embodiments according to the present invention, the possibility of method and computer program product are real
Existing architecture, function and operation.In this regard, each box in flowchart or block diagram can represent module, a journey
A part of sequence section or code, a part of the module, section or code include one or more for realizing defined
The executable instruction of logic function.It should also be noted that in some implementations as replacement, function marked in the box
It can also occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be substantially in parallel
It executes, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/
Or the combination of each box in flow chart and the box in block diagram and or flow chart, can with execute as defined in function or
The dedicated hardware based system of movement is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the present invention can integrate one independent part of formation together, it can also be with
It is modules individualism, an independent part can also be integrated to form with two or more modules.
It can replace, can be realized wholly or partly by software, hardware, firmware or any combination thereof.When
When using software realization, can entirely or partly it realize in the form of a computer program product.The computer program product
Including one or more computer instructions.It is all or part of when loading on computers and executing the computer program instructions
Ground is generated according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, special purpose computer,
Computer network or other programmable devices.The computer instruction may be stored in a computer readable storage medium, or
Person is transmitted from a computer readable storage medium to another computer readable storage medium, for example, the computer instruction
Wired (such as coaxial cable, optical fiber, digital subscriber can be passed through from a web-site, computer, server or data center
Line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or data
It is transmitted at center.The computer readable storage medium can be any usable medium that computer can access and either wrap
The data storage devices such as server, the data center integrated containing one or more usable mediums.The usable medium can be magnetic
Property medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.
Claims (10)
1. one kind two takes two voting process methods, which is characterized in that be applied to electronic equipment, the electronic equipment includes at first
Reason device and the second processor being connect with the first processor;The described method includes:
The first processor or the second processor are to the first processor from received first data of signal source and institute
It is synchronous from the received second data progress data of the signal source to state second processor;
The first processor and the second processor divide first data and the second data according to default voting rule
Voting is not interacted;
First data voting is passed through in the first processor, and the first processor receives the second processing
After device passes through second data voting, first processor output to first data or second data according to
The data packet that default packing rule obtains.
2. the method according to claim 1, wherein the first processor and the second processor are according to pre-
If voting rule interacts voting to first data and the second data respectively, comprising:
The first processor puts to the vote to first data according to the first default voting rule to obtain the first voting knot
Fruit, and after first voting result is voted through, first data are packaged to obtain the first data packet;
The second processor puts to the vote to obtain the second table to second data according to the described first default voting rule
Certainly as a result, and after second voting result is voted through, second data are packaged with obtain second number
According to packet;
The first processor receive second voting result that the second processor is sent and with second data pair
The the second dynamic locking data for being indicated to second voting result answered;
First data packet is sent to the second processor by the first processor, and receives the second processor hair
Second data packet sent;
The second processor receive first voting result that the first processor is sent and with first data pair
The the first dynamic locking data for being indicated to first voting result answered;
Second data packet is sent to the first processor by the second processor, and receives the first processor hair
First data packet sent;
The first processor carries out check voting to first data packet and second data packet, and obtains third voting
As a result, and the third voting result is sent to the second processor;
The second processor carries out check voting to above-mentioned first data packet and second data packet, and obtains the 4th voting
As a result, and the 4th voting result is sent to the first processor.
3. according to the method described in claim 2, it is characterized in that, the first processor according to the first default voting rule,
Put to the vote first data to obtain the first voting result, comprising:
The first processor judges whether corresponding first fixed code of first data is the first default fixed code, wherein
When corresponding first fixed code of first data is not the first default fixed code, obtain indicating voting unacceptable the
One voting result, alternatively, being indicated when corresponding first fixed code of first data is the first default fixed code
The first voting result voted through.
4. according to the method described in claim 2, it is characterized in that, the second processor is according to the described first default voting rule
Then, put to the vote second data to obtain the second voting result, comprising:
The second processor judges whether corresponding second fixed code of second data is the second default fixed code, wherein
When corresponding second fixed code of second data is not the second default fixed code, obtain indicating voting unacceptable the
Two voting results, alternatively, being indicated when corresponding second fixed code of second data is the second default fixed code
The second voting result voted through.
5. according to the method described in claim 2, it is characterized in that, first processor output is to first data or institute
State the data packet that the second data are obtained according to default packing rule, comprising:
When the third voting result and the 4th voting result are voted through, the first processor receives institute
The key data of second processor transmission is stated, and exports the key data and first data packet or second data
Packet.
6. according to the method described in claim 5, it is characterized in that, first processor output is to first data or institute
After stating the data packet that the second data are obtained according to default packing rule, the method also includes:
The data packet is verified according to default verification rule, and is verifying the obstructed out-of-date deletion data packet.
7. one kind two takes two voting process devices, which is characterized in that be applied to electronic equipment, the electronic equipment includes at first
Reason device and the second processor being connect with the first processor;Described device includes:
Data synchronisation unit, for the first processor from received first data of signal source and the second processor from
It is synchronous that received second data of signal source carry out data;
Unit is decided by vote, for interacting voting respectively to first data and the second data according to default voting rule;
Output unit, for passing through in the first processor to first data voting, and the first processor receives
After passing through to the second processor to second data voting, the first processor output is to first data or institute
State the data packet that the second data are obtained according to default packing rule.
8. device according to claim 7, which is characterized in that the voting unit is also used to:
According to the first default voting rule, put to the vote to first data to obtain the first voting result, and described
After one voting result is voted through, first data are packaged to obtain the first data packet;
According to the described first default voting rule, put to the vote to second data to obtain the second voting result, and in institute
It states after the second voting result votes through, second data is packaged to obtain the second data packet;
Receive second voting result that the second processor is sent and corresponding with second data for described
The second dynamic locking data that second voting result is indicated;
First data packet is sent to the second processor, and receives second number that the second processor is sent
According to packet;
Receive first voting result that the first processor is sent and corresponding with first data for described
The first dynamic locking data that first voting result is indicated;
Second data packet is sent to the first processor, and receives first number that the first processor is sent
According to packet;
Check voting is carried out to first data packet and second data packet, and obtains third voting result, and will be described
Third voting result is sent to the second processor;
Check voting is carried out to above-mentioned first data packet and second data packet, and obtains the 4th voting result, and will be described
4th voting result is sent to the first processor.
9. a kind of electronic equipment, which is characterized in that including first processor and the second processing being connect with the first processor
Device, in which:
The first processor or the second processor, for the first processor from received first data of signal source
And the second processor carries out data from received second data of the signal source and synchronizes;
The first processor and the second processor are also used to according to default voting rule to first data and second
Data interact voting respectively;
First data voting is passed through in the first processor, and the first processor receives the second processing
After device passes through second data voting, first processor output to first data or second data according to
The data packet that default packing rule obtains.
10. a kind of computer readable storage medium, which is characterized in that it is stored with computer program in the readable storage medium storing program for executing,
When the computer program is run on computers, so that the computer is executed such as any one of claim 1-6 institute
Two stated take two voting process methods.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810887598.9A CN109240976B (en) | 2018-08-06 | 2018-08-06 | Two-out-of-two voting processing method and device and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810887598.9A CN109240976B (en) | 2018-08-06 | 2018-08-06 | Two-out-of-two voting processing method and device and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN109240976A true CN109240976A (en) | 2019-01-18 |
| CN109240976B CN109240976B (en) | 2021-07-06 |
Family
ID=65070925
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810887598.9A Active CN109240976B (en) | 2018-08-06 | 2018-08-06 | Two-out-of-two voting processing method and device and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109240976B (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110362421A (en) * | 2019-06-24 | 2019-10-22 | 河南思维轨道交通技术研究院有限公司 | A kind of data voting output method and device |
| CN113612574A (en) * | 2021-06-28 | 2021-11-05 | 通号城市轨道交通技术有限公司 | Data transmission method and device |
| CN115577225A (en) * | 2022-12-07 | 2023-01-06 | 通号万全信号设备有限公司 | Two-out-of-two voting processing method, device and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN201941780U (en) * | 2010-11-29 | 2011-08-24 | 北京交大微联科技有限公司 | Automatic train protection (ATP) vehicle-mounted double 2-vote-2 system based on TMS570 |
| CN103220100A (en) * | 2013-03-15 | 2013-07-24 | 卡斯柯信号有限公司 | Output voting method based on codes |
| CN103902402A (en) * | 2012-12-30 | 2014-07-02 | 航天信息股份有限公司 | Radio frequency tag safety chip device and data processing method thereof |
| CN104714862A (en) * | 2013-12-16 | 2015-06-17 | 雅特生嵌入式计算有限公司 | Voting Architecture For Safety and Mission Critical Systems |
| CN105398472A (en) * | 2015-11-06 | 2016-03-16 | 株洲南车时代电气股份有限公司 | Platform host plug-in |
-
2018
- 2018-08-06 CN CN201810887598.9A patent/CN109240976B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN201941780U (en) * | 2010-11-29 | 2011-08-24 | 北京交大微联科技有限公司 | Automatic train protection (ATP) vehicle-mounted double 2-vote-2 system based on TMS570 |
| CN103902402A (en) * | 2012-12-30 | 2014-07-02 | 航天信息股份有限公司 | Radio frequency tag safety chip device and data processing method thereof |
| CN103220100A (en) * | 2013-03-15 | 2013-07-24 | 卡斯柯信号有限公司 | Output voting method based on codes |
| CN104714862A (en) * | 2013-12-16 | 2015-06-17 | 雅特生嵌入式计算有限公司 | Voting Architecture For Safety and Mission Critical Systems |
| CN105398472A (en) * | 2015-11-06 | 2016-03-16 | 株洲南车时代电气股份有限公司 | Platform host plug-in |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110362421A (en) * | 2019-06-24 | 2019-10-22 | 河南思维轨道交通技术研究院有限公司 | A kind of data voting output method and device |
| CN110362421B (en) * | 2019-06-24 | 2023-09-22 | 河南思维轨道交通技术研究院有限公司 | Data voting output method and device |
| CN113612574A (en) * | 2021-06-28 | 2021-11-05 | 通号城市轨道交通技术有限公司 | Data transmission method and device |
| CN113612574B (en) * | 2021-06-28 | 2025-01-03 | 通号城市轨道交通技术有限公司 | Data transmission method and device |
| CN115577225A (en) * | 2022-12-07 | 2023-01-06 | 通号万全信号设备有限公司 | Two-out-of-two voting processing method, device and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109240976B (en) | 2021-07-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111858472B (en) | File format conversion method, device, computer equipment and storage medium | |
| CN104933368B (en) | A kind of detection method and device of cyberspace vulnerability | |
| CN105391696B (en) | Terminal registration and verification method and terminal registration and verification system | |
| CN109240976A (en) | Two take two voting process method, apparatus and electronic equipment | |
| CN109802941A (en) | A kind of login validation method, device, storage medium and server | |
| CN111654395A (en) | Voting information processing method, device, equipment and storage medium | |
| CN109587131A (en) | A method and device for data communication between blockchain networks | |
| CN113467852B (en) | Configuration and verification method and system for cross-bay protection configuration file of intelligent substation | |
| CN106301845A (en) | Switch logger module | |
| WO2021228143A1 (en) | Mini program startup method, signature method and apparatus, server and medium | |
| TW201322718A (en) | Access control system and access control method thereof | |
| CN108664628A (en) | A kind of deriving method and equipment of data | |
| CN110659905A (en) | Transaction verification method, device, terminal equipment and storage medium | |
| CN115865625B (en) | Analysis method and device for fault root cause of communication equipment | |
| CN115952515B (en) | Data security processing method and device based on big data | |
| CN117834174A (en) | Power data encryption transmission method, system, terminal and storage medium | |
| CN109818748A (en) | Data transmission method, equipment, system and medium | |
| CN107181795A (en) | A kind of convenient packaging process of wireless security terminal firmware and system | |
| US11677495B2 (en) | Safety communication device, safety communication system, safety communication method, and computer readable medium | |
| CN113626405A (en) | HDFS network data transmission optimization method, system, terminal and storage medium | |
| CN109800565B (en) | Software upgrading method and terminal equipment | |
| CN109684033A (en) | Cloud platform bare machine management method, storage medium, electronic equipment and system | |
| CN104899732B (en) | A kind of information interacting method and device | |
| CN110865995B (en) | SCD file configuration method and device for reconstruction and expansion of substations based on decoupling and synthesis | |
| CN114679466B (en) | Consensus processing method, device, computer equipment and medium for block chain network |
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 |