CN116880878A - Upgrading method, device, equipment and storage medium - Google Patents

Upgrading method, device, equipment and storage medium Download PDF

Info

Publication number
CN116880878A
CN116880878A CN202310886067.9A CN202310886067A CN116880878A CN 116880878 A CN116880878 A CN 116880878A CN 202310886067 A CN202310886067 A CN 202310886067A CN 116880878 A CN116880878 A CN 116880878A
Authority
CN
China
Prior art keywords
upgraded
target
equipment
data segment
upgrading
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
CN202310886067.9A
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.)
Shanghai Chint Intelligent Technology Co Ltd
Original Assignee
Shanghai Chint Intelligent 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 Shanghai Chint Intelligent Technology Co Ltd filed Critical Shanghai Chint Intelligent Technology Co Ltd
Priority to CN202310886067.9A priority Critical patent/CN116880878A/en
Publication of CN116880878A publication Critical patent/CN116880878A/en
Pending legal-status Critical Current

Links

Classifications

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

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an upgrading method, device, equipment and storage medium. The method is executed by an upper computer and comprises the following steps: acquiring an initial data segment and a target upgrading file corresponding to equipment to be upgraded; scanning a target upgrading file to obtain a target data segment, wherein the target data segment is defined at a preset position of the target upgrading file; if the target data segment is successfully matched with the initial data segment, the target upgrading file is sent to the equipment to be upgraded, so that the equipment to be upgraded is upgraded according to the target upgrading file.

Description

