CN107526617B - CPU updating method and system - Google Patents

CPU updating method and system Download PDF

Info

Publication number
CN107526617B
CN107526617B CN201710786444.6A CN201710786444A CN107526617B CN 107526617 B CN107526617 B CN 107526617B CN 201710786444 A CN201710786444 A CN 201710786444A CN 107526617 B CN107526617 B CN 107526617B
Authority
CN
China
Prior art keywords
cpu
update
updating
instruction
current
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
CN201710786444.6A
Other languages
Chinese (zh)
Other versions
CN107526617A (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.)
Jinggangshan Electrical Appliance Co ltd
Original Assignee
Jinggangshan Electrical Appliance 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 Jinggangshan Electrical Appliance Co ltd filed Critical Jinggangshan Electrical Appliance Co ltd
Priority to CN201710786444.6A priority Critical patent/CN107526617B/en
Publication of CN107526617A publication Critical patent/CN107526617A/en
Application granted granted Critical
Publication of CN107526617B publication Critical patent/CN107526617B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The invention discloses a CPU updating method and a system, wherein the method comprises the following steps: the current CPU receives an update instruction issued by a server; judging whether the updating instruction is a multi-CPU updating instruction or not; and if the current CPU update instruction is a multi-CPU update instruction, generating and sending an update broadcast for indicating the online CPU to enter the CPU update, and entering the CPU update according to the update instruction and the update file. The method provided by the invention can simultaneously upload the update files to the appointed directory by a plurality of CPUs based on the CPU list, and can simultaneously enter the update process by a plurality of CPUs in an update broadcasting mode. And when a certain CPU has updating abnormality, the abnormal CPU can be updated independently, so that the efficiency of the updating process of the CPU is obviously improved.

Description

