CN114840238A - Software upgrading method and device, electronic equipment and computer readable storage medium - Google Patents

Software upgrading method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114840238A
CN114840238A CN202210556884.3A CN202210556884A CN114840238A CN 114840238 A CN114840238 A CN 114840238A CN 202210556884 A CN202210556884 A CN 202210556884A CN 114840238 A CN114840238 A CN 114840238A
Authority
CN
China
Prior art keywords
upgrading
upgraded
software
time
determining
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.)
Pending
Application number
CN202210556884.3A
Other languages
Chinese (zh)
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.)
Guangdong ePropulsion Technology Co Ltd
Original Assignee
Guangdong ePropulsion 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 Guangdong ePropulsion Technology Co Ltd filed Critical Guangdong ePropulsion Technology Co Ltd
Priority to CN202210556884.3A priority Critical patent/CN114840238A/en
Publication of CN114840238A publication Critical patent/CN114840238A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a software upgrading method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: and if the upgrading software package of the shipborne equipment to be upgraded is received, determining the upgrading time occupied by upgrading the shipborne equipment to be upgraded by adopting the upgrading software package. And if the ship stays, determining the stay time of the ship, and determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time. And upgrading the software of the shipborne equipment to be upgraded based on the upgrading software package of the shipborne equipment to be upgraded at the upgrading moment. According to the technical scheme of the embodiment of the invention, on one hand, the situation that software upgrading fails due to the fact that the upgrading duration exceeds the staying duration can be avoided, so that the reliability of software upgrading is improved, on the other hand, the operation of software upgrading can be executed when the ship staying duration exceeds the time required by software upgrading, upgrading is not required to be carried out when the ship is parked on the shore, and the timeliness of software upgrading is ensured.

Description