Upgrading method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an upgrading method, device, equipment and storage medium.
Background
At present, all the equipment in the industry has the function of program upgrading, and the use of the equipment is greatly facilitated. However, in the actual upgrading process, problems still occur, for example, an unmatched upgrading packet is upgraded for equipment to be upgraded, so that the equipment to be upgraded runs incorrectly; or, different applicable environments of the same equipment generate a plurality of program types, which are difficult to distinguish, the equipment to be upgraded cannot be accurately upgraded, and even malicious upgrading behaviors exist.
Therefore, although the current upgrade function has been generally applied, the device to be upgraded cannot work normally or cannot achieve the expected effect due to the upgrade authority problem and the problem occurring in the upgrade process.
Disclosure of Invention
The invention provides an upgrading method, an upgrading device, equipment and a storage medium, which can avoid upgrading files of other equipment to be upgraded, thereby improving the upgrading reliability.
In one aspect of the present invention, an upgrade method is provided, which is executed by an upper computer, and includes:
acquiring an initial data segment and a target upgrading file corresponding to equipment to be upgraded;
scanning a target upgrading file to obtain a target data segment, wherein the target data segment is defined at a preset position of the target upgrading file;
and if the target data segment is successfully matched with the initial data segment, sending a target upgrading file to the equipment to be upgraded, so that the equipment to be upgraded is upgraded according to the target upgrading file.
In one aspect of the present invention, there is provided an upgrade method, performed by a device to be upgraded, including:
receiving an upgrade signal sent by a server and a target upgrade file sent by an upper computer;
if the initial data segment in the equipment to be upgraded is successfully matched with the target data segment corresponding to the target upgrading file, upgrading is carried out according to the upgrading signal and the target upgrading file.
In one aspect of the present invention, there is provided an upgrade method, which is performed by a server, including:
acquiring configuration information of equipment to be upgraded, storing the configuration information of the equipment to be upgraded into a database, and generating an initial data segment corresponding to the equipment to be upgraded;
and sending the initial data segment corresponding to the equipment to be upgraded to the upper computer so that the upper computer can upgrade according to the initial data segment corresponding to the equipment to be upgraded and the target upgrade file.
In another aspect of the present invention, there is provided an upgrade apparatus including:
the acquisition module is used for acquiring an initial data segment and a target upgrading file corresponding to equipment to be upgraded;
the obtaining module is used for scanning the target upgrading file to obtain a target data segment, wherein the target data segment is defined at a preset position of the target upgrading file;
and the first matching module is used for sending a target upgrading file to equipment to be upgraded if the target data segment is successfully matched with the initial data segment, so that the equipment to be upgraded is upgraded according to the target upgrading file.
In another aspect of the present invention, there is provided an upgrade apparatus including:
the receiving module is used for receiving the upgrade signal sent by the server and the target upgrade file sent by the upper computer;
and the second matching module is used for carrying out upgrading according to the upgrading signal and the target upgrading file if the initial data segment in the equipment to be upgraded is successfully matched with the target data segment corresponding to the target upgrading file.
In another aspect of the present invention, there is provided an upgrade apparatus including:
the generating module is used for acquiring the configuration information of the equipment to be upgraded, storing the configuration information of the equipment to be upgraded into a database and generating an initial data segment corresponding to the equipment to be upgraded;
the first sending module is used for sending the initial data segment corresponding to the equipment to be upgraded to the upper computer so that the upper computer can upgrade according to the initial data segment corresponding to the equipment to be upgraded and the target upgrade file.
In 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 memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the upgrade method of any one of the embodiments of the present invention.
In another aspect of the present invention, a computer readable storage medium is provided, where the computer readable storage medium stores computer instructions for implementing the upgrade method according to any embodiment of the present invention when executed by a processor.
The method comprises the steps of obtaining an initial data segment and a target upgrading file corresponding to equipment to be upgraded; scanning a target upgrading file to obtain a target data segment, wherein the target data segment is defined at a preset position of the target upgrading file; if the target data segment is successfully matched with the initial data segment, a target upgrading file is sent to the equipment to be upgraded, so that the equipment to be upgraded is upgraded according to the target upgrading file, the problem that the equipment to be upgraded cannot work normally or cannot achieve the expected effect due to the problem of upgrading authority and the problem in the upgrading process is solved, upgrading files of other equipment to be upgraded can be avoided, and further upgrading reliability is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an upgrade method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of an upgrade method in a second embodiment of the present invention;
FIG. 3 is a flow chart of an upgrade method in a third embodiment of the present invention;
FIG. 4 is a diagram of a bin file data map according to a third embodiment of the present invention;
FIG. 5 is a flow chart of another upgrade method in a third embodiment of the present invention;
FIG. 6 is a schematic diagram of an upgrade apparatus according to a fourth embodiment of the present invention;
FIG. 7 is a schematic diagram of an upgrade apparatus according to a fifth embodiment of the present invention;
FIG. 8 is a schematic diagram of an upgrade apparatus according to a sixth embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device in a seventh embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
Example 1
Fig. 1 is a flowchart of an upgrade method in the first embodiment of the present invention, where the present embodiment is applicable to a case of upgrading a device, the method may be performed by an upgrade apparatus in the fourth embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner, as shown in fig. 1, and the method is performed by an upper computer, and specifically includes the following steps:
s110, obtaining an initial data segment and a target upgrading file corresponding to equipment to be upgraded.
The upper computer is a computer capable of directly sending out control commands. The device to be upgraded is the device to be upgraded, the initial data segment is the identification information corresponding to the device to be upgraded, and the initial data segment can be an N-byte data segment, and it is to be noted that different devices to be upgraded and running programs all have unique initial data segments. The target upgrade file is an upgrade file obtained after the program stored in the device to be upgraded or the running program is improved, and the target upgrade file can be a target bin file.
Specifically, the method for obtaining the initial data segment and the target upgrade file corresponding to the device to be upgraded may be: the method comprises the steps that an initial data segment corresponding to equipment to be upgraded can be sent to an upper computer through a server, a data table associated with the initial data segment of the equipment to be upgraded can be obtained in advance, the initial data segment corresponding to the equipment to be upgraded is obtained after the data table is queried, and the initial data segment corresponding to the equipment to be upgraded can be obtained by reading the equipment to be upgraded through the upper computer; the target upgrade file is imported into the host computer, and the importing mode is not limited.
S120, scanning the target upgrade file to obtain a target data segment, wherein the target data segment is defined at a preset position of the target upgrade file.
The target data segment is a data segment included in a target upgrade file obtained after the target upgrade file is scanned, and the preset position is a position preset for the data segment during the writing stage of the target upgrade file, for example, the preset position may be a preset address in the target upgrade file, such as 0x08004000. It should be noted that, when writing the target upgrade file, the data segment at the preset position may be obtained by querying the database of the server.
Specifically, the method for scanning the target upgrade file to obtain the target data segment may be: and the upper computer scans the imported target upgrade file byte by byte to obtain a target data segment.
And S130, if the target data segment is successfully matched with the initial data segment, sending a target upgrading file to the equipment to be upgraded, so that the equipment to be upgraded is upgraded according to the target upgrading file.
Specifically, if the target data segment is successfully matched with the initial data segment, the target upgrade file is sent to the device to be upgraded, so that the method for upgrading the device to be upgraded according to the target upgrade file can be as follows: and comparing the scanned target data segment with the initial data segment, if the target data segment is identical to the initial data segment, indicating that the target data segment is successfully matched with the initial data segment, and if the target upgrade file is matched with the equipment to be upgraded, allowing the equipment to be upgraded to upgrade, sending the target upgrade file to the equipment to be upgraded, so that the equipment to be upgraded is upgraded according to the target upgrade file.
Optionally, acquiring an initial data segment corresponding to the device to be upgraded includes:
and reading the initial data segment corresponding to the equipment to be upgraded from the equipment to be upgraded through the target protocol.
Wherein the target protocol is a communication protocol, for example, the target protocol may be a Modbus protocol.
Specifically, the method for reading the initial data segment corresponding to the device to be upgraded from the device to be upgraded through the target protocol may be: the upper computer can read the equipment to be upgraded through the target protocol to obtain an initial data segment corresponding to the equipment to be upgraded.
The initial data segment corresponding to the equipment to be upgraded is read from the equipment to be upgraded through the target protocol, so that the operation provided by people can be reduced, and the efficiency of matching the target data segment with the initial data segment is improved.
Optionally, the method further comprises:
and if the target data segment is not successfully matched with the initial data segment, carrying out error information prompt.
The error information prompt is information for prompting that the equipment to be upgraded cannot be matched with the current target upgrade file.
Specifically, if the target data segment and the initial data segment are not successfully matched, the error information prompting manner may be: if the target data segment is different from the initial data segment by at least one byte, the target data segment is not successfully matched with the initial data segment, the target upgrading file is not matched with the equipment to be upgraded, the target upgrading file is not allowed to be sent to the equipment to be upgraded, and error information prompt is carried out.
If the target data segment is not successfully matched with the initial data segment, the error information prompt is carried out, so that prompt can be carried out in time, and the situation of upgrading errors caused by mismatching of the target upgrading file and equipment to be upgraded is avoided.
According to the technical scheme, an initial data segment and a target upgrading file corresponding to equipment to be upgraded are obtained; scanning a target upgrading file to obtain a target data segment, wherein the target data segment is defined at a preset position of the target upgrading file; if the target data segment is successfully matched with the initial data segment, a target upgrading file is sent to the equipment to be upgraded, so that the equipment to be upgraded is upgraded according to the target upgrading file, the problem that the equipment to be upgraded cannot work normally or cannot achieve the expected effect due to the problem of upgrading authority and the problem in the upgrading process is solved, upgrading files of other equipment to be upgraded can be avoided, and further upgrading reliability is improved.
Example two
Fig. 2 is a flowchart of an upgrade method in the second embodiment of the present invention, where the present embodiment is applicable to a case of upgrading a device, the method may be performed by an upgrade apparatus in the fifth embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner, as shown in fig. 2, and the method is performed by a device to be upgraded, and specifically includes the following steps:
s210, receiving an upgrade signal sent by the server and a target upgrade file sent by the upper computer.
Specifically, the manner of receiving the upgrade signal sent by the server and the target upgrade file sent by the upper computer may be: if the equipment to be upgraded needs to be upgraded, the server sends an upgrade signal to the equipment to be upgraded, and the equipment to be upgraded receives and stores the upgrade signal; after the upper computer of the equipment to be upgraded is successfully matched, the upper computer sends a target upgrading file to the equipment to be upgraded, and the equipment to be upgraded receives the target upgrading file sent by the upper computer.
S220, if the initial data segment in the equipment to be upgraded is successfully matched with the target data segment corresponding to the target upgrading file, upgrading is carried out according to the upgrading signal and the target upgrading file.
Specifically, if the initial data segment in the device to be upgraded is successfully matched with the target data segment corresponding to the target upgrade file, the upgrade mode according to the upgrade signal and the target upgrade file is as follows: the equipment to be upgraded scans the running program of the equipment to be upgraded byte by byte to obtain an initial data segment, scans a target upgrading file byte by byte to obtain a target data segment, matches the initial data segment with the target data segment again, and upgrades the equipment to be upgraded according to the upgrading signal and the target upgrading file if the matching is successful; if the initial data segment in the device to be upgraded is successfully matched with the target data segment corresponding to the target upgrade file, the upgrade mode according to the upgrade signal and the target upgrade file may also be: and acquiring a preset position corresponding to the initial data segment, directly acquiring the initial data segment and the target data segment from a running program and a target upgrading file of the equipment to be upgraded through the preset position corresponding to the initial data segment, and matching the initial data segment and the target data segment again, wherein if the matching is successful, the equipment to be upgraded is upgraded according to the upgrading signal and the target upgrading file.
Optionally, the method further comprises:
and if the equipment to be upgraded is upgraded and is in the upgrading mode, sending an upgrading success signal to the server.
The upgrade mode may be a mode when an upgrade signal of the device to be upgraded is in an on state. The upgrade success signal is a signal sent to the server after the equipment to be upgraded is upgraded.
Specifically, if the device to be upgraded is upgraded and is in the upgrade mode, the manner of sending the upgrade success signal to the server may be: if the equipment to be upgraded is upgraded after being successfully matched and the equipment to be upgraded is already upgraded, an upgrade success signal is sent to the server.
If the equipment to be upgraded is upgraded and is in the upgrading mode, an upgrading success signal is sent to the server, and an upgrading result can be fed back to the server in time.
According to the technical scheme, an upgrade signal sent by a server and a target upgrade file sent by an upper computer are received; if the initial data segment in the equipment to be upgraded is successfully matched with the target data segment corresponding to the target upgrading file, the equipment to be upgraded is upgraded according to the upgrading signal and the target upgrading file, so that the problem that the equipment to be upgraded cannot work normally or cannot achieve the expected effect due to the problem of upgrading authority and the problem in the upgrading process is solved, the upgrading files of other equipment can be prevented from being upgraded to the equipment to be upgraded, and the matching is carried out again on the equipment to be upgraded, the matching accuracy of the target upgrading file and the equipment to be upgraded is ensured, and the upgrading reliability is further improved.
Example III
Fig. 3 is a flowchart of an upgrade method in the third embodiment of the present invention, where the present embodiment is applicable to a case of upgrading a device, the method may be performed by an upgrade apparatus in the sixth embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner, as shown in fig. 3, and the method is performed by a server, and specifically includes the following steps:
s310, acquiring configuration information of equipment to be upgraded, storing the configuration information of the equipment to be upgraded into a database, and generating an initial data segment corresponding to the equipment to be upgraded.
The configuration information of the device to be upgraded may include information such as a model number, a name of an operating program, a serial number of the operating program, a name of a circuit board, and a serial number of the circuit board.
Specifically, the method for obtaining the configuration information of the device to be upgraded and storing the configuration information of the device to be upgraded in the database, and generating the initial data segment corresponding to the device to be upgraded may be: the server can obtain the configuration information such as the type of the equipment to be upgraded, the name of the running program, the number of the running program, the name of the circuit board, the number of the circuit board and the like, store the configuration information of the equipment to be upgraded into the database, generate an initial data segment corresponding to the equipment to be upgraded in the database, and generate an initial data segment corresponding to the equipment to be upgraded in the database without limitation. It should be noted that, the different devices to be upgraded and the running program have their only initial data segments.
For example, the initial data segment may be set to be an N-byte data segment, and the N-byte data segment is defined at a preset position when an operating program of the device to be upgraded is written, where the process needs to be completed in an initial stage of a development stage, and takes 16 bytes as an example: const uint8_t Nbyte [16] _attribute ] ((at (0 x 08004000))) = {0x0F,0x F2,0x55,0x F7,0x C0,0x54,0x4F,0x06,0x9C,0xDE,0x74,0xFF,0xB5,0xE9,0xFD,0x8E }, wherein the preset position is 0x08004000, the initial data segment is 16 bytes, and the running program containing the initial data segment is burnt to the equipment to be upgraded according to the normal flow for running of the equipment to be upgraded, so that the upper computer and the equipment to be upgraded acquire the initial data segment corresponding to the equipment to be upgraded. It should be noted that, after defining the initial data segment at the preset position of the running program in the initial stage of the development stage, the initial data segment after compiling the program is included in the final bin file program, and fig. 4 is a schematic diagram of a bin file data diagram in the third embodiment of the present invention, as shown in fig. 4, and the 16-byte initial data segment is included in the final bin file program.
S320, the initial data segment corresponding to the equipment to be upgraded is sent to the upper computer, so that the upper computer is upgraded according to the initial data segment corresponding to the equipment to be upgraded and the target upgrade file.
Specifically, the method for sending the initial data segment corresponding to the device to be upgraded to the upper computer so that the upper computer can upgrade according to the initial data segment corresponding to the device to be upgraded and the target upgrade file may be as follows: when the upper computer needs to match the target data segment with the initial data segment, the upper computer can initiate an application request to the server, the server inquires the initial data segment corresponding to the equipment to be upgraded from the database, and the initial data segment corresponding to the equipment to be upgraded of the initial data segment corresponding to the equipment to be upgraded, so that the upper computer upgrades according to the initial data segment corresponding to the equipment to be upgraded and the target upgrade file.
Optionally, the method further comprises:
acquiring a face image of a target object;
and if the target object is determined to have the upgrading authority according to the face image of the target object, sending an upgrading signal to equipment to be upgraded.
Wherein the target object may be an upgrade staff. The facial image may be a face recognition image of the target object. The upgrading authority is the authority that the target object has the function of upgrading the equipment to be upgraded.
Specifically, the manner of acquiring the face image of the target object may be: the target object can scan the two-dimensional code corresponding to the equipment to be upgraded through the mobile phone, the face image is uploaded to the server after being scanned, and the server acquires the face image of the target object.
Specifically, if it is determined that the target object has the upgrade authority according to the face image of the target object, the manner of sending the upgrade signal to the device to be upgraded may be: if the target object is determined to have the upgrading authority according to the face image, the target object is determined to be capable of upgrading the equipment to be upgraded, and the server sends an upgrading signal to the equipment to be upgraded.
By acquiring the face image of the target object, if the target object is determined to have upgrading authority according to the face image of the target object, the upgrading function of the equipment to be upgraded is opened, an upgrading signal is sent to the equipment to be upgraded, the upgrading safety of the equipment to be upgraded can be improved, and further the upgrading reliability is improved.
Optionally, the method further comprises:
if the upgrade success signal sent by the equipment to be upgraded is received, the upgrade function of the equipment to be upgraded is closed.
Specifically, if an upgrade success signal sent by the device to be upgraded is received, a manner of closing an upgrade service of the device to be upgraded may be: if the server receives the upgrade success signal sent by the equipment to be upgraded, the upgrade function of the equipment to be upgraded is immediately closed, or after the upgrade success signal sent by the equipment to be upgraded is received, the upgrade function of the equipment to be upgraded is automatically closed by the server or the equipment to be upgraded after the preset time.
If an upgrade success signal sent by the equipment to be upgraded is received, the upgrade function of the equipment to be upgraded is closed, management of the equipment to be upgraded can be facilitated, and upgrade safety and reliability are improved.
In a specific example, fig. 5 is a flowchart of another upgrading method in the third embodiment of the present invention, where, as shown in fig. 5, a server stores configuration information of a device to be upgraded into a database, obtains N byte data segments corresponding to the device to be upgraded, embeds the N byte data segments into a program, and burns the N byte data segments to the device to be upgraded; the server scans a two-dimensional code corresponding to the equipment to be upgraded through the target object to upload a face image, if the face image is successfully identified, the target object is indicated to have upgrading authority, an upgrading function of the equipment to be upgraded is started, an upgrading signal is sent to the equipment to be upgraded, the equipment to be upgraded stores the upgrading signal, a target upgrading file is imported into the upper computer, the upper computer scans the target upgrading file to obtain a target data segment, the upper computer reads the N-byte data segment from the equipment to be upgraded through a target protocol, the upper computer is matched with the target data segment and the N-byte data segment, and if the matching is unsuccessful, the upper computer is not allowed to be upgraded and carries out error information prompt; if the matching is successful, the upper computer sends a target upgrading file to the equipment to be upgraded, the equipment to be upgraded matches a target data segment and an N-byte data segment in the target upgrading file, after the matching is successful, the equipment to be upgraded upgrades according to the target upgrading file and an upgrading signal, if the upgrading is successful, the equipment to be upgraded sends an upgrading success signal to the server, and the server can directly close an upgrading function; if the upgrading is unsuccessful, the server does not have any operation in the preset time, and the upgrading function is closed, or the facial image of the target object is acquired again to close the upgrading function.
According to the technical scheme, the configuration information of the equipment to be upgraded is obtained, and is stored in a database to generate an initial data segment corresponding to the equipment to be upgraded; the initial data segment corresponding to the equipment to be upgraded is sent to the upper computer, so that the upper computer is upgraded according to the initial data segment corresponding to the equipment to be upgraded and the target upgrading file, the problem that the equipment to be upgraded cannot work normally or cannot achieve the expected effect due to the problem of upgrading authority and the problem in the upgrading process is solved, the upgrading file of other equipment can be prevented from being upgraded to the equipment to be upgraded, and the upgrading reliability is improved.
Example IV
Fig. 6 is a schematic structural diagram of an upgrade apparatus according to a fourth embodiment of the present invention. The embodiment may be applicable to a case of upgrading a device, where the apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in any device that provides an upgraded function, as shown in fig. 6, where the upgrading apparatus specifically includes: an acquisition module 410, an acquisition module 420, and a first matching module 430.
The acquiring module 410 is configured to acquire an initial data segment and a target upgrade file corresponding to a device to be upgraded;
an obtaining module 420, configured to scan the target upgrade file to obtain a target data segment, where the target data segment is defined at a preset position of the target upgrade file;
the first matching module 430 is configured to send a target upgrade file to the device to be upgraded if the target data segment is successfully matched with the initial data segment, so that the device to be upgraded is upgraded according to the target upgrade file.
Optionally, the acquiring module is specifically configured to:
and reading the initial data segment corresponding to the equipment to be upgraded from the equipment to be upgraded through the target protocol.
Optionally, the method further comprises:
and the prompting module is used for prompting error information if the target data segment is not successfully matched with the initial data segment.
The product can execute the method provided by the first embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 7 is a schematic structural diagram of an upgrade apparatus according to a fifth embodiment of the present invention. The embodiment may be applicable to a case of upgrading a device, where the device may be implemented in software and/or hardware, and the device may be integrated in any device that provides an upgraded function, as shown in fig. 7, where the upgrading device specifically includes: a receiving module 510 and a second matching module 520.
The receiving module 510 is configured to receive an upgrade signal sent by the server and a target upgrade file sent by the upper computer;
the second matching module 520 is configured to perform an upgrade according to the upgrade signal and the target upgrade file if the initial data segment in the device to be upgraded and the target data segment corresponding to the target upgrade file are successfully matched.
Optionally, the method further comprises:
and the second sending module is used for sending an upgrade success signal to the server if the equipment to be upgraded is upgraded and is in an upgrade mode.
The product can execute the method provided by the second embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example six
Fig. 8 is a schematic structural diagram of an upgrade apparatus according to a sixth embodiment of the present invention. The embodiment may be applicable to a case of upgrading a device, where the device may be implemented in software and/or hardware, and the device may be integrated in any device that provides an upgraded function, as shown in fig. 8, where the upgrading device specifically includes: a generation module 610 and a first transmission module 620.
The generating module 610 is configured to obtain configuration information of a device to be upgraded, store the configuration information of the device to be upgraded in a database, and generate an initial data segment corresponding to the device to be upgraded;
the first sending module 620 is configured to send an initial data segment corresponding to the device to be upgraded to the upper computer, so that the upper computer upgrades according to the initial data segment corresponding to the device to be upgraded and the target upgrade file.
Optionally, the method further comprises:
an image acquisition module for acquiring a face image of a target object;
and the third sending module is used for sending an upgrade signal to equipment to be upgraded if the target object is determined to have upgrade permission according to the face image of the target object.
The product can execute the method provided by the third embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example seven
Fig. 9 is a schematic structural diagram of an electronic device in a seventh embodiment of the present 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. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 9, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM12 and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various 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, etc.; 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, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the upgrade method.
In some embodiments, the upgrade method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. When the computer program is loaded into RAM13 and executed by processor 11, one or more steps of the upgrade method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the upgrade method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, 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. The 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (12)

