CN112130886A - Method and device for upgrading master control program of traffic signal controller - Google Patents

Method and device for upgrading master control program of traffic signal controller Download PDF

Info

Publication number
CN112130886A
CN112130886A CN201910557162.8A CN201910557162A CN112130886A CN 112130886 A CN112130886 A CN 112130886A CN 201910557162 A CN201910557162 A CN 201910557162A CN 112130886 A CN112130886 A CN 112130886A
Authority
CN
China
Prior art keywords
control program
main control
program
preset monitoring
running
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
Application number
CN201910557162.8A
Other languages
Chinese (zh)
Other versions
CN112130886B (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910557162.8A priority Critical patent/CN112130886B/en
Publication of CN112130886A publication Critical patent/CN112130886A/en
Application granted granted Critical
Publication of CN112130886B publication Critical patent/CN112130886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)
  • Traffic Control Systems (AREA)

Abstract

The embodiment of the invention provides a method and a device for upgrading a master control program of a traffic signal controller, which are applied to a master controller and comprise the following steps: in the running process of the current main control program, if a preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program, starting to run a new main control program in an upgrade package; the preset monitoring program receives an initialization completion instruction from the new main control program; the initialization completion instruction is used for indicating that the new main control program is initialized; and the preset monitoring program sends an operation stopping instruction to the current main control program and sends a continuous operation instruction to the new main control program. The running of the current main control program is parallel to the initialization of the new main control program, and the running of the current main control program is stopped and the new main control program is continuously run after the initialization of the new main control program is finished, so that the traffic signal controller can maintain normal traffic order in the upgrading process.

Description

