CN109582325A - Software upgrade method for robot, robot and computer-readable storage medium - Google Patents
Software upgrade method for robot, robot and computer-readable storage medium Download PDFInfo
- Publication number
- CN109582325A CN109582325A CN201710895791.2A CN201710895791A CN109582325A CN 109582325 A CN109582325 A CN 109582325A CN 201710895791 A CN201710895791 A CN 201710895791A CN 109582325 A CN109582325 A CN 109582325A
- Authority
- CN
- China
- Prior art keywords
- upgrade
- file
- robot
- hardware
- software
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Stored Programmes (AREA)
Abstract
本发明适用于机器人技术领域,提供了一种机器人的软件升级方法、机器人及计算机可读存储介质,所述软件升级方法包括:在接收到升级指令时,检测所述升级指令所针对的升级包的完整性;若所述升级包完整,则从所述升级包中获取配置文件和升级文件;根据所述配置文件,启动所述升级文件对应的升级子程序。通过本发明可简化机器人进行软件升级时的操作,提高软件升级的灵活性。
The present invention is applicable to the field of robot technology, and provides a software upgrade method for a robot, a robot and a computer-readable storage medium. The software upgrade method includes: when an upgrade instruction is received, detecting an upgrade package targeted by the upgrade instruction If the upgrade package is complete, obtain the configuration file and the upgrade file from the upgrade package; and start the upgrade subprogram corresponding to the upgrade file according to the configuration file. By means of the invention, the operation of the robot during software upgrade can be simplified, and the flexibility of software upgrade can be improved.
Description
技术领域technical field
本发明属于机器人技术领域,尤其涉及机器人的软件升级方法、机器人及计算机可读存储介质。The invention belongs to the technical field of robots, and in particular relates to a software upgrade method of a robot, a robot and a computer-readable storage medium.
背景技术Background technique
随着智能化技术的发展,机器人已经越来越走进人们的生活,从工厂产品线上的智能机械手到生活中的服务器机器人。但由于机器人的开发和制造成本较高,这让机器人的更新换代面临严峻挑战,为了解决该技术问题,就需要不断地在机器人原有硬件的基础上提升机器人的工,常用的方法是不断地对机器人进行软件升级。With the development of intelligent technology, robots have entered people's lives more and more, from intelligent manipulators on factory product lines to server robots in life. However, due to the high development and manufacturing costs of robots, the replacement of robots faces severe challenges. In order to solve this technical problem, it is necessary to continuously improve the work of robots on the basis of the original hardware of robots. The commonly used method is to continuously Software upgrades to the robot.
目前,机器人软件升级一般是使用工具升级或者使用固定升级服务程序进行升级。然而工具升级需要连接个人计算机(Personal Computer,PC)和机器人的工具,操作繁琐;根据固定升级服务程序进行升级虽然解决了使用工具升级所带来的不便,但操作流程较为固定,软件升级的灵活性较差。At present, the robot software upgrade is generally carried out by using a tool upgrade or using a fixed upgrade service program. However, tool upgrade requires a tool to connect a personal computer (PC) and a robot, and the operation is cumbersome; although the upgrade according to the fixed upgrade service program solves the inconvenience caused by using the tool upgrade, the operation process is relatively fixed, and the software upgrade is flexible Poor sex.
故有必要提出一种新的技术方案,以解决上述技术问题。Therefore, it is necessary to propose a new technical solution to solve the above-mentioned technical problems.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例提供了机器人的软件升级方法、机器人及计算机可读存储介质,以简化机器人进行软件升级时的操作,提高软件升级的灵活性。In view of this, embodiments of the present invention provide a software upgrade method for a robot, a robot, and a computer-readable storage medium, so as to simplify the operation of the robot during software upgrade and improve the flexibility of software upgrade.
本发明实施例的第一方面提供了一种机器人的软件升级方法,所述软件升级方法包括:A first aspect of the embodiments of the present invention provides a software upgrade method for a robot, where the software upgrade method includes:
在接收到升级指令时,检测所述升级指令所针对的升级包的完整性;When receiving the upgrade instruction, detecting the integrity of the upgrade package targeted by the upgrade instruction;
若所述升级包完整,则从所述升级包中获取配置文件和升级文件;If the upgrade package is complete, obtain the configuration file and the upgrade file from the upgrade package;
根据所述配置文件,启动所述升级文件对应的升级子程序。According to the configuration file, the upgrade subprogram corresponding to the upgrade file is started.
本发明实施例的第二方面提供了一种机器人,其特征在于,所述机器人包括:A second aspect of the embodiments of the present invention provides a robot, wherein the robot includes:
第一检测模块,用于在接收到升级指令时,检测所述升级指令所针对的升级包的完整性;a first detection module, configured to detect the integrity of the upgrade package targeted by the upgrade instruction when the upgrade instruction is received;
文件获取模块,用于若所述升级包完整,则从所述升级包中获取配置文件和升级文件;a file acquisition module, configured to obtain a configuration file and an upgrade file from the upgrade package if the upgrade package is complete;
第一启动模块,用于根据所述配置文件,启动所述升级文件对应的升级子程序。The first startup module is configured to start the upgrade subprogram corresponding to the upgrade file according to the configuration file.
本发明实施例的第三方面提供了一种机器人,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第一方面所述软件升级方法的步骤。A third aspect of the embodiments of the present invention provides a robot, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the computer program when the processor executes the computer program. The steps of the software upgrade method described in the first aspect above.
本发明实施例第四方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述软件升级方法的步骤。A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the software upgrade method described in the first aspect above .
本发明实施例的第五方面提供了一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被一个或多个处理器执行时实现如上述第一方面所述软件升级方法的步骤。A fifth aspect of the embodiments of the present invention provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by one or more processors, implements the software upgrade method described in the first aspect above. step.
本发明实施例与现有技术相比存在的有益效果是:本发明实施例在机器人升级管理服务程序接收到升级指令时,检测所述升级指令所针对的升级包的完整性,并在所述升级包完整时,从所述升级包中获取配置文件和升级文件,根据所述配置文件,启动所述升级文件对应的升级子程序。本发明实施例在对机器人进行软件升级时无需借助工具,简化了软件升级的操作,且机器人的主程序(即升级管理服务程序)与升级子程序相独立,在升级子程序改变时,对主程序无影响,即无需改变主程序,提高了软件升级的灵活性。Compared with the prior art, the embodiment of the present invention has the beneficial effect that: when the robot upgrade management service program receives the upgrade instruction, the embodiment of the present invention detects the integrity of the upgrade package for which the upgrade instruction is directed, and performs When the upgrade package is complete, a configuration file and an upgrade file are obtained from the upgrade package, and an upgrade subprogram corresponding to the upgrade file is started according to the configuration file. The embodiment of the present invention does not need tools when upgrading the software of the robot, which simplifies the operation of software upgrading, and the main program of the robot (ie, the upgrade management service program) is independent of the upgrade subprogram. The program has no influence, that is, the main program does not need to be changed, which improves the flexibility of software upgrade.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present invention. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本发明实施例一提供的机器人的软件升级方法的实现流程示意图;Fig. 1 is the realization flow schematic diagram of the software upgrade method of the robot provided by the first embodiment of the present invention;
图2是本发明实施例二提供的机器人的软件升级方法的实现流程示意图;Fig. 2 is the realization flow schematic diagram of the software upgrade method of the robot provided by the second embodiment of the present invention;
图3是本发明实施例三提供的机器人的示意图;3 is a schematic diagram of a robot provided in Embodiment 3 of the present invention;
图4是本发明实施例四提供的机器人的示意图;4 is a schematic diagram of a robot provided in Embodiment 4 of the present invention;
图5是本发明实施例五提供的机器人的示意图。FIG. 5 is a schematic diagram of a robot according to Embodiment 5 of the present invention.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本发明实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are set forth in order to provide a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other features , whole, step, operation, element, component and/or the presence or addition of a collection thereof.
还应当理解,在此本发明说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本发明。如在本发明说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It is also to be understood that the terminology used in this specification of the present invention is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural unless the context clearly dictates otherwise.
还应当进一步理解,在本发明说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should further be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items .
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting" . Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".
应理解,本实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in this embodiment does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present invention.
为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions of the present invention, the following specific embodiments are used for description.
参见图1,是本发明实施例一提供的机器人的软件升级方法的实现流程示意图,该软件升级方法应用于机器人,如图所示该软件升级方法可以包括以下步骤:Referring to FIG. 1, it is a schematic diagram of the implementation flow of the software upgrading method for a robot provided in Embodiment 1 of the present invention. The software upgrading method is applied to a robot. As shown in the figure, the software upgrading method may include the following steps:
步骤S101,在接收到升级指令时,检测所述升级指令所针对的升级包的完整性。Step S101, when an upgrade instruction is received, the integrity of the upgrade package targeted by the upgrade instruction is detected.
在本发明实施例中,在检测到机器人启动时,所述机器人可以通过无线的方式向服务器发送获取升级包的版本信息的请求信息,在接收到所述服务器反馈的升级包的版本信息后,将接收到的所述升级包的版本信息与所述机器人当前使用的软件数据包的版本信息进行比较,若接收到的所述升级包的版本信息高于所述机器人当前使用的软件数据包的版本信息,则所述机器人从所述服务器中获取所述升级包,并将所述升级包存储至所述机器人中,在接收到针对所述升级包的升级指令时,检测所述升级包的完整性;若接收到的所述升级包的版本信息不高于所述机器人当前使用的软件数据包的版本信息,则所述机器人无需进行软件升级。其中,所述服务器中存储有机器人的最新软件数据包,即最新的升级包。In the embodiment of the present invention, when detecting that the robot starts, the robot may wirelessly send a request for obtaining the version information of the upgrade package to the server, and after receiving the version information of the upgrade package fed back by the server, Compare the version information of the received upgrade package with the version information of the software data package currently used by the robot, if the received version information of the upgrade package is higher than the version information of the software data package currently used by the robot. version information, the robot obtains the upgrade package from the server, stores the upgrade package in the robot, and detects the upgrade package when receiving an upgrade instruction for the upgrade package. Integrity; if the received version information of the upgrade package is not higher than the version information of the software data package currently used by the robot, the robot does not need to perform software upgrade. Wherein, the server stores the latest software data package of the robot, that is, the latest upgrade package.
所述机器人的软件升级可以分为强制升级和非强制升级。具体的,所述强制升级可以是指所述机器人在检测到接收到的所述升级包的版本信息高于所述机器人当前使用的软件数据包的版本信息时,触发生成升级指令,并将所述升级指令发送给机器人的升级管理服务程序,所述升级管理服务程序在接收到所述升级指令时,控制所述机器人检测所述升级包的完整性,并执行后续的软件升级流程;所述非强制升级可以是所述机器人在检测到接收到的所述升级包的版本信息高于所述机器人当前使用的软件数据包的版本信息时,提示用户所述机器人的软件需要升级,在所述升级管理服务程序接收用户发送的升级指令时,控制所述机器人检测所述升级包的完整性,并执行后续的软件升级流程。其中,所述升级管理服务程序是用于引导和管理机器人中软件的升级。The software upgrade of the robot can be divided into mandatory upgrade and non-mandatory upgrade. Specifically, the forced upgrade may mean that when the robot detects that the received version information of the upgrade package is higher than the version information of the software data package currently used by the robot, triggering the generation of an upgrade instruction, and The upgrade management service program that the upgrade instruction is sent to the robot, and the upgrade management service program, when receiving the upgrade instruction, controls the robot to detect the integrity of the upgrade package and execute the subsequent software upgrade process; the The unforced upgrade may be that when the robot detects that the version information of the received upgrade package is higher than the version information of the software data package currently used by the robot, it prompts the user that the software of the robot needs to be upgraded. When the upgrade management service program receives the upgrade instruction sent by the user, it controls the robot to detect the integrity of the upgrade package and execute the subsequent software upgrade process. Wherein, the upgrade management service program is used to guide and manage the upgrade of software in the robot.
可选的,所述检测所述升级指令所针对的升级包的完整性包括:Optionally, the detecting the integrity of the upgrade package targeted by the upgrade instruction includes:
计算所述升级包的消息摘要算法第五版MD5值,并从服务器中获取所述升级包的MD5值;Calculate the MD5 value of the fifth edition of the message digest algorithm of the upgrade package, and obtain the MD5 value of the upgrade package from the server;
若计算所得的所述升级包的MD5值与从所述服务器中获取的所述升级包的MD5值相同,则确定所述升级包完整;If the calculated MD5 value of the upgrade package is the same as the MD5 value of the upgrade package obtained from the server, it is determined that the upgrade package is complete;
若计算所得的所述升级包的MD5值与从所述服务器中获取的所述升级包的MD5值不相同,则确定所述升级包不完整。If the calculated MD5 value of the upgrade package is different from the MD5 value of the upgrade package obtained from the server, it is determined that the upgrade package is incomplete.
在本发明实施例中,消息摘要算法第五版(Message Digest Algorithm 5,MD5)用于确保所述升级包的完整性,通过其特定算法为所述升级包产生唯一的MD5值。In the embodiment of the present invention, the fifth version of the message digest algorithm (Message Digest Algorithm 5, MD5) is used to ensure the integrity of the upgrade package, and a unique MD5 value is generated for the upgrade package through its specific algorithm.
需要说明的是,检测所述升级包的完整性的方法包括但不限于使用MD5值进行所述升级包的完整性的检测,其他可以检测所述升级包的完整性的方法也在本发明的保护范围内。It should be noted that the method for detecting the integrity of the upgrade package includes, but is not limited to, using the MD5 value to detect the integrity of the upgrade package, and other methods that can detect the integrity of the upgrade package are also included in the present invention. within the scope of protection.
步骤S102,若所述升级包完整,则从所述升级包中获取配置文件和升级文件。Step S102, if the upgrade package is complete, obtain a configuration file and an upgrade file from the upgrade package.
可选的,所述若所述升级包完整,则从所述升级包中获取配置文件和升级文件包括:Optionally, if the upgrade package is complete, obtaining the configuration file and the upgrade file from the upgrade package includes:
若所述升级包完整,则解压所述升级包,并从解压后的所述升级包中获取所述配置文件和所述升级文件。If the upgrade package is complete, the upgrade package is decompressed, and the configuration file and the upgrade file are obtained from the decompressed upgrade package.
在本发明实施例中,若所述升级包完整,则解压所述升级包,以从所述升级包中提取配置文件和升级文件;若所述升级包不完整,则重新从所述服务器中获取所述升级包。其中,所述配置文件包括硬件的型号、与所述硬件对应的软件的版本信息以及升级文件与硬件的型号的对应关系等。所述升级文件的数量可以为一个或多个,由于一个升级文件对应一个升级子程序,那么升级子程序的数量也可以为一个或多个。需要说明的是,所述硬件对应的软件是指为了使所述硬件实现某一功能,在所述硬件上运行的软件。若一个升级文件与一个硬件的型号对应,则该硬件、该升级文件以及该升级文件对应的升级子程序都对应同一个软件。In the embodiment of the present invention, if the upgrade package is complete, the upgrade package is decompressed to extract the configuration file and the upgrade file from the upgrade package; if the upgrade package is incomplete, the upgrade package is retrieved from the server again. Obtain the upgrade package. The configuration file includes the model of the hardware, the version information of the software corresponding to the hardware, the correspondence between the upgrade file and the model of the hardware, and the like. The number of the upgrade files may be one or more. Since one upgrade file corresponds to one upgrade subprogram, the number of upgrade subprograms may also be one or more. It should be noted that the software corresponding to the hardware refers to software that runs on the hardware in order to enable the hardware to implement a certain function. If an upgrade file corresponds to a model of hardware, the hardware, the upgrade file and the upgrade subprogram corresponding to the upgrade file all correspond to the same software.
步骤S103,根据所述配置文件,启动所述升级文件对应的升级子程序。Step S103, according to the configuration file, start the upgrade subroutine corresponding to the upgrade file.
在本发明实施例中,从所述配置文件查找所述升级文件对应的硬件,通过启动所述升级文件对应的升级子程序可以实现对所述硬件对应的软件进行升级。In the embodiment of the present invention, the hardware corresponding to the upgrade file is searched from the configuration file, and the software corresponding to the hardware can be upgraded by starting the upgrade subprogram corresponding to the upgrade file.
可选的所述根据所述配置文件,启动所述升级文件对应的升级子程序包括:Optionally, according to the configuration file, starting the upgrade subprogram corresponding to the upgrade file includes:
从所述配置文件中获取所述升级文件对应的硬件的型号,并获取所述硬件在所述机器人中的当前型号;Obtain the model of the hardware corresponding to the upgrade file from the configuration file, and obtain the current model of the hardware in the robot;
若从所述配置文件中获取的所述升级文件对应的硬件的型号与所述硬件在所述机器人中的当前型号相同,则从所述配置文件中获取所述硬件对应的软件的版本信息,并获取所述硬件对应的软件在所述机器人中的当前版本信息;If the model of the hardware corresponding to the upgrade file obtained from the configuration file is the same as the current model of the hardware in the robot, obtain the version information of the software corresponding to the hardware from the configuration file, and obtain the current version information of the software corresponding to the hardware in the robot;
若从所述配置文件中获取的所述硬件对应的软件的版本信息高于所述硬件对应的软件在所述机器人中的当前版本信息,则启动所述升级文件对应的升级子程序。If the version information of the software corresponding to the hardware obtained from the configuration file is higher than the current version information of the software corresponding to the hardware in the robot, an upgrade subroutine corresponding to the upgrade file is started.
在本发明实施例中,由于所述配置文件中存储有所述升级文件与所述硬件的型号的对应关系,可以从所述配置文件中获取所述升级文件对应的硬件的型号,并同时获取所述硬件在所述机器人中的当前型号(即在所述机器人中所使用的该硬件的型号),将从所述配置文件中获取的所述升级文件对应的硬件的型号与所述硬件在所述机器人中的当前型号进行比较,判断是否相同,若相同,则从所述配置文件中获取所述硬件对应的软件的版本信息,并同时获取所述硬件对应的软件在所述机器人中的当前版本信息(即在所述机器人中所使用的该硬件上运行的软件的版本信息),判断从所述配置文件中获取的所述硬件对应的软件的版本信息是否高于所述硬件对应的软件在所述机器人中的当前版本信息,若是,则启动所述升级文件对应的升级子程序,若否,则不执行所述升级文件对应的升级子程序,并提示用户所述硬件对应的软件无需升级。需要说明的是,当所述升级文件的数量为多个时,可以根据所述配置文件,依次启动所述升级文件对应的升级子程序。In the embodiment of the present invention, since the configuration file stores the corresponding relationship between the upgrade file and the model of the hardware, the model of the hardware corresponding to the upgrade file can be obtained from the configuration file, and the model of the hardware corresponding to the upgrade file can be obtained at the same time. The current model of the hardware in the robot (that is, the model of the hardware used in the robot), the model of the hardware corresponding to the upgrade file obtained from the configuration file and the model of the hardware in the robot. The current models in the robot are compared to determine whether they are the same. If they are the same, the version information of the software corresponding to the hardware is obtained from the configuration file, and the software version corresponding to the hardware in the robot is obtained at the same time. Current version information (that is, the version information of the software running on the hardware used in the robot), to determine whether the version information of the software corresponding to the hardware obtained from the configuration file is higher than the version information corresponding to the hardware The current version information of the software in the robot, if yes, start the upgrade subprogram corresponding to the upgrade file, if not, do not execute the upgrade subprogram corresponding to the upgrade file, and prompt the user for the software corresponding to the hardware No need to upgrade. It should be noted that, when the number of the upgrade files is multiple, the upgrade subprograms corresponding to the upgrade files may be started in sequence according to the configuration file.
本发明实施例在对机器人进行软件升级时无需借助工具,简化了软件升级的操作,且机器人的升级管理服务程序与升级子程序相独立,在升级子程序改变时,对主程序无影响,即无需改变主程序,提高了软件升级的灵活性。The embodiment of the present invention does not require tools to upgrade the software of the robot, which simplifies the operation of the software upgrade, and the upgrade management service program of the robot is independent of the upgrade subroutine. There is no need to change the main program, which improves the flexibility of software upgrade.
参见图2,是本发明实施例二提供的机器人的软件升级方法的实现流程示意图,该软件升级方法应用于机器人,如图所示该软件升级方法可以包括以下步骤:Referring to FIG. 2, it is a schematic diagram of the realization flow of the software upgrading method of the robot provided by the second embodiment of the present invention. The software upgrading method is applied to the robot. As shown in the figure, the software upgrading method may include the following steps:
步骤S201,在接收到升级指令时,检测所述升级指令所针对的升级包的完整性。Step S201, when an upgrade instruction is received, the integrity of the upgrade package targeted by the upgrade instruction is detected.
该步骤与步骤S101相同,具体可参见步骤S101的相关描述,在此不再赘述。This step is the same as step S101 , for details, please refer to the relevant description of step S101 , which will not be repeated here.
步骤S202,若所述升级包完整,则从所述升级包中获取配置文件和升级文件。Step S202, if the upgrade package is complete, obtain a configuration file and an upgrade file from the upgrade package.
该步骤与步骤S102相同,具体可参见步骤S102的相关描述,在此不再赘述。This step is the same as step S102. For details, please refer to the relevant description of step S102, which will not be repeated here.
步骤S203,根据所述配置文件,启动一个升级文件对应的升级子程序。Step S203, according to the configuration file, start an upgrade subroutine corresponding to an upgrade file.
在本发明实施例中,从所述配置文件查找该升级文件(即步骤S203中的升级文件)对应的硬件,通过启动该升级文件对应的升级子程序可以实现对所述硬件对应的软件进行升级。In the embodiment of the present invention, the hardware corresponding to the upgrade file (that is, the upgrade file in step S203 ) is searched from the configuration file, and the software corresponding to the hardware can be upgraded by starting the upgrade subprogram corresponding to the upgrade file. .
可选的,所述根据所述配置文件,启动一个升级文件对应的升级子程序包括:Optionally, according to the configuration file, starting an upgrade subprogram corresponding to an upgrade file includes:
从所述配置文件中获取所述升级文件对应的硬件的型号,并获取所述硬件在所述机器人中的当前型号;Obtain the model of the hardware corresponding to the upgrade file from the configuration file, and obtain the current model of the hardware in the robot;
若从所述配置文件中获取的所述升级文件对应的硬件的型号与所述硬件在所述机器人中的当前型号相同,则从所述配置文件中获取所述硬件对应的软件的版本信息,并获取所述硬件对应的软件在所述机器人中的当前版本信息;If the model of the hardware corresponding to the upgrade file obtained from the configuration file is the same as the current model of the hardware in the robot, obtain the version information of the software corresponding to the hardware from the configuration file, and obtain the current version information of the software corresponding to the hardware in the robot;
若从所述配置文件中获取的所述硬件对应的软件的版本信息高于所述硬件对应的软件在所述机器人中的当前版本信息,则启动所述升级文件对应的升级子程序。If the version information of the software corresponding to the hardware obtained from the configuration file is higher than the current version information of the software corresponding to the hardware in the robot, an upgrade subroutine corresponding to the upgrade file is started.
其中,所述升级文件即为步骤S203中的升级文件。Wherein, the upgrade file is the upgrade file in step S203.
步骤S204,获取所述升级子程序对应的软件的升级状态信息。Step S204: Obtain the upgrade status information of the software corresponding to the upgrade subroutine.
在本发明实施例中,所述升级子程序对应的软件的升级状态信息可以包括所述升级子程序对应的软件升级完成、升级失败和升级中。同时,本发明实施例还可以获取所述升级子程序对应的软件的升级进度,例如已升级50%。In the embodiment of the present invention, the upgrade status information of the software corresponding to the upgrade subroutine may include the upgrade completion, the upgrade failure, and the upgrade of the software corresponding to the upgrade subroutine. At the same time, the embodiment of the present invention can also acquire the upgrade progress of the software corresponding to the upgrade subprogram, for example, 50% has been upgraded.
步骤S205,若所述升级子程序对应的软件的升级状态信息为升级完成,则检测是否还存在其他升级文件。Step S205, if the upgrade status information of the software corresponding to the upgrade subprogram is that the upgrade is completed, it is detected whether there are other upgrade files.
步骤S206,若是,则根据所述配置文件,启动所述其他升级文件对应的升级子程序。Step S206, if yes, start the upgrade subprograms corresponding to the other upgrade files according to the configuration file.
在本发明实施例中,所述升级包中可能包括多个升级文件,在执行一个升级文件后,为了避免遗漏其他升级文件,可以检测解压后的数据包中是否还存在其他升级文件。In the embodiment of the present invention, the upgrade package may include multiple upgrade files. After executing one upgrade file, in order to avoid missing other upgrade files, it may be detected whether there are other upgrade files in the decompressed data package.
需要说明的是,所述其他升级文件的数量可以为一个或多个,当所述其他升级文件的数量为一个时,步骤S206中根据所述配置文件,启动所述其他升级文件对应的升级子程序的具体实现方法与步骤S203相同,在此不再赘述;当所述其他升级文件的数量为多个时,则针对所述多个其他升级文件重复执行步骤S203至S206,直到遍历完所述多个其他升级文件。It should be noted that the number of the other upgrade files may be one or more. When the number of the other upgrade files is one, in step S206, according to the configuration file, the upgrade sub-file corresponding to the other upgrade files is started. The specific implementation method of the program is the same as that of step S203, and will not be repeated here; when the number of the other upgrade files is multiple, steps S203 to S206 are repeatedly executed for the multiple other upgrade files until the traversal of the Multiple other upgrade files.
需要说明的是,在对所述升级包解压后,若从解压后的升级包中提取出多个升级文件,则可以根据所述预先设定的优先级依次启动所述多个升级文件中每个升级文件对应的升级子程序,在每次启动一个升级文件且该升级完成时,再启动下一个升级文件,依次类推,直到启动完所述多个升级文件对应的升级子程序。其中,所述优先级可以根据所述多个升级文件分别对应的硬件的类别进行设定,即先根据硬件的类别设定硬件的优先级,然后根据硬件的优先级对应设定该硬件对应的升级文件的优先级,在此不作限定。例如,多个升级文件中存在电源板的升级文件时,可以将电源板的升级文件的优先级设定为最低,最后启动电源板的升级文件对应的升级子程序。It should be noted that, after the upgrade package is decompressed, if multiple upgrade files are extracted from the decompressed upgrade package, each of the multiple upgrade files can be started in sequence according to the preset priority. The upgrade subprograms corresponding to each upgrade file, each time one upgrade file is started and the upgrade is completed, the next upgrade file is started, and so on, until the upgrade subprograms corresponding to the plurality of upgrade files are started. The priority may be set according to the hardware categories corresponding to the plurality of upgrade files, that is, first set the hardware priority according to the hardware category, and then set the hardware corresponding to the hardware according to the hardware priority. The priority of the upgrade file is not limited here. For example, when there are upgrade files for the power board in multiple upgrade files, the priority of the upgrade files for the power board can be set to the lowest, and finally the upgrade subroutine corresponding to the upgrade files for the power board is started.
本发明实施例在对机器人进行软件升级时无需借助工具,简化了软件升级的操作,且机器人的升级管理服务程序与升级子程序相独立,在存在多个升级子程序时,只需迭代升级该多个升级子程序,无需改变主程序,提高了软件升级的灵活性。The embodiment of the present invention does not require tools to upgrade the software of the robot, which simplifies the operation of software upgrade, and the upgrade management service program of the robot is independent of the upgrade sub-program. When there are multiple upgrade sub-programs, it is only necessary to iteratively upgrade the Multiple upgrade subroutines, without changing the main program, improve the flexibility of software upgrades.
参见图3,是本发明实施例三提供的机器人的示意图,为了便于说明,仅示出了与本发明实施例相关的部分。Referring to FIG. 3 , it is a schematic diagram of a robot according to Embodiment 3 of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown.
所述机器人包括:The robot includes:
检测模块31,用于在接收到升级指令时,检测所述升级指令所针对的升级包的完整性;A detection module 31, configured to detect the integrity of the upgrade package targeted by the upgrade instruction when receiving the upgrade instruction;
文件获取模块32,用于若所述升级包完整,则从所述升级包中获取配置文件和升级文件;A file obtaining module 32, configured to obtain a configuration file and an upgrade file from the upgrade package if the upgrade package is complete;
启动模块33,用于根据所述配置文件,启动所述升级文件对应的升级子程序。The starting module 33 is configured to start the upgrade subprogram corresponding to the upgrade file according to the configuration file.
可选的,所述启动模块33具体包括:Optionally, the startup module 33 specifically includes:
第一启动单元,用于根据所述配置文件,启动一个升级文件对应的升级子程序;a first startup unit, configured to start an upgrade subprogram corresponding to an upgrade file according to the configuration file;
获取单元,用于获取所述升级子程序对应的软件的升级状态信息;an acquisition unit, configured to acquire the upgrade status information of the software corresponding to the upgrade subprogram;
检测单元,用于若所述升级子程序对应的软件的升级状态信息为升级完成,则检测是否还存在其他升级文件;a detection unit, configured to detect whether there are other upgrade files if the upgrade status information of the software corresponding to the upgrade subprogram is that the upgrade is completed;
第二启动单元,用于若所述检测单元的检测结果为是,则根据所述配置文件,启动所述其他升级文件对应的升级子程序;a second startup unit, configured to start the upgrade subprograms corresponding to the other upgrade files according to the configuration file if the detection result of the detection unit is yes;
所述第一启动单元具体包括:The first starting unit specifically includes:
第一获取子单元,用于从所述配置文件中获取所述升级文件对应的硬件的型号,并获取所述硬件在所述机器人中的当前型号;a first obtaining subunit, configured to obtain the model of the hardware corresponding to the upgrade file from the configuration file, and obtain the current model of the hardware in the robot;
第二获取子单元,用于若从所述配置文件中获取的所述升级文件对应的硬件的型号与所述硬件在所述机器人中的当前型号相同,则从所述配置文件中获取所述硬件对应的软件的版本信息,并获取所述硬件对应的软件在所述机器人中的当前版本信息;A second obtaining subunit, configured to obtain the hardware from the configuration file if the model of the hardware corresponding to the upgrade file obtained from the configuration file is the same as the current model of the hardware in the robot The version information of the software corresponding to the hardware, and obtain the current version information of the software corresponding to the hardware in the robot;
启动子单元,用于若从所述配置文件中获取的所述硬件对应的软件的版本信息高于所述硬件对应的软件在所述机器人中的当前版本信息,则启动所述升级文件对应的升级子程序。A starter subunit is used to start the software corresponding to the upgrade file if the version information of the software corresponding to the hardware obtained from the configuration file is higher than the current version information of the software corresponding to the hardware in the robot. Upgrade subroutine.
可选的,所述检测模块31具体包括:Optionally, the detection module 31 specifically includes:
计算单元,用于计算所述升级包的消息摘要算法第五版MD5值,并从服务器中获取所述升级包的MD5值;A computing unit, configured to calculate the MD5 value of the fifth edition of the message digest algorithm of the upgrade package, and obtain the MD5 value of the upgrade package from the server;
第一确定单元,用于若计算所得的所述升级包的MD5值与从所述服务器中获取的所述升级包的MD5值相同,则确定所述升级包完整;a first determining unit, configured to determine that the upgrade package is complete if the calculated MD5 value of the upgrade package is the same as the MD5 value of the upgrade package obtained from the server;
第二确定单元,用于若计算所得的所述升级包的MD5值与从所述服务器中获取的所述升级包的MD5值不相同,则确定所述升级包不完整;a second determining unit, configured to determine that the upgrade package is incomplete if the calculated MD5 value of the upgrade package is different from the MD5 value of the upgrade package obtained from the server;
所述文件获取模块32具体用于:The file acquisition module 32 is specifically used for:
若所述升级包完整,则解压所述升级包,并从解压后的所述升级包中获取所述配置文件和所述升级文件。If the upgrade package is complete, the upgrade package is decompressed, and the configuration file and the upgrade file are obtained from the decompressed upgrade package.
图4是本发明实施例四提供的机器人的示意图。如图所示的该机器人可以包括:一个或多个处理器401(图中仅示出一个);一个或多个输入设备402(图中仅示出一个),一个或多个输出设备403(图中仅示出一个)和存储器404。上述处理器401、输入设备402、输出设备403和存储器404通过总线405连接。存储器404用于存储指令,处理器401用于执行存储器404存储的指令。其中:FIG. 4 is a schematic diagram of a robot according to Embodiment 4 of the present invention. The robot as shown may include: one or more processors 401 (only one is shown in the figure); one or more input devices 402 (only one is shown in the figure), one or more output devices 403 ( Only one is shown) and memory 404. The above-mentioned processor 401 , input device 402 , output device 403 and memory 404 are connected through a bus 405 . The memory 404 is used to store instructions, and the processor 401 is used to execute the instructions stored in the memory 404 . in:
所述处理器401,用于在接收到升级指令时,检测所述升级指令所针对的升级包的完整性;若所述升级包完整,则从所述升级包中获取配置文件和升级文件;根据所述配置文件,启动所述升级文件对应的升级子程序。The processor 401 is configured to, when receiving an upgrade instruction, detect the integrity of the upgrade package targeted by the upgrade instruction; if the upgrade package is complete, obtain a configuration file and an upgrade file from the upgrade package; According to the configuration file, the upgrade subprogram corresponding to the upgrade file is started.
可选的,所述处理器401,具体用于根据所述配置文件,启动一个升级文件对应的升级子程序;获取所述升级子程序对应的软件的升级状态信息;若所述升级子程序对应的软件的升级状态信息为升级完成,则检测是否还存在其他升级文件;若是,则根据所述配置文件,启动所述其他升级文件对应的升级子程序。Optionally, the processor 401 is specifically configured to, according to the configuration file, start an upgrade subprogram corresponding to an upgrade file; obtain the upgrade status information of the software corresponding to the upgrade subprogram; if the upgrade subprogram corresponds to If the upgrade status information of the software indicates that the upgrade is complete, it is detected whether there are other upgrade files; if so, the upgrade subprograms corresponding to the other upgrade files are started according to the configuration file.
可选的,所述处理器401,具体用于从所述配置文件中获取所述升级文件对应的硬件的型号,并获取所述硬件在所述机器人中的当前型号;若从所述配置文件中获取的所述升级文件对应的硬件的型号与所述硬件在所述机器人中的当前型号相同,则从所述配置文件中获取所述硬件对应的软件的版本信息,并获取所述硬件对应的软件在所述机器人中的当前版本信息;若从所述配置文件中获取的所述硬件对应的软件的版本信息高于所述硬件对应的软件在所述机器人中的当前版本信息,则启动所述升级文件对应的升级子程序。Optionally, the processor 401 is specifically configured to obtain the model of the hardware corresponding to the upgrade file from the configuration file, and obtain the current model of the hardware in the robot; The model of the hardware corresponding to the upgrade file obtained in The current version information of the software in the robot; if the version information of the software corresponding to the hardware obtained from the configuration file is higher than the current version information of the software corresponding to the hardware in the robot, then start The upgrade subprogram corresponding to the upgrade file.
可选的,所述处理器401,具体用于计算所述升级包的消息摘要算法第五版MD5值,并从服务器中获取所述升级包的MD5值;若计算所得的所述升级包的MD5值与从所述服务器中获取的所述升级包的MD5值相同,则确定所述升级包完整;若计算所得的所述升级包的MD5值与从所述服务器中获取的所述升级包的MD5值不相同,则确定所述升级包不完整。Optionally, the processor 401 is specifically configured to calculate the MD5 value of the message digest algorithm version 5 of the upgrade package, and obtain the MD5 value of the upgrade package from the server; if the calculated value of the upgrade package is If the MD5 value is the same as the MD5 value of the upgrade package obtained from the server, it is determined that the upgrade package is complete; if the calculated MD5 value of the upgrade package is the same as the upgrade package obtained from the server If the MD5 values are different, it is determined that the upgrade package is incomplete.
可选的,所述处理器401,具体用于若所述升级包完整,则解压所述升级包,并从解压后的所述升级包中获取所述配置文件和所述升级文件。Optionally, the processor 401 is specifically configured to decompress the upgrade package if the upgrade package is complete, and obtain the configuration file and the upgrade file from the decompressed upgrade package.
应当理解,在本发明实施例中,所述处理器401可以是中央处理单元(CentralProcessing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DigitalSignal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment of the present invention, the processor 401 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), special-purpose processors An integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
输入设备402可以包括触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风、数据接收接口等。输出设备403可以包括显示器(LCD等)、扬声器、数据发送接口等。The input device 402 may include a touch panel, a fingerprint sensor (for collecting the user's fingerprint information and the direction information of the fingerprint), a microphone, a data receiving interface, and the like. The output device 403 may include a display (LCD, etc.), a speaker, a data transmission interface, and the like.
该存储器404可以包括只读存储器和随机存取存储器,并向处理器401提供指令和数据。存储器404的一部分还可以包括非易失性随机存取存储器。例如,存储器404还可以存储设备类型的信息。The memory 404 , which may include read-only memory and random access memory, provides instructions and data to the processor 401 . A portion of memory 404 may also include non-volatile random access memory. For example, memory 404 may also store device type information.
具体实现中,本发明实施例中所描述的处理器401、输入设备402、输出设备403和存储器404可执行本发明实施例提供的软件升级方法的实施例中所描述的实现方式,也可执行实施例三所述机器人中所描述的实现方式,在此不再赘述。In specific implementation, the processor 401 , the input device 402 , the output device 403 , and the memory 404 described in the embodiments of the present invention can execute the implementations described in the embodiments of the software upgrade method provided by the embodiments of the present invention, and can also execute The implementation manner described in the robot of the third embodiment will not be repeated here.
图5是本发明实施例五提供的机器人的示意图。如图5所示,该实施例的机器人5包括:处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机程序52。所述处理器50执行所述计算机程序52时实现上述各个软件升级方法实施例中的步骤,例如图1所示的步骤S101至S103。或者,所述处理器50执行所述计算机程序52时实现上述各装置实施例中各模块/单元的功能,例如图3所示模块31至33的功能。FIG. 5 is a schematic diagram of a robot according to Embodiment 5 of the present invention. As shown in FIG. 5 , the robot 5 of this embodiment includes a processor 50 , a memory 51 , and a computer program 52 stored in the memory 51 and executable on the processor 50 . When the processor 50 executes the computer program 52, the steps in each of the foregoing software upgrade method embodiments are implemented, for example, steps S101 to S103 shown in FIG. 1 . Alternatively, when the processor 50 executes the computer program 52 , the functions of the modules/units in the foregoing device embodiments, such as the functions of the modules 31 to 33 shown in FIG. 3 , are implemented.
示例性的,所述计算机程序52可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器51中,并由所述处理器50执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序52在所述机器人5中的执行过程。例如,所述计算机程序52可以被分割成检测模块、文件获取模块以及启动模块,各模块具体功能如下:Exemplarily, the computer program 52 can be divided into one or more modules/units, and the one or more modules/units are stored in the memory 51 and executed by the processor 50 to complete the this invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the robot 5 . For example, the computer program 52 can be divided into a detection module, a file acquisition module and a startup module, and the specific functions of each module are as follows:
检测模块,用于在接收到升级指令时,检测所述升级指令所针对的升级包的完整性;a detection module, configured to detect the integrity of the upgrade package targeted by the upgrade instruction when the upgrade instruction is received;
文件获取模块,用于若所述升级包完整,则从所述升级包中获取配置文件和升级文件;a file acquisition module, configured to obtain a configuration file and an upgrade file from the upgrade package if the upgrade package is complete;
启动模块,用于根据所述配置文件,启动所述升级文件对应的升级子程序。A startup module, configured to start an upgrade subprogram corresponding to the upgrade file according to the configuration file.
可选的,所述启动模块具体包括:Optionally, the startup module specifically includes:
第一启动单元,用于根据所述配置文件,启动一个升级文件对应的升级子程序;a first startup unit, configured to start an upgrade subprogram corresponding to an upgrade file according to the configuration file;
获取单元,用于获取所述升级子程序对应的软件的升级状态信息;an acquisition unit, configured to acquire the upgrade status information of the software corresponding to the upgrade subprogram;
检测单元,用于若所述升级子程序对应的软件的升级状态信息为升级完成,则检测是否还存在其他升级文件;a detection unit, configured to detect whether there are other upgrade files if the upgrade status information of the software corresponding to the upgrade subprogram is that the upgrade is completed;
第二启动单元,用于若所述检测单元的检测结果为是,则根据所述配置文件,启动所述其他升级文件对应的升级子程序;a second startup unit, configured to start the upgrade subprograms corresponding to the other upgrade files according to the configuration file if the detection result of the detection unit is yes;
所述第一启动单元具体包括:The first starting unit specifically includes:
第一获取子单元,用于从所述配置文件中获取所述升级文件对应的硬件的型号,并获取所述硬件在所述机器人中的当前型号;a first obtaining subunit, configured to obtain the model of the hardware corresponding to the upgrade file from the configuration file, and obtain the current model of the hardware in the robot;
第二获取子单元,用于若从所述配置文件中获取的所述升级文件对应的硬件的型号与所述硬件在所述机器人中的当前型号相同,则从所述配置文件中获取所述硬件对应的软件的版本信息,并获取所述硬件对应的软件在所述机器人中的当前版本信息;A second obtaining subunit, configured to obtain the hardware from the configuration file if the model of the hardware corresponding to the upgrade file obtained from the configuration file is the same as the current model of the hardware in the robot The version information of the software corresponding to the hardware, and obtain the current version information of the software corresponding to the hardware in the robot;
启动子单元,用于若从所述配置文件中获取的所述硬件对应的软件的版本信息高于所述硬件对应的软件在所述机器人中的当前版本信息,则启动所述升级文件对应的升级子程序。A starter subunit is used to start the software corresponding to the upgrade file if the version information of the software corresponding to the hardware obtained from the configuration file is higher than the current version information of the software corresponding to the hardware in the robot. Upgrade subroutine.
可选的,所述检测模块具体包括:Optionally, the detection module specifically includes:
计算单元,用于计算所述升级包的消息摘要算法第五版MD5值,并从服务器中获取所述升级包的MD5值;A computing unit, configured to calculate the MD5 value of the fifth edition of the message digest algorithm of the upgrade package, and obtain the MD5 value of the upgrade package from the server;
第一确定单元,用于若计算所得的所述升级包的MD5值与从所述服务器中获取的所述升级包的MD5值相同,则确定所述升级包完整;a first determining unit, configured to determine that the upgrade package is complete if the calculated MD5 value of the upgrade package is the same as the MD5 value of the upgrade package obtained from the server;
第二确定单元,用于若计算所得的所述升级包的MD5值与从所述服务器中获取的所述升级包的MD5值不相同,则确定所述升级包不完整;a second determining unit, configured to determine that the upgrade package is incomplete if the calculated MD5 value of the upgrade package is different from the MD5 value of the upgrade package obtained from the server;
所述文件获取模块具体用于:The file acquisition module is specifically used for:
若所述升级包完整,则解压所述升级包,并从解压后的所述升级包中获取所述配置文件和所述升级文件。If the upgrade package is complete, the upgrade package is decompressed, and the configuration file and the upgrade file are obtained from the decompressed upgrade package.
本领域技术人员可以理解,图5仅仅是机器人5的示例,并不构成对机器人5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述机器人还可以包括输入输出设备、网络接入设备、总线等。Those skilled in the art can understand that FIG. 5 is only an example of the robot 5, and does not constitute a limitation to the robot 5. It may include more or less components than the one shown, or combine some components, or different components, such as The robot may also include input and output devices, network access devices, buses, and the like.
所称处理器50可以是中央处理单元CPU,还可以是其他通用处理器、数字信号处理器DSP、专用集成电路ASIC、现成可编程门阵列FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices. , discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器51可以是所述机器人5的内部存储单元,例如机器人5的硬盘或内存。所述存储器51也可以是所述机器人5的外部存储设备,例如所述移动终端5上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括所述机器人5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机程序以及所述机器人所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述机器人的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。The memory 51 may be an internal storage unit of the robot 5 , such as a hard disk or a memory of the robot 5 . The memory 51 may also be an external storage device of the robot 5, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card equipped on the mobile terminal 5. , Flash card (Flash Card) and so on. Further, the memory 51 may also include both an internal storage unit of the robot 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the robot. The memory 51 can also be used to temporarily store data that has been output or will be output. Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated to different functional units, Module completion, that is, dividing the internal structure of the robot into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.
在本发明所提供的实施例中,应该理解到,所揭露的机器人和方法,可以通过其它的方式实现。例如,以上所描述的机器人实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided by the present invention, it should be understood that the disclosed robot and method may be implemented in other ways. For example, the robot embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The integrated modules/units, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the readable medium of the computer can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction area. For example, in certain jurisdictions, according to legislation and patent practice, computer readable medium Excluding electric carrier signals and telecommunications signals.
以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be used for the foregoing implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710895791.2A CN109582325A (en) | 2017-09-28 | 2017-09-28 | Software upgrade method for robot, robot and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710895791.2A CN109582325A (en) | 2017-09-28 | 2017-09-28 | Software upgrade method for robot, robot and computer-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109582325A true CN109582325A (en) | 2019-04-05 |
Family
ID=65912789
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710895791.2A Pending CN109582325A (en) | 2017-09-28 | 2017-09-28 | Software upgrade method for robot, robot and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109582325A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111242577A (en) * | 2020-01-13 | 2020-06-05 | 中国建设银行股份有限公司 | RPA process automation robot deployment method and device and electronic equipment |
CN112306552A (en) * | 2020-11-01 | 2021-02-02 | 国铁吉讯科技有限公司 | System software version management method, device and storage medium |
CN112631632A (en) * | 2020-12-30 | 2021-04-09 | 北京天融信网络安全技术有限公司 | System upgrading method, framework, electronic equipment and readable storage medium |
CN112685057A (en) * | 2020-12-18 | 2021-04-20 | 深圳市网心科技有限公司 | Root file system upgrading method, electronic device and computer readable storage medium |
CN112732298A (en) * | 2020-12-30 | 2021-04-30 | 广州富港万嘉智能科技有限公司 | Data processing method, intelligent robot and related product |
CN112860283A (en) * | 2019-11-12 | 2021-05-28 | 深圳怡化电脑股份有限公司 | Self-identification upgrading method and device of SP (service provider) upgrading package and computer equipment |
CN113076117A (en) * | 2020-01-03 | 2021-07-06 | 北京猎户星空科技有限公司 | OTA (over the air) upgrading method and device, electronic equipment and storage medium |
CN113342374A (en) * | 2021-06-15 | 2021-09-03 | 东莞新能安科技有限公司 | Battery management system upgrading method and electronic device |
CN113434179A (en) * | 2021-07-08 | 2021-09-24 | 恒安嘉新(北京)科技股份公司 | Online upgrade method, device, equipment and storage medium for programmable power supply |
CN113504922A (en) * | 2021-06-07 | 2021-10-15 | 深圳市优必选科技股份有限公司 | Robot software upgrading method and device, bridge server and upgrading server |
CN113515747A (en) * | 2021-05-17 | 2021-10-19 | 深圳市友华通信技术有限公司 | Equipment upgrading method, device, equipment and storage medium |
CN114995855A (en) * | 2022-06-07 | 2022-09-02 | 深圳市视美泰技术股份有限公司 | Android system upgrade method, device, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101290579A (en) * | 2008-06-16 | 2008-10-22 | 四川长虹电器股份有限公司 | Reconfigurable software unit upgrading method |
CN101719072A (en) * | 2009-11-23 | 2010-06-02 | 青岛海信宽带多媒体技术有限公司 | Embedded type terminal equipment software upgrading method and upgrading device |
CN102364891A (en) * | 2011-09-13 | 2012-02-29 | 杭州华三通信技术有限公司 | Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment |
US20140196021A1 (en) * | 2013-01-04 | 2014-07-10 | Quanta Computer Inc. | Remote upgrade servers and load balancing methods thereof |
CN105912340A (en) * | 2016-04-26 | 2016-08-31 | 江苏惠通集团有限责任公司 | Primary device, remote control and overhead upgrading method of remote control |
-
2017
- 2017-09-28 CN CN201710895791.2A patent/CN109582325A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101290579A (en) * | 2008-06-16 | 2008-10-22 | 四川长虹电器股份有限公司 | Reconfigurable software unit upgrading method |
CN101719072A (en) * | 2009-11-23 | 2010-06-02 | 青岛海信宽带多媒体技术有限公司 | Embedded type terminal equipment software upgrading method and upgrading device |
CN102364891A (en) * | 2011-09-13 | 2012-02-29 | 杭州华三通信技术有限公司 | Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment |
US20140196021A1 (en) * | 2013-01-04 | 2014-07-10 | Quanta Computer Inc. | Remote upgrade servers and load balancing methods thereof |
CN105912340A (en) * | 2016-04-26 | 2016-08-31 | 江苏惠通集团有限责任公司 | Primary device, remote control and overhead upgrading method of remote control |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112860283B (en) * | 2019-11-12 | 2024-04-02 | 深圳怡化电脑股份有限公司 | SP upgrade package self-identification upgrade method and device and computer equipment |
CN112860283A (en) * | 2019-11-12 | 2021-05-28 | 深圳怡化电脑股份有限公司 | Self-identification upgrading method and device of SP (service provider) upgrading package and computer equipment |
CN113076117B (en) * | 2020-01-03 | 2024-05-07 | 北京猎户星空科技有限公司 | OTA upgrading method and device, electronic equipment and storage medium |
CN113076117A (en) * | 2020-01-03 | 2021-07-06 | 北京猎户星空科技有限公司 | OTA (over the air) upgrading method and device, electronic equipment and storage medium |
CN111242577A (en) * | 2020-01-13 | 2020-06-05 | 中国建设银行股份有限公司 | RPA process automation robot deployment method and device and electronic equipment |
CN112306552A (en) * | 2020-11-01 | 2021-02-02 | 国铁吉讯科技有限公司 | System software version management method, device and storage medium |
CN112685057A (en) * | 2020-12-18 | 2021-04-20 | 深圳市网心科技有限公司 | Root file system upgrading method, electronic device and computer readable storage medium |
CN112732298A (en) * | 2020-12-30 | 2021-04-30 | 广州富港万嘉智能科技有限公司 | Data processing method, intelligent robot and related product |
CN112631632A (en) * | 2020-12-30 | 2021-04-09 | 北京天融信网络安全技术有限公司 | System upgrading method, framework, electronic equipment and readable storage medium |
CN112732298B (en) * | 2020-12-30 | 2024-04-19 | 广州富港生活智能科技有限公司 | Data processing method, intelligent robot and related products |
CN112631632B (en) * | 2020-12-30 | 2024-03-12 | 北京天融信网络安全技术有限公司 | System upgrade method, framework, electronic device and readable storage medium |
CN113515747A (en) * | 2021-05-17 | 2021-10-19 | 深圳市友华通信技术有限公司 | Equipment upgrading method, device, equipment and storage medium |
CN113515747B (en) * | 2021-05-17 | 2024-02-09 | 深圳市友华通信技术有限公司 | Equipment upgrading method, device, equipment and storage medium |
CN113504922A (en) * | 2021-06-07 | 2021-10-15 | 深圳市优必选科技股份有限公司 | Robot software upgrading method and device, bridge server and upgrading server |
CN113504922B (en) * | 2021-06-07 | 2024-01-12 | 深圳市优必选科技股份有限公司 | Robot software upgrading method and device, bridge server and upgrading server |
CN113342374A (en) * | 2021-06-15 | 2021-09-03 | 东莞新能安科技有限公司 | Battery management system upgrading method and electronic device |
CN113434179A (en) * | 2021-07-08 | 2021-09-24 | 恒安嘉新(北京)科技股份公司 | Online upgrade method, device, equipment and storage medium for programmable power supply |
CN113434179B (en) * | 2021-07-08 | 2023-12-19 | 恒安嘉新(北京)科技股份公司 | Online upgrade method, device and equipment of programmable power supply and storage medium |
CN114995855A (en) * | 2022-06-07 | 2022-09-02 | 深圳市视美泰技术股份有限公司 | Android system upgrade method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109582325A (en) | Software upgrade method for robot, robot and computer-readable storage medium | |
US10643621B2 (en) | Speech recognition using electronic device and server | |
EP3010015B1 (en) | Electronic device and method for spoken interaction thereof | |
CN104699236A (en) | Using context to interpret natural language speech recognition commands | |
CN106126256B (en) | A kind of driven management method, apparatus and system | |
CN111203874A (en) | Robot control method, device, electronic device and storage medium | |
CN110459222A (en) | Voice control method, voice control device and terminal equipment | |
CN106066686B (en) | A kind of information processing method and terminal device | |
CN111381842A (en) | Robot upgrading method, electronic equipment and server | |
CN111694572A (en) | Code format conversion method, device, computer equipment and storage medium | |
CN111258613B (en) | Firmware upgrading method, device, electronic equipment and storage medium | |
WO2018157499A1 (en) | Method for voice input and related device | |
CN110569058A (en) | System upgrading method, device, terminal and computer readable storage medium | |
CN106775835B (en) | Method, server and terminal for acquiring upgrade file | |
CN109104481B (en) | File integrity detection method, file integrity detection device and terminal equipment | |
CN108009068A (en) | Information recording method, information record carrier and intelligent terminal | |
US20100121909A1 (en) | Storage apparatus and on-line client service system, software and method thereof | |
CN106775641A (en) | Software update method and smart device | |
CN107360230A (en) | Application downloading method and device and computer readable storage medium | |
CN116028099A (en) | Method for generating installation package, related device, equipment and storage medium | |
CN109963233A (en) | Method, device and terminal device for updating robot wake-up word | |
CN111352357A (en) | Robot control method and device and terminal equipment | |
CN107729180B (en) | Abnormal information processing method and device, computer device and readable storage medium | |
CN106292977B (en) | Adapter identification method and terminal | |
CN111506966B (en) | Discriminating method and device of process coordination model, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190405 |