CN112130886B - Main control program upgrading method and device of traffic signal controller - Google Patents

Main control program upgrading method and device of traffic signal controller Download PDF

Info

Publication number
CN112130886B
CN112130886B CN201910557162.8A CN201910557162A CN112130886B CN 112130886 B CN112130886 B CN 112130886B CN 201910557162 A CN201910557162 A CN 201910557162A CN 112130886 B CN112130886 B CN 112130886B
Authority
CN
China
Prior art keywords
main control
control program
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.)
Active
Application number
CN201910557162.8A
Other languages
Chinese (zh)
Other versions
CN112130886A (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

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

Abstract

The embodiment of the invention provides a method and a device for upgrading a main control program of a traffic signal controller, which are applied to a main 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 the upgrade package; a preset monitoring program receives an initialization completion instruction from a new main control program; the initialization completion instruction is used for indicating that the new main control program has completed initialization; the preset monitoring program sends an operation stopping instruction to the current main control program and sends an operation continuing instruction to the new main control program. Because the running of the current main control program is parallel to the initialization of the new main control program, the current main control program stops running after the initialization of the new main control program is completed, and the new main control program continues running, the traffic signal controller can maintain the normal traffic order in the upgrading process.

Description

Main control program upgrading method and device of traffic signal controller
Technical Field
The invention relates to the technical field of intelligent transportation, in particular to a method and a device for upgrading a main control program of a traffic signal controller.
Background
A traffic signal controller is a device for controlling traffic lights. The main controller is an important hardware component of the traffic signal controller, and can send a control command according to a preset timing scheme by running a main control program to control the color output of the signal lamp.
In order to perform error repair or function improvement, it is often necessary to upgrade the main control program in the traffic signal controller. However, the upgrade process may give the signal lamp a long time to be unavailable, and thus, a master controller and a standby master controller are generally provided in the traffic signal controller at the same time.
Specifically, the upgrading process of the traffic signal controller is as shown in fig. 1: after receiving the upgrade instruction, the standby master controller 110 sends an instruction of stopping working and waiting for upgrade to the master controller 120; then, the standby master controller 110 receives the current light color output scheme and the execution state of the current light color output scheme sent by the master controller 120, takes over the light color output of the signal lamp controlled by the master controller 120, acquires an upgrade program, and stores the upgrade program in a memory 130 accessible to both the master controller 120 and the standby master 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 are required to be set in the traffic signal controller in advance, and the main controllers also need to be restarted after upgrading is completed, and a certain time is required from stopping operation to restarting completion, and the signal lamp can only continuously flash in the time, so that the normal maintenance of traffic order is affected.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for upgrading a main control program of a traffic signal controller, so as to avoid the problem that the traffic order cannot be normally maintained when the main 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 main control program of a traffic signal controller, which is applied to a main controller; the main controller is internally operated with a current main control program and a preset monitoring program; the main 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 the 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 has completed initialization;
and after receiving the initialization completion instruction, 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.
Optionally, before the preset monitor program receives the upgrade package receiving completion instruction sent by the current main control program, the method further includes:
the preset monitoring program detects whether a current running 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, takes the searched main control program as the current main control program, and starts operation.
Optionally, if the preset monitor program receives the upgrade package receiving completion instruction sent by the current main control program, the step of starting to run the new main control program in the upgrade package includes:
unpacking a new main control program in the upgrade package to the preset path by the preset monitoring program;
and the preset monitoring program starts to run the new main control program so as to initialize the new main control program.
Optionally, the step of starting to run the new main control program by the preset monitoring program to initialize the new main control program includes:
the preset monitoring program starts to run the new main control program so that the new main control program initializes the peripheral equipment and detects whether a specific memory area exists or not; if yes, 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 not, the new main control program creates a specific memory area for storing operation 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 run continuously.
Optionally, the operation information at least includes: timing scheme number, timing scheme running state and phase number of signal lamp.
In a second aspect, an embodiment of the present invention provides a method for upgrading a main control program of a traffic signal controller, which is applied to a current main control program running in a main controller; the main controller also runs a preset monitoring program; the main control program upgrading method comprises the following steps:
if the upgrade package is received in the running process, sending an upgrade package receiving completion instruction to the preset monitoring program; the upgrade package receives a completion instruction, and is used for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
receiving an operation stopping instruction sent by the preset monitoring program, and stopping operation; the stopping instruction is used for indicating that the preset monitoring program has received the initialization completion instruction from the new main control program.
Optionally, if an upgrade package is received during the operation, before sending an upgrade package receiving completion instruction to the preset monitoring program, the method further includes:
initializing a peripheral;
detecting whether a specific memory area exists; if yes, after the running information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous running instruction from the monitoring program is received or not is detected;
if the operation information does not exist, a specific memory area for storing the operation information is created and the operation is performed normally;
the running information in the specific memory area is information which is written in real time by a 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: timing scheme number, timing scheme running state and phase number of 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 is internally operated with a current main control program and a preset monitoring program; the main control program upgrading device comprises:
the starting operation module is used for starting 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;
the first instruction receiving module is used for receiving an initialization completion instruction from the new main control program by the preset monitoring program, wherein the initialization completion instruction is used for indicating 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 completion instruction.
Optionally, the apparatus further includes:
the detection module is used for detecting whether the current running main control program exists or not 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 if the running current main control program does not exist, taking the searched main control program as the current main control program and starting running.
Optionally, the starting operation 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 the preset monitor program to run the new main control program, so that the new main control program initializes a peripheral device, and detects whether a specific memory area exists; if yes, 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 not, the new main control program creates a specific memory area for storing operation 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 run continuously.
Optionally, the operation information at least includes: timing scheme number, timing scheme running state and phase number of signal lamp.
In a fourth 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 current main control program running in a main controller; the main controller also runs a preset monitoring program; the main 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 running process; the upgrade package receives a completion instruction, and is used 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 an operation stopping instruction sent by the preset monitoring program and stopping operation; the stopping instruction is used for indicating that the preset monitoring program has received the 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 yes, after the running information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous running instruction from the monitoring program is received or not is detected;
the creation module is used for creating a specific memory area for storing operation information and operating normally 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 a 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: timing scheme number, timing scheme running state and phase number of signal lamp.
In a fifth aspect, an embodiment of the present invention provides a master, including:
a memory for storing a computer program;
and the processor is used for realizing the main control program upgrading method step of any 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, where the computer program when executed by a processor implements any one of the steps of the method for upgrading a main control program of a traffic signal controller described above.
The method and the device for upgrading the main control program of the traffic signal controller are applied to the main 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 the 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 has completed initialization; after receiving the initialization completion instruction, the preset monitoring program sends an operation stopping instruction to the current main control program and sends a continuous operation continuing 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 to run after the initialization of the new main control program is completed, the new main control program is continued to run, the problem of yellow flashing of the signal lamp caused by restarting the main control program is avoided, and the traffic signal controller can still maintain the normal traffic order in the upgrading process.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a method for upgrading a main control program of a traffic signal controller according to 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 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. 4 is a schematic flow chart of the monitoring program in the embodiment shown in FIG. 2;
FIG. 5 is a schematic diagram illustrating a specific flow of the master control procedure 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 diagram of another structure 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 according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to solve the problem that traffic signal lamps cannot normally maintain traffic order when a main control program is upgraded, the embodiment of the invention provides a main control program upgrading method of a traffic signal controller, which is applied to a main controller; the main controller is internally operated with 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 receiving the instruction of receiving the upgrade package, the preset monitor program starts to run the new main control program in the upgrade package to initialize the new main control program, where the initialization of the new main control program is a process of obtaining the execution state of the timing scheme of the current main control program before upgrading.
S202, a preset monitoring program receives an initialization completion instruction from a new main control program; the initialization completion instruction is used to indicate that the new main control program has completed initialization.
S203, after receiving the initialization completion instruction, the preset monitoring program sends an operation stopping instruction to the current main control program and sends an operation continuing instruction to the new main control program.
Specifically, any communication mechanism between the current main control program and the monitor program and between the monitor program and the new main control program can be adopted to realize communication, such as: shared memory, socket, message queue, semaphore or pipe, etc.
Therefore, according to the method for upgrading the main control program of the traffic signal controller, the running states of the current main control program and the new main control program are monitored through the preset monitoring 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 current main control program is stopped to run after the initialization of the new main control program is completed, the new main control program is continued to run, the problem of yellow flashing of the signal lamp caused by restarting of the main control is avoided, and the traffic signal controller can still maintain normal traffic order in the upgrading process.
The specific flow of the monitoring program in the embodiment shown in fig. 2 will be described in detail by way of example.
Referring to fig. 3, fig. 3 is a specific flow chart of a monitor program in a method for upgrading a main control program of a traffic signal controller according to an embodiment of the present invention, where the specific flow chart includes:
s301, detecting whether a current running main control program exists; if not, executing step S302; if so, step S303 is performed.
S302, searching a main control program according to a preset path, taking the searched main control program as a current main control program, and starting operation.
In a specific embodiment, the monitoring program may be started first, and after the monitoring program is started successfully, if the current master control program running in the master controller is not available, the master control program is started by the monitoring program.
S303, detecting whether an upgrade package receiving completion instruction sent by the current main control program is received or not in the running process of the current main control program; if so, step S304 is performed.
S304, starting and running a new main control program in the upgrade package so as to initialize the new main control program.
In this step, the monitor program unpacks the new main control program in the upgrade package to the preset path, and then starts the new main control program to initialize it. The initialization process of the new master control program may be: initializing peripheral hardware, and detecting whether a specific memory area exists in a main controller; if yes, the operation information in the specific memory area is read; if not, a specific memory area for storing the operation information is created. 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 obtaining the operation information, and continuously control the color output of the signal lamp.
S305, judging whether an initialization completion instruction sent by a new main control program is received or not; 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, the embodiment of the invention provides a method for upgrading a main control program of a traffic signal controller, which is applied to a current main control program running in a main controller; the main controller also runs a preset monitoring program. Specifically, the method comprises the following steps:
s401, if an upgrade package is received in the running process, sending an upgrade package receiving completion instruction to a preset monitoring program; the upgrade package receives a completion instruction, and the completion instruction is used for indicating a preset monitoring program to start and run 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 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, any inter-process communication mechanism may be used to implement communication between the current main control program and the monitor program and between the monitor program and the new main control program.
Fig. 5 is a schematic flow chart of a main control procedure in the embodiment shown in fig. 4, including:
s501, initializing the peripheral.
After the main control program starts to run, the peripheral is initialized, and the parameters of the hardware are configured.
S502, detecting whether a specific memory area exists; if not, then step S503 is performed; if so, step S504 is performed.
S503, creating a specific memory area for storing the operation information, and then executing step S507.
In an application scenario, if no other main control program is running, that is, when the main control program is started for the first time, then there is no specific memory area in the main controller for storing running information, and at this time, the main control program may first create a specific memory area, such as a shared memory, for writing running information in a subsequent running process.
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 real time by the previous current main control program in the running process; and 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 scene, considering the variation of the 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 master control program to start running, the light color output of the signal lamp can be continuously controlled according to the timing scheme, and the running information includes but is not limited to: timing scheme number, timing scheme running state and phase number of signal lamp.
Specifically, the timing scheme refers to the output sequence and duration of each lamp color of the signal lamp in one signal period; the phase refers to the combination of lights and colors in several directions with right of way at the intersection in one signal period; the number for 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 lamplight color output sequence and the lamplight color output duration of the east-west signal lamp of the intersection are as follows: green light display 20s, yellow light flashing 3s, red light display 25s; the light color output in the north-south direction of the intersection and the duration are as follows: red light display 23s, green light display 22s, yellow light flashing 3s; the first phase is a lamp color combination with right of way and straight running in the east-west direction at the intersection, and the second phase is a lamp color combination with right of way and straight running in the north-south direction; the timing scheme running state refers to the position of the signal period in the timing scheme at the current moment.
Therefore, the main control program can continuously control the signal lamp according to the established timing scheme only according to the necessary operation information such as the timing scheme number, the timing scheme operation state and the phase number of the signal lamp, so that the availability and the continuity of the signal lamp are ensured.
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 or not; if so, step S507 is performed.
S507, normal operation is performed, and operation information is written into a specific memory area in real time.
S508, judging whether an upgrade package sent by the upper computer is received or not; if so, step S409 is performed.
S509, storing the upgrade package, and sending an upgrade package receiving completion instruction to a preset monitoring program.
S510, continuing normal operation.
S511, judging whether a stop operation instruction sent by the monitoring program is received; if so, step S512 is performed.
S512, releasing the resources and stopping the operation.
It should be noted that, in the master controller, both the current master control program to be upgraded and the new master control program in the upgrade package may start to operate according to the steps shown in fig. 5.
Obviously, compared with the related art, the method for upgrading the main control program of the traffic signal controller provided by the embodiment of the invention does not need to arrange two main controllers in the traffic signal controller, and can ensure that the main controllers can still normally maintain the traffic order during upgrading on the premise of not increasing the cost.
The main control program upgrading device of the traffic signal controller provided by the embodiment of the invention is applied to a main controller; the main controller is internally operated with a current main control program and a preset monitoring program; as shown in fig. 7, the apparatus includes:
the start-up operation module 710 is configured to start up and operate a new main control program in an upgrade package if the preset monitor program receives an upgrade package receiving completion instruction sent by the current main control program during operation of the current main control program;
a first instruction receiving module 720, configured to receive an initialization completion instruction from the new main control program by using the preset monitor 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 730 is configured to 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 after the preset monitor program receives the initialization completion instruction.
The main control program upgrading device of the traffic signal controller provided by the embodiment of the invention is applied to a main 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 the 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 has completed initialization; after receiving the initialization completion instruction, the preset monitoring program sends an operation stopping instruction to the current main control program and sends a continuous operation continuing 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 to run after the initialization of the new main control program is completed, the new main control program is continued to run, the problem of yellow flashing of the signal lamp caused by restarting the main control program is avoided, and the traffic signal controller can still maintain the normal traffic order in the upgrading process.
As one embodiment of the present invention, the main control program upgrading device of the traffic signal controller further includes:
the detection module is used for detecting whether the current running main control program exists or not 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 if the running current main control program 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 operation 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 implementation manner of the present invention, a starting unit is specifically configured to start the preset monitor program to run the new main control program, so that the new main control program initializes a peripheral device, and detects whether a specific memory area exists; if yes, 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 not, the new main control program creates a specific memory area for storing operation 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 run continuously.
Operation information, at least including: timing scheme number, timing scheme running state and phase number of signal lamp.
The main control program upgrading device of the traffic signal controller is applied to a current main control program running in a main controller; the main controller also runs a preset monitoring program; as shown in fig. 8, the apparatus includes:
the second instruction sending module 810 is configured to send an upgrade package receiving completion instruction to the preset monitoring program if an upgrade package is received in the running process; the upgrade package receives a completion instruction, and is used for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
the second instruction receiving module 820 is configured to receive a stop operation instruction sent by the preset monitoring program, and stop operation; the stopping instruction is used for indicating that the preset monitoring program has received the initialization completion instruction from the new main control program.
As one embodiment of the present invention, the main control program upgrading device of the 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 yes, after the running information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous running instruction from the monitoring program is received or not is detected;
the creation module is used for creating a specific memory area for storing operation information and operating normally 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 a previously running main control program in the running process and enables the current main control program to continue running.
Operation information, at least including: timing scheme number, timing scheme running state and phase number of signal lamp.
The embodiment of the present invention also 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 perform communication with each other through the communication bus 904,
a memory 903 for storing a computer program;
the processor 901 is configured to execute a program stored in the memory 903, and implement 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 the upgrade package;
a preset monitoring program receives an initialization completion instruction from a new main control program; the initialization completion instruction is used for indicating that the new main control program has completed initialization;
after receiving the initialization completion instruction, the preset monitoring program sends an operation stopping instruction to the current main control program and sends a continuous operation continuing instruction to the new main control program.
Or alternatively, the process may be performed,
if the upgrade package is received in the running process, sending an upgrade package receiving completion instruction to the preset monitoring program; the upgrade package receives a completion instruction, and is used for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
receiving an operation stopping instruction sent by the preset monitoring program, and stopping operation; the stopping instruction is used for indicating that the preset monitoring program has received the initialization completion instruction from the new main control program.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include 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 aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which a computer program is stored, the computer program implementing the steps of the method for upgrading a main control program of any one of the traffic signal controllers described above when executed by a processor.
In yet another embodiment of the present invention, a computer program product containing instructions that, when run on a computer, cause the computer to perform the method of upgrading a main control program of a traffic signal controller according to any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part 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, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more 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)), etc.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (9)