Software upgrading method and device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a software upgrading method, a software upgrading apparatus, an electronic device, and a computer-readable storage medium.
Background
With the continuous development of ship technology, software of shipborne equipment needs to be upgraded at times so as to meet the requirements of providing new functions and characteristics and repairing previous version problems. At present, the software upgrading of the shipborne equipment needs to be carried out under the condition that the shipborne equipment is in a non-working state. When the shipborne equipment is in a working state, software upgrading cannot be carried out on the shipborne equipment. In the related art, in order to ensure the reliability of software upgrading, software upgrading can be performed on shipborne equipment when a ship is berthed on the shore, however, the upgrading mode is deficient in timeliness.
Disclosure of Invention
In view of the above problems, the present invention provides a software upgrading method, a software upgrading apparatus, an electronic device, and a computer-readable storage medium, so as to upgrade software of a ship-borne device in time and ensure reliability of software upgrade.
According to an aspect of the present invention, there is provided a software upgrading method, including:
if an upgrading software package of the shipborne equipment to be upgraded is received, determining upgrading time occupied by upgrading the shipborne equipment to be upgraded by adopting the upgrading software package;
if the ship stays, determining the stay time of the ship, and determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time;
and upgrading the software of the shipborne equipment to be upgraded based on the upgrading software package of the shipborne equipment to be upgraded at the upgrading moment.
Optionally, the to-be-upgraded shipborne device is provided with a storage hard disk, and the storage hard disk comprises a preset system partition and a preset upgrading partition; if an upgrade software package of the shipborne equipment to be upgraded is received, determining an upgrade duration occupied by upgrading the shipborne equipment to be upgraded by adopting the upgrade software package, wherein the upgrade duration includes:
if an upgrading software package of the shipborne equipment to be upgraded is received, storing the upgrading software package to the preset upgrading partition, and determining the upgrading time occupied by upgrading the shipborne equipment to be upgraded by adopting the upgrading software package;
the upgrading of the software of the to-be-upgraded shipborne equipment based on the upgrading software package of the to-be-upgraded shipborne equipment at the upgrading moment comprises the following steps: and upgrading the software of the shipborne equipment to be upgraded in the preset upgrading subarea based on the upgrading software package at the upgrading moment.
Optionally, the method further includes: and if the software of the shipborne equipment to be upgraded is upgraded, taking the preset upgrading partition as a target system partition.
Optionally, after the preset upgrade partition is taken as a target system partition, the method further includes: and deleting the software of the shipborne equipment to be upgraded stored in the preset system partition, and taking the preset system partition as a target upgrading partition.
Optionally, the determining the stay time of the ship includes:
determining a stop position of the ship, wherein the stop position is used for indicating that the ship stops on the shore or stops on the way of sailing;
and determining the stay time according to the stay position.
Optionally, the determining the stay time of the ship further includes: determining a navigation task of the ship;
the determining the stay time length according to the stay position comprises the following steps: and determining the stay time according to the stay position and the navigation task.
Optionally, the determining to adopt the upgrade software package to upgrade the occupied upgrade duration of the to-be-upgraded shipborne device includes: acquiring the software upgrading type of the upgrading software package; determining the upgrading time of the upgrading software package according to the software upgrading type, wherein the software upgrading type comprises a full upgrading type and an incremental upgrading type; and/or
The step of determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time comprises the following steps: and comparing the upgrading time with the staying time, and if the upgrading time does not exceed the staying time, determining the upgrading time within the staying time.
According to another aspect of the present invention, there is provided a software upgrading apparatus. The device includes:
the upgrading time length determining module is used for determining the upgrading time length occupied by adopting the upgrading software package to upgrade the shipborne equipment to be upgraded if the upgrading software package of the shipborne equipment to be upgraded is received;
the upgrading time determining module is used for determining the stay time of the ship if the ship stays, and determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time;
and the software upgrading module is used for upgrading the software of the shipborne equipment to be upgraded based on the upgrading software package of the shipborne equipment to be upgraded at the upgrading moment.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the software upgrade method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the software upgrading method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the upgrading time is determined through the stay time and the upgrading time, and the software of the shipborne equipment to be upgraded is upgraded based on the upgrading software package of the shipborne equipment to be upgraded at the upgrading time, so that on one hand, the situation that the software upgrading fails due to the fact that the upgrading time exceeds the stay time can be avoided, the reliability of the software upgrading is improved, on the other hand, the operation of the software upgrading can be executed when the stay time of the ship exceeds the time required by the software upgrading, the upgrading is not required to be carried out when the ship is parked on the shore, and the timeliness of the software upgrading is ensured.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a software upgrading method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a software upgrading method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a software upgrading apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Fig. 1 is a schematic flowchart of a software upgrading method according to an embodiment of the present invention, where the present embodiment is applicable to a scenario of upgrading software of a ship-mounted device, and the method may be executed by a software upgrading apparatus, where the software upgrading apparatus may be implemented in a form of hardware and/or software, and the software upgrading apparatus may be configured in an electronic device such as a computer or a server. As shown in fig. 1, the method of the present embodiment includes:
s110, if the upgrading software package of the shipborne equipment to be upgraded is received, determining the upgrading time occupied by upgrading the shipborne equipment to be upgraded by adopting the upgrading software package.
The shipborne equipment to be upgraded can be understood as shipborne equipment needing software upgrading, namely shipborne equipment needing to update low-version software into high-version software. The number of the shipborne equipment to be upgraded can be one, two or more. The upgrade software package may be understood as high version software. The package name of the upgrade software package may include, but is not limited to: and the equipment identifier of the shipborne equipment to be upgraded and the version identifier of the upgrading software package corresponding to the upgrading software package. The package name of the upgrading software package is set, so that when the number of the received upgrading software packages is large, the shipborne equipment to be upgraded corresponding to the upgrading software packages can be quickly and effectively positioned. The corresponding relation between the shipborne equipment to be upgraded and the upgrading software package can be one-to-one or one-to-many. The upgrade time is the time consumed for updating the software of the shipborne device from the low-version software to the high-version software.
In the embodiment of the present invention, the upgrade duration may be determined in the following ways:
as an optional implementation manner of the embodiment of the present invention, if an upgrade software package of a to-be-upgraded shipborne device is received, the size of each upgrade software package may be determined for each received upgrade software package, and further, based on the size of each upgrade software package, a time period required for upgrading the corresponding to-be-upgraded shipborne device by using each upgrade software package may be determined. Optionally, the determining of the size of each upgrade software package may be reading a configuration file of the upgrade software package, and determining the size of each upgrade software package based on the configuration file. The configuration file of the upgrade software package may be one or more. When a configuration file exists, the configuration information in the configuration file may include the size of each upgrade software package. When the number of upgrade software packages is the same as the number of configuration files, the size of the corresponding upgrade software package may be included in the configuration information in each configuration file.
As another optional implementation manner of the embodiment of the present invention, if an upgrade software package of the to-be-upgraded shipborne device is received, the device type of the to-be-upgraded shipborne device corresponding to each upgrade software package may be determined. And then, based on the equipment type, determining the upgrading time occupied by upgrading the shipborne equipment to be upgraded of the equipment type by adopting the upgrading software package. The equipment type may be determined based on functions of the ship-borne equipment, such as the type of the weight calculation function and the type of the weight control function.
Taking a central processing Unit (MPU) and a Microprocessor Unit (MCU) included in a security terminal on a ship as onboard equipment, functions of the MPU include communication with a target cloud server, receiving a video signal acquired by a monitoring camera on the ship, processing the video signal, and the like, that is, the type of the MPU may be a type of a side-weight operation function. The functions of the MCU include power management, data acquisition based on a CAN communication protocol, data acquisition based on a 485 communication interface, and data acquisition based on an Inertial Measurement Unit (IMU), i.e., the type of the MCU is a type of the side control function.
As another optional implementation manner of the embodiment of the present invention, if an upgrade software package of the onboard device to be upgraded is received, a software upgrade type of the upgrade software package may be acquired. And further, the upgrading time of the upgrading software package can be determined according to the software upgrading type. The software upgrading type comprises a full upgrading type and an incremental upgrading type. The full upgrade type may be understood as a type in which the entire low-version software of the on-board device to be upgraded is upgraded. The incremental upgrade type may be understood as a type in which a part of a program that needs to be updated is updated on the basis of a low-version software of the on-board device to be upgraded. Optionally, the incremental upgrade type may be a patch package upgrade type.
Optionally, the upgrade software package of the shipborne device to be upgraded may be received in the following manner:
and receiving a software upgrading package of at least one shipborne device to be upgraded, which is sent by the target cloud server.
The target cloud server can be understood as a cloud server for storing a software upgrading package of the shipborne device to be upgraded.
Specifically, wireless communication between the shipborne device and the target cloud server is established. After the wireless communication is established, the upgrading software collection package remotely issued by the target cloud server can be received. The upgrading software set package comprises at least one software upgrading package of the shipborne equipment to be upgraded. After receiving the upgrade software collection package, the upgrade software collection package can be analyzed, so that the software upgrade package of at least one ship-borne device to be upgraded can be obtained.
And S120, if the ship stays, determining the stay time of the ship, and determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time.
In particular, if the vessel is stopped, the length of the stop of the vessel may be determined. And then the ship stay time length and the upgrading time length can be compared. Thereby obtaining a comparison result. If the comparison result shows that the upgrading time does not exceed the stay time, the upgrading time of the shipborne equipment to be upgraded can be determined within the stay time. The upgrading time of the shipborne equipment to be upgraded can be determined during the stay time, the upgrading waitable time of the shipborne equipment to be upgraded can be determined based on the time difference between the stay time and the upgrading time, and any time within the upgrading waitable time can be used as the upgrading time after the upgrading waitable time is determined. The upgrade waiting time can be understood as the time interval between the ship stopping time and the latest upgrade starting time of the software of the ship-mounted equipment to be upgraded.
Illustratively, the residence time is 60 minutes, and the specific residence time period is: 9:00-10:00, the upgrade time period is 20 minutes, so that the upgrade waiting time period is 40 minutes, and the upgrade waiting time period is 9: 00-9: 40, then any time (such as 9:00, 9:07, 9:20, 9:30 or 9: 40) in the 9: 00-9: 40 time period can be used as the upgrade time of the shipborne device to be upgraded.
In practical applications, the number of the shipborne devices to be upgraded is usually multiple, and the upgrading time can be determined by the following method:
for each shipborne device to be upgraded, the resource occupation amount of each shipborne device to be upgraded in the software upgrading process can be determined, and the upgrading time of each shipborne device to be upgraded can be further determined based on the resource occupation amount, the upgrading time and the staying time. The processing can avoid the phenomenon of resource competition in the process of upgrading the software of the shipborne equipment to be upgraded, thereby causing interruption or failure of software upgrading.
Optionally, the dwell time of the vessel is determined by:
and determining the stop position of the ship, and further determining the stop time according to the stop position. The stop position is used for indicating that the ship stops on the shore or stops on the way of sailing.
Specifically, if the ship is stopped, the stop position of the ship can be determined. If the ship stays on the shore, a first stay time for the stay on the shore can be determined; and if the ship stays on the way of sailing, the second stay time for staying on the way of sailing is carried out. Wherein the first dwell time period and the second dwell time period may be predefined dwell time periods according to actual conditions. It will be appreciated that in actual use of the vessel, the first dwell period will typically be greater than the second dwell period.
On the basis of the method, the navigation task of the ship can be determined. Correspondingly, the stay time length determined according to the stay position can be determined according to the stay position and the navigation task. The navigation task comprises at least one of a navigation track, total navigation time, stop time of each stop position and a task type. In the embodiment of the invention, the stay time is determined according to the stay position and the navigation task, and the stay time can be dynamically adjusted, so that the accuracy and the flexibility of determining the stay time of the ship are improved.
And S130, upgrading the software of the to-be-upgraded shipborne equipment based on the upgrading software package of the to-be-upgraded shipborne equipment at the upgrading moment.
Specifically, after the upgrading time of each shipborne device to be upgraded is determined, the software of the corresponding shipborne device to be upgraded can be upgraded at each upgrading time through the upgrading software package of each shipborne device to be upgraded.
According to the technical scheme of the embodiment of the invention, the upgrading time is determined through the stay time and the upgrading time, and the software of the shipborne equipment to be upgraded is upgraded based on the upgrading software package of the shipborne equipment to be upgraded at the upgrading time, so that on one hand, the situation that the software upgrading fails due to the fact that the upgrading time exceeds the stay time can be avoided, the reliability of the software upgrading is improved, on the other hand, the operation of the software upgrading can be executed when the stay time of the ship exceeds the time required by the software upgrading, the upgrading is not required to be carried out when the ship is parked on the shore, and the timeliness of the software upgrading is ensured.
Example two
Fig. 2 is a schematic flow chart of a software upgrading method according to a second embodiment of the present invention, where on the basis of the foregoing embodiment, optionally, a storage hard disk is disposed on the to-be-upgraded ship-mounted device, and the storage hard disk includes a preset system partition and a preset upgrading partition; step S110 specifically includes step S210, and step S130 specifically includes step S230. The technical terms that are the same as or corresponding to the above embodiments are not repeated herein. As shown in fig. 2, the method of this embodiment specifically includes:
s210, if the upgrading software package of the shipborne equipment to be upgraded is received, the upgrading software package is stored to a preset upgrading partition of a storage hard disk of the shipborne equipment to be upgraded, and upgrading time occupied by upgrading the shipborne equipment to be upgraded by adopting the upgrading software package is determined.
The shipborne equipment to be upgraded is provided with a storage hard disk, and the storage hard disk comprises a preset system partition and a preset upgrading partition. The pre-set system partition may be used to store low-version software for the on-board device to be upgraded. The preset upgrade partition may be used to store high-version software of the on-board device to be upgraded.
Specifically, if an upgrade software package of one or more to-be-upgraded onboard devices is received, a preset upgrade partition of a storage hard disk of each to-be-upgraded onboard device may be determined for each to-be-upgraded onboard device. And then storing the upgrading software package of each shipborne device to be upgraded to the corresponding preset upgrading subarea, and determining the upgrading time occupied by upgrading the shipborne device to be upgraded by adopting the upgrading software package.
In order to avoid malicious attacks on the upgrade software package during transmission, the upgrade software package is generally received as an encrypted upgrade software package. Then, after receiving the encrypted upgrade software package, the encrypted upgrade software package may be stored to the preset upgrade partition. And after the storage is finished, decrypting the encrypted upgrade software package. Alternatively, the encrypted upgrade software package may be decrypted after receipt of the encrypted upgrade software package. And after the decryption is finished, storing the decrypted upgrading software package to a preset upgrading partition. By the method, the upgrading software package is not easy to attack in the transmission process, and the problem of huge loss caused by the installation of the maliciously attacked upgrading software package is avoided.
S220, if the ship stays, determining the stay time of the ship, and determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time.
And S230, upgrading the software of the ship-borne equipment to be upgraded in the preset upgrading partition based on the upgrading software package at the upgrading moment.
Specifically, after the upgrade time is determined, the software of the ship-borne device to be upgraded can be upgraded by running the upgrade software package in the preset upgrade partition at the upgrade time. Therefore, the software of the shipborne equipment to be upgraded is upgraded from low-version software to high-version software.
On the basis, if the software of the shipborne equipment to be upgraded is upgraded, the preset upgrading partition can be used as a target system partition. The target system partition may be understood as a system partition in which the software of the onboard device to be upgraded runs after the software of the onboard device to be upgraded is upgraded, or may be understood as a new preset system partition.
On the basis, after the preset upgrading partition is taken as the target system partition, the software of the shipborne equipment to be upgraded, which is stored in the preset system partition, can be deleted, that is, the low-version software of the shipborne equipment to be upgraded, which is stored in the preset system partition, is deleted. This has the advantage that the footprint of the storage space of the storage hard disk of the on-board device to be upgraded can be reduced. After the low-version software of the shipborne device to be upgraded, which is stored in the preset system partition, is deleted, the preset system partition can be used as a target upgrading partition. The target upgrading partition can be understood as a new preset upgrading partition of the shipborne equipment to be upgraded after the software of the shipborne equipment to be upgraded is upgraded. If the software of the shipborne equipment to be upgraded needs to be upgraded again after the upgrading, the upgrading software package used by the upgrading is stored in the new preset upgrading partition.
It should be noted that the target system partition and the target upgrade partition exchange roles with each other after software of the onboard device to be upgraded is upgraded. Specifically, after software of the shipborne equipment to be upgraded is upgraded, the preset upgrading partition is used as a target system partition, and the preset system partition is used as a target upgrading partition.
It should be further noted that, after the preset upgrade partition is taken as the target system partition, the advantage of deleting the software of the to-be-upgraded onboard device stored in the preset system partition is that: if the software of the shipborne equipment to be upgraded fails to be upgraded, the software of the shipborne equipment to be upgraded, which is stored in the preset system partition, can play a role of backup, so that the situation that the equipment cannot work normally after the software is failed to be upgraded can be avoided.
In the technical scheme of the embodiment of the invention, the preset system partition is used for storing the low-version software of the shipborne equipment, and the preset upgrading partition is used for storing the high-version software of the shipborne equipment. After receiving the upgrading software package of the shipborne equipment to be upgraded, the upgrading software package can be stored to the preset upgrading partition, so that the influence of high-version software on low-version software is avoided. After the storage is finished, the software of the ship-borne equipment to be upgraded can be upgraded in the preset upgrading partition based on the upgrading software package at the upgrading moment, and the software upgrading of the ship-borne equipment independently by the preset upgrading partition is realized. Further, if the software of the shipborne device to be upgraded is upgraded, the preset upgrading partition can be used as a target system partition. After the preset upgrading partition is used as the target system partition, software of the shipborne equipment to be upgraded, which is stored in the preset system partition, can be deleted, and the preset system partition is used as the target upgrading partition, so that the roles of the preset system partition and the preset upgrading partition are exchanged.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a software upgrading apparatus according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: an upgrade duration determination module 310, an upgrade time determination module 320, and a software upgrade module 330.
The upgrading duration determining module 310 is configured to determine, if an upgrading software package of the onboard device to be upgraded is received, an upgrading duration occupied by upgrading the onboard device to be upgraded with the upgrading software package; the upgrading time determining module 320 is used for determining the stay time of the ship if the ship stays, and determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time; and the software upgrading module 330 is configured to upgrade, at an upgrading time, software of the to-be-upgraded shipborne device based on the upgrading software package of the to-be-upgraded shipborne device.
In the technical scheme of the embodiment of the invention, the upgrading time determining module 320 determines the upgrading time through the stay time and the upgrading time, and the software upgrading module 330 upgrades the software of the shipborne equipment to be upgraded based on the upgrading software package of the shipborne equipment to be upgraded at the upgrading time, so that on one hand, the situation that the software upgrading fails due to the fact that the upgrading time exceeds the stay time can be avoided, the reliability of the software upgrading is improved, on the other hand, the operation of the software upgrading can be executed when the stay time of the ship exceeds the time needed by the software upgrading, the upgrading is not needed when the ship is parked on the shore, and the timeliness of the software upgrading is ensured.
Optionally, the to-be-upgraded shipborne device is provided with a storage hard disk, and the storage hard disk comprises a preset system partition and a preset upgrade partition. The upgrading duration determining module 310 is configured to, if an upgrading software package of the to-be-upgraded shipborne device is received, store the upgrading software package to a preset upgrading partition, and determine the upgrading duration occupied by upgrading the to-be-upgraded shipborne device by using the upgrading software package; correspondingly, the software upgrading module 330 is further configured to upgrade, at the upgrading time, the software of the ship-borne device to be upgraded in the preset upgrading partition based on the upgrading software package.
Optionally, the apparatus further comprises: and the target system partition determining module is used for taking the preset upgrading partition as the target system partition if the software of the shipborne equipment to be upgraded is upgraded.
Optionally, after the preset upgrade partition is used as the target system partition, the apparatus further includes: and the target upgrading partition determining module is used for deleting the software of the shipborne equipment to be upgraded, which is stored in the preset system partition, and taking the preset system partition as the target upgrading partition.
Optionally, the upgrade time determining module 320 includes: the device comprises a staying position determining unit and a staying duration determining unit, wherein the staying position determining unit is used for determining the staying position of the ship, and the staying position is used for indicating that the ship stays in the shore or stays in the way of sailing; and the stay time length determining unit is used for determining the stay time length according to the stay position.
Optionally, the upgrade time determining module 320 further includes: the navigation task determining unit is used for determining the navigation task of the ship; correspondingly, the stay time length determining unit is used for determining the stay time length according to the stay position and the navigation task.
Optionally, the upgrade duration determining module 310 is configured to obtain a software upgrade type of the upgrade software package; and determining the upgrading time of the upgrading software package according to the software upgrading type, wherein the software upgrading type comprises a full upgrading type and an incremental upgrading type.
Optionally, the upgrade time determining module 320 is configured to compare the upgrade time length with the dwell time length, and determine the upgrade time within the dwell time length if the upgrade time length does not exceed the dwell time length.
The software upgrading device provided by the embodiment of the invention can execute the software upgrading method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the software upgrading apparatus are merely divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
FIG. 4 shows a schematic block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores computer programs executable by the at least one processor. The software upgrade method may be implemented as the computer program. The processor 11 may perform various appropriate actions and processes, such as performing the software upgrade method described in any of the above embodiments, according to a computer program stored in the Read Only Memory (ROM)12 or a computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like.
EXAMPLE five
The fifth embodiment of the invention provides a computer-readable storage medium. The computer readable storage medium stores computer instructions. The computer instructions are used for enabling the processor to implement the software upgrading method in any one of the above embodiments when executed.
Among other things, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of upgrading software, comprising:
if an upgrading software package of the shipborne equipment to be upgraded is received, determining upgrading time occupied by upgrading the shipborne equipment to be upgraded by adopting the upgrading software package;
if the ship stays, determining the stay time of the ship, and determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time;
and upgrading the software of the shipborne equipment to be upgraded based on the upgrading software package of the shipborne equipment to be upgraded at the upgrading moment.
2. The method according to claim 1, wherein the on-board equipment to be upgraded is provided with a storage hard disk, and the storage hard disk comprises a preset system partition and a preset upgrade partition; if the upgrading software package of the shipborne equipment to be upgraded is received, the upgrading software package is determined to be adopted, and the upgrading time occupied by upgrading the shipborne equipment to be upgraded is long, and the upgrading method comprises the following steps:
if an upgrading software package of the shipborne equipment to be upgraded is received, storing the upgrading software package to the preset upgrading partition, and determining the upgrading time occupied by upgrading the shipborne equipment to be upgraded by adopting the upgrading software package;
the upgrading of the software of the to-be-upgraded shipborne equipment based on the upgrading software package of the to-be-upgraded shipborne equipment at the upgrading moment comprises the following steps:
and upgrading the software of the shipborne equipment to be upgraded in the preset upgrading subarea based on the upgrading software package at the upgrading moment.
3. The method of claim 2, further comprising:
and if the software of the shipborne equipment to be upgraded is upgraded, taking the preset upgrading partition as a target system partition.
4. The method of claim 3, wherein after said targeting said pre-set upgrade partition as a target system partition, said method further comprises:
and deleting the software of the shipborne equipment to be upgraded stored in the preset system partition, and taking the preset system partition as a target upgrading partition.
5. The method of claim 1, wherein the determining the length of the dwell time of the vessel comprises:
determining a stop position of the ship, wherein the stop position is used for indicating that the ship stops on the shore or stops on the way of sailing;
and determining the stay time according to the stay position.
6. The method of claim 5, wherein the determining the length of the dwell time of the vessel further comprises:
determining a sailing task of the ship;
the determining the dwell time period according to the dwell position includes:
and determining the stay time according to the stay position and the navigation task.
7. The method according to claim 1, wherein the determining an upgrade duration taken for upgrading the onboard device to be upgraded by using the upgrade software package comprises:
acquiring the software upgrading type of the upgrading software package; determining the upgrading time of the upgrading software package according to the software upgrading type, wherein the software upgrading type comprises a full upgrading type and an incremental upgrading type; and/or
The step of determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time comprises the following steps:
and comparing the upgrading time with the staying time, and if the upgrading time does not exceed the staying time, determining the upgrading time within the staying time.
8. A software upgrading apparatus, comprising:
the upgrading time length determining module is used for determining the upgrading time length occupied by adopting the upgrading software package to upgrade the shipborne equipment to be upgraded if the upgrading software package of the shipborne equipment to be upgraded is received;
the upgrading time determining module is used for determining the stay time of the ship if the ship stays, and determining the upgrading time of the shipborne equipment to be upgraded according to the stay time and the upgrading time;
and the software upgrading module is used for upgrading the software of the shipborne equipment to be upgraded based on the upgrading software package of the shipborne equipment to be upgraded at the upgrading moment.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the software upgrade method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the software upgrade method of any one of claims 1-7 when executed.
CN202210556884.3A 2022-05-20 2022-05-20 Software upgrading method and device, electronic equipment and computer readable storage medium Pending CN114840238A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210556884.3A CN114840238A (en) 2022-05-20 2022-05-20 Software upgrading method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210556884.3A CN114840238A (en) 2022-05-20 2022-05-20 Software upgrading method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114840238A true CN114840238A (en) 2022-08-02