Method and device for upgrading master control program of traffic signal controller
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a method and a device for upgrading a master control program of a traffic signal controller.
Background
A traffic signal controller is a device for controlling traffic signal lights. The main controller is an important hardware component of the traffic signal controller, and can issue a control command according to a preset timing scheme by running a main control program to control the light color output of the signal lamp.
In order to repair errors or complete functions, the master control program in the traffic signal controller is often required to be upgraded. However, the upgrading process may cause a long unavailable time for the signal lamp, and therefore, a main controller and a standby main controller are usually provided in the traffic signal controller at the same time.
Specifically, the upgrading process of the traffic signal controller is shown in fig. 1: after receiving the upgrade instruction, the standby master 110 sends an instruction of stopping working and waiting for upgrade to the master 120; then, the standby main controller 110 receives the current light color output scheme and the execution state of the current light color output scheme sent by the main controller 120, takes over the control of the light color output of the signal lamp by the main controller 120, obtains an upgrading program, and stores the upgrading program in the memory 130 accessible to both the main controller 120 and the standby main controller 110; finally, standby master 110 sends a reset command to master 120, causing master 120 to read the upgrade program from memory 130 and restart.
Obviously, in the above upgrading method, two main controllers need to be arranged in the traffic signal controller in advance, and the main controllers need to be restarted after upgrading is completed, a certain time is required from stopping work to completing restarting, and the signal lamp can only continue yellow flashing in this time, which affects normal traffic order maintenance.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a method and an apparatus for upgrading a master control program of a traffic signal controller, so as to avoid a problem that a traffic order cannot be maintained normally when the master control program is upgraded. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for upgrading a master control program of a traffic signal controller, which is applied to a master controller; the main controller runs a current main control program and a preset monitoring program; the master control program upgrading method comprises the following steps:
in the running process of the current main control program, if the preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program, starting to run a new main control program in an upgrade package;
the preset monitoring program receives an initialization completion instruction from the new main control program; the initialization completion instruction is used for indicating that the new master control program is initialized;
and after receiving the initialization completion instruction, the preset monitoring program sends a running stop instruction to the current main control program and sends a running continuing instruction to the new main control program.
Optionally, before the preset monitoring program receives the upgrade package reception completion instruction sent by the current master control program, the method further includes:
the preset monitoring program detects whether a running current main control program exists or not; if yes, detecting whether an upgrade package receiving completion instruction sent by the current main control program is received;
if not, the preset monitoring program searches the main control program according to the preset path, the searched main control program is used as the current main control program, and the operation is started.
Optionally, if the preset monitoring program receives an upgrade package reception completion instruction sent by the current master control program, the step of starting to run a new master control program in the upgrade package includes:
the preset monitoring program unpacks the new master control program in the upgrade package to the preset path;
and the preset monitoring program starts to operate the new main control program so as to initialize the new main control program.
Optionally, the step of starting the new main control program by the preset monitoring program to initialize the new main control program includes:
the preset monitoring program starts to operate the new main control program so as to enable the new main control program to initialize the peripheral equipment and detect whether a specific memory area exists or not; if the current main control program exists in the specific memory area, the new main control program reads the running information in the specific memory area and then sends an initialization completion instruction to the preset monitoring program;
if the running information does not exist, the new main control program creates a specific memory area for storing the running information;
the running information in the specific memory area is information which is written in real time by the current main control program in the running process and enables the new main control program to continue running.
Optionally, the operation information at least includes: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
In a second aspect, an embodiment of the present invention provides a method for upgrading a master control program of a traffic signal controller, which is applied to a current master control program running in a master controller; a preset monitoring program is also operated in the main controller; the master control program upgrading method comprises the following steps:
if the upgrade package is received in the operation process, sending an upgrade package receiving completion instruction to the preset monitoring program; the upgrade package receives a completion instruction for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
receiving a stop operation instruction sent by the preset monitoring program, and stopping operation; the operation stopping instruction is used for indicating that the preset monitoring program has received an initialization completion instruction from the new main control program.
Optionally, if the upgrade package is received in the operation process, sending an upgrade package reception completion instruction to the front of the preset monitoring program, further includes:
initializing the peripheral equipment;
detecting whether a specific memory area exists or not; if the operation information exists in the specific memory area, after the operation information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous operation instruction from the monitoring program is received or not is detected;
if the running information does not exist, a specific memory area for storing the running information is created and the running is performed normally;
the running information in the specific memory area is information which is written in real time by the previously running main control program in the running process and enables the current main control program to continue running.
Optionally, the operation information at least includes: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
In a third aspect, an embodiment of the present invention provides a device for upgrading a main control program of a traffic signal controller, which is applied to a main controller; the main controller runs a current main control program and a preset monitoring program; the master control program upgrading device comprises:
the starting operation module is used for starting and operating a new main control program in an upgrade package if the preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program in the operation process of the current main control program;
a first instruction receiving module, configured to receive, by the preset monitoring program, an initialization completion instruction from the new main control program, where the initialization completion instruction is used to indicate that the new main control program has completed initialization;
and the first instruction sending module is used for sending an operation stopping instruction to the current main control program and sending an operation continuing instruction to the new main control program after the preset monitoring program receives the initialization completing instruction.
Optionally, the apparatus further includes:
the detection module is used for detecting whether the running current main control program exists by the preset monitoring program; if yes, detecting whether an upgrade package receiving completion instruction sent by the current main control program is received;
and the searching module is used for searching the main control program according to a preset path by the preset monitoring program if the current main control program which is running does not exist, taking the searched main control program as the current main control program, and starting running.
Optionally, the start-up module includes:
the unpacking unit is used for unpacking the new main control program in the upgrade package to the preset path by the preset monitoring program;
and the starting unit is used for starting the preset monitoring program to run the new main control program so as to initialize the new main control program.
Optionally, the starting unit is specifically configured to start and run the new main control program by the preset monitoring program, so that the new main control program initializes a peripheral and detects whether a specific memory area exists; if the current main control program exists in the specific memory area, the new main control program reads the running information in the specific memory area and then sends an initialization completion instruction to the preset monitoring program;
if the running information does not exist, the new main control program creates a specific memory area for storing the running information;
the running information in the specific memory area is information which is written in real time by the current main control program in the running process and enables the new main control program to continue running.
Optionally, the operation information at least includes: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
In a fourth aspect, an embodiment of the present invention provides a device for upgrading a master control program of a traffic signal controller, where the device is applied to a current master control program running in a master controller; a preset monitoring program is also operated in the main controller; the master control program upgrading device comprises:
the second instruction sending module is used for sending an upgrade package receiving completion instruction to the preset monitoring program if the upgrade package is received in the operation process; the upgrade package receives a completion instruction for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
the second instruction receiving module is used for receiving the operation stopping instruction sent by the preset monitoring program and stopping operation; the operation stopping instruction is used for indicating that the preset monitoring program has received an initialization completion instruction from the new main control program.
Optionally, the apparatus further includes:
the initialization module is used for initializing the peripheral equipment;
the detection module is used for detecting whether a specific memory area exists or not; if the operation information exists in the specific memory area, after the operation information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous operation instruction from the monitoring program is received or not is detected;
the creating module is used for creating a specific memory area for storing the operation information and normally operating if the specific memory area does not exist;
the running information in the specific memory area is information which is written in real time by the previously running main control program in the running process and enables the current main control program to continue running.
Optionally, the operation information at least includes: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
In a fifth aspect, an embodiment of the present invention provides a master controller, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for upgrading the main control program of the traffic signal controller when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for upgrading a master control program of a traffic signal controller described above are implemented.
The embodiment of the invention provides a method and a device for upgrading a master control program of a traffic signal controller, which are applied to a master controller. Firstly, in the running process of a current main control program, if a preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program, starting to run a new main control program in an upgrade package; then, the preset monitoring program receives an initialization completion instruction from the new main control program; the initialization completion instruction is used for indicating that the new main control program is initialized; and after receiving the initialization completion instruction, the preset monitoring program sends a stop operation instruction to the current main control program and sends a continuous operation instruction to the new main control program. The preset monitoring program can monitor the running states of the current main control program and the new main control program, so that the running of the current main control program and the initialization of the new main control program are executed in parallel, the main control program is stopped and the new main control program is continuously run after the initialization of the new main control program is finished, the problem of signal lamp yellow flash caused by the restart of the main controller is avoided, and the traffic signal controller can still maintain normal traffic order in the upgrading process.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating a master control program upgrading method of a traffic signal controller in the related art;
fig. 2 is a schematic flow chart of a method for upgrading a main control program of a traffic signal controller according to an embodiment of the present invention;
fig. 3 is another schematic flow chart of a method for upgrading a master control program of a traffic signal controller according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a specific process of the monitor program in the embodiment shown in FIG. 2;
FIG. 5 is a flowchart illustrating a detailed process of the main control program in the embodiment shown in FIG. 3;
FIG. 6 is an exemplary diagram of a traffic signal timing scheme provided by an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a main control program upgrading device of a traffic signal controller according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a main control program upgrading device of a traffic signal controller according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a master controller according to 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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problem that the traffic signal lamp cannot normally maintain the traffic order when the master control program is upgraded, the embodiment of the invention provides a master control program upgrading method of a traffic signal controller, which is applied to a master controller; the main controller runs a current main control program and a preset monitoring program. Specifically, as shown in fig. 2, the method includes:
s201, in the running process of the current main control program, if a preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program, starting to run a new main control program in the upgrade package.
In this step, after the preset monitoring program receives the update package reception completion instruction, the new main control program in the update package is started to be operated to initialize, and the initialization of the new main control program is a process of acquiring the execution state of the timing scheme before the current main control program is updated.
S202, the preset monitoring program receives an initialization completion instruction from the new main control program; the initialization completion instruction is used to indicate that the new master program has completed initialization.
And S203, after receiving the initialization completion instruction, the preset monitoring program sends an operation stop instruction to the current main control program and sends an operation continuing instruction to the new main control program.
Specifically, any one of the interprocess communication mechanisms may be adopted to implement communication between the current main control program and the monitor program and between the monitor program and the new main control program, for example: shared memory, sockets, message queues, semaphores or pipes, etc.
It can be seen that, in the method for upgrading the main control program of the traffic signal controller according to the embodiments of the present invention, the preset monitoring program is used to monitor the running states of the current main control program and the new main control program, so that the running of the current main control program and the initialization of the new main control program are executed in parallel, and after the initialization of the new main control program is completed, the current main control program is stopped and the new main control program is continuously run, thereby avoiding the yellow flashing problem of the signal lamp caused by the restart of the main controller, and enabling the traffic signal controller to still maintain the normal traffic order during the upgrading process.
The following describes a specific flow of the monitoring program in the embodiment shown in fig. 2 in detail by way of example.
Referring to fig. 3, fig. 3 is a schematic view of a specific flow of a monitoring program in a method for upgrading a master control program of a traffic signal controller according to an embodiment of the present invention, where the method includes:
s301, detecting whether a running current main control program exists; if not, executing step S302; if so, step S303 is performed.
S302, searching the main control program according to a preset path, taking the searched main control program as the current main control program, and starting to operate.
In a specific embodiment, the monitoring program may be started first, and after the monitoring program is started successfully, if there is no current main control program in the main controller, the main control program is started by the monitoring program.
S303, in the running process of the current main control program, detecting whether an upgrade package receiving completion instruction sent by the current main control program is received; if so, step S304 is performed.
And S304, starting and running the new main control program in the upgrade package so as to initialize the new main control program.
In this step, the monitoring program unpacks the new master control program in the upgrade package to a preset path, and then starts the new master control program to initialize. The initialization process of the new master program may be: initializing peripheral hardware, and detecting whether a specific memory area exists in a main controller; if yes, reading the operation information in the specific memory area; and if not, creating a specific memory area for storing the operation information. The running information in the specific memory area can be written in real time by the current main control program in the running process.
It can be understood that the specific memory area is used for temporarily storing the operation information of the current main control program, so that the new main control program can restore the operation state of the current main control program after acquiring the operation information and continuously control the light color output of the signal lamp.
S305, judging whether an initialization completion instruction sent by a new main control program is received; if so, step S306 is performed.
S306, sending an operation stopping instruction to the current main control program, and sending an operation continuing instruction to the new main control program.
As shown in fig. 4, an embodiment of the present invention provides a method for upgrading a master control program of a traffic signal controller, which is applied to a current master control program running in a master controller; the main controller is also internally provided with a preset monitoring program. Specifically, the method comprises the following steps:
s401, if an upgrade package is received in the operation process, sending an upgrade package receiving completion instruction to a preset monitoring program; the upgrade package receives a completion instruction for instructing a preset monitoring program to start and operate a new main control program in the upgrade package.
S402, receiving a stop operation instruction sent by a preset monitoring program, and stopping operation; the stop operation instruction is used for indicating that the preset monitoring program has received the initialization completion instruction from the new main control program.
In this embodiment, communication between the current main control program and the monitoring program and between the monitoring program and the new main control program may also be implemented by using any communication mechanism between processes.
Fig. 5 is a schematic flowchart of a specific flow of the main control program in the embodiment shown in fig. 4, including:
s501, initializing the peripheral.
After the master control program is started to run, the peripheral equipment is initialized, and parameters of used hardware are configured.
S502, detecting whether a specific memory area exists or not; if not, go to step S503; if so, step S504 is performed.
S503, a specific memory area for storing the operation information is created, and then step S507 is performed.
In an application scenario, if no other main control program runs, that is, when the main control program is started for the first time, a specific memory area for storing running information does not exist in the main control program, and at this time, the main control program may create a specific memory area, such as a shared memory, for writing the running information in the subsequent running.
S504, the operation information in the specific memory area is read.
Here, when the main control program is the current main control program to be upgraded, the running information in the specific memory area may be written in by the last current main control program in real time during the running process; when the main control program is a new main control program in the upgrade package, the running information in the specific memory area may be written in real time by the current main control program to be upgraded.
In an actual application scenario, in consideration of the change of traffic flow in different time periods, a plurality of timing schemes are often designed even for the same intersection. Therefore, in order to enable the main control program to continue to control the light color output of the signal lamp according to the timing scheme after starting operation, the operation information includes but is not limited to: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
Specifically, the timing scheme refers to the output sequence and duration of each light color of the signal lamp in one signal period; the phase refers to the combination of the light colors in several directions with the right of way at the intersection in one signal period; the numbering of these combinations is the phase number.
Fig. 6 is an exemplary diagram of a traffic signal timing scheme according to an embodiment of the present invention. As shown in the figure, the signal period of the timing scheme is 48s, and in one signal period, the light color output sequence and the time length of the east-west directional signal lights at the intersection are as follows: green light display for 20s, yellow light flashing for 3s, and red light display for 25 s; the color output and the time length of the lights in the south and north directions of the intersection are as follows: red light display 23s, green light display 22s, yellow light flashing 3 s; the first phase is the light color combination of the straight going in the east-west direction with the traffic right at the intersection, and the second phase is the light color combination of the straight going in the north-south direction with the traffic right; the timing scheme operation state refers to the position of the current time in the signal period of the timing scheme.
Therefore, the main control program can continuously control the signal lamp according to the set timing scheme as long as necessary operation information such as the timing scheme number, the timing scheme operation state and the phase number of the signal lamp is required, and the availability and the continuity of the signal lamp are ensured.
And S505, sending an initialization completion message to a preset monitoring program.
S506, judging whether a continuous operation instruction sent by the monitoring program is received; if so, step S507 is executed.
And S507, normally operating, and writing the operation information into the specific memory area in real time.
S508, judging whether an upgrade package sent by an upper computer is received; if so, step S409 is performed.
S509, storing the upgrade package, and sending an upgrade package receiving completion instruction to a preset monitoring program.
And S510, continuing normal operation.
S511, judging whether an operation stopping instruction sent by the monitoring program is received; if so, step S512 is performed.
S512, releasing the resources and stopping running.
It should be noted that, in the master controller, whether the current master control program to be upgraded or the new master control program in the upgrade package may be started and operated according to the steps shown in fig. 5.
Obviously, compared with the related art, the method for upgrading the master control program of the traffic signal controller provided by the embodiment of the invention does not need to arrange two master controllers in the traffic signal controller, and can enable the master controllers to still normally maintain the traffic order during upgrading on the premise of not increasing the cost.
The embodiment of the invention provides a master control program upgrading device of a traffic signal controller, which is applied to a master controller; the main controller runs a current main control program and a preset monitoring program; as shown in fig. 7, the apparatus includes:
a start operation module 710, configured to, in an operation process of a current main control program, start and operate a new main control program in an upgrade package if the preset monitoring program receives an upgrade package reception completion instruction sent by the current main control program;
a first instruction receiving module 720, configured to receive, by the preset monitoring program, an initialization completion instruction from the new main control program, where the initialization completion instruction is used to indicate that the new main control program has completed initialization;
the first instruction sending module 730 is configured to, after receiving the initialization completion instruction, send an instruction to stop running to the current main control program, and send an instruction to continue running to the new main control program.
The embodiment of the invention provides a master control program upgrading device of a traffic signal controller, which is applied to a master controller. Firstly, in the running process of a current main control program, if a preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program, starting to run a new main control program in an upgrade package; then, the preset monitoring program receives an initialization completion instruction from the new main control program; the initialization completion instruction is used for indicating that the new main control program is initialized; and after receiving the initialization completion instruction, the preset monitoring program sends a stop operation instruction to the current main control program and sends a continuous operation instruction to the new main control program. The preset monitoring program can monitor the running states of the current main control program and the new main control program, so that the running of the current main control program and the initialization of the new main control program are executed in parallel, the main control program is stopped and the new main control program is continuously run after the initialization of the new main control program is finished, the problem of signal lamp yellow flash caused by the restart of the main controller is avoided, and the traffic signal controller can still maintain normal traffic order in the upgrading process.
As an embodiment of the present invention, the device for upgrading a main control program of a traffic signal controller further includes:
the detection module is used for detecting whether the running current main control program exists by the preset monitoring program; if yes, detecting whether an upgrade package receiving completion instruction sent by the current main control program is received;
and the searching module is used for searching the main control program according to a preset path by the preset monitoring program if the current main control program which is running does not exist, taking the searched main control program as the current main control program, and starting running.
As an embodiment of the present invention, the start-up module 710 may include:
the unpacking unit is used for unpacking the new main control program in the upgrade package to the preset path by the preset monitoring program;
and the starting unit is used for starting the preset monitoring program to run the new main control program so as to initialize the new main control program.
As an embodiment of the present invention, the starting unit is specifically configured to start and run the new main control program by the preset monitoring program, so that the new main control program initializes a peripheral and detects whether a specific memory area exists; if the current main control program exists in the specific memory area, the new main control program reads the running information in the specific memory area and then sends an initialization completion instruction to the preset monitoring program;
if the running information does not exist, the new main control program creates a specific memory area for storing the running information;
the running information in the specific memory area is information which is written in real time by the current main control program in the running process and enables the new main control program to continue running.
Operational information, including at least: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
The embodiment of the invention provides a master control program upgrading device of a traffic signal controller, which is applied to a current master control program running in a master controller; a preset monitoring program is also operated in the main controller; as shown in fig. 8, the apparatus includes:
a second instruction sending module 810, configured to send an upgrade package receiving completion instruction to the preset monitoring program if the upgrade package is received in the operation process; the upgrade package receives a completion instruction for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
a second instruction receiving module 820, configured to receive an instruction to stop operating sent by the preset monitoring program, and stop operating; the operation stopping instruction is used for indicating that the preset monitoring program has received an initialization completion instruction from the new main control program.
As an embodiment of the present invention, the device for upgrading a main control program of a traffic signal controller further includes:
the initialization module is used for initializing the peripheral equipment;
the detection module is used for detecting whether a specific memory area exists or not; if the operation information exists in the specific memory area, after the operation information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous operation instruction from the monitoring program is received or not is detected;
the creating module is used for creating a specific memory area for storing the operation information and normally operating if the specific memory area does not exist;
the running information in the specific memory area is information which is written in real time by the previously running main control program in the running process and enables the current main control program to continue running.
Operational information, including at least: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
The embodiment of the present invention further provides a master, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the following steps when executing the program stored in the memory 903:
in the running process of the current main control program, if a preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program, starting to run a new main control program in an upgrade package;
the preset monitoring program receives an initialization completion instruction from the new main control program; the initialization completion instruction is used for indicating that the new main control program is initialized;
and after receiving the initialization completion instruction, the preset monitoring program sends a stop operation instruction to the current main control program and sends a continuous operation instruction to the new main control program.
Or,
if the upgrade package is received in the operation process, sending an upgrade package receiving completion instruction to the preset monitoring program; the upgrade package receives a completion instruction for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
receiving a stop operation instruction sent by the preset monitoring program, and stopping operation; the operation stopping instruction is used for indicating that the preset monitoring program has received an initialization completion instruction from the new main control program.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for upgrading the master control program of any one of the traffic signal controllers.
In another embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for upgrading the master control program of any one of the traffic signal control machines in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A main control program upgrading method of a traffic signal controller is characterized in that the method is applied to a main controller; the main controller runs a current main control program and a preset monitoring program; the master control program upgrading method comprises the following steps:
in the running process of the current main control program, if the preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program, starting to run a new main control program in an upgrade package;
the preset monitoring program receives an initialization completion instruction from the new main control program; the initialization completion instruction is used for indicating that the new master control program is initialized;
and after receiving the initialization completion instruction, the preset monitoring program sends a running stop instruction to the current main control program and sends a running continuing instruction to the new main control program.
2. The method according to claim 1, wherein before the preset monitoring program receives an upgrade package reception completion instruction sent by the current master control program, the method further comprises:
the preset monitoring program detects whether a running current main control program exists or not; if yes, detecting whether an upgrade package receiving completion instruction sent by the current main control program is received;
if not, the preset monitoring program searches the main control program according to the preset path, the searched main control program is used as the current main control program, and the operation is started.
3. The method according to claim 2, wherein if the preset monitoring program receives an upgrade package reception completion instruction sent by the current master control program, the step of starting to run a new master control program in an upgrade package comprises:
the preset monitoring program unpacks the new master control program in the upgrade package to the preset path;
and the preset monitoring program starts to operate the new main control program so as to initialize the new main control program.
4. The method according to claim 3, wherein the step of starting the new main control program by the preset monitoring program to initialize the new main control program comprises:
the preset monitoring program starts to operate the new main control program so as to enable the new main control program to initialize the peripheral equipment and detect whether a specific memory area exists or not; if the current main control program exists in the specific memory area, the new main control program reads the running information in the specific memory area and then sends an initialization completion instruction to the preset monitoring program;
if the running information does not exist, the new main control program creates a specific memory area for storing the running information;
the running information in the specific memory area is information which is written in real time by the current main control program in the running process and enables the new main control program to continue running.
5. The method of claim 4, wherein the operation information comprises at least: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
6. A main control program upgrading method of a traffic signal controller is characterized in that the method is applied to a current main control program running in a main controller; a preset monitoring program is also operated in the main controller; the master control program upgrading method comprises the following steps:
if the upgrade package is received in the operation process, sending an upgrade package receiving completion instruction to the preset monitoring program; the upgrade package receives a completion instruction for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
receiving a stop operation instruction sent by the preset monitoring program, and stopping operation; the operation stopping instruction is used for indicating that the preset monitoring program has received an initialization completion instruction from the new main control program.
7. The method of claim 6, wherein if the upgrade package is received during the operation process, before sending an upgrade package reception completion instruction to the preset monitoring program, the method further comprises:
initializing the peripheral equipment;
detecting whether a specific memory area exists or not; if the operation information exists in the specific memory area, after the operation information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous operation instruction from the monitoring program is received or not is detected;
if the running information does not exist, a specific memory area for storing the running information is created and the running is performed normally;
the running information in the specific memory area is information which is written in real time by the previously running main control program in the running process and enables the current main control program to continue running.
8. The method of claim 7, wherein the operation information comprises at least: the timing scheme number, the timing scheme running state and the phase number of the signal lamp.
9. A main control program upgrading device of a traffic signal controller is characterized in that the device is applied to a main controller; the main controller runs a current main control program and a preset monitoring program; the master control program upgrading device comprises:
the starting operation module is used for starting and operating a new main control program in an upgrade package if the preset monitoring program receives an upgrade package receiving completion instruction sent by the current main control program in the operation process of the current main control program;
a first instruction receiving module, configured to receive, by the preset monitoring program, an initialization completion instruction from the new main control program, where the initialization completion instruction is used to indicate that the new main control program has completed initialization;
and the first instruction sending module is used for sending an operation stopping instruction to the current main control program and sending an operation continuing instruction to the new main control program after the preset monitoring program receives the initialization completing instruction.
10. A main control program upgrading device of a traffic signal controller is characterized in that the device is applied to a current main control program running in a main controller; a preset monitoring program is also operated in the main controller; the master control program upgrading device comprises:
the second instruction sending module is used for sending an upgrade package receiving completion instruction to the preset monitoring program if the upgrade package is received in the operation process; the upgrade package receives a completion instruction for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
the second instruction receiving module is used for receiving the operation stopping instruction sent by the preset monitoring program and stopping operation; the operation stopping instruction is used for indicating that the preset monitoring program has received an initialization completion instruction from the new main control program.
11. A master controller, comprising:
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 or 6 to 8 when executing a program stored in the memory.
12. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 5 or 6 to 8.
CN201910557162.8A 2019-06-25 2019-06-25 Main control program upgrading method and device of traffic signal controller Active CN112130886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910557162.8A CN112130886B (en) 2019-06-25 2019-06-25 Main control program upgrading method and device of traffic signal controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910557162.8A CN112130886B (en) 2019-06-25 2019-06-25 Main control program upgrading method and device of traffic signal controller