1. A method for upgrading a main control program of a traffic signal controller is characterized by being applied to a main controller; the main controller is internally operated with a current main control program and a preset monitoring program; the main 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 the 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 has completed initialization;
after receiving the initialization completion instruction, the preset monitoring program sends an operation stopping instruction to the current main control program and sends a continuous operation continuing instruction to the new main control program;
if the preset monitoring program receives the upgrade package receiving completion instruction sent by the current main control program, starting to run a new main control program in the upgrade package, which comprises the following steps:
the preset monitoring program unpacks the new main control program in the upgrade package to a preset path;
the preset monitoring program starts to run the new main control program so as to initialize the new main control program;
the step of starting the preset monitoring program to run the new main control program so as to initialize the new main control program comprises the following steps:
the preset monitoring program starts to run the new main control program so that the new main control program initializes the peripheral equipment and detects whether a specific memory area exists or not; if yes, 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 not, the new main control program creates a specific memory area for storing operation 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 run continuously.
2. The method of claim 1, wherein before the preset monitor program receives the upgrade package reception completion instruction sent by the current main control program, the method further comprises:
the preset monitoring program detects whether a current running 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, takes the searched main control program as the current main control program, and starts operation.
3. The method according to claim 1, wherein the operation information includes at least: timing scheme number, timing scheme running state and phase number of signal lamp.
4. A method for upgrading a main control program of a traffic signal controller is characterized by being applied to a current main control program running in a main controller; the main controller also runs a preset monitoring program; the main control program upgrading method comprises the following steps:
initializing a peripheral;
detecting whether a specific memory area exists; if yes, after the running information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous running instruction from the monitoring program is received or not is detected;
if the operation information does not exist, a specific memory area for storing the operation information is created and the operation is performed normally;
the running information in the specific memory area is information which is written in real time by a previously running main control program and enables the current main control program to run continuously in the running process;
if the upgrade package is received in the running process, sending an upgrade package receiving completion instruction to the preset monitoring program; the upgrade package receives a completion instruction, and is used for indicating the preset monitoring program to start and operate a new main control program in the upgrade package;
receiving an operation stopping instruction sent by the preset monitoring program, and stopping operation; the stopping instruction is used for indicating that the preset monitoring program has received the initialization completion instruction from the new main control program.
5. The method according to claim 4, wherein the operation information includes at least: timing scheme number, timing scheme running state and phase number of signal lamp.
6. The main control program upgrading device of the traffic signal controller is characterized by being applied to a main controller; the main controller is internally operated with a current main control program and a preset monitoring program; the main control program upgrading device comprises:
the starting operation module is used for starting 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;
the first instruction receiving module is used for receiving an initialization completion instruction from the new main control program by the preset monitoring program, wherein the initialization completion instruction is used for indicating that the new main control program has completed initialization;
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 completion instruction;
the starting operation module comprises:
the unpacking unit is used for unpacking the new main control program in the upgrade package to a preset path by the preset monitoring program;
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;
the starting unit is specifically used for starting the preset monitoring program to run 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 yes, 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 not, the new main control program creates a specific memory area for storing operation 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 run continuously.
7. The main control program upgrading device of the traffic signal controller is characterized by being applied to a current main control program running in a main controller; the main controller also runs a preset monitoring program; the main control program upgrading device comprises:
the peripheral initialization module is used for initializing the peripheral;
the memory area detection module is used for detecting whether a specific memory area exists or not; if yes, after the running information in the specific memory area is read, an initialization completion instruction is sent to the preset monitoring program, and whether a continuous running instruction from the monitoring program is received or not is detected; if the operation information does not exist, a specific memory area for storing the operation information is created and the operation is performed normally; the running information in the specific memory area is information which is written in real time by a previously running main control program and enables the current main control program to run continuously in the running process;
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 running process; the upgrade package receives a completion instruction, and is used 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 an operation stopping instruction sent by the preset monitoring program and stopping operation; the stopping instruction is used for indicating that the preset monitoring program has received the initialization completion instruction from the new main control program.
8. A master, comprising:
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-3 or 4-5 when executing a program stored on a memory.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-3 or 4-5.
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 CN112130886A (en) 2020-12-25
CN112130886B true 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)

