CN109495798B - ONU system upgrading method, device, equipment and computer readable storage medium - Google Patents

ONU system upgrading method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN109495798B
CN109495798B CN201811539393.8A CN201811539393A CN109495798B CN 109495798 B CN109495798 B CN 109495798B CN 201811539393 A CN201811539393 A CN 201811539393A CN 109495798 B CN109495798 B CN 109495798B
Authority
CN
China
Prior art keywords
code
onu
head
firmware
manufacturer
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
CN201811539393.8A
Other languages
Chinese (zh)
Other versions
CN109495798A (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.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth 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 Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN201811539393.8A priority Critical patent/CN109495798B/en
Publication of CN109495798A publication Critical patent/CN109495798A/en
Application granted granted Critical
Publication of CN109495798B publication Critical patent/CN109495798B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q11/0067Provisions for optical access or distribution networks, e.g. Gigabit Ethernet Passive Optical Network (GE-PON), ATM-based Passive Optical Network (A-PON), PON-Ring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0079Operation or maintenance aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0086Network resource allocation, dimensioning or optimisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method, a device and equipment for upgrading an ONU system and a computer readable storage medium, wherein the method comprises the following steps: acquiring a bootstrap program and a system head code in an Optical Network Unit (ONU) system, and verifying the system head code through the bootstrap program; if the system head code is successfully verified, starting the ONU system based on a starting instruction input by a user in the ONU system, and judging whether the ONU system needs to be upgraded or not; if the ONU system needs to be upgraded, acquiring a downloaded system firmware head code in the ONU system, and verifying the system firmware head code; and if the verification of the head code of the system firmware is successful, the ONU system is upgraded. The invention solves the technical problem that the ONU system can be upgraded to systems of other manufacturers at will when being upgraded.

Description

ONU system upgrading method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for upgrading an ONU system.
Background
A PON (Passive Optical Network) includes an OLT (Optical Line Terminal) installed at a central control station and a set of Optical Network Units (ONU) installed at customer sites. An ODN (Optical Distribution Network) between the OLT and the ONUs contains Optical fibers and passive Optical splitters or couplers. The PON uses a single fiber to connect to the OLT, which then connects to the ONUs. The ONU provides data, IPTV (i.e., interactive network television), voice (using IAD (Integrated Access Device) services), and the like.
At present, with the increasing innovation of PON technology and various services, the ONU system is required to have more and more functions, that is, the ONU system needs to be frequently upgraded, and as the ONU system is used more and more widely, it is important to protect the copyright of the ONU system. Therefore, how to avoid upgrading the ONU system to another manufacturer system becomes a technical problem to be solved urgently.
Disclosure of Invention
The invention mainly aims to provide an ONU system upgrading method, an ONU system upgrading device, ONU equipment and a computer storage medium, and aims to solve the technical problem that the ONU system can be upgraded to systems of other manufacturers at will when being upgraded.
In order to achieve the above object, the present invention provides an ONU system upgrading method, including:
acquiring a bootstrap program and a system head code in an Optical Network Unit (ONU) system, and verifying the system head code through the bootstrap program;
if the system head code is successfully verified, starting the ONU system based on a starting instruction input by a user in the ONU system, and judging whether the ONU system needs to be upgraded or not;
if the ONU system needs to be upgraded, acquiring a downloaded system firmware head code in the ONU system, and verifying the system firmware head code;
and if the verification of the head code of the system firmware is successful, the ONU system is upgraded.
Optionally, the step of acquiring a downloaded system firmware header code in the ONU system and verifying the system firmware header code includes:
acquiring downloaded system firmware head codes in the ONU system, and judging whether a first manufacturer code exists in the system firmware head codes;
if the first manufacturer code exists in the head code of the system firmware, judging whether the first manufacturer code is matched with a second manufacturer code in the head code of the system firmware;
and if the first manufacturer code does not exist in the head code of the system firmware, the head code of the system firmware fails to be verified.
Optionally, after the step of determining whether the first factory code matches a second factory code in the system header code, the method includes:
if the first factory code and the second factory code are matched, acquiring a first offset position of the first factory code in the head code of the system firmware;
acquiring a second offset position of the second manufacturer code in the system head code, and judging whether the first offset position is matched with the second offset position;
if the first offset location and the second offset location match, the system firmware header code is successfully verified;
if the first offset location and the second offset location do not match, the system firmware header code fails to verify.
Optionally, the step of verifying the system header code by the bootstrap includes:
judging whether a second manufacturer code exists in the system head code through the bootstrap program;
if the second manufacturer code exists in the system head code, the system head code is verified successfully;
and if the second manufacturer code does not exist in the system head code, the system head code fails to be verified.
Optionally, if the second vendor code exists in the system header code, the step of successfully verifying the system header code includes:
if the system head code has a second manufacturer code, acquiring a second offset position of the second manufacturer code in the system head code, and judging that the second offset position is matched with a preset offset position in the bootstrap program;
if the second offset position is matched with a preset offset position, the verification of the system head code is successful;
and if the second offset position is not matched with the preset offset position, the verification of the system head code fails.
Optionally, if the second offset position does not match the preset offset position, after the step of failing to verify the system header code, the method includes:
acquiring a recovery system mechanism in the ONU system;
and recovering the system head code through the recovery system mechanism.
Optionally, after the step of upgrading the ONU system if the verification of the system firmware header code is successful, the method includes:
if the ONU system is upgraded, verifying the system head code in the upgraded ONU system again;
and if the verification of the system head code in the upgraded ONU system is successful, starting the ONU system.
In addition, to achieve the above object, the present invention further provides an ONU system upgrading apparatus, including:
the system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a bootstrap program and a system head code in an Optical Network Unit (ONU) system and verifying the system head code through the bootstrap program;
the judging module is used for starting the ONU system based on a starting instruction input by a user in the ONU system and judging whether the ONU system needs to be upgraded or not if the system head code is successfully verified;
the verification module is used for acquiring the downloaded system firmware head codes in the ONU system and verifying the system firmware head codes if the ONU system needs to be upgraded;
and the upgrading module is used for upgrading the ONU system if the verification of the head code of the system firmware is successful.
In addition, in order to achieve the above purpose, the invention also provides an ONU system upgrading device;
the ONU system upgrading device comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein:
the computer program when executed by the processor implements the steps of the ONU system upgrade method as described above.
In addition, to achieve the above object, the present invention also provides a computer-readable storage medium;
the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the ONU system upgrading method as described above.
The method comprises the steps of acquiring a bootstrap program and a system head code in an Optical Network Unit (ONU) system, and verifying the system head code through the bootstrap program; if the system head code is successfully verified, starting the ONU system based on a starting instruction input by a user in the ONU system, and judging whether the ONU system needs to be upgraded or not; if the ONU system needs to be upgraded, acquiring a downloaded system firmware head code in the ONU system, and verifying the system firmware head code; and if the verification of the head code of the system firmware is successful, the ONU system is upgraded. When the ONU system is started, the system head code is verified to ensure that the running ONU system is always the system released by a manufacturer, and when the ONU system is upgraded, the system firmware head code is verified, and the ONU system is upgraded after the verification is successful, so that pirated software is effectively prevented from using the ONU of the manufacturer, the copyright and market share of the manufacturer are maintained, and the technical effect of preventing a user from upgrading other manufacturer systems is achieved.
Drawings
FIG. 1 is a schematic diagram of a terminal \ device structure of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a first embodiment of an ONU system upgrading method according to the present invention;
fig. 3 is a schematic flowchart of a second embodiment of an ONU system upgrading method according to the present invention;
fig. 4 is a schematic diagram of functional modules of the ONU system upgrading apparatus according to the present invention;
fig. 5 is a schematic flowchart of an ONU system upgrading method according to the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal in the embodiment of the invention is ONU system upgrading equipment.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that turns off the display screen and/or the backlight when the terminal device is moved to the ear. Of course, the terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an ONU system upgrade program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the ONU system upgrade program stored in the memory 1005, and perform the following operations:
acquiring a bootstrap program and a system head code in an Optical Network Unit (ONU) system, and verifying the system head code through the bootstrap program;
if the system head code is successfully verified, starting the ONU system based on a starting instruction input by a user in the ONU system, and judging whether the ONU system needs to be upgraded or not;
if the ONU system needs to be upgraded, acquiring a downloaded system firmware head code in the ONU system, and verifying the system firmware head code;
and if the verification of the head code of the system firmware is successful, the ONU system is upgraded.
Referring to fig. 2, the present invention provides an ONU system upgrading method, where in a first embodiment of the ONU system upgrading method, the ONU system upgrading method includes the following steps:
step S10, acquiring a bootstrap program and a system head code in an ONU system of the optical network unit, and verifying the system head code through the bootstrap program;
an ONU (Optical Network Unit) is divided into an active Optical Network Unit and a passive Optical Network Unit. A device equipped with a network monitoring comprising an optical receiver, an upstream optical transmitter, a plurality of bridged amplifiers is generally called an optical node. The PON uses a single fiber to connect to the OLT, which then connects to the ONUs. The ONU provides data, IPTV (i.e., interactive network television), voice (using IAD (Integrated Access Device) services), and the like.
In this embodiment, when a user selects to start the ONU system, first, a bootstrap program and a system header code need to be acquired from the ONU system, and a manufacturer code in the system header code is verified through the bootstrap program, so as to determine whether the ONU system to be currently operated is an original manufacturer system, instead of a pirate system. When the manufacturer code in the system header code is verified, in addition to verifying whether the manufacturer code in the system header code is a special code for marking the manufacturer, it is also required to verify whether the position of the manufacturer code in the system header code is correct. That is, when the manufacturer code in the system header code is found to be the special code for identifying the manufacturer and the position of the manufacturer code in the system header code is also correct, the ONU system to be currently operated may be considered to be the genuine system, but when the manufacturer code in the system header code is found not to be the special code for identifying the manufacturer or the position of the manufacturer code in the system header code does not coincide with the predetermined position, the ONU system at that time may be considered not to be the genuine system or the ONU system has failed. At this time, a system recovery starting mechanism in the ONU system is automatically triggered, and the ONU system is recovered through the system recovery mechanism, namely the ONU system is recovered to be a legal system.
Step S20, if the system head code is successfully verified, starting the ONU system based on a starting instruction input by a user in the ONU system, and judging whether the ONU system needs to be upgraded;
when the fact that verification of the head codes of the system is successful is judged, the ONU system is started based on a starting instruction which is originally input into the ONU system by a user, after the ONU system is started, whether the ONU system needs to be upgraded or not is automatically judged, if the ONU system needs to be upgraded is judged, a new version with system firmware is automatically downloaded, the ONU system is prepared to be upgraded, and when the fact that the ONU system does not need to be upgraded is judged, the running state of the ONU system is kept. The ONU system may be upgraded through a WEB (World Wide WEB), or may be upgraded through an OLT, or may be upgraded through a bootstrap program, and specifically, the upgrade method is not limited herein, but any upgrade method may check a special code of a manufacturer marked in the ONU system.
Step S30, if the ONU system needs to be upgraded, acquiring the downloaded system firmware head code in the ONU system, and verifying the system firmware head code;
when the ONU system needs to be upgraded by judgment, the downloaded system firmware is acquired in the ONU system, whether a section of special code representing a manufacturer exists in a head code of the system firmware is determined, if the special code exists in the head code of the system firmware, whether the position of the special code is normal is verified, if the special code is detected to be correct in the head code of the system firmware, the head code of the system firmware can be determined to be successfully verified, and the ONU system can be upgraded until the upgrading is successful. However, when it is determined that the special code does not exist in the system or the position of the special code in the system firmware header code is incorrect, it may be determined that the system firmware header code fails to be verified, and at this time, a prompt message indicating that the upgrade fails is automatically output to notify the user that the current ONU system is not upgraded successfully. The special code is a preset manufacturer code compiled by a manufacturer in advance at a preset offset position in the system firmware code before being downloaded by a user.
Step S40, if the verification of the system firmware header code is successful, the ONU system performs upgrading.
And when the head code of the system firmware is successfully verified through judgment, the user can be considered to download the genuine software, so that the ONU system is upgraded until the upgrading is successful.
To assist understanding of the ONU system upgrading method of the present invention, the following description is made by way of example.
As shown in fig. 5, when the ONU system is started, the system header code is automatically verified by the bootstrap, and if the verification fails, that is, the system header code does not meet the requirement, the system recovery mechanism is automatically started to recover the system. If the verification is successful, namely the system head code meets the requirement, the ONU system is started, whether the system needs to be upgraded is judged, if the system needs to be upgraded, the system firmware is downloaded and compiled into the manufacturer code, when a user selects to upgrade the system, the system head code is verified again, namely whether the downloaded system firmware is legal software but not software of other manufacturers is determined, when the system head code is verified to meet the requirement, the ONU system can be upgraded, after the upgrade is successful, prompt information of upgrade success is output, but when the verification that the system head code does not meet the requirement is judged, prompt information of upgrade failure is output.
In the embodiment, a bootstrap program and a system head code in an Optical Network Unit (ONU) system are obtained, and the system head code is verified through the bootstrap program; if the system head code is successfully verified, starting the ONU system based on a starting instruction input by a user in the ONU system, and judging whether the ONU system needs to be upgraded or not; if the ONU system needs to be upgraded, acquiring a downloaded system firmware head code in the ONU system, and verifying the system firmware head code; and if the verification of the head code of the system firmware is successful, the ONU system is upgraded. When the ONU system is started, the system head code is verified to ensure that the running ONU system is always the system released by a manufacturer, and when the ONU system is upgraded, the system firmware head code is verified, and the ONU system is upgraded after the verification is successful, so that pirated software is effectively prevented from using the ONU of the manufacturer, the copyright and market share of the manufacturer are maintained, and the technical effect of preventing a user from upgrading other manufacturer systems is achieved.
Further, on the basis of the first embodiment of the present invention, a second embodiment of the ONU system upgrading method according to the present invention is provided, where this embodiment is a step S30 of the first embodiment of the present invention, and details of a step of acquiring a system firmware header code downloaded in the ONU system and verifying the system firmware header code, and with reference to fig. 3, the method includes:
step S31, acquiring the downloaded system firmware head code in the ONU system, and judging whether the first manufacturer code exists in the system firmware head code;
the first manufacturer code may be a special code identifying the manufacturer. In the ONU system, the downloaded system firmware is obtained, the head code of the system firmware is extracted, then whether a first manufacturer code exists in the head code of the system firmware is judged, if the first manufacturer code exists, whether the position of the first manufacturer code meets the requirement is determined, if the first manufacturer code meets the requirement, the head code of the system firmware can be considered to be successfully verified, and the system firmware can be upgraded. However, when it is determined that the first manufacturer code does not exist in the system firmware header code, it may be determined that the system firmware header code fails to be verified, and at this time, a prompt message indicating that the upgrade fails may be automatically output.
Step S32, if there is a first factory code in the system firmware header code, determining whether the first factory code matches with a second factory code in the system header code;
the second vendor code may be a special code with a vendor identification present in the ONU system header code. If the first manufacturer code is found to exist in the head code of the system firmware through judgment, the second manufacturer code in the head code of the system firmware is required to be obtained, the first manufacturer code and the second manufacturer code are matched, and if the first manufacturer code and the second manufacturer code are matched, the special code with the manufacturer mark exists in the head code of the system firmware. However, when the first manufacturer code and the second manufacturer code are found to be not matched through judgment, it can be considered that the special code with the manufacturer mark does not exist in the head code of the system firmware, that is, it can be considered that the user is ready to update with software of other manufacturers at this time, and failure of upgrade can be prompted.
In step S33, if the first vendor code does not exist in the system firmware header code, the system firmware header code fails to be verified.
When the first manufacturer code is found to be absent in the system firmware header code through judgment, the system firmware header code can be considered to fail to be verified, and prompt information of system upgrade failure can be output at the moment. The mode of outputting the prompt message of the system upgrade failure may be outputting in a voice playing mode, or outputting in a pattern display mode, and specifically, the output mode is not limited herein.
In this embodiment, whether the manufacturer of the downloaded system firmware software and the currently running ONU system is the same manufacturer is determined by determining whether the first manufacturer code exists in the downloaded system firmware header code, thereby effectively preventing the user from upgrading the ONU system to a system of another manufacturer.
Specifically, after the step of determining whether the first factory code matches a second factory code in the system header code, the method includes:
step S34, if the first factory code and the second factory code match, obtaining a first offset position of the first factory code in the system firmware header code;
the first offset location may be an offset location of the first factory code in the system firmware header code. When the first factory code and the second factory code are judged to be matched, a first offset position of the first factory code in the head code of the system firmware needs to be obtained.
Step S35, obtaining a second offset position of the second factory code in the system header code, and determining whether the first offset position and the second offset position match;
the second offset location may be an offset location of the second factory code in the system header code. And acquiring a second offset position of the second manufacturer code in the system head code, matching the acquired first offset position with the acquired second offset position, judging whether the first offset position is the same as the second offset position, and executing different operations according to the judgment result.
Step S36, if the first offset position and the second offset position match, the system firmware header code is successfully verified;
when the first offset position is matched with the second offset position, the verification of the head code of the system firmware can be considered to be successful, the ONU system can be upgraded, and after the upgrade is successful, prompt information of the upgrade success can be automatically sent.
In step S37, if the first offset position and the second offset position do not match, the system firmware header code fails to verify.
When the first offset position and the second offset position are found to be not matched through judgment, the verification of the head codes of the system firmware can be considered to be failed, the ONU system can be automatically stopped to be upgraded, and prompt information of system upgrade failure can be output at the moment.
In this embodiment, whether the head code of the system firmware is successfully verified is determined by determining whether the first offset position corresponding to the first manufacturer code and the second offset position corresponding to the second manufacturer code are matched, and whether the ONU system can be upgraded is determined, so that the accuracy of determining the upgrade of the ONU system is improved.
Further, on the basis of any one of the first to second embodiments of the present invention, a third embodiment of the ONU system upgrading method of the present invention is provided, where this embodiment is step S10 of the first embodiment of the present invention, and the step of verifying the system header code by the bootstrap program is refined, and the method includes:
step S11, judging whether a second manufacturer code exists in the system head code through the bootstrap program;
after the bootstrap program is obtained in the ONU system, each code in the system head code is automatically judged according to the bootstrap program, whether a second manufacturer code exists is determined, if the second manufacturer code exists, the verification of the system head code can be considered to be successful, so that the ONU system can be started according to a starting instruction input by a user, but when the fact that the second manufacturer code does not exist in the system head code is found through judgment, the verification of the system head code can be considered to be failed, and a system recovery mechanism needs to be started to recover the system.
Step S12, if the second manufacturer code exists in the system head code, the system head code is successfully verified;
when the second manufacturer code is found to exist in the system head code through judgment, the system head code can be considered to be successfully verified, and the ONU system can be started according to a starting instruction input by a user.
Step S13, if the second vendor code does not exist in the system header code, the system header code fails to be verified.
However, when it is determined that the second manufacturer code does not exist in the system header code, it may be considered that the system header code fails to be verified, and a system recovery mechanism needs to be started to recover the system.
In this embodiment, when the ONU system is started, it is determined whether the second manufacturer code exists in the system header code, and it is determined whether the currently running system is a system released by the manufacturer according to the determination result, so that it can be determined that the running system is always the system released by the manufacturer.
Specifically, if the second vendor code exists in the system header code, the step of successfully verifying the system header code includes:
step S121, if a second manufacturer code exists in the system head code, acquiring a second offset position of the second manufacturer code in the system head code, and judging that the second offset position is matched with a preset offset position in the bootstrap program;
the preset offset position may be any position where the manufacturer sets in advance a special code with a manufacturer mark. When the second manufacturer code is found to exist in the system head code through judgment, a second offset position of the second manufacturer code in the system head code needs to be determined, meanwhile, a preset offset position needs to be determined through a bootstrap program, and the second offset position is matched with the preset offset position, so that whether the offset position of the second manufacturer code in the system head code is accurate is judged.
Step S122, if the second offset position is matched with a preset offset position, the verification of the system head code is successful;
when the second offset position is found to be matched with the preset offset position through judgment, the system head code can be considered to be successfully verified, and the ONU system can be started according to a starting instruction input by a user.
Step S123, if the second offset position does not match the preset offset position, the system header code fails to be verified.
When the second offset position is found to be not matched with the preset offset position through judgment, the verification of the head code of the system can be considered to be failed, and a recovery system mechanism needs to be started to recover the system.
In this embodiment, it can be determined at any time that the running system is always the system released by the manufacturer by determining whether the position of the second manufacturer code in the system header code matches the preset offset position.
Specifically, if the second offset position does not match the preset offset position, after the step of failing to verify the system header code, the method includes:
step S124, acquiring a system recovery mechanism in the ONU system;
and step S125, recovering the system head code through the recovery system mechanism.
When the system head code is judged to fail to be verified, a system recovery mechanism needs to be acquired in the ONU system, and then the system head code is recovered through the system recovery mechanism. The system recovery mechanism is to recover the system to the state of the system just before installation on the premise of not destroying the data file.
In this embodiment, the system is restored to the state of the system in the normal operation through the restoration system mechanism in the ONU system, so that the system can be ensured to operate with the system released by the manufacturer all the time.
Further, if the verification of the system firmware header code is successful, after the step of upgrading the ONU system, the method includes:
step S60, if the ONU system is upgraded, the system head code in the upgraded ONU system is checked again;
step S70, if the system head code of the upgraded ONU system is successfully verified, turning on the ONU system.
When the ONU system is judged to be upgraded, prompt information of successful upgrade can be automatically output, and a system head code in the upgraded ONU system can be verified again, namely whether a special code marking a manufacturer exists in a preset offset position or not is judged, if the system head code of the upgraded ONU system is successfully verified, the ONU system can be automatically started for a user to use, and if the system head code of the upgraded ONU system is not successfully verified, the system needs to be recovered to recover a system released by the manufacturer.
In this embodiment, after the system is upgraded, the system head code in the ONU system needs to be detected again, so that the user is effectively prevented from upgrading the ONU system to a system of another manufacturer, pirated software is also effectively prevented from using the ONU of the manufacturer, and the copyright and market share of the manufacturer are maintained.
In addition, referring to fig. 4, an embodiment of the present invention further provides an ONU system upgrading apparatus, where the ONU system upgrading apparatus includes:
the system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a bootstrap program and a system head code in an Optical Network Unit (ONU) system and verifying the system head code through the bootstrap program;
the judging module is used for starting the ONU system based on a starting instruction input by a user in the ONU system and judging whether the ONU system needs to be upgraded or not if the system head code is successfully verified;
the verification module is used for acquiring the downloaded system firmware head codes in the ONU system and verifying the system firmware head codes if the ONU system needs to be upgraded;
and the upgrading module is used for upgrading the ONU system if the verification of the head code of the system firmware is successful.
Optionally, the verification module is further configured to:
acquiring downloaded system firmware head codes in the ONU system, and judging whether a first manufacturer code exists in the system firmware head codes;
if the first manufacturer code exists in the head code of the system firmware, judging whether the first manufacturer code is matched with a second manufacturer code in the head code of the system firmware;
and if the first manufacturer code does not exist in the head code of the system firmware, the head code of the system firmware fails to be verified.
Optionally, the verification module is further configured to:
if the first factory code and the second factory code are matched, acquiring a first offset position of the first factory code in the head code of the system firmware;
acquiring a second offset position of the second manufacturer code in the system head code, and judging whether the first offset position is matched with the second offset position;
if the first offset location and the second offset location match, the system firmware header code is successfully verified;
if the first offset location and the second offset location do not match, the system firmware header code fails to verify.
Optionally, the obtaining module is further configured to:
judging whether a second manufacturer code exists in the system head code through the bootstrap program;
if the second manufacturer code exists in the system head code, the system head code is verified successfully;
and if the second manufacturer code does not exist in the system head code, the system head code fails to be verified.
Optionally, the obtaining module is further configured to:
if the system head code has a second manufacturer code, acquiring a second offset position of the second manufacturer code in the system head code, and judging that the second offset position is matched with a preset offset position in the bootstrap program;
if the second offset position is matched with a preset offset position, the verification of the system head code is successful;
and if the second offset position is not matched with the preset offset position, the verification of the system head code fails.
Optionally, the obtaining module is further configured to:
acquiring a recovery system mechanism in the ONU system;
and recovering the system head code through the recovery system mechanism.
Optionally, the ONU system upgrading apparatus further includes:
if the ONU system is upgraded, verifying the system head code in the upgraded ONU system again;
and if the verification of the system head code in the upgraded ONU system is successful, starting the ONU system.
The steps implemented by each functional module of the ONU system upgrading apparatus may refer to each embodiment of the ONU system upgrading method of the present invention, and are not described herein again.
The invention also provides an ONU system upgrading device, which comprises: a memory, a processor, a communication bus, and an ONU system upgrade program stored on the memory:
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute the ONU system upgrade program to implement the steps of each embodiment of the ONU system upgrade method.
The present invention also provides a computer-readable storage medium storing one or more programs, which can be further executed by one or more processors for implementing the steps of the above-mentioned ONU system upgrading method embodiments.
The specific implementation manner of the computer-readable storage medium of the present invention is substantially the same as that of each embodiment of the ONU system upgrading method, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An ONU system upgrading method is characterized by comprising the following steps:
acquiring a bootstrap program and a system head code in an Optical Network Unit (ONU) system, and verifying the system head code through the bootstrap program, wherein whether a manufacturer code in the system head code is a special code for identifying a manufacturer is verified, and whether the position of the manufacturer code in the system head code is correct is verified;
if the system head code is successfully verified, starting the ONU system based on a starting instruction input by a user in the ONU system, and judging whether the ONU system needs to be upgraded or not;
if the ONU system needs to be upgraded, acquiring a downloaded system firmware head code in the ONU system, verifying the system firmware head code, and determining whether a system firmware corresponding to the system firmware head code is legal software;
and if the system firmware is the genuine software, determining that the verification of the head code of the system firmware is successful, and upgrading the ONU system.
2. The ONU system upgrading method of claim 1, wherein the step of obtaining a downloaded system firmware header code in the ONU system and verifying the system firmware header code comprises:
acquiring downloaded system firmware head codes in the ONU system, and judging whether a first manufacturer code exists in the system firmware head codes;
if the first manufacturer code exists in the head code of the system firmware, judging whether the first manufacturer code is matched with a second manufacturer code in the head code of the system firmware;
and if the first manufacturer code does not exist in the head code of the system firmware, the head code of the system firmware fails to be verified.
3. The ONU system upgrade method of claim 2, wherein said step of determining whether said first vendor code matches a second vendor code in said system header code comprises:
if the first factory code and the second factory code are matched, acquiring a first position of the first factory code in the head code of the system firmware;
acquiring a second position of the second manufacturer code in the system head code, and judging whether the first position is matched with the second position;
if the first location and the second location match, the system firmware header code is successfully verified;
if the first location and the second location do not match, the system firmware header code fails to verify.
4. The ONU system upgrade method of claim 1, wherein the step of verifying the system header code by the bootstrap comprises:
judging whether a second manufacturer code exists in the system head code through the bootstrap program;
if the second manufacturer code exists in the system head code, the system head code is verified successfully;
and if the second manufacturer code does not exist in the system head code, the system head code fails to be verified.
5. The ONU system upgrading method of claim 4, wherein the step of successfully verifying the system header code if the second vendor code exists in the system header code comprises:
if the second manufacturer code exists in the system head code, acquiring a second position of the second manufacturer code in the system head code, and judging that the second position is matched with a preset position in the bootstrap program;
if the second position is matched with a preset position, the verification of the system head code is successful;
and if the second position is not matched with the preset position, the verification of the system head code fails.
6. The ONU system upgrading method according to claim 5, wherein the step of failing to verify the system header code if the second location does not match the preset location comprises:
acquiring a recovery system mechanism in the ONU system;
and recovering the system head code through the recovery system mechanism.
7. The ONU system upgrading method according to claim 1, wherein the step of upgrading the ONU system if the system firmware header code is successfully verified comprises:
if the ONU system is upgraded, verifying the system head code in the upgraded ONU system again;
and if the verification of the system head code in the upgraded ONU system is successful, starting the ONU system.
8. An ONU system upgrading apparatus, characterized in that the ONU system upgrading apparatus comprises:
the system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a bootstrap program and a system head code in an Optical Network Unit (ONU) system and verifying the system head code through the bootstrap program, wherein whether a manufacturer code in the system head code is a special code for identifying a manufacturer is verified, and whether the position of the manufacturer code in the system head code is correct is verified;
the judging module is used for starting the ONU system based on a starting instruction input by a user in the ONU system and judging whether the ONU system needs to be upgraded or not if the system head code is successfully verified;
the verification module is used for acquiring a downloaded system firmware head code in the ONU system if the ONU system needs to be upgraded, verifying the system firmware head code and determining whether system firmware corresponding to the system firmware head is legal software;
and the upgrading module is used for determining that the verification of the head code of the system firmware is successful if the system firmware is the genuine software, and upgrading the ONU system.
9. An ONU system upgrade apparatus, comprising: a memory, a processor, and an ONU system upgrade program stored on the memory and executable on the processor, the ONU system upgrade program when executed by the processor implementing the steps of the ONU system upgrade method according to any one of claims 1 to 7.
10. A computer-readable storage medium, having an ONU system upgrade program stored thereon, which when executed by a processor implements the steps of the ONU system upgrade method according to any one of claims 1 to 7.
CN201811539393.8A 2018-12-14 2018-12-14 ONU system upgrading method, device, equipment and computer readable storage medium Active CN109495798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811539393.8A CN109495798B (en) 2018-12-14 2018-12-14 ONU system upgrading method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811539393.8A CN109495798B (en) 2018-12-14 2018-12-14 ONU system upgrading method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109495798A CN109495798A (en) 2019-03-19
CN109495798B true CN109495798B (en) 2021-10-22

Family

ID=65710535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811539393.8A Active CN109495798B (en) 2018-12-14 2018-12-14 ONU system upgrading method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109495798B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965461B (en) * 2020-07-02 2022-09-27 大唐移动通信设备有限公司 Active antenna unit upgrading method and device
CN115174392B (en) * 2022-09-07 2023-01-31 武汉长光科技有限公司 Upgrading method of optical network unit ONU, server and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859182A (en) * 2005-12-25 2006-11-08 华为技术有限公司 Method for edition upgrading of optical network unit ONU
CN102098590A (en) * 2009-12-15 2011-06-15 中兴通讯股份有限公司 Automatic upgrading method and system of firmware version of optical network unit
CN102571462A (en) * 2012-04-06 2012-07-11 烽火通信科技股份有限公司 Self-protecting method for long-distance upgrading of optical network unit
CN102681871A (en) * 2012-04-25 2012-09-19 广州致远电子股份有限公司 Firmware upgrading system based on communication interfaces
CN103488501A (en) * 2013-09-09 2014-01-01 青岛海信宽带多媒体技术有限公司 Optical network terminal equipment and system software upgrade method thereof
CN106375406A (en) * 2016-08-31 2017-02-01 浙江创佳数字技术有限公司 Terminal system upgrading method
CN107943499A (en) * 2017-11-27 2018-04-20 深圳创维数字技术有限公司 A kind of method for upgrading system, device, terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7643753B2 (en) * 2005-09-29 2010-01-05 Broadlight Ltd. Enhanced passive optical network (PON) processor
CN107102871A (en) * 2017-03-30 2017-08-29 建荣半导体(深圳)有限公司 The method and apparatus of embedded system upgrading

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859182A (en) * 2005-12-25 2006-11-08 华为技术有限公司 Method for edition upgrading of optical network unit ONU
CN102098590A (en) * 2009-12-15 2011-06-15 中兴通讯股份有限公司 Automatic upgrading method and system of firmware version of optical network unit
CN102571462A (en) * 2012-04-06 2012-07-11 烽火通信科技股份有限公司 Self-protecting method for long-distance upgrading of optical network unit
CN102681871A (en) * 2012-04-25 2012-09-19 广州致远电子股份有限公司 Firmware upgrading system based on communication interfaces
CN103488501A (en) * 2013-09-09 2014-01-01 青岛海信宽带多媒体技术有限公司 Optical network terminal equipment and system software upgrade method thereof
CN106375406A (en) * 2016-08-31 2017-02-01 浙江创佳数字技术有限公司 Terminal system upgrading method
CN107943499A (en) * 2017-11-27 2018-04-20 深圳创维数字技术有限公司 A kind of method for upgrading system, device, terminal and storage medium

Also Published As

Publication number Publication date
CN109495798A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
RU2346407C1 (en) Method and device for updating digital television receiver software
CN111538517B (en) Method and system for upgrading server firmware, electronic equipment and storage medium
US9100695B2 (en) Dynamic application loader for set top box
EP2456257B1 (en) Method and system for upgrading wireless data card
CN113110852A (en) Firmware upgrading method and device and storage medium
WO2017161947A1 (en) Multi-system ota upgrade method and multi-system device
CN109495798B (en) ONU system upgrading method, device, equipment and computer readable storage medium
CN105307195B (en) A kind of method and device updating access point name parameter
US20090077634A1 (en) Firmware update method and system using the same
CN105511920B (en) A kind of mobile terminal operating system upgrade method and device based on container
CN109240720B (en) Firmware upgrading method of android system and storage device
CN101594613A (en) The method of terminal equipment and upgrading thereof, system
US20120210317A1 (en) Method and apparatus for updating data card
CN105808278A (en) Client version upgrading method and device
CN106303709B (en) A kind of set-top box and its application program updating method, system
CN105975298A (en) Method and system for remotely controlling applications of Android terminal
WO2011079632A1 (en) Protection method and system under abnormal conditions in upgrade gigabit passive optical network terminal
CN105045671B (en) The method for upgrading system and device of a kind of intelligent terminal
CN103840968A (en) Version updating method, version updating device and terminal equipment
CN105468420B (en) operating system upgrading method and device
KR20180050001A (en) Firmware upgrade system and method for IoT
CN102866905A (en) Third-party application program upgrading processing method and device and intelligent television
KR101206639B1 (en) Server and Method for updating firmware in Mobile communication terminal
WO2016000355A1 (en) Terminal upgrade method and device
CN106789863B (en) Matching rule upgrading 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