Family

ID=82572364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210556884.3A Pending CN114840238A (en) 2022-05-20 2022-05-20 Software upgrading method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114840238A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117240645A (en) * 2023-11-15 2023-12-15 广州斯沃德科技有限公司 OTA upgrading method and device of intelligent home system, electronic equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117240645A (en) * 2023-11-15 2023-12-15 广州斯沃德科技有限公司 OTA upgrading method and device of intelligent home system, electronic equipment and medium
CN117240645B (en) * 2023-11-15 2024-02-09 广州斯沃德科技有限公司 OTA upgrading method and device of intelligent home system, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN109213600B (en) GPU resource scheduling method and device based on AI cloud
CN108566290B (en) Service configuration management method, system, storage medium and server
CN109800160B (en) Cluster server fault testing method and related device in machine learning system
CN112650576B (en) Resource scheduling method, device, equipment, storage medium and computer program product
CN111045933B (en) Regression strategy updating method and device, storage medium and terminal equipment
CN110750592B (en) Data synchronization method, device and terminal equipment
CN111736872A (en) Gray scale release upgrading method and device, computer system and readable storage medium
CN110290166B (en) Cross-cluster data interaction method, system and device and readable storage medium
CN106170763A (en) A kind of software check method and apparatus
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
CN110647318A (en) Method, device, equipment and medium for creating instance of stateful application
CN111585805B (en) Smooth release upgrading method and device, computer system and readable storage medium
CN114840238A (en) Software upgrading method and device, electronic equipment and computer readable storage medium
CN111651286A (en) Data communication method, device, computing equipment and storage medium
CN111338688A (en) Long-acting data caching method and device, computer system and readable storage medium
CN110069217A (en) A kind of date storage method and device
CN107766146B (en) Method for resource reconfiguration and corresponding device
CN116302328A (en) Intelligent contract data processing method and system
CN105338058A (en) Application updating method and device
CN109257256A (en) Apparatus monitoring method, device, computer equipment and storage medium
CN115277398A (en) Cluster network configuration method and device
CN114756527A (en) Method and device for expanding Redis cluster, electronic equipment and storage medium
CN109614242B (en) Computing capacity sharing method, device, equipment and medium
CN114064403A (en) Task delay analysis processing method and device
CN111026571B (en) Processor down-conversion processing method and device and electronic equipment

Legal Events

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