1. An upgrade method, which is executed by an upper computer, includes:
acquiring an initial data segment and a target upgrading file corresponding to equipment to be upgraded;
scanning a target upgrading file to obtain a target data segment, wherein the target data segment is defined at a preset position of the target upgrading file;
and if the target data segment is successfully matched with the initial data segment, sending a target upgrading file to the equipment to be upgraded, so that the equipment to be upgraded is upgraded according to the target upgrading file.
2. The method for upgrading according to claim 1, wherein obtaining an initial data segment corresponding to the device to be upgraded includes:
and reading the initial data segment corresponding to the equipment to be upgraded from the equipment to be upgraded through the target protocol.
3. The upgrade method of claim 1, further comprising:
and if the target data segment is not successfully matched with the initial data segment, carrying out error information prompt.
4. An upgrade method, performed by a device to be upgraded, comprising:
receiving an upgrade signal sent by a server and a target upgrade file sent by an upper computer;
if the initial data segment in the equipment to be upgraded is successfully matched with the target data segment corresponding to the target upgrading file, upgrading is carried out according to the upgrading signal and the target upgrading file.
5. The upgrade method of claim 4, further comprising:
and if the equipment to be upgraded is upgraded and is in the upgrading mode, sending an upgrading success signal to the server.
6. An upgrade method, performed by a server, comprising:
acquiring configuration information of equipment to be upgraded, storing the configuration information of the equipment to be upgraded into a database, and generating an initial data segment corresponding to the equipment to be upgraded;
and sending the initial data segment corresponding to the equipment to be upgraded to the upper computer so that the upper computer can upgrade according to the initial data segment corresponding to the equipment to be upgraded and the target upgrade file.
7. The upgrade method of claim 6, further comprising:
acquiring a face image of a target object;
and if the target object is determined to have the upgrading authority according to the face image of the target object, sending an upgrading signal to equipment to be upgraded.
8. An upgrade apparatus, comprising:
the acquisition module is used for acquiring an initial data segment and a target upgrading file corresponding to equipment to be upgraded;
the obtaining module is used for scanning the target upgrading file to obtain a target data segment, wherein the target data segment is defined at a preset position of the target upgrading file;
and the first matching module is used for sending a target upgrading file to equipment to be upgraded if the target data segment is successfully matched with the initial data segment, so that the equipment to be upgraded is upgraded according to the target upgrading file.
9. An upgrade apparatus, comprising:
the receiving module is used for receiving the upgrade signal sent by the server and the target upgrade file sent by the upper computer;
and the second matching module is used for carrying out upgrading according to the upgrading signal and the target upgrading file if the initial data segment in the equipment to be upgraded is successfully matched with the target data segment corresponding to the target upgrading file.
10. An upgrade apparatus, comprising:
the generating module is used for acquiring the configuration information of the equipment to be upgraded, storing the configuration information of the equipment to be upgraded into a database and generating an initial data segment corresponding to the equipment to be upgraded;
the first sending module is used for sending the initial data segment corresponding to the equipment to be upgraded to the upper computer so that the upper computer can upgrade according to the initial data segment corresponding to the equipment to be upgraded and the target upgrade file.
11. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the upgrade method of any one of claims 1-7.
12. A computer readable storage medium storing computer instructions for causing a processor to perform the upgrade method of any one of claims 1-7 when executed.
CN202310886067.9A 2023-07-18 2023-07-18 Upgrading method, device, equipment and storage medium Pending CN116880878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310886067.9A CN116880878A (en) 2023-07-18 2023-07-18 Upgrading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310886067.9A CN116880878A (en) 2023-07-18 2023-07-18 Upgrading method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116880878A true CN116880878A (en) 2023-10-13