CPU updating method and system
Technical Field
The present application relates to the field of computer technologies, and in particular, to a CPU updating method and system.
Background
At present, devices on the market are basically single-CPU devices, and in the using process, the CPU devices need to be updated after a certain time, and the updating process needs to be performed by means of external storage devices such as a usb disk.
With the progress of technology, multi-CPU devices are also born, but the updating method for multi-CPU devices still adopts a one-by-one updating method, which increases the updating time of the CPU and also reduces the updating efficiency of the CPU.
Disclosure of Invention
The embodiment of the invention provides a CPU updating method and a CPU updating system, which are used for solving the problems that in the prior art, the updating time of a CPU of a multi-CPU device is long, and the updating efficiency of the CPU is low.
The specific technical scheme is as follows:
a CPU update method, the method comprising:
the current CPU receives an update instruction issued by a server;
judging whether the updating instruction is a multi-CPU updating instruction or not;
and if the current CPU update instruction is a multi-CPU update instruction, generating and sending an update broadcast for indicating the online CPU to enter the CPU update, and entering the CPU update according to the update instruction and the update file.
Optionally, before the current CPU receives the update instruction issued by the server, the method further includes:
the current CPU broadcasts the CPU information of the current CPU and receives the CPU information broadcasted by other CPUs, wherein the CPU information at least comprises a CPU identification;
and generating a CPU list according to CPU information broadcast by other CPUs, wherein the CPU list comprises the online CPUs.
Optionally, entering a CPU update flow, including:
judging whether the version number of the updated file is greater than or equal to the current version number of the CPU;
if yes, restarting the current CPU system, and entering reset partition updating;
if not, the updating process is directly ended.
Optionally, the method further includes:
and if the current CPU update instruction is a single CPU update instruction, updating according to the single CPU update instruction, and sending a list update broadcast for indicating the online CPU to delete the current CPU in a CPU list.
A CPU update system, the system comprising:
the receiving module is used for receiving an updating instruction sent by the server;
the judging module is used for judging whether the updating instruction is a multi-CPU updating instruction or not;
and the updating module is used for generating and sending an updating broadcast for indicating the online CPU to enter the CPU updating if the current CPU updating instruction is a multi-CPU updating instruction, and entering the CPU updating according to the updating instruction and the updating file.
Optionally, the receiving module is further configured to broadcast CPU information of a current CPU and receive CPU information broadcast by other CPUs, where the CPU information at least includes a CPU identifier;
the updating module is further configured to generate a CPU list according to CPU information broadcast by other CPUs, where the CPU list includes online CPUs.
Optionally, the update module is specifically configured to determine whether a version number of the update file is greater than or equal to a current version number of the CPU; if yes, restarting the current CPU system, and entering reset partition updating; if not, the updating process is directly ended.
Optionally, the update module is further configured to update according to the single CPU update instruction if the current CPU update instruction is the single CPU update instruction, and send a list update broadcast for instructing the online CPU to delete the current CPU from the CPU list.
The method provided by the invention can simultaneously upload the update files to the appointed directory by a plurality of CPUs based on the CPU list, and can simultaneously enter the update process by a plurality of CPUs in an update broadcasting mode. And when a certain CPU has updating abnormality, the abnormal CPU can be updated independently, so that the efficiency of the updating process of the CPU is obviously improved.
Drawings
FIG. 1 is a flowchart of a CPU update method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a Web service in an embodiment of the present invention;
FIG. 3 is a schematic diagram of a Web display interface before updating of a CPU in the device in the embodiment of the present invention;
FIG. 4 is a schematic diagram of a Web interface of an update file uploading process in the embodiment of the present invention;
FIG. 5 is a schematic diagram of a Web display interface during the updating process of the CPU in the embodiment of the present invention;
FIG. 6 is a schematic diagram of a successful update interface in an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a CPU update system according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention are described in detail with reference to the drawings and the specific embodiments, and it should be understood that the embodiments and the specific technical features in the embodiments of the present invention are merely illustrative of the technical solutions of the present invention, and are not restrictive, and the embodiments and the specific technical features in the embodiments of the present invention may be combined with each other without conflict.
Fig. 1 is a flowchart of a CPU updating method according to an embodiment of the present invention, where the method includes:
s101, a current CPU receives an update instruction issued by a server;
s102, judging whether the updating instruction is a multi-CPU updating instruction or not;
if yes, go to step S103, otherwise go to step S104.
S103, entering the CPU for updating according to the updating instruction and the updating file, and sending an updating broadcast for indicating the online CPU to enter the CPU for updating;
and S104, updating according to the single CPU updating instruction, and sending a list updating broadcast for indicating the online CPU to delete the current CPU in the CPU list.
Specifically, in the embodiment of the present invention, before the updating step is performed, the local update file needs to be uploaded to a system directory of all CPUs of the device, and each CPU needs to maintain a CPU list, where the CPU list includes information of each CPU and a current operating state of the CPU, such as whether the CPU is online or offline.
In the embodiment of the present invention, the generation manner of the CPU list is: each CPU of the equipment sends the CPU information of the equipment by a broadcasting mode and receives the broadcasting information of other CPUs, so that each CPU can acquire the information of other CPUs, each CPU can further store a CPU list, and the CPU list can be updated in real time.
Furthermore, in the embodiment of the present invention, a file upload plug-in file is used in the update file upload process, so that the file can be asynchronously uploaded to each CPU specified path, and callback function processing is added, so that some things before upload can be processed, the progress of the upload process is displayed, and upload success and time-varying prompts are indicated.
In addition, in the embodiment of the present invention, the CPU list may also be displayed through a Web page, specifically as shown in fig. 2, the browser Web page front end provides a setting interface, executes an operation request through the JS script, then the browser Web page front end sends the request to the Web server, the Web server monitors the 80 port by default, points to the php back end, and then the php back end interprets the php script to generate the html page. This allows the CPU list to be displayed via a web page.
After the local update file is uploaded, a user may first select an update file to be updated through a browser, as shown in fig. 3, a Web display interface before updating of a CPU in the device is shown, and then the system uploads the update file selected by the user, as shown in fig. 4, a Web interface in an update file uploading process.
Then, the system verifies whether the update file is valid, if the update file is valid, the current update is further determined to be single-CPU update or multi-CPU update, if the update file is multi-CPU update, a multi-CPU update instruction is sent to the CPU in the current webpage, after the current CPU receives the multi-CPU update instruction, an update broadcast for instructing other online CPUs to enter CPU update is generated, and the current CPU enters a CPU update flow, as shown in fig. 5, a Web display interface in the CPU update process is shown, and after the update is successful, the system displays an update success interface shown in fig. 6.
And after receiving the updating broadcast, other online CPUs enter an updating process according to the updating broadcast and the updating file. By the method, the plurality of CPUs can simultaneously upload the update files to the designated directory based on the CPU list, and the plurality of CPUs can simultaneously enter the update process in an update broadcasting mode.
Further, if an abnormality occurs during updating of a certain CPU, the system may enter into the system to perform single CPU update on the abnormal CPU. That is, if the system updates a single CPU, the system issues a single CPU update instruction of the current CPU, updates according to the single CPU update instruction, and sends a list update broadcast for instructing the online CPU to delete the current CPU in the CPU list.
Further, in the embodiment of the present invention, after the CPU enters the update process, the CPU first determines whether the version number of the update file is greater than or equal to the current version number of the CPU, if so, the current CPU system is restarted, and enters the reset partition update, and if not, the update process is directly ended. Therefore, the CPU can be accurately updated, and the updating of the CPU can be timely and accurately carried out.
Corresponding to a CPU updating method in the embodiment of the present invention, a CPU updating system is further provided in the embodiment of the present invention, and as shown in fig. 7, the system is a schematic structural diagram of a CPU updating system in the embodiment of the present invention, and includes:
a receiving module 701, configured to receive an update instruction sent by a server;
a determining module 702, configured to determine whether the update instruction is a multi-CPU update instruction;
an updating module 703, configured to generate and send an update broadcast for instructing the online CPU to enter CPU update if the current CPU update instruction is a multi-CPU update instruction, and enter CPU update according to the update instruction and the update file.
Further, in the embodiment of the present invention, the receiving module 701 is further configured to broadcast CPU information of a current CPU, and receive CPU information broadcast by other CPUs, where the CPU information at least includes a CPU identifier;
the updating module 703 is further configured to generate a CPU list according to the CPU information broadcast by other CPUs, where the CPU list includes an online CPU.
Further, in the embodiment of the present invention, the updating module 703 is specifically configured to determine whether a version number of the updated file is greater than or equal to a current version number of the CPU; if yes, restarting the current CPU system, and entering reset partition updating; if not, the updating process is directly ended.
Further, in this embodiment of the present invention, the updating module 703 is further configured to update according to the single CPU update instruction if the current CPU update instruction is the single CPU update instruction, and send a list update broadcast for instructing the online CPU to delete the current CPU in the CPU list.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (4)

