CN113460124B - Train running time processing method and device, computer equipment and storage medium - Google Patents

Train running time processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113460124B
CN113460124B CN202010237520.XA CN202010237520A CN113460124B CN 113460124 B CN113460124 B CN 113460124B CN 202010237520 A CN202010237520 A CN 202010237520A CN 113460124 B CN113460124 B CN 113460124B
Authority
CN
China
Prior art keywords
control unit
central control
train
running
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
Application number
CN202010237520.XA
Other languages
Chinese (zh)
Other versions
CN113460124A (en
Inventor
王丽英
成智华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BYD Co Ltd
Original Assignee
BYD Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN202010237520.XA priority Critical patent/CN113460124B/en
Publication of CN113460124A publication Critical patent/CN113460124A/en
Application granted granted Critical
Publication of CN113460124B publication Critical patent/CN113460124B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B61RAILWAYS
    • B61LGUIDING RAILWAY TRAFFIC; ENSURING THE SAFETY OF RAILWAY TRAFFIC
    • B61L15/00Indicators provided on the vehicle or train for signalling purposes
    • B61L15/009On-board display devices
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B61RAILWAYS
    • B61LGUIDING RAILWAY TRAFFIC; ENSURING THE SAFETY OF RAILWAY TRAFFIC
    • B61L27/00Central railway traffic control systems; Trackside control; Communication systems specially adapted therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/12Synchronisation of different clock signals provided by a plurality of clock generators

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Train Traffic Observation, Control, And Security (AREA)
  • Electric Propulsion And Braking For Vehicles (AREA)

Abstract

The invention discloses a train running time processing method, a train running time processing device, computer equipment and a storage medium.A first central control unit periodically acquires a first running time and a second running time before a train is started, wherein the first running time is the running time calculated and stored by the first central control unit, and the second running time is the running time calculated and stored by a second central control unit matched with the first central control unit; the first central control unit updates the first operation time length by adopting the larger value of the first operation time length and the second operation time length; after the train is started, if the running state of the first central control unit is a strong main state, the first central control unit sends real-time first running duration to a train display screen; therefore, the problem that the running time of the train is inaccurate due to the fact that the train time calculated by the first central control unit is inconsistent with the train time calculated by the second central control unit is solved.

Description

Train running time processing method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of rail transit control, in particular to a method and a device for processing train running time, computer equipment and a storage medium.
Background
In the current fast-paced social environment, rail transit trains play an increasingly important role in our lives, and a Central Control Unit (CCU) of the trains is used as the working brain of normal operation of the trains, and if the CCU breaks down, the trains lose Control, so that the safety of passengers cannot be guaranteed. Therefore, ensuring the normal operation of the CCU is one of the important factors for ensuring the normal operation of the train. At present, most rail transit vehicles have a dual-machine hot standby redundancy function, namely, under a normal working condition, the rail transit vehicles comprise a strong main control CCU and a weak main control CCU. However, when a train is in operation, if any one of the strong main CCU and the weak main CCU has a fault, such as a hardware fault circuit of the strong main CCU and the weak main CCU is damaged, or program software has a fault due to data overflow or array boundary crossing breakdown, or a CCU fault is caused by unstable power supply voltage or power failure, the CCU cannot calculate the operation time length, so that the operation time lengths calculated by the strong main CCU and the weak main CCU are inconsistent, and the operation time lengths sent to a train display screen (HMI) by the two CCU devices are inconsistent, thereby finally the accuracy of the actual operation time length of the train cannot be ensured.
Disclosure of Invention
The embodiment of the invention provides a train running time processing method, a train running time processing device, computer equipment and a storage medium, and aims to solve the problem that the running time of a train is inaccurate.
A train operation time length processing method comprises the following steps:
before a train is started, a first central control unit periodically acquires a first running time and a second running time, wherein the first running time is the running time calculated and stored by the first central control unit, and the second running time is the running time calculated and stored by a second central control unit matched with the first central control unit;
the first central control unit updates the first operation duration by adopting the larger value of the first operation duration and the second operation duration;
after the train is started, if the running state of the first central control unit is a strong main state, the first central control unit sends the real-time first running time to a train display screen.
A train operation duration processing device includes:
the train starting control system comprises a first acquisition module, a first central control unit and a second central control unit, wherein the first acquisition module is used for periodically acquiring a first operation time length and a second operation time length by the first central control unit before a train is started, the first operation time length is the operation time length calculated and stored by the first central control unit, and the second operation time length is the operation time length calculated and stored by the second central control unit matched with the first central control unit;
the first updating module is used for updating the first operation time length by the first central control unit through the first updating module by adopting the larger value of the first operation time length and the second operation time length;
and the first sending module is used for sending the real-time first running duration to a train display screen by the first central control unit through the first sending module after the train is started and if the running state of the first central control unit is a strong master state.
A computer device, comprising a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor implements the train running time processing method when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the train operation time length processing method described above.
Before the train is started, the first central control unit periodically acquires a first running time and a second running time, wherein the first running time is the running time calculated and stored by the first central control unit, and the second running time is the running time calculated and stored by a second central control unit matched with the first central control unit; the first central control unit updates the first operation time length by adopting the larger value of the first operation time length and the second operation time length; after the train is started, if the running state of the first central control unit is a strong main state, the first central control unit sends a real-time first running time to a train display screen; the embodiment can synchronize the running time before the train is started and stop the synchronization after the train is started, thereby ensuring that the running time variables do not need to be mutually acquired in real time and the assigned values are calculated in the running process of the train, and effectively reducing the program load rate and the occupancy rate; in addition, the running time is synchronized, so that the problem that the running time of the train is inaccurate due to the fact that the train time calculated by the first central control unit is inconsistent with the train time calculated by the second central control unit is solved, and the phenomenon that the running time of the train display screen is withdrawn or added is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic view of an application environment of a method for processing train operation duration according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an exemplary train operation duration processing method according to an embodiment of the present invention;
fig. 3 is another exemplary diagram of a train operation duration processing method according to an embodiment of the present invention;
fig. 4 is another exemplary diagram of a train operation duration processing generation method according to an embodiment of the present invention;
fig. 5 is another exemplary diagram of a train operation duration processing generation method according to an embodiment of the present invention;
fig. 6 is another exemplary diagram of a train operation duration processing generation method according to an embodiment of the present invention;
fig. 7 is another exemplary diagram of a train operation duration processing generation method according to an embodiment of the present invention;
fig. 8 is another exemplary diagram of a train operation duration processing generation method according to an embodiment of the present invention;
fig. 9 is another exemplary diagram of a train operation duration processing generation method according to an embodiment of the present invention;
fig. 10 is a diagram illustrating an example of a train operation time period processing generation apparatus according to an embodiment of the present invention;
fig. 11 is another exemplary diagram of the train operation duration processing generation device according to the embodiment of the present invention;
FIG. 12 is a schematic diagram of a computing device in accordance with an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making an invasive task, are within the scope of the present invention.
The train running time processing method provided by the embodiment of the invention can be applied to the application environment shown in fig. 1. Specifically, the train operation duration processing method is applied to a train operation duration processing system, the train operation duration processing system comprises a first central control unit and a second central control unit shown in fig. 1, and the first central control unit and the second central control unit are communicated through a network and used for achieving the problem that the operation duration of a train is inaccurate. The first central control unit and the second central control unit are working brains of the train in normal operation and can be used for calculating the operation time of the train before starting. The first central control unit and the second central control unit can monitor the heartbeat and the working state of the other party mutually.
In an embodiment, as shown in fig. 2, a train operation duration processing method is provided, which is described by taking the first central control unit in fig. 1 as an example, and includes the following steps:
s10: before the train is started, the first central control unit periodically acquires a first operation time length and a second operation time length, wherein the first operation time length is the operation time length calculated and stored by the first central control unit, and the second operation time length is the operation time length calculated and stored by the second central control unit matched with the first central control unit.
Specifically, before the train starts, the first central control unit periodically acquires the first operation time length and the second operation time length. Alternatively, when the vehicle speed of the train is less than a preset threshold (for example, 0.2 km/h) and the traction enable of the train is invalid, it is determined that the train has not been started. The periodically acquiring the first operation duration and the second operation duration means that the first central control unit acquires the first operation duration and the second operation duration according to a preset time interval if the train is not started after comparing the acquired first operation duration and the acquired second operation duration and confirming the current operation duration, and the operation is circulated in sequence until the train is started. It will be appreciated that after power up, the first central control unit will always read the first operating time period stored by its own calculation and the second operating time period stored by the second central control unit as long as the speed of the train has not been greater than 0.2km/h and no traction enable.
The first operation duration is the operation duration calculated and stored by the first central control unit, and the second operation duration is the operation duration calculated and stored by the second central control unit matched with the first central control unit. In a specific embodiment, the train includes two Central Control Units (CCUs), one of which is a strong main control central control unit and the other is a weak main control central control unit under normal working conditions, the two central control units can monitor the heartbeat and working state of each other, and the heartbeat and working state between the two central control units can be transmitted through an ethernet packet. When the strong main control central control unit fails, another weak main standby central control unit can replace the failed weak main standby central control unit. The train only needs one central control unit to work normally to maintain normal operation, and the other central control unit is in a standby state. In this embodiment, the first central control unit and the second central control unit are mutually matched, one is used as a strong main control central control unit, and the other is used as a weak main standby central control unit.
S20: the first central control unit updates the first operation duration by using a larger value of the first operation duration and the second operation duration.
Specifically, before the train is started, the first central control unit compares the acquired first operation duration with the acquired second operation duration, and if the first operation duration is longer than the second operation duration, the first operation duration is used as the current first operation duration of the first central control unit, and records are stored; and if the first operation duration is shorter than the second operation duration, taking the second operation duration as the current first operation duration of the first central control unit, and storing a record, so as to realize that the first operation duration of the first central control unit is updated by adopting a larger value in the first operation duration and the second operation duration.
In one embodiment, since the train includes two central control units: the first central control unit and the second central control unit work in a matched mode, so that when the first central control unit updates the first operation time length by adopting a larger value of the first operation time length and the second operation time length, the second central control unit reads the first operation time length calculated and stored by the second central control unit and the second operation time length calculated and stored by the first central control unit, compares the first operation time length calculated and stored by the second central control unit with the second operation time length calculated and stored by the first central control unit, and if the first operation time length is larger than the second operation time length, the first operation time length is used as the current first operation time length of the second central control unit and records are stored; and if the first operation time length is less than the second operation time length, taking the second operation time length as the current first operation time length of the second central control unit, and storing the record. In the next communication period, the first central control unit and the second central control unit repeat the operation, mutually compare the values of the first running time length and the second running time length, and always read a larger value as the current second running time length; therefore, the running time lengths calculated and processed by the first central control unit and the second central control unit can be always kept consistent, and the purpose of synchronizing the running time lengths of the double Central Control Units (CCUs) is achieved.
S30: after the train is started, if the running state of the first central control unit is a strong main state, the first central control unit sends a real-time first running time to a train display screen.
Specifically, after the train is started, the first central control unit and the second central control unit stop running for a time period to be synchronous, and if the running state of the first central control unit is a strong master state, the first central control unit sends a real-time first running time period to a train display screen for reference of an operator. Alternatively, when the speed of the train is greater than a preset threshold (for example, 0.2 km/h) and the traction enable of the train is effective, it is determined that the train is started.
In another embodiment, after the train is started, if the operation state of the second central control unit is a strong master state, the second central control unit sends the real-time first operation duration to the train display screen for the operator to refer.
In this embodiment, before a train is started, a first central control unit periodically obtains a first operation duration and a second operation duration, where the first operation duration is an operation duration calculated and stored by the first central control unit, and the second operation duration is an operation duration calculated and stored by a second central control unit that is matched with the first central control unit; the first central control unit updates the first operation time length by adopting the larger value of the first operation time length and the second operation time length; after the train is started, if the running state of the first central control unit is a strong main state, the first central control unit sends real-time first running duration to a train display screen; the embodiment can synchronize the running time before the train is started, and synchronize the stopping running time after the train is started, so that the running time variables do not need to be mutually acquired in real time in the running process of the train, calculation and assignment are carried out, and the program load rate and the occupancy rate can be effectively reduced; in addition, the running time is synchronized, so that the problem that the running time of the train is inaccurate due to the fact that the train time calculated by the first central control unit is inconsistent with the train time calculated by the second central control unit is solved, and the phenomenon that the running time of the train display screen is reversed or added is avoided.
In an embodiment, as shown in fig. 3, the method for processing the train operation duration further includes the following steps:
s11: and if the running state of the first central control unit is the weak master state, monitoring the running state of the second central control unit in real time.
S12: if the operating state of the second central control unit is changed to the weak master state, the operating state of the first central control unit is changed to the strong master state.
Specifically, because the train includes two Central Control Units (CCUs), under normal working conditions, one is used as a strong main control central control unit, the other is used as a weak main control central control unit, and the two central control units can monitor the heartbeat and working state of the other side mutually. Therefore, before the train is started and after the first central control unit and the second central control unit are powered on and initialized, if the operation state of the first central control unit is in the weak master state and the second central control unit is in the strong master state, the first central control unit monitors the operation state of the second central control unit in real time, and if the operation state of the second central control unit is detected to be changed into the weak master state, for example: when the second central control unit fails, the first central control unit changes the operation state of the first central control unit into a strong main state, and the second central control unit changes the operation state of the second central control unit into a weak main state.
It can be understood that, the first central control unit and the second central control unit monitor the working state of each other, and when the running state of the second central control unit is the strong master state, the running state of the first central control unit is the weak master state; if the operation state of the second central control unit is changed into the weak master state, the operation state of the first central control unit is changed into the strong master state; therefore, only one central control unit on the train is required to work normally to maintain normal operation, and the other central control unit is in a standby state.
In this embodiment, if the operating status of the first central control unit is the weak master status, the operating status of the second central control unit is monitored in real time; if the operation state of the second central control unit is changed into a weak main state, changing the operation state of the first central control unit into a strong main state; the method ensures that only one central control unit on the train works normally to maintain normal operation, and the other central control unit is in a standby state, thereby saving equipment resources while ensuring the accuracy of the obtained train operation time.
In an embodiment, as shown in fig. 4, after the train is started, the train operation duration processing method further includes the following steps:
s31: and acquiring the crystal oscillation frequency of the first central control unit.
Here, the crystal oscillation frequency refers to a time interval (cycle) at which any oscillation (oscillation) phenomenon repeatedly occurs. Specifically, after the first central control unit completes initialization and completes synchronization of the running time with the second central control unit, if the train speed is greater than 0.2km/h and the control handle is at the traction position, the first central control unit collects the crystal oscillator vibration frequency inside the equipment and performs cumulative number calculation, and the cumulative number is converted into time duration cumulative.
S32: and calculating the accumulated operation time length of the first central control unit according to the crystal oscillation frequency accumulation.
Specifically, the calculating the accumulated operating time period of the first central control unit according to the crystal oscillation frequency accumulation includes: the obtained crystal oscillator vibration frequency is firstly subjected to accumulated frequency calculation, then the crystal oscillator vibration frequency is converted into crystal oscillator time length, and finally the crystal oscillator time length is converted into the accumulated running time length of the first central control unit. In the present embodiment, the conversion of the crystal oscillation frequency into the crystal oscillation time length is realized by converting every 20 clock cycles of the crystal oscillation frequency into 1 s. In the process of converting the crystal oscillator time length into the accumulated operation time length, when the crystal oscillator time length is accumulated to 60 seconds, accumulating the minutes of the accumulated operation time length by adding 1, and when the crystal oscillator time length is not accumulated to 60 seconds, accumulating the accumulated operation time length according to a 50ms period, but not using the data; when the crystal oscillator time length is accumulated to 60 minutes, adding 1 to the accumulated operation hours of the accumulated operation time length, when the crystal oscillator time length is not accumulated to 60 minutes, still accumulating the crystal oscillator time length according to a 50ms period, accumulating the operation minutes when the crystal oscillator time length exceeds 60 seconds, and not processing when the crystal oscillator time length is less than 60 seconds.
S33: and when the accumulated operation time of the first central control unit meets a preset value, sending the accumulated operation time of the first central control unit to a train display screen for displaying.
The preset value is a preset value for detecting whether the accumulated operation time meets the display condition. In this embodiment, the advance value may be one or more, for example: the advance value may be 60 seconds, 60 minutes, etc. Specifically, if the preset value is 60 seconds, when the accumulated operation time of the first central control unit is greater than or equal to 60 seconds, it indicates that the accumulated operation time of the first central control unit meets the preset value, adds 1 to the number of minutes of the accumulated operation time, and sends the accumulated operation time of the first central control unit to the train display screen for displaying. If the accumulated running time is less than 60 seconds, accumulation is continued, but the accumulated running time is not sent to a display screen. Similarly, if the preset value is 60 minutes, when the number of minutes of the accumulated operation time length is greater than or equal to 60 minutes, the number of hours of the accumulated operation time length is added by 1, and the accumulated operation time length of the first central control unit is sent to a train display screen for displaying. If the accumulated minutes are less than 60 minutes, keeping the accumulated minutes of the accumulated operation time length, and sending the accumulated operation time length of the first central control unit to a train display screen for displaying in the form of minutes; therefore, the train display screen can normally and accurately display the actual running time of the train.
In the embodiment, the crystal oscillation frequency of the first central control unit is obtained; calculating the accumulated operation time of the first central control unit according to the crystal oscillator vibration frequency accumulation; when the accumulated operation time of the first central control unit meets a preset value, the accumulated operation time of the first central control unit is sent to a train display screen to be displayed; therefore, the running time accuracy of the display screen of the train is further improved, and more accurate reference is provided for the service life or the replacement time of the steel wheel or the rubber wheel.
In an embodiment, as shown in fig. 5, the preset values include a first preset value and a second preset value, and when the accumulated operating time of the first central control unit meets the preset values, the accumulated operating time of the first central control unit is sent to a train display screen for displaying, which specifically includes the following steps:
s331: and when the accumulated operation time of the first central control unit meets a first preset value, sending the accumulated operation time of the first central control unit to a train display screen for displaying.
S332: and when the accumulated operation time of the first central control unit meets a second preset value, sending the accumulated operation time of the first central control unit to a train display screen for displaying.
Specifically, referring to fig. 6, if the train speed is greater than 0.2km/h and the control handle is at the traction position, the first central control unit collects the vibration frequency of the crystal oscillator inside the equipment and performs cumulative number calculation, and the crystal oscillator starts to count time and adds 1s every 20 timing cycles, so as to convert the time into cumulative operation duration. Referring to fig. 6, the first preset value is preferably 60 seconds, when the accumulated operating time of the first central control unit is greater than or equal to 60 seconds, it indicates that the accumulated operating time of the first central control unit meets the first preset value, 1 is added to the number of minutes of the accumulated operating time, and the accumulated operating time of the first central control unit is sent to the train display screen for displaying. The second preset value is preferably 60 minutes; and when the number of minutes of the accumulated operation time length is greater than or equal to 60 minutes, adding 1 to the number of hours of the accumulated operation time length, and sending the accumulated operation time length of the first central control unit to a train display screen for displaying.
In an embodiment, as shown in fig. 7, a method for processing train operation duration is provided, which is described by taking the application of the method to the train operation duration system in fig. 1 as an example, and includes the following steps:
and S100, before the train is started, determining a first operation state of a first central control unit and a second operation state of a second central control unit.
Specifically, referring to fig. 8, before the train starts, a first operation state of the first central control unit and a second operation state of the second central control unit are determined. Alternatively, when the speed of the train is less than a preset threshold (illustratively, 0.2 km/h) and the traction enable of the train is invalid, it is determined that the train has not been started.
In a specific embodiment, when the first central control unit and the second central control unit are not powered on, the status bits of the first central control unit and the second central control unit are defaulted to be 0, and the first central control unit and the second central control unit are indicated to not start to operate; when the first central control unit and the second central control unit are just powered on, the status bits of the first central control unit and the second central control unit are 1, and the first central control unit and the second central control unit are indicated to be in an initialization state; after the first central control unit and the second central control unit are initialized, determining a first operation state of the first central control unit and a second operation state of the second central control unit according to the power-on time; if the power-on time of the first central control unit is earlier than the power-on time of the second central control unit, setting the state bit of the first central control unit to be 3 to indicate that the running state of the first central control unit is in a strong main state, and setting the state bit of the second central control unit to be 2 to indicate that the running state of the second central control unit is in a weak main state; if the power-on time of the first central control unit is later than the power-on time of the second central control unit, setting the status bit of the second central control unit to be 3 to indicate that the operation state of the second central control unit is a strong master state, and setting the status bit of the first central control unit to be 2 to indicate that the operation state of the first central control unit is a weak master state.
Additionally, when the central control unit with the operation state of strong master fails, the central control unit with another operation state of weak master can take over the central control unit with strong master, that is, the operation state of the central control unit with the failed strong master changes to the weak master, and the operation state of the central control unit with the weak master changes to the strong master.
And S101, the first central control unit periodically acquires a first operation time length and a second operation time length, wherein the first operation time length is the operation time length calculated and stored by the first central control unit, and the second operation time length is the operation time length calculated and stored by the second central control unit matched with the first central control unit.
And S102, the first central control unit updates the first operation time length by adopting the larger value of the first operation time length and the second operation time length.
Specifically, referring to fig. 8, the first central control unit periodically obtains a first operating time period T1 calculated and stored by itself from the first central control unit and a second operating time period T2 calculated and stored by the second central control unit; and comparing a first operating duration T1 of the first central control unit with a second operating duration T2 of the second central control unit; if the first operation time length T1 of the first central control unit is longer than the second operation time length T2 of the second central control unit, determining the first operation time length T1 of the first central control unit as the current first operation time length T1 of the first central control unit, and storing a record; and if the first operation time length T1 of the first central control unit is less than the second operation time length T2 of the second central control unit, determining the second operation time length T2 of the second central control unit as the current first operation time length T1 of the first central control unit, and storing the record. In the next communication period, the first central control unit repeats the operation, compares the values of the first operation time length and the second operation time length with each other, and always reads the larger value as the current first operation time length; therefore, the running time lengths calculated and processed by the first central control unit and the second central control unit can be always kept consistent, and the purpose of synchronizing the running time lengths of the double Central Control Units (CCUs) is achieved.
S103, the second central control unit periodically acquires the first operation time length and the second operation time length.
And S104, updating the second operation time length by the second central control unit by adopting the larger value of the first operation time length and the second operation time length.
Specifically, referring to fig. 8, the second central control unit periodically obtains the second operating time length T2 calculated and stored by itself from the second central control unit and the first operating time length T1 calculated and stored by the first central control unit; and comparing the first operating duration T2 of the second central control unit with the first operating duration T1 of the first central control unit; if the second operation time length T2 of the second central control unit is longer than the first operation time length T1 of the second central control unit, determining the second operation time length T2 of the second central control unit as the current second operation time length T1 of the second central control unit, and storing a record; if the second operation duration T2 of the second central control unit is less than the first operation duration T1 of the first central control unit, the first operation duration T1 of the first central control unit is determined as the current second operation duration T2 of the second central control unit, and a record is stored. In the next communication period, the second central control unit repeats the operation, compares the values of the first operation duration and the second operation duration with each other, and reads a larger value as the current second operation duration all the time; therefore, the running time lengths calculated and processed by the first central control unit and the second central control unit can be always kept consistent, and the purpose of synchronizing the running time lengths of the double Central Control Units (CCUs) is achieved.
S105, after the train is started, if the first running state of the first central control unit is a strong main state, the first central control unit sends real-time first running time of the first central control unit to a train display screen; and if the second running state of the second central control unit is a strong main state, the second central control unit sends the real-time second running time of the second central control unit to the train display screen.
Specifically, referring to fig. 8, after the train is started, if the first operating state of the first central control unit is the strong master state, the first central control unit sends the real-time first operating duration of the first central control unit to the train display screen; and if the second running state of the second central control unit is the strong main state, the second central control unit sends the real-time second running time of the second central control unit to a train display screen for the reference of operators. Optionally, when the speed of the train is greater than a preset threshold (for example, 0.2 km/h) and the traction enable of the train is valid, the train is determined to be started.
In the embodiment, before the train is started, a first operation state of a first central control unit and a second operation state of a second central control unit are determined; the method comprises the steps that a first central control unit periodically obtains a first operation time length and a second operation time length, wherein the first operation time length is calculated and stored by the first central control unit, and the second operation time length is calculated and stored by a second central control unit matched with the first central control unit; the first central control unit updates the first operation duration by adopting the larger value of the first operation duration and the second operation duration; the second central control unit periodically acquires a first operation time length and a second operation time length; the second central control unit updates the second operation time length by adopting the larger value of the first operation time length and the second operation time length; after the train is started, if the first running state of the first central control unit is a strong main state, the first central control unit sends real-time first running duration of the first central control unit to a train display screen; if the second running state of the second central control unit is a strong main state, the second central control unit sends real-time second running duration of the second central control unit to a train display screen; the embodiment can synchronize the running time before the train is started and stop the running time after the train is started, thereby ensuring that the running time variables do not need to be mutually acquired in real time in the running process of the train, calculating and assigning values, and effectively reducing the program load rate and the occupancy rate; in addition, the running time is synchronized, so that the problem that the running time of the train is inaccurate due to the fact that the train time calculated by the first central control unit is inconsistent with the train time calculated by the second central control unit is solved, and the phenomenon that the running time of a train display screen is reversed or added is avoided.
In an embodiment, as shown in fig. 9, before the first central control unit periodically obtains the first operation duration and the second operation duration, the method for processing the train operation duration further includes the following steps:
s21: after the first central control unit is initialized, the first central control unit and the second central control unit are monitored.
S22: and if the power-on time of the first central control unit is earlier than that of the second central control unit, setting the running state of the first central control unit to be in a strong master state, and setting the running state of the second central control unit to be in a weak master state.
Specifically, when the first central control unit and the second central control unit are not powered on, the status bits of the first central control unit and the second central control unit are defaulted to be 0, and the first central control unit and the second central control unit are indicated to not start to operate; when the first central control unit and the second central control unit are just powered on, the status bits of the first central control unit and the second central control unit are 1, and the first central control unit and the second central control unit are indicated to be in an initialization state.
In one embodiment, in order to determine the operating states of the first central control unit and the second central control unit, after the first central control unit is initialized, the power-on time of the first central control unit and the second central control unit is monitored, if the power-on time of the first central control unit is earlier than the power-on time of the second central control unit, the operating state of the first central control unit is set as a strong master state, and the operating state of the second central control unit is set as a weak master state; and if the power-on time of the first central control unit is later than that of the second central control unit, setting the running state of the first central control unit as a weak master state, and setting the running state of the second central control unit as a strong master state. It is to be understood that, after the two central control units are initialized, the operating state of the central control unit with the earlier power-on time is determined as the strong master state, and the operating state of the central control unit with the later power-on time is determined as the weak master state.
In this embodiment, after the first central control unit is initialized, the first central control unit and the second central control unit are monitored; if the power-on time of the first central control unit is earlier than that of the second central control unit, setting the running state of the first central control unit to be in a strong main state, and setting the running state of the second central control unit to be in a weak main state; therefore, only one central control unit on the train is required to work normally to maintain normal operation, and the other central control unit is in a standby state, so that equipment resources are saved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a train operation duration processing device is provided, and the train operation duration processing device corresponds to the train operation duration processing method in the above embodiment one to one. As shown in fig. 10, the train operation duration processing apparatus includes a first obtaining module 10, a first updating module 20, and a first sending module 30. The detailed description of each functional module is as follows:
the first obtaining module 10 is configured to, before the train is started, periodically obtain, by a first central control, a first operating duration and a second operating duration through a first obtaining module unit, where the first operating duration is an operating duration calculated and stored by a first central control unit, and the second operating duration is an operating duration calculated and stored by a second central control unit that is matched with the first central control unit;
a first updating module 20, configured to update, by the first central control unit through the first obtaining module, the first operation duration with a larger value of the first operation duration and the second operation duration;
the first sending module 30 is configured to, after the train is started, send a real-time first operation duration to the train display screen through the first obtaining module if the operation state of the first central control unit is a strong master state.
Preferably, as shown in fig. 11, the train operation duration processing device further includes:
the monitoring module 11 is configured to monitor the operating state of the second central control unit in real time through the monitoring module when the operating state of the first central control unit is the weak master state;
and an operation state changing module 12, configured to, when the operation state of the second central control unit is changed to the weak master state, change the operation state of the first central control unit to the strong master state through the operation state changing module by the first central control unit.
Preferably, the train operation duration processing device further includes:
the crystal oscillator vibration frequency acquisition module is used for acquiring the crystal oscillator vibration frequency of the first central control unit;
the calculation module is used for calculating the accumulated operation time of the first central control unit according to the crystal oscillator vibration frequency accumulation;
and the second sending module is used for sending the accumulated running time of the first central control unit to the train display screen for displaying when the accumulated running time of the first central control unit meets a preset value.
Preferably, the second sending module includes:
the first sending unit is used for sending the accumulated running time length of the first central control unit to the train display screen for displaying when the accumulated running time length of the first central control unit meets a first preset value;
and the second sending unit is used for sending the accumulated running time of the first central control unit to the train display screen for displaying when the accumulated running time of the first central control unit meets a second preset value.
Preferably, the train operation duration processing device further includes:
the running state determining module is used for determining a first running state of the first central control unit and a second running state of the second central control unit before the train is started;
the second acquisition module is used for the first central control unit to periodically acquire a first operation time length and a second operation time length, wherein the first operation time length is the operation time length calculated and stored by the first central control unit, and the second operation time length is the operation time length calculated and stored by the second central control unit matched with the first central control unit;
the second updating module is used for updating the first operation duration by the first central control unit by adopting the larger value of the first operation duration and the second operation duration;
the third acquisition module is used for the second central control unit to periodically acquire the first operation time length and the second operation time length;
the third updating module is used for updating the second operation time length by the second central control unit by adopting the larger value of the first operation time length and the second operation time length;
the third sending module is used for sending the real-time first running duration of the first central control unit to a train display screen by the first central control unit if the first running state of the first central control unit is a strong master state after the train is started; and if the second running state of the second central control unit is a strong main state, the second central control unit sends the real-time second running time of the second central control unit to a train display screen.
Preferably, the train operation duration processing device further includes:
the monitoring module is used for monitoring the first central control unit and the second central control unit after the first central control unit and the second central control unit are initialized;
and the operation state setting module is used for setting the operation state of the first central control unit as a strong master state and setting the operation state of the second central control unit as a weak master state when the power-on time of the first central control unit is earlier than the power-on time of the second central control unit.
For the specific definition of the train operation duration processing device, reference may be made to the above definition of the train operation duration processing method, which is not described herein again. All or part of the modules in the train operation time processing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 12. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data used in the train operation time length processing method of the embodiment. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a train running time processing method.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the method for processing the train running time length in the above embodiments is implemented.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed by a processor, implements the train running time processing method in the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by the relevant hardware instructed by a computer program stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the embodiments of the methods described above when executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and simplicity of description, the foregoing functional units and modules are merely illustrated in terms of division, and in practical applications, the foregoing functional allocation may be performed by different functional units and modules as needed, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above described functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention, and they should be construed as being included in the scope of the present invention.

Claims (10)

1. A train operation time length processing method is characterized by comprising the following steps:
before a train is started, a first central control unit periodically acquires a first running time length and a second running time length, wherein the first running time length is the running time length of the accumulated running of the train before the train is started, which is calculated and stored by the first central control unit, and the second running time length is the running time length of the accumulated running of the train before the train is started, which is calculated and stored by a second central control unit matched with the first central control unit;
the first central control unit updates the first operation time length by adopting the larger value of the first operation time length and the second operation time length;
after the train is started, if the running state of the first central control unit is a strong main state, the first central control unit sends real-time first running duration to a train display screen, the running states of the first central control unit and the second central control unit after the train is started are different, and the running states comprise a strong main state and a weak main state.
2. The train operation duration processing method according to claim 1, further comprising:
if the running state of the first central control unit is a weak main state, monitoring the running state of the second central control unit in real time;
and if the operation state of the second central control unit is changed into a weak master state, changing the operation state of the first central control unit into a strong master state.
3. The train running time processing method according to claim 1, wherein the train running time processing method further includes, after the train is started:
acquiring the crystal oscillator vibration frequency of the first central control unit;
calculating the accumulated operation time length of the first central control unit according to the crystal oscillator vibration frequency accumulation;
and when the accumulated operation time length of the first central control unit meets a preset value, sending the accumulated operation time length of the first central control unit to the train display screen for displaying.
4. The train operation time length processing method according to claim 3, wherein the preset values include a first preset value and a second preset value, and when the accumulated operation time length of the first central control unit meets a preset value, the step of sending the accumulated operation time length of the first central control unit to the train display screen for displaying comprises the steps of:
when the accumulated running time of the first central control unit meets a first preset value, sending the accumulated running time of the first central control unit to the train display screen for displaying;
and when the accumulated running time of the first central control unit meets a second preset value, sending the accumulated running time of the first central control unit to the train display screen for displaying.
5. A train operation time length processing method is characterized by comprising the following steps:
determining a first operating state of a first central control unit and a second operating state of a second central control unit before a train starts;
the method comprises the steps that a first central control unit periodically obtains a first running time length and a second running time length, wherein the first running time length is the running time length of accumulated running of a train before starting, calculated and stored by the first central control unit, and the second running time length is the running time length of accumulated running of the train before starting, calculated and stored by a second central control unit matched with the first central control unit;
the first central control unit updates the first operation time length by adopting the larger value of the first operation time length and the second operation time length;
the second central control unit periodically acquires a first operation time length and a second operation time length;
the second central control unit updates the second operation duration by adopting the larger value of the first operation duration and the second operation duration;
after a train is started, if a first running state of a first central control unit is a strong master state, the first central control unit sends real-time first running duration of the first central control unit to a train display screen; if the second running state of the second central control unit is a strong main state, the second central control unit sends the real-time second running time of the second central control unit to a train display screen, the running states of the first central control unit and the second central control unit after the train is started are different, and the running states comprise a strong main state and a weak main state.
6. The train operation duration processing method according to claim 5, wherein before the determining the first operation state of the first central control unit and the second operation state of the second central control unit, the train operation duration processing method further comprises:
monitoring a first central control unit and a second central control unit after the first central control unit and the second central control unit are initialized;
and if the power-on time of the first central control unit is earlier than the power-on time of the second central control unit, setting the running state of the first central control unit to be in a strong master state, and setting the running state of the second central control unit to be in a weak master state.
7. The utility model provides a long processing apparatus of train operation which characterized in that includes:
the train starting control device comprises a first acquisition module, a first central control unit and a second central control unit, wherein before a train is started, the first central control unit periodically acquires a first running time and a second running time through the first acquisition module, the first running time is the running time of the train calculated and stored by the first central control unit in the accumulated running before the train is started, and the second running time is the running time of the train calculated and stored by the second central control unit matched with the first central control unit in the accumulated running before the train is started;
the first central control unit updates the first operation duration by adopting the larger value of the first operation duration and the second operation duration through the first updating module;
the first sending module is used for sending real-time first running duration to a train display screen through the first sending module if the running state of the first central control unit is a strong main state after the train is started, the running states of the first central control unit and the second central control unit after the train is started are different, and the running states comprise a strong main state and a weak main state.
8. The train operation duration processing apparatus according to claim 7, further comprising:
the monitoring module is used for monitoring the running state of the second central control unit in real time by the first central control unit through the monitoring module when the running state of the first central control unit is a weak master state;
and the operation state changing module is used for changing the operation state of the first central control unit into a strong master state through the operation state changing module when the operation state of the second central control unit is changed into a weak master state.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor implements the train operation duration processing method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the train running time processing method according to any one of claims 1 to 6.
CN202010237520.XA 2020-03-30 2020-03-30 Train running time processing method and device, computer equipment and storage medium Active CN113460124B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010237520.XA CN113460124B (en) 2020-03-30 2020-03-30 Train running time processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010237520.XA CN113460124B (en) 2020-03-30 2020-03-30 Train running time processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113460124A CN113460124A (en) 2021-10-01
CN113460124B true CN113460124B (en) 2022-12-09

Family

ID=77866021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010237520.XA Active CN113460124B (en) 2020-03-30 2020-03-30 Train running time processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113460124B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102407856B (en) * 2011-09-21 2015-04-29 中国北车股份有限公司 Hot backup redundancy method and hot backup redundancy system of train central control unit
JP5941771B2 (en) * 2012-07-03 2016-06-29 株式会社日立製作所 Delay loss evaluation apparatus, delay loss calculation and display method
CN109305197B (en) * 2017-07-26 2020-08-25 比亚迪股份有限公司 Train control method and system and vehicle-mounted controller
CN108521324B (en) * 2018-03-20 2021-07-13 中国科学院微电子研究所 Synchronous clock device
CN109774743A (en) * 2019-01-23 2019-05-21 北京交通大学 A kind of the operation data acquiring and transmission system and data acquisition and transmission method of track train

Also Published As

Publication number Publication date
CN113460124A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
CN106888123B (en) CAN message loss monitoring method
EP3026515B1 (en) Programmable controller system
JP2008502182A (en) Method and communication system for establishing a global time base in a time-controlled communication system
CN112769924B (en) Distributed deployment method, device, equipment and medium of RocktMQ
CN113460124B (en) Train running time processing method and device, computer equipment and storage medium
CN107450512B (en) System and method for state access of DCS (distributed control System) controller of nuclear power station
CN114924952B (en) Distributed graph database blackbox health diagnostic methods, systems, and media
EP4206839A1 (en) Method for managing ecu on vehicle, and ecu and readable storage medium
CN102761432A (en) CGI (Common Gateway Interface) monitoring method, device and system thereof
US9681364B2 (en) Wireless communication system, management device, wireless device, and wireless communication method
US10142934B2 (en) Wireless communication apparatus and communication system
CN109039781B (en) Network equipment fault diagnosis method, execution node, server and system
CA2912779C (en) System and method for remote maintenance of user units
CN113778744B (en) Task processing method, device, system and storage medium
JP5223809B2 (en) Synchronous communication system
Palai Vehicle level approach for optimization of on-board diagnostic strategies for fault management
CN112291299A (en) Synchronization method, device, equipment and storage medium based on AI Station inference platform
CN103052101B (en) Network management data acquisition method
CN110753057B (en) Communication method, device and equipment of fault indicator
CN116300823A (en) Electronic control unit exception handling method and device, storage medium and electronic equipment
CN113911168B (en) Multi-node feedback central control unit redundancy method
JP5449484B2 (en) Electronic control device and application execution interval monitoring method applied to electronic control device
CN106992883B (en) Data control method and data control device
CN118264753A (en) Resource scheduling method and system for environment-controlled distributed KVM agents
CN113075445A (en) Ripple protection method and circuit for high-voltage device, electronic controller 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