Family

ID=88271155

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310886067.9A Pending CN116880878A (en) 2023-07-18 2023-07-18 Upgrading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116880878A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018006677A1 (en) * 2016-07-06 2018-01-11 中兴通讯股份有限公司 Smart upgrade method, server, terminal and system
CN109309592A (en) * 2018-11-14 2019-02-05 无锡信捷电气股份有限公司 The method and apparatus of remote upgrade PLC firmware
CN111279310A (en) * 2017-10-24 2020-06-12 华为国际有限公司 Vehicle-mounted equipment upgrading method and related equipment
CN114296751A (en) * 2021-11-17 2022-04-08 三维通信股份有限公司 Program upgrading method, device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018006677A1 (en) * 2016-07-06 2018-01-11 中兴通讯股份有限公司 Smart upgrade method, server, terminal and system
CN111279310A (en) * 2017-10-24 2020-06-12 华为国际有限公司 Vehicle-mounted equipment upgrading method and related equipment
CN109309592A (en) * 2018-11-14 2019-02-05 无锡信捷电气股份有限公司 The method and apparatus of remote upgrade PLC firmware
CN114296751A (en) * 2021-11-17 2022-04-08 三维通信股份有限公司 Program upgrading method, device and storage medium

Similar Documents

Publication Publication Date Title
CN109905293A (en) A kind of terminal device recognition methods, system and storage medium
CN113766487B (en) Cloud mobile phone information acquisition method, device, equipment and medium
CN112434278A (en) Bare computer authentication method, apparatus, device and medium
CN116301997A (en) Upgrading method, device, equipment and medium of controller
CN116880878A (en) Upgrading method, device, equipment and storage medium
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN114218166A (en) Data processing method and device, electronic equipment and readable storage medium
CN116363260B (en) Image generation method and device and electronic equipment
CN116962539B (en) Data packet generation method, device, equipment and storage medium
CN114579520B (en) Mirror image data processing method, mirror image data loading method and device
CN115270672A (en) Verification method, device, equipment and storage medium of TCAM (ternary content addressable memory) encapsulation module
CN110009370B (en) Information processing method, information processing device, electronic equipment and readable storage medium
CN116506165A (en) Cloud mobile phone identification method and device, electronic equipment and readable storage medium
CN117762462A (en) Code examination method, device, equipment and storage medium based on large model
CN115481090A (en) File processing method and device, electronic equipment and storage medium
CN115455437A (en) Code unauthorized detection method and device, electronic equipment and storage medium
CN114579494A (en) Interface calling method, device, equipment and medium
CN117742730A (en) Project deployment method and device, electronic equipment and storage medium
CN117193825A (en) Method and device for calling update function, electronic equipment and storage medium
CN117216066A (en) Material code generation method, device, equipment and storage medium
CN117668114A (en) Data synchronization method, device, equipment and medium
CN116954689A (en) Identification generation and identification verification methods, devices, electronic equipment and storage medium
CN116627442A (en) Version update prompting method, device, equipment and medium of application program interface
CN116382640A (en) Method, device, equipment and storage medium for managing micro-service
CN118075290A (en) Data synchronization method, device, equipment, medium and product

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