1. A CPU update method, the method comprising:
the method comprises the steps that a current CPU broadcasts CPU information of the current CPU, and receives CPU information broadcasted by other CPUs, wherein the CPU information at least comprises a CPU identification;
generating a CPU list according to CPU information broadcast by other CPUs, wherein the CPU list comprises online CPUs;
the current CPU receives an update instruction and an update file issued by a server;
judging whether the updating instruction is a multi-CPU updating instruction or not;
if the current CPU update instruction is a multi-CPU update instruction, generating and sending an update broadcast for indicating an online CPU to enter CPU update, and entering CPU update according to the update instruction and an update file;
and if the current CPU update instruction is a single CPU update instruction, updating according to the single CPU update instruction, and sending a list update broadcast for indicating the online CPU to delete the current CPU in a CPU list.
2. The method of claim 1, wherein entering a CPU update comprises:
judging whether the version number of the updated file is greater than or equal to the current version number of the CPU;
if yes, restarting the current CPU system, and entering reset partition updating;
if not, the updating process is directly ended.
3. A CPU update system, comprising:
the receiving module is used for broadcasting the CPU information of the current CPU and receiving the CPU information broadcasted by other CPUs, wherein the CPU information at least comprises a CPU identifier; the CPU is also used for receiving an update instruction and an update file sent by the server;
the judging module is used for judging whether the updating instruction is a multi-CPU updating instruction or not;
the updating module is used for generating a CPU list according to CPU information broadcasted by other CPUs, wherein the CPU list comprises online CPUs; if the current CPU update instruction is a multi-CPU update instruction, generating and sending an update broadcast for indicating an online CPU to enter CPU update, and entering CPU update according to the update instruction and an update file; and if the current CPU update instruction is a single CPU update instruction, updating according to the single CPU update instruction, and sending a list update broadcast for indicating the online CPU to delete the current CPU in a CPU list.
4. The system of claim 3, wherein the update module is further configured to determine whether a version number of the update file is greater than or equal to a current version number of the CPU; if yes, restarting the current CPU system, and entering reset partition updating; if not, the updating process is directly ended.
CN201710786444.6A 2017-09-04 2017-09-04 CPU updating method and system Active CN107526617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710786444.6A CN107526617B (en) 2017-09-04 2017-09-04 CPU updating method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710786444.6A CN107526617B (en) 2017-09-04 2017-09-04 CPU updating method and system