Families Citing this family (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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104299427A (en) * 2014-10-13 2015-01-21 安徽科力信息产业有限责任公司 Remote program updating method for traffic signal instrument
CN106873943A (en) * 2017-01-12 2017-06-20 深圳市优必选科技有限公司 The firmware upgrade 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

Family Cites Families (4)

* 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
US9141635B2 (en) * 2012-09-28 2015-09-22 Oracle International Corporation Transparently upgrading derived database objects
JP6555096B2 (en) * 2015-11-18 2019-08-07 富士通株式会社 Information processing apparatus and program update control method
TWI597665B (en) * 2016-12-27 2017-09-01 緯創資通股份有限公司 Method and storage system for updating software in a storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104299427A (en) * 2014-10-13 2015-01-21 安徽科力信息产业有限责任公司 Remote program updating method for traffic signal instrument
CN106873943A (en) * 2017-01-12 2017-06-20 深圳市优必选科技有限公司 The firmware upgrade 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
A procedure-based dynamic software update;Janghoon Lyu等;2001 International Conference on Dependable Systems and Networks;全文 *
基于Uboot的嵌入式系统远程更新设计;罗正,华唐帅;成都大学学报(自然科学版);第37卷(第2期);全文 *
嵌入式单点自适应信号控制系统软件设计;姚佼;时柏营;马万经;钟章建;;交通与计算机(第05期);全文 *

Also Published As

Publication number Publication date
CN112130886A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
US9778844B2 (en) Installation of operating system on host computer using virtual storage of BMC
CN106201566B (en) Benefit wins the hot upgrade method of big special software and equipment
CN105453043B (en) Providing queue barriers when unsupported by I/O protocols or target devices
CN109086079B (en) Mounting management method and device for storage equipment
US8954619B1 (en) Memory module communication control
US20140137091A1 (en) Automobile open system architecture(autosar)-based electronic control unit (ecu) and method for updating ecu
KR20070097538A (en) Operating-system-friendly bootloader
US9311138B2 (en) System management interrupt handling for multi-core processors
US10761776B2 (en) Method for handling command in conflict scenario in non-volatile memory express (NVMe) based solid-state drive (SSD) controller
CN105872088A (en) Operating system switching method and device for driverless vehicle
TWI530789B (en) ?graceful out-of-band power control of remotely-managed computer systems
JP2013164842A (en) Electronic device having restoration function of bmc firmware and restoration method of the same
EP3489777B1 (en) Control device, control method, and program
CN112130886B (en) Main control program upgrading method and device of traffic signal controller
CN103257922A (en) Method for quickly testing reliability of BIOS (basic input output system) and OS (operating system) interface codes
WO2020119377A1 (en) Start method for application module, container, control device and readable storage medium
US11416233B1 (en) Software upgrade system and method for a baseboard management controller configured in an information handling system
CN106951276B (en) Multi-controller software upgrading and address conflict detection method and device
CN114640709A (en) Edge node processing method, device and medium
JP6187508B2 (en) Control device, bus circuit, method, and program
KR102250138B1 (en) System for providing micro service-based device control interface and method using thereof
US11782702B2 (en) Generation of code for a system
JP2015014962A (en) Arithmetic device, arithmetic method, and program
CN114138572B (en) NVMe disk hot plug management method of NVMe backboard and related assembly
CN106713453A (en) Application information monitoring method and device

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