Publications (2)

Publication Number Publication Date
CN112130886A true CN112130886A (en) 2020-12-25
CN112130886B CN112130886B (en) 2023-11-03

Family

ID=73849426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910557162.8A Active CN112130886B (en) 2019-06-25 2019-06-25 Main control program upgrading method and device of traffic signal controller

Country Status (1)

Country Link
CN (1) CN112130886B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515296A (en) * 2021-07-28 2021-10-19 特灵空调***(中国)有限公司 Online upgrading method, controller, air conditioning unit and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050031168A (en) * 2003-09-29 2005-04-06 에스케이 텔레콤주식회사 Method and system for upgrading software of mobile station automatically in mobile communication network
CN104299427A (en) * 2014-10-13 2015-01-21 安徽科力信息产业有限责任公司 Remote program updating method for traffic signal instrument
US20160357549A1 (en) * 2012-09-28 2016-12-08 Oracle International Corporation Reducing downtime during upgrades of interrelated components in a database system
US20170139698A1 (en) * 2015-11-18 2017-05-18 Fujitsu Limited Information processing apparatus and program update control method
CN106873943A (en) * 2017-01-12 2017-06-20 深圳市优必选科技有限公司 Firmware upgrading method of embedded system
CN107748668A (en) * 2017-11-27 2018-03-02 北京奇安信科技有限公司 A kind of method and device of application program updating
US20180181384A1 (en) * 2016-12-27 2018-06-28 Wistron Corp. Method and storage system for updating software in a storage system
CN108228213A (en) * 2017-12-29 2018-06-29 广州金十信息科技有限公司 A kind of application automatic update method, system, smart machine and storage medium
CN109597635A (en) * 2018-11-23 2019-04-09 湖北航天飞行器研究所 A kind of primary control program is safe to guide upgrade method, embedded device and memory

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050031168A (en) * 2003-09-29 2005-04-06 에스케이 텔레콤주식회사 Method and system for upgrading software of mobile station automatically in mobile communication network
US20160357549A1 (en) * 2012-09-28 2016-12-08 Oracle International Corporation Reducing downtime during upgrades of interrelated components in a database system
CN104299427A (en) * 2014-10-13 2015-01-21 安徽科力信息产业有限责任公司 Remote program updating method for traffic signal instrument
US20170139698A1 (en) * 2015-11-18 2017-05-18 Fujitsu Limited Information processing apparatus and program update control method
US20180181384A1 (en) * 2016-12-27 2018-06-28 Wistron Corp. Method and storage system for updating software in a storage system
CN106873943A (en) * 2017-01-12 2017-06-20 深圳市优必选科技有限公司 Firmware upgrading method of embedded system
CN107748668A (en) * 2017-11-27 2018-03-02 北京奇安信科技有限公司 A kind of method and device of application program updating
CN108228213A (en) * 2017-12-29 2018-06-29 广州金十信息科技有限公司 A kind of application automatic update method, system, smart machine and storage medium
CN109597635A (en) * 2018-11-23 2019-04-09 湖北航天飞行器研究所 A kind of primary control program is safe to guide upgrade method, embedded device and memory

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JANGHOON LYU等: "A procedure-based dynamic software update", 2001 INTERNATIONAL CONFERENCE ON DEPENDABLE SYSTEMS AND NETWORKS *
姚佼;时柏营;马万经;钟章建;: "嵌入式单点自适应信号控制***软件设计", 交通与计算机, no. 05 *
罗正,华唐帅: "基于Uboot的嵌入式***远程更新设计", 成都大学学报(自然科学版), vol. 37, no. 2 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113515296A (en) * 2021-07-28 2021-10-19 特灵空调***(中国)有限公司 Online upgrading method, controller, air conditioning unit and readable storage medium

Also Published As

Publication number Publication date
CN112130886B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
US9778844B2 (en) Installation of operating system on host computer using virtual storage of BMC
US10216514B2 (en) Identification of a component for upgrade
US9910664B2 (en) System and method of online firmware update for baseboard management controller (BMC) devices
US10846124B2 (en) Communication method, apparatus and system for virtual machine and host machine
US20180150359A1 (en) Electronic apparatus, restarting method, and non-transitory recording medium
CN109086079B (en) Mounting management method and device for storage equipment
US20200193027A1 (en) Firmware upgrade method, slave station of robot, and machine readable storage medium
CN111506386A (en) Virtual machine online migration method, device, equipment and computer readable storage medium
US20110197193A1 (en) Device and method for controlling communication between bios and bmc
US20190258534A1 (en) Message oriented middleware with integrated rules engine
JP2016532950A (en) Provide a queue barrier when not supported by the I / O protocol or target device
WO2016033941A1 (en) Boot on-line upgrading apparatus and method
CN112015447B (en) System updating method and device of electronic equipment, electronic equipment and storage medium
CN113867743A (en) Network operating system loading burning method and device, electronic equipment and storage medium
US11137995B2 (en) Updating firmware of a microcontroller
JP6604427B1 (en) Information processing system
CN112130886A (en) Method and device for upgrading master control program of traffic signal controller
US11416233B1 (en) Software upgrade system and method for a baseboard management controller configured in an information handling system
CN114153477A (en) Method, device, system, equipment and medium for upgrading firmware of PCIE (peripheral component interface express) driver card
CN113434467B (en) Network file transmission method, device and computer readable storage medium
CN114691224A (en) Equipment loading system and method and electronic equipment
CN113946854A (en) File access control method and device and computer readable storage medium
CN105893233B (en) Method and system for automatically testing firmware
CN116578327B (en) Program updating method and device, electronic equipment and storage medium
CN112612498A (en) Embedded equipment upgrading method and embedded equipment

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