Publications (2)

Publication Number Publication Date
CN107526617A CN107526617A (en) 2017-12-29
CN107526617B true CN107526617B (en) 2020-12-29

Family

ID=60683600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710786444.6A Active CN107526617B (en) 2017-09-04 2017-09-04 CPU updating method and system

Country Status (1)

Country Link
CN (1) CN107526617B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111638900A (en) * 2020-05-15 2020-09-08 哈尔滨市科佳通用机电股份有限公司 IAP (Internet access protocol) online upgrading method for locomotive signal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902315A (en) * 2012-12-27 2014-07-02 北京谊安医疗系统股份有限公司 System and method for online updating of multiple board cards
CN104102518A (en) * 2014-07-23 2014-10-15 江苏兆伏新能源有限公司 Double-CPU system and program updating method thereof
CN104503787A (en) * 2014-12-16 2015-04-08 上海斐讯数据通信技术有限公司 CPU (central processing unit) system upgrading method and system
CN106020855A (en) * 2015-03-24 2016-10-12 日本电气株式会社 Multiple CPU system and method for upgrading CPU
CN106850749A (en) * 2016-12-26 2017-06-13 联想(北京)有限公司 A kind of method and device, the electronic equipment of online updating kernel

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044304A (en) * 2001-07-26 2003-02-14 Matsushita Electric Ind Co Ltd Software update system in multi-cpu system
CN103019755B (en) * 2011-09-26 2016-04-20 东莞易步机器人有限公司 The wireless program method for down loading of multi-CPU in embedded system
KR102092660B1 (en) * 2015-12-29 2020-03-24 후아웨이 테크놀러지 컴퍼니 리미티드 Cpu and multi-cpu system management method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902315A (en) * 2012-12-27 2014-07-02 北京谊安医疗系统股份有限公司 System and method for online updating of multiple board cards
CN104102518A (en) * 2014-07-23 2014-10-15 江苏兆伏新能源有限公司 Double-CPU system and program updating method thereof
CN104503787A (en) * 2014-12-16 2015-04-08 上海斐讯数据通信技术有限公司 CPU (central processing unit) system upgrading method and system
CN106020855A (en) * 2015-03-24 2016-10-12 日本电气株式会社 Multiple CPU system and method for upgrading CPU
CN106850749A (en) * 2016-12-26 2017-06-13 联想(北京)有限公司 A kind of method and device, the electronic equipment of online updating kernel

Also Published As

Publication number Publication date
CN107526617A (en) 2017-12-29

Similar Documents

Publication Publication Date Title
CN106843828B (en) Interface display and loading method and device
US20190228303A1 (en) Method and apparatus for scheduling resource for deep learning framework
CN110262807B (en) Cluster creation progress log acquisition system, method and device
CN109766082B (en) Method and device for application program page jump
CN105577722B (en) Point exchange method and device
US9736228B2 (en) Method, apparatus, and system for distributing information in graphic code
CN107066300B (en) Firmware upgrading method of storage device and storage device
CN110730090B (en) Batch updating method, device, medium and electronic equipment for agent terminals in cloud environment
EP2985730A1 (en) Method and device for partially-upgrading
JP2009259161A (en) Knowledge-based failure recovery support system, user terminal, relay server and knowledge supply server, and data relay method
CN103647756A (en) Advertisement broadcasting method, server, client and system
CN102982570A (en) Information processing apparatus, information processing system, information processing method, and program
CN106210918B (en) User interface updating method and system
CN107526617B (en) CPU updating method and system
CN109657164B (en) Method, device and storage medium for publishing message
CN114064438A (en) Database fault processing method and device
CN109299124B (en) Method and apparatus for updating a model
US9680697B2 (en) Dynamic product installation based on user feedback
CN111724206A (en) Advertisement processing method, responsibility chain object generation method, device, equipment and medium
EP3866031A1 (en) Webpage loading method, intermediate server, and webpage loading system
CN110597525A (en) Method and apparatus for installing applications
CN113238944A (en) Test method, device and system
CN114301969B (en) Message pushing method, device, electronic equipment and computer readable storage medium
CN116028245B (en) Service message processing method and device based on message middleware
CN109388498B (en) Mutual exclusion processing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant