WO2023035901A1 - 系统软件升级方法、装置、设备和计算机存储介质 - Google Patents

系统软件升级方法、装置、设备和计算机存储介质 Download PDF

Info

Publication number
WO2023035901A1
WO2023035901A1 PCT/CN2022/113471 CN2022113471W WO2023035901A1 WO 2023035901 A1 WO2023035901 A1 WO 2023035901A1 CN 2022113471 W CN2022113471 W CN 2022113471W WO 2023035901 A1 WO2023035901 A1 WO 2023035901A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgraded
target
program data
verification
data
Prior art date
Application number
PCT/CN2022/113471
Other languages
English (en)
French (fr)
Inventor
段平
Original Assignee
深圳Tcl新技术有限公司
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 深圳Tcl新技术有限公司 filed Critical 深圳Tcl新技术有限公司
Publication of WO2023035901A1 publication Critical patent/WO2023035901A1/zh

Links

Classifications

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

Definitions

  • the application belongs to the technical field of software online upgrade, and in particular relates to a system software upgrade method, device, equipment and computer storage medium.
  • OTA over-the-air technology
  • the technical problem to be solved in this application is how to provide a system software upgrade solution, which can not only ensure the safety and reliability of the differential software package upgrade, but also ensure that the budget of the software upgrade cost is controllable.
  • the embodiment of the present application provides a method for upgrading system software, including:
  • determine whether the program data in the target data area to be upgraded of the device to be upgraded is correct including:
  • the verification result is used to indicate whether the target verification code is the same as the standard verification code in the standard verification code data table.
  • the target verification code is located by the device to be upgraded according to the location index information. program data, and calculated based on program data;
  • determine whether the program data in the target data area to be upgraded of the device to be upgraded is correct including:
  • the target check code is obtained by locating the program data according to the positioning index information of the device to be upgraded, and calculating according to the program data;
  • determine whether the program data in the target data area to be upgraded of the device to be upgraded is correct including:
  • the program data is obtained by the device to be upgraded from the target data area to be upgraded according to the location index information;
  • a differential upgrade package is produced and generated; wherein, the project compilation environment configuration data item includes difference information between the full upgrade package of the current version and the full upgrade package of the target version.
  • the differential upgrade package After making and generating the differential upgrade package, it also includes:
  • target check code and the standard check code are configured to be obtained by calculating the program data in the data area to be upgraded according to the MD5 information digest algorithm.
  • the embodiment of the present application provides a method for upgrading system software, including:
  • the management device before receiving the differential upgrade package sent by the management device, it also includes:
  • the verification instruction includes the positioning index information of the target data area to be upgraded and the standard verification code data table;
  • the verification result is generated according to the positioning index information and the standard verification code data table.
  • the verification result is used to indicate whether the target verification code is the same as the standard verification code.
  • the target verification code is located to the program data according to the positioning index information, and based on Calculated from program data;
  • the management device before receiving the differential upgrade package sent by the management device, it also includes:
  • the verification instruction includes the positioning index information of the target data area to be upgraded;
  • the management device before receiving the differential upgrade package sent by the management device, it also includes:
  • the verification instruction includes the positioning index information of the target data area to be upgraded;
  • the management device determines the target check code according to the program data, and when the target check code and the standard check code are the same, determine that the program data is correct, and when the target check code and the standard check code If not, it is determined that the program data is incorrect.
  • the embodiment of the present application provides a system software upgrade device, the device includes:
  • the program data check module is used to determine whether the program data in the data area to be upgraded of the device to be upgraded is correct
  • the differential packet push module is used to push the differential packet to the device to be upgraded when the program data in the data area to be upgraded of the device to be upgraded is correct;
  • program data verification module includes:
  • a verification code acquisition module configured to obtain the verification code of the data area to be upgraded of the device to be upgraded
  • the check code verification module is used to determine whether the check code is the same as the corresponding standard check code in the preset check code comparison table. If they are the same, it is determined that the program data in the data area to be upgraded of the device to be upgraded is incorrect.
  • the verification code acquisition module includes:
  • the sending module is used to send the verification code acquisition instruction and the positioning index information of the data area to be upgraded to the device to be upgraded;
  • the receiving module is used to receive the check code returned by the device to be upgraded.
  • the check code is calculated by the device to be upgraded according to the positioning index information to locate the program data in the data area to be upgraded, and based on the data in the data area to be upgraded.
  • the embodiment of the present application provides a terminal device, and the terminal device includes:
  • the upgrade package acquisition module is used to selectively acquire the differential upgrade package or the full upgrade package, and the selective acquisition of the differential upgrade package or the full upgrade package is executed based on whether the program data in the data area to be upgraded of the device is correct;
  • the upgrade execution module is configured to upgrade the program data in the data area to be upgraded of the device based on the obtained differential upgrade package or full upgrade package.
  • an embodiment of the present application provides an electronic device, the electronic device includes: a processor, and a memory storing computer program instructions; the processor reads and executes the computer program instructions, so as to realize the above first aspect and The method for upgrading system software in any implementation manner of the first aspect; or, the processor reads and executes computer program instructions to implement the second aspect and the method for upgrading system software in any implementation manner of the second aspect.
  • the embodiment of the present application provides a computer storage medium, on which computer program instructions are stored; when the computer program instructions are executed by a processor, the above-mentioned first aspect and any implementation manner of the first aspect can be realized A method for upgrading system software; or, when the computer program instructions are executed by a processor, the second aspect and the method for upgrading system software in any implementation manner of the second aspect are implemented.
  • the system software upgrade method, device, device and computer storage medium of the embodiments of the present application can automatically select the type of the upgrade package, thereby not only ensuring the success rate and stability of the user's software upgrade, but also effectively reducing data transmission traffic.
  • FIG. 1 is a schematic flowchart of a method for upgrading system software provided by an embodiment of the present application
  • Fig. 2 is a schematic structural diagram of a system software upgrading device provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of interaction between devices in a method for upgrading system software provided in an embodiment of the present application
  • FIG. 4 is a schematic diagram of a system software upgrade device provided by an embodiment of the present application applied on a smart TV;
  • Fig. 5 is a schematic structural diagram of a system software upgrading device provided by an embodiment of the present application.
  • the technical solution provided by this application is mainly applied to system software upgrades.
  • system software upgrades of electronic products such as smart TVs or mobile phones
  • the differential upgrade method it is very dependent on the correctness of the client (device to be upgraded) body software. If If the software data of the device to be upgraded is abnormal, the result of the differential upgrade may be wrong, which may lead to failures such as crashes, etc.
  • the full package upgrade method will occupy a large amount of Internet traffic and the cost will be high.
  • the embodiments of the present application provide a system software upgrading method, device, device and computer storage medium, where the device includes a device to be upgraded and a management device.
  • the system architecture of this embodiment of the present application may include a management device and one or more devices to be upgraded.
  • the management device can be a stand-alone computer device.
  • the management device may be a terminal device or a management device.
  • the management device can also be a device cluster.
  • the management device The management device is used to control the system software upgrade of one or more devices to be upgraded included in the system architecture.
  • the management device can generate, store and manage full upgrade packages and differential upgrade packages of all software versions corresponding to each device to be upgraded.
  • the management device pushes the full upgrade package or the differential upgrade package for the device to be upgraded.
  • the device to be upgraded may be a terminal device, and the terminal device may include any type of electronic device such as a smart home appliance (for example, a television), a personal computer, a smart phone, a tablet computer, a vehicle-mounted device, or an artificial intelligence device.
  • a smart home appliance for example, a television
  • a personal computer for example, a personal computer
  • a smart phone for example, a tablet computer
  • a vehicle-mounted device for example, a vehicle-mounted device, or an artificial intelligence device.
  • the management device (such as a cloud management device or server, etc.) is used as the main body of the system software upgrade.
  • the management device such as a cloud management device or server, etc.
  • any device that can perform the same function or function as the management device in this application can be used as the main body of the system software upgrade. .
  • Fig. 1 shows a schematic flowchart of a method for upgrading system software provided by an embodiment of the present application. As shown in Figure 1, the method may include the contents of step N1-step N3:
  • the data area to be upgraded specifically refers to the storage space corresponding to one or more programs or data to be upgraded in the operating system of the device to be upgraded, and the data area to be upgraded may also be installed on the device to be upgraded
  • the storage space corresponding to one or more programs or data to be upgraded of software such as application software, etc.
  • the device to be upgraded may contain one or more data areas to be upgraded. For example.
  • the device to be upgraded contains multiple data areas to be upgraded, which are respectively the data area to be upgraded 1, the data area to be upgraded 2, the data area to be upgraded 3, etc., wherein, the data area to be upgraded 1 refers to multiple sections in the operating system of the device to be upgraded
  • the storage space 1 corresponding to the program to be upgraded the data area 2 to be upgraded refers to the storage space 2 corresponding to one or more sections of the program or data to be upgraded in the application software A installed in the device to be upgraded
  • the data area 3 to be upgraded refers to The storage space 3 corresponding to one or more programs or data to be upgraded of the application software B installed in the device to be upgraded.
  • the management device when the device to be upgraded needs to upgrade the target software, the management device first determines whether the program data in the target data area to be upgraded corresponding to the target software is correct.
  • the target area to be upgraded is one of the above one or more data areas to be upgraded.
  • the management device determines whether the program data in the target data area to be upgraded of the device to be upgraded is correct mainly based on whether the target check code of the target data area to be upgraded is the same as the standard check code.
  • the management device in the embodiment of the present application includes location index information and a check code data table corresponding to each data area to be upgraded of the device to be upgraded.
  • the check code data table contains the standard check code corresponding to each data block included in the data area to be upgraded. Since the check code data table contains the standard check code code, so the check code data table can also be called the standard check code data table.
  • steps N2 and N3 may specifically include:
  • the management device establishes a communication connection with the device to be upgraded, and sends a verification code acquisition instruction and location index information of the data area to be upgraded to the device to be upgraded;
  • the management device receives the check code returned by the device to be upgraded, the check code is used by the device to be upgraded to locate the program data of the data area to be upgraded according to the location index information, and based on the data area to be upgraded calculated from the data.
  • the device to be upgraded contains one or more data areas to be upgraded.
  • the data area to be upgraded can be the area corresponding to one or more programs or data in the operating system of the device to be upgraded, or the area installed on the device to be upgraded.
  • the device to be upgraded After the device to be upgraded receives the program data verification task of the data area to be upgraded distributed by the management device or the verification code acquisition instruction sent by the management device, and the positioning index information of the data area to be upgraded sent by the management device, it locates the data area to be upgraded according to the positioning index information. Upgrade the data area and calculate the checksum. After the device to be upgraded finishes calculating the check code, it sends the check code to the management device.
  • the device to be upgraded can also obtain the program data of the area according to the received positioning index information of the data area to be upgraded, and return the acquired program data to the management device, and the management The device processes the program data according to the same algorithm to obtain the check code. In this way, the computing resources of the device to be upgraded can be reduced, and the management device performs related calculations and judgments.
  • the management device determines whether the check codes are the same as the corresponding standard check codes in the preset check code comparison table according to the obtained program data check codes of all the data areas of the device to be upgraded.
  • the device to be upgraded includes the data area to be upgraded 1, the data area to be upgraded 2, and the data area to be upgraded 3, and the preset check code comparison table includes the standard check code corresponding to the data area 1 to be upgraded, and the data area 2 and the standard check code corresponding to the data area 3 to be upgraded.
  • the management device determines the program data check code and preset check code of the data area 1 to be upgraded, the data area 2 to be upgraded, and the data area 3 to be upgraded. Whether the corresponding check codes in the code comparison table are the same.
  • the preset check code comparison table in this embodiment and the standard check code contained therein can be obtained by a predetermined algorithm (such as MD5 (Message-Digest Algorithm 5) Information Digest Algorithm) is generated for the program or data area in the device to be upgraded corresponding to the differential upgrade package.
  • the comparison table can be released to the management device together with the generated software version upgrade package.
  • the specific calculation algorithm can be calculated in units of Flash blocks, or in the form of files, depending on whether the differential method is in the form of files or blocks.
  • the same verification code calculation method is adopted on the device to be upgraded to ensure that the calculation algorithm is consistent.
  • the program data verification code in the data area to be upgraded of the device to be upgraded is compared with the corresponding standard verification code in the preset verification code comparison table.
  • the device sends a differential upgrade package to upgrade, otherwise it sends a full package to the device to be upgraded for a full package software upgrade.
  • the preset check code comparison table can also be called a standard check code data table.
  • this embodiment of the present application provides a schematic flowchart of another upgrading method, as shown in FIG. 3 .
  • the management device "shakes hands” with the device to be upgraded (client) to establish a connection;
  • the management device issues a differential verification task to the device to be upgraded.
  • the management device sends an instruction to the device to be upgraded to start the verification task.
  • the management device judges the verification result.
  • step S104 the management device judges the verification result may include the following situations:
  • the management device sends a verification instruction to the device to be upgraded, the verification instruction includes the location index information of the target data area to be upgraded and a standard verification code data table; the management device receives the verification code sent by the device to be upgraded A check result, the check result is used to indicate whether the target check code is the same as the standard check code, the target check code is that the device to be upgraded locates the program data according to the location index information, and calculated based on the program data; when the check result indicates that the target check code is the same as the standard check code, it is determined that the program data is correct; when the check result indicates that the target check code When the check code is different from the standard check code, it is determined that the program data is incorrect.
  • the management device sends a verification instruction to the device to be upgraded, the verification instruction includes location index information of the target data area to be upgraded; the management device receives the target verification code sent by the device to be upgraded, and the The target check code is obtained by locating the program data according to the location index information of the device to be upgraded and calculating according to the program data; when the target check code is the same as the standard check code, determine the The program data is correct; when the target check code is different from the standard check code, it is determined that the program data is incorrect.
  • the management device sends a verification instruction to the device to be upgraded, where the verification instruction includes location index information of the target data area to be upgraded; the management device receives the program data sent by the device to be upgraded, and the The program data is obtained by the device to be upgraded from the target data area to be upgraded according to the positioning index information; the management device determines the target check code according to the program data; when the target check code and the standard check code When the check codes are the same, it is determined that the program data is correct; when the target check code is different from the standard check code, it is determined that the program data is incorrect.
  • the management device receives the verification result.
  • the management device first traverses (multiple) clients (one by one) to shake hands with them, and then sends data information to the target computer (device to be upgraded/client) to start the differential verification task S102, the client
  • the machine calculates the MD5 value check code of the data area to be updated in the basic software of the target machine (device to be upgraded/client), compares it with the standard MD5 value data issued by the management device (cloud), and then compares the result Feedback to the management device, the management device determines the type of upgrade package to be pushed to the target machine (device to be upgraded/client) according to the feedback result, and if the check code verification is all passed, then pushes the smaller differential package software to the target machine (to be upgraded) upgrade device/client) upgrade, otherwise push the full upgrade package to the target machine (device/client to be upgraded) for upgrade.
  • FIG. 4 is a schematic flow diagram showing the application of a system software upgrading device provided in an embodiment of the present application on a TV set. As shown in Figure 3, the process of applying the system software upgrade device to the TV is explained:
  • the access first traverses the smart TV (device to be upgraded/client) to shake hands with it (establish a communication connection), and then sends S03 data information to the target machine to start the target machine (program data is the TV body software) verification task S06, and the management device sends
  • the TV sends out the TV body software verification command, and at the same time sends out the benchmark (standard) MD5 value of the TV body software and the index information of the data area to be upgraded.
  • the TV calculates the MD5 value of the TV body software, according to the The comparison of the corresponding standard MD5 values saves the result to the S08 module, and then S08 feeds back the result to the management device, and the management device determines and pushes the upgrade package category to the target machine according to the feedback result.
  • the full upgrade package will be pushed to the target machine for upgrading; because the target machine has a fixed IP address and MAC address location, fixed-point identification and push can be used, and there will be no mutual interference between customers.
  • the motor will calculate the MD5 value of the data area to be upgraded, compare it with the corresponding standard MD5 value, save the result to the S08 module, and then S08 will feed back the result to the management device.
  • the device determines the type of upgrade package to be pushed to the target machine according to the feedback result, and if the verification is passed, then pushes the smaller differential package software to the target machine to be upgraded, otherwise pushes the full upgrade package to the target machine to be upgraded.
  • the MD5 algorithm is used as the calculation method of the check code; other algorithms may also be selected in practical applications, which is not limited in this application.
  • the system software upgrade device includes:
  • the program data check module is used to determine whether the program data in the data area to be upgraded of the device to be upgraded is correct
  • the differential packet push module is used to push the differential packet to the device to be upgraded when the program data in the data area to be upgraded of the device to be upgraded is correct;
  • the full package push module is used to push the full package to the device to be upgraded when the program data in the data area to be upgraded of the device to be upgraded is incorrect.
  • program data verification module is also used to execute:
  • the verification result is used to indicate whether the target verification code is the same as the standard verification code in the standard verification code data table.
  • the target verification code is located by the device to be upgraded according to the location index information. program data, and calculated based on program data;
  • program data verification module is also used to execute:
  • the target check code is obtained by locating the program data according to the positioning index information of the device to be upgraded, and calculating according to the program data;
  • program data verification module is also used to execute:
  • the program data is obtained by the device to be upgraded from the target data area to be upgraded according to the location index information;
  • system software upgrading device also includes:
  • a differential upgrade package is produced and generated; wherein, the project compilation environment configuration data item includes difference information between the full upgrade package of the current version and the full upgrade package of the target version.
  • the differential packet push module is specifically used to execute:
  • the full package push module is specifically used to execute:
  • the embodiment of the present application also provides a terminal device, and the terminal device includes:
  • the upgrade package acquisition module is used to selectively acquire the differential upgrade package or the full upgrade package, and the selective acquisition of the differential upgrade package or the full upgrade package is executed based on whether the program data in the data area to be upgraded of the device is correct;
  • the upgrade execution module is configured to upgrade the program data in the data area to be upgraded of the device based on the acquired differential upgrade package or full upgrade package.
  • the terminal equipment also includes:
  • the instruction receiving module is used to execute:
  • the verification instruction includes the positioning index information of the target data area to be upgraded and the standard verification code data table;
  • the verification result is generated according to the positioning index information and the standard verification code data table.
  • the verification result is used to indicate whether the target verification code is the same as the standard verification code.
  • the target verification code is located to the program data according to the positioning index information, and based on Calculated from program data;
  • the instruction receiving module is also used to execute:
  • the verification instruction includes the positioning index information of the target data area to be upgraded;
  • the instruction receiving module is also used to execute:
  • the verification instruction includes the positioning index information of the target data area to be upgraded;
  • the management device determines the target check code according to the program data, and when the target check code and the standard check code are the same, determine that the program data is correct, and when the target check code and the standard check code If not, it is determined that the program data is incorrect.
  • each of the above modules can be implemented as an independent entity, or can be combined arbitrarily as the same or several entities.
  • each of the above modules and the corresponding beneficial effects please refer to the previous method embodiments. I won't repeat them here.
  • FIG. 5 shows a schematic diagram of a hardware structure of a system software upgrading device provided by an embodiment of the present application.
  • the system software upgrading device may include a device to be upgraded and a management device.
  • the system software upgrading device may include a processor 301 and a memory 302 storing computer program instructions.
  • the above-mentioned processor 301 may include a central processing unit (Central Processing Unit, CPU), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present application.
  • CPU Central Processing Unit
  • ASIC Application Specific Integrated Circuit
  • Memory 302 may include mass storage for data or instructions.
  • memory 302 may include a hard disk drive (Hard Disk Drive, HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (Universal Serial Bus, USB) drive or two or more Combinations of multiple of the above.
  • memory 302 may include removable or non-removable (or fixed) media, or memory 302 may be a non-volatile solid-state memory.
  • the storage 302 can be inside or outside the comprehensive gateway disaster recovery device.
  • the memory 302 may be a read only memory (Read Only Memory, ROM).
  • ROM Read Only Memory
  • the ROM can be mask programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or both A combination of one or more of the above.
  • the processor 301 reads and executes the computer program instructions stored in the memory 302 to implement the method steps N1-N3 in the embodiment shown in FIG. 1 , and achieve the corresponding technical effects achieved by executing the method steps in the example shown in FIG. 1 , For the sake of brevity, no more details are given here.
  • the device for upgrading system software may further include a communication interface 303 and a bus 310 .
  • the processor 301 , the memory 302 , and the communication interface 303 are connected through a bus 310 to complete mutual communication.
  • the communication interface 303 is mainly used to realize the communication between various modules, devices, units and/or devices in the embodiments of the present application.
  • the bus 310 includes hardware, software or both, and couples the components of the online data traffic charging device to each other.
  • the bus may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), Hyper Transport (HT) interconnect, Industry Standard Architecture (ISA) bus, InfiniBand interconnect, low pin count (LPC) bus, memory bus, Micro Channel Architecture (MCA) bus, Peripheral Component Interconnect (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association local (VLB) bus or other suitable bus or a combination of two or more of these.
  • Bus 310 may comprise one or more buses, where appropriate. Although the embodiments of this application describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.
  • the system software upgrade device can automatically select to perform differential data packet upgrade or full packet upgrade according to the data situation in the data area of the device to be upgraded to be upgraded, and execute the system software upgrade method in the embodiment of the present application, thereby realizing the combination of FIG. 1 Describes the system software upgrade method.
  • the embodiments of the present application may provide a computer storage medium for implementation.
  • Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by the processor, any one of the system software upgrading methods in the foregoing embodiments is implemented.
  • the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD, etc.
  • any system software upgrade method provided in the embodiments of the present application can be implemented.
  • beneficial effects that can be achieved by the upgrading method refer to the previous embodiments for details, and will not be repeated here.
  • the functional blocks shown in the structural block diagrams described above may be implemented as hardware, software, firmware, or a combination thereof.
  • hardware When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-ins, feature cards, etc.
  • ASIC Application Specific Integrated Circuit
  • the elements of the present application are the programs or code segments employed to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted over transmission media or communication links by data signals carried in carrier waves. "Machine-readable medium" may include any medium that can store or transmit information.
  • machine-readable media examples include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, etc. wait.
  • Code segments may be downloaded via a computer network such as the Internet, an Intranet, or the like.
  • processors may be, but are not limited to, general purpose processors, special purpose processors, application specific processors, or field programmable logic circuits. It can also be understood that each block in the block diagrams and/or flowcharts and combinations of blocks in the block diagrams and/or flowcharts can also be realized by dedicated hardware for performing specified functions or actions, or can be implemented by dedicated hardware and Combination of computer instructions to achieve.

Landscapes

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

Abstract

本申请实施例提供了一种系统软件升级方法、装置、设备和计算机存储介质。通过确定目标待升级数据区域的程序数据是否正确;若正确,则向所述待升级设备推送差分升级包;若不正确,则向所述待升级设备推送全量升级包。从而避免差分升级出错,既避免差分升级出错,又解决了全部采用全量包升级带来高成本的问题。

Description

系统软件升级方法、装置、设备和计算机存储介质
本申请要求申请日为2021年09月08日、申请号为202111049118.X、发明名称为“系统软件升级方法、装置、设备和计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于软件在线升级技术领域,尤其涉及一种系统软件升级方法、装置、设备和计算机存储介质。
背景技术
随着电子产品的普及和发展,产品功能需要不断迭代更新,大多需要通过在线升级方式及时将更新数据发送到用户已购买产品上,让用户及时享受到新技术带来的崭新体验。
现在通过互联网对已出售智能电视或手机等产品进行在线空中(over-the-air technology,OTA)软件版本升级,主要通过全量包升级和差分包升级,其中全量包升级方式采取的是全部代码更新方式,但是所述全量包升级软件文件比较大,会占用较大的互联网流量,费用比较高,频繁升级让厂家的财务预算压力很大;而差分升级方式,占用网络流量带宽小,费用低,升级速度快,但是差分升级软件方式依赖用户本机旧版本软件基础,一旦用户机本体软件有不可预测的变更,则差分升级后的结果就是错误的,有时是灾难性的,会造成升级故障。
因此,如何提供一种系统软件升级的方案,既能保证差分软件包升级的安全可靠,又能保证软件升级费用的预算可控,是本领域技术人员需要解决的技术问题。
技术问题
本申请要解决的技术问题在于,如何提供一种系统软件升级的方案,既能保证差分软件包升级的安全可靠,又能保证软件升级费用的预算可控。
技术解决方案
本申请解决技术问题所采用的技术方案如下:
第一方面,本申请实施例提供一种系统软件升级方法,包括:
确定待升级设备的目标待升级数据区域的程序数据是否正确;
若正确,则向待升级设备推送差分升级包;
若不正确,则向待升级设备推送全量升级包。
进一步的,确定待升级设备的目标待升级数据区域的程序数据是否正确,包括:
向待升级设备发送校验指令,校验指令包括目标待升级数据区域的定位索引信息和标准校验码数据表;
接收待升级设备发送的校验结果,校验结果用于指示目标校验码和标准校验码数据表中的标准校验码是否相同,目标校验码是待升级设备根据定位索引信息定位到程序数据,并基于程序数据计算得到的;
当校验结果指示目标校验码和标准校验码相同时,确定程序数据正确;
当校验结果指示目标校验码和标准校验码不相同时,确定程序数据不正确。
进一步的,确定待升级设备的目标待升级数据区域的程序数据是否正确,包括:
向待升级设备发送校验指令,校验指令包括目标待升级数据区域的定位索引信息;
接收待升级设备发送的目标校验码,目标校验码是待升级设备根据定位索引信息定位到程序数据,并根据程序数据计算得到的;
当目标校验码和标准校验码相同时,确定程序数据正确;
当目标校验码和标准校验码不相同时,确定程序数据不正确。
进一步的,确定待升级设备的目标待升级数据区域的程序数据是否正确,包括:
向待升级设备发送校验指令,校验指令包括目标待升级数据区域的定位索引信息;
接收待升级设备发送的程序数据,程序数据是待升级设备根据定位索引信息从目标待升级数据区域获取的;
根据程序数据确定目标校验码;
当目标校验码和标准校验码相同时,确定程序数据正确;
当目标校验码和标准校验码不相同时,确定程序数据不正确。
进一步的,确定待升级设备中的目标待升级数据区域的程序数据是否正确之前,还包括:
读取系统软件当前版本的全量升级包;
读取系统软件目标版本的全量升级包;
读取系统软件的项目编译环境配置数据项;
根据项目编译环境配置数据项,制作并生成差分升级包;其中,项目编译环境配置数据项包括当前版本的全量升级包和目标版本的全量升级包的差异信息。
进一步的,制作并生成差分升级包后,还包括:
生成定位索引信息;
读取系统软件当前版本的全量升级包;
根据定位索引信息计算系统软件当前版本的全量升级包需要校验的程序数据,并生成标准校验码数据表。
进一步的,目标校验码和标准校验码配置为根据MD5信息摘要算法,对待升级数据区域的程序数据进行计算得到。
第二方面,本申请实施例提供一种系统软件升级方法,包括:
当目标软件对应的目标待升级数据区域的程序数据正确时,接收管理设备发送的差分升级包;
当目标待升级数据区域的程序数据不正确时,接收管理设备发送的全量升级包。
进一步的,接收管理设备发送的差分升级包之前,还包括:
接收管理设备发送的校验指令,校验指令包括目标待升级数据区域的定位索引信息和标准校验码数据表;
根据定位索引信息和标准校验码数据表生成校验结果,校验结果用于指示目标校验码和标准校验码是否相同,目标校验码是根据定位索引信息定位到程序数据,并基于程序数据计算得到的;
将校验结果发送给管理设备,以使得管理设备在校验结果指示目标校验码和标准校验码相同时,确定程序数据正确,当校验结果指示目标校验码和标准校验码不相同时,确定程序数据不正确。
进一步的,接收管理设备发送的差分升级包之前,还包括:
接收管理设备发送的校验指令,校验指令包括目标待升级数据区域的定位索引信息;
根据定位索引信息定位到程序数据,并根据程序数据计算得到目标校验码;
将目标校验码发送给管理设备,以使得管理设备在目标校验码和标准校验码相同时,确定程序数据正确,当目标校验码和标准校验码不相同时,确定程序数据不正确。
进一步的,接收管理设备发送的差分升级包之前,还包括:
接收管理设备发送的校验指令,校验指令包括目标待升级数据区域的定位索引信息;
根据定位索引信息从目标待升级数据区域获取程序数据;
将程序数据发送给管理设备,以使得管理设备根据程序数据确定目标校验码,并当目标校验码和标准校验码相同时,确定程序数据正确,当目标校验码和标准校验码不相同时,确定程序数据不正确。
第三方面,本申请实施例提供一种系统软件升级装置,装置包括:
程序数据校验模块,用于确定待升级设备的待升级数据区域的程序数据是否正确;
差分包推送模块,用于当待升级设备的待升级数据区域的程序数据正确时,向待升级设备推送差分包;
全量包推送模块,用于当待升级设备的待升级数据区域的程序数据不正确时,向待升级设备推送全量包。
进一步的,程序数据校验模块包括:
校验码获取模块,用于获取待升级设备的待升级数据区域的校验码;
校验码验证模块,用于确定校验码和预设校验码对照表中对应的标准校验码是否相同,若相同,则确定待升级设备的待升级数据区域的程序数据正确,若不相同,则确定待升级设备的待升级数据区域的程序数据不正确。
进一步的,校验码获取模块包括:
发送模块,用于向待升级设备发送校验码获取指令及待升级数据区域的定位索引信息;
接收模块,用于接收待升级设备返回的校验码,校验码由待升级设备根据定位索引信息定位待升级数据区域的程序数据,并基于待升级数据区域的数据计算得出。
第四方面,本申请实施例提供一种终端设备,终端设备包括:
升级包获取模块,用于选择性获取差分升级包或全量升级包,差分升级包或全量升级包的选择性获取,基于设备的待升级数据区域的程序数据是否正确而执行;
升级执行模块,用于基于获取的差分升级包或全量升级包对设备的待升级数据区域的程序数据进行升级。
第五方面,本申请实施例提供了一种电子设备,电子设备包括:处理器,以及存储有计算机程序指令的存储器;处理器读取并执行计算机程序指令,以实现如上所述第一方面以及第一方面任意一种实现方式的系统软件升级方法;或者,处理器读取并执行计算机程序指令,以实现如上所述第二方面以及第二方面任意一种实现方式的系统软件升级方法。
第六方面,本申请实施例提供了一种计算机存储介质,计算机存储介质上存储有计算机程序指令;计算机程序指令被处理器执行时实现如上所述第一方面以及第一方面任意一种实现方式的系统软件升级方法;或者,计算机程序指令被处理器执行时实现如上所述第二方面以及第二方面任意一种实现方式的系统软件升级方法。
有益效果
本申请实施例的系统软件升级方法、装置、设备和计算机存储介质,能够自动选择升级包的类型,从而既能保证用户软件升级的成功率和稳定性,又能有效降低数据传输流量。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单的介绍,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种系统软件升级方法的流程示意图;
图2是本申请实施例提供的一种系统软件升级装置的结构示意图;
图3是本申请实施例提供的一种系统软件升级方法中设备间交互示意图;
图4是本申请实施例提供的一种系统软件升级装置在智能电视上应用的框架示意图;
图5是本申请实施例提供的一种系统软件升级设备的结构示意图。
本发明的实施方式
下面将详细描述本申请的各个方面的特征和示例性实施例,为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及具体实施例,对本申请进行进一步详细描述。应理解,此处所描述的具体实施例仅意在解释本申请,而不是限定本申请。对于本领域技术人员来说,本申请可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述仅仅是为了通过示出本申请的示例来提供对本申请更好的理解。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本申请所提供的技术方案主要应用于系统软件升级,对于智能电视或手机等电子产品的系统软件升级,尤其是对于差分升级方式,非常依赖于客户机(待升级设备)本体软件正确性,如果待升级设备本体软件数据发生异常,则差分升级结果可能出错,会导致死机等等故障,而全部采用全量包升级的方式,会占用较大的互联网流量,费用较高。
为了解决现有技术问题,本申请实施例提供一种系统软件升级方法、装置、设备和计算机存储介质,该设备包括待升级设备和管理设备。
首先对本申请实施例的系统架构进行介绍。本申请实施例的系统架构中可以包括管理设备和一个或多个待升级设备。
管理设备可以是一个独立的计算机设备。例如管理设备可以是一个终端设备或者一个管理设备。管理设备也可以是一个设备集群。例如管理设备管理设备用于对系统架构中所包含的一个或多个待升级设备的系统软件升级进行控制。管理设备可以生成、存储以及管理每个待升级设备对应的所有软件版本的全量升级包和差分升级包。管理设备对用于待升级设备进行全量升级包或者差分升级包的推送。
其中,待升级设备可以是终端设备,该终端设备可以包括智能家电(例如,电视机)、个人计算机、智能手机、平板电脑等,车载装置或人工智能设备等任意类型的电子设备。
基于上述的系统架构,接下来对本申请实施例所提供的系统软件升级方法进行介绍。在以下实施例中,以管理设备(例如云端管理设备或服务器等)作为系统软件升级的主体,实际上,可以完成与本申请中管理设备相同功能或作用的设备均可作为系统软件升级的主体。
图1示出了本申请一个实施例提供的系统软件升级方法的流程示意图。如图1所示,该方法可以包括步骤N1-步骤N3的内容:
N1、确定待升级设备的目标待升级数据区域的程序数据是否正确。
本申请实施例中,待升级数据区域具体是指是待升级设备的操作系统中的一段或多段待升级程序或数据所对应的存储空间,待升级数据区域也可以是安装在待升级设备上的软件(如应用软件等)的一段或多段待升级程序或数据等所对应的存储空间。待升级设备中可以包含一个或多个待升级数据区域。例如。待升级设备中包含多个待升级数据区域,分别为待升级数据区域1、待升级数据区域2、待升级数据区域3等,其中,待升级数据区域1是指待升级设备的操作系统中多段待升级程序所对应的存储空间1,待升级数据区域2是指待升级设备中所安装的应用软件A的一段或多段待升级程序或数据等所对应的存储空间2,待升级数据区域3指待升级设备中所安装的应用软件B的一段或多段待升级程序或数据等所对应的存储空间3。
本申请实施例中,当待升级设备需要对目标软件进行升级时,管理设备首先确定该目标软件所对应的目标待升级数据区域中的程序数据是否正确。目标待升级区域为上述一个或多个待升级数据区域中的一个。
本申请实施例中,管理设备确定待升级设备的目标待升级数据区域的程序数据是否正确主要是依据目标待升级数据区域的目标校验码和标准校验码是否相同来确定的。
本申请实施例中的管理设备中包含待升级设备的每一个待升级数据区域所对应的定位索引信息和校验码数据表。以其中的任意一个待升级数据区域为例,该校验码数据表包含该待升级数据区域中所包括的每个数据区块对应的标准校验码,由于校验码数据表包含标准校验码,因此该校验码数据表也可以称为标准校验码数据表。
N2、若正确,则向所述待升级设备推送差分升级包。
N3、若不正确,则向所述待升级设备推送全量升级包,以使得所述待升级设备根据所述全量升级包对所述目标软件进行升级。
上述步骤N2、N3具体可以包括:
管理设备与待升级设备建立通信连接,向所述待升级设备发送校验码获取指令以及所述待升级数据区域的定位索引信息;
管理设备接收所述待升级设备返回的校验码,所述校验码由所述待升级设备根据所述定位索引信息定位所述待升级数据区域的程序数据,并基于所述待升级数据区域的数据计算得出。
待升级设备包含一个或多个待升级数据区域,待升级数据区域可以是待升级设备操作系统中的某一段或多段当前需要升级的程序或数据所对应的区域,或是待升级设备所安装的软件中某一段或多段需要升级的数据所对应的区域。
待升级设备接收到管理设备分发的待升级数据区域程序数据校验任务或发送的校验码获取指令,以及管理设备发送的待升级数据区域的定位索引信息后,根据所述定位索引信息定位待升级数据区域,并计算校验码。待升级设备完成计算校验码的计算之后,将该校验码发送至管理设备。
在本申请的另一种实施例中,待升级设备也可以根据接收到的待升级数据区域的定位索引信息获取该区域的程序数据,并将所获取的程序数据返回至管理设备端,由管理设备按同样算法对所述程序数据进行处理以获取校验码。这样可以减少待升级设备的计算资源,而由管理设备进行相关计算和判断。
管理设备根据获取的待升级设备所有待升级数据区域的程序数据校验码,确定所述校验码和预设校验码对照表中对应的标准校验码是否相同。例如,待升级设备包含待升级数据区域1、待升级数据区域2和待升级数据区域3,预设校验码对照表包含待升级数据区域1对应的标准校验码、待升级数据区域2对应的标准校验码,以及待升级数据区域3对应的标准校验码,管理设备确定待升级数据区域1、待升级数据区域2和待升级数据区域3的程序数据校验码和预设校验码对照表中对应的校验码是否相同。
若相同,则确定所述待升级设备的待升级数据区域的程序数据正确,则向所述待升级设备推送差分升级包。
若不相同,则确定所述待升级设备的待升级数据区域的程序数据不正确,则向所述待升级设备推送全量包。对于差分升级方式,非常强依赖于待升级设备本体软件正确性,如果待升级设备本体软件数据发生异常,则差分升级结果可能出错导致死机等等故障,因此通过本实施例的技术方案,可以有效避免因待升级设备本体软件数据异常造成的升级错误。
本实施例中的预设校验码对照表及其包含的标准校验码可以是软件厂商在制作原始升级包(差分包、全量包)时通过预定算法(例如MD5(Message-Digest Algorithm 5)信息摘要算法)针对差分升级包所对应的待升级设备中的程序或数据区域生成的。该对照表可随同所生成软件版本的升级包一起发布到管理设备。具体计算算法可以选择以Flash块为单位计算,也可以以文件方式为基本单位计算,视差分方式为文件方式和块方式而定。待升级设备上采取同样的校验码计算方式,保证计算算法一致。
以上所述仅为本申请的较佳实施例而已,并不用以限定本申请,对于MD5值计算和校验方法,只是本实施例举例采用,也可以采用其它校验码计算和验证方法,凡在本申请的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本申请的保护范围之内。
本实施例在升级时,对待升级设备的待升级数据区域的程序数据校验码,与预设校验码对照表中对应的标准校验码进行对比,当二者符合或相同时,对待升级设备下发差分升级包予以升级,否则下发全量包到待升级设备进行全量包软件升级。预设校验码对照表也可称为标准校验码数据表。
基于图2,本申请实施例提供另一种升级方法的流程示意图,如图3所示。
S101、管理设备与待升级设备(客户机)“握手”建立连接;
S102、管理设备向待升级设备下发差分校验任务。
S103、管理设备向待升级设备发送指令启动校验任务。
S104、管理设备判断校验结果。
其中,步骤S104管理设备判断校验结果可以包括以下情况:
S1041:管理设备向所述待升级设备发送校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息和标准校验码数据表;管理设备接收所述待升级设备发送的校验结果,所述校验结果用于指示目标校验码和标准校验码是否相同,所述目标校验码是所述待升级设备根据所述定位索引信息定位到所述程序数据,并基于所述程序数据计算得到的;当所述校验结果指示所述目标校验码和所述标准校验码相同时,确定所述程序数据正确;当所述校验结果指示所述目标校验码和所述标准校验码不相同时,确定所述程序数据不正确。
S1042:管理设备向所述待升级设备发送校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息;管理设备接收所述待升级设备发送的目标校验码,所述目标校验码是所述待升级设备根据所述定位索引信息定位到所述程序数据,并根据所述程序数据计算得到的;当所述目标校验码和标准校验码相同时,确定所述程序数据正确;当所述目标校验码和标准校验码不相同时,确定所述程序数据不正确。
S1043:管理设备向所述待升级设备发送校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息;管理设备接收所述待升级设备发送的所述程序数据,所述程序数据是所述待升级设备根据所述定位索引信息从所述目标待升级数据区域获取的;管理设备根据所述程序数据确定所述目标校验码;当所述目标校验码和标准校验码相同时,确定所述程序数据正确;当所述目标校验码和标准校验码不相同时,确定所述程序数据不正确。
S105、管理设备接收校验结果。
当所述校验结果指示所述目标校验码和所述标准校验码相同时,确定所述程序数据正确;
当所述校验结果指示所述目标校验码和所述标准校验码不相同时,确定所述程序数据不正确。
若正确,则向所述待升级设备推送差分升级包;若不正确,则向所述待升级设备推送全量升级包。
本实施例所提供的的方案中,管理设备首先遍历(多个)客户机(逐个)与其握手,然后下发数据信息到目标机(待升级设备/客户机)启动差分校验任务S102,客户机根据所述信息索引表对目标机(待升级设备/客户机)基本软件待更新数据区进行MD5值校验码计算,与管理设备(云端)下发标准MD5值数据比对,然后将结果反馈给管理设备,管理设备根据所述反馈结果判定推送给目标机(待升级设备/客户机)升级包类别,如果校验码验证全通过则推送体积较小的差分包软件给目标机(待升级设备/客户机)升级,否则推送全量升级包给目标机(待升级设备/客户机)升级。既避免差分升级出错,又解决了全部采用全量包升级带来高成本的问题。此外,因目标机(待升级设备/客户机)都有固定IP地址和MAC地址定位,可以采用定点识别和推送,不会发生客户间互相干扰情况。
请参考图4,图4所示为本申请实施例提供的一种系统软件升级装置在电视机上应用的流程示意图。根据图3所示,对系统软件升级装置在电视机上应用的流程进行解释:
访问首先遍历智能电视(待升级设备/客户机)与其握手(建立通信连接),然后下发S03数据信息到目标机启动目标机(程序数据即电视机本体软件)校验任务S06,管理设备向电视机下发电视机本体软件校验指令,同时下发电视机本体软件的基准(标准)MD5值以及待升级数据区域的索引信息,电视机对电视机本体软件的MD5值进行计算,根据与对应的标准MD5值的比对,将结果保存到S08模块,然后S08将结果反馈给管理设备,管理设备根据所述反馈结果判定推送给目标机升级包类别。其中,如果校验码验证不通过则推送全量升级包给目标机升级;因目标机都有固定IP地址和MAC地址定位,可以采用定点识别和推送,不会发生客户间互相干扰情况。
如果电视机本体软件校验码验证通过,则电机及计算待升级数据区域的MD5值,并与相应的标准MD5值进行对比,将结果保存到S08模块,然后S08将结果反馈给管理设备,管理设备根据所述反馈结果判定推送给目标机升级包类别,如果校验通过则推送体积较小的差分包软件给待升级目标机升级,否则推送全量升级包给待升级目标机升级。
本实施例中,以MD5算法作为检验码的计算方法;在实际应用中也可以选择其他的算法,本申请对此并不做限定。
下面对系统软件升级装置进行进一步说明。系统软件升级装置包括:
程序数据校验模块,用于确定待升级设备的待升级数据区域的程序数据是否正确;
差分包推送模块,用于当待升级设备的待升级数据区域的程序数据正确时,向待升级设备推送差分包;
全量包推送模块,用于当待升级设备的待升级数据区域的程序数据不正确时,向待升级设备推送全量包。
可选地,程序数据校验模块还用于执行:
向待升级设备发送校验指令,校验指令包括目标待升级数据区域的定位索引信息和标准校验码数据表;
接收待升级设备发送的校验结果,校验结果用于指示目标校验码和标准校验码数据表中的标准校验码是否相同,目标校验码是待升级设备根据定位索引信息定位到程序数据,并基于程序数据计算得到的;
当校验结果指示目标校验码和标准校验码相同时,确定程序数据正确;
当校验结果指示目标校验码和标准校验码不相同时,确定程序数据不正确。
可选地,程序数据校验模块还用于执行:
向待升级设备发送校验指令,校验指令包括目标待升级数据区域的定位索引信息;
接收待升级设备发送的目标校验码,目标校验码是待升级设备根据定位索引信息定位到程序数据,并根据程序数据计算得到的;
当目标校验码和标准校验码相同时,确定程序数据正确;
当目标校验码和标准校验码不相同时,确定程序数据不正确。
可选地,程序数据校验模块还用于执行:
向待升级设备发送校验指令,校验指令包括目标待升级数据区域的定位索引信息;
接收待升级设备发送的程序数据,程序数据是待升级设备根据定位索引信息从目标待升级数据区域获取的;
根据程序数据确定目标校验码;
当目标校验码和标准校验码相同时,确定程序数据正确;
当目标校验码和标准校验码不相同时,确定程序数据不正确。
可选地,系统软件升级装置还包括:
生成模块,用于执行:
读取系统软件当前版本的全量升级包;
读取系统软件目标版本的全量升级包;
读取系统软件的项目编译环境配置数据项;
根据项目编译环境配置数据项,制作并生成差分升级包;其中,项目编译环境配置数据项包括当前版本的全量升级包和目标版本的全量升级包的差异信息。
可选地,生成模块具体用于执行:
生成定位索引信息;
读取系统软件当前版本的全量升级包;
根据定位索引信息计算系统软件当前版本的全量升级包需要校验的程序数据,并生成标准校验码数据表。
可选地,差分包推送模块具体用于执行:
获取待升级设备的IP地址和MAC地址;
若正确,则根据待升级设备的IP地址和MAC地址,向待升级设备推送差分升级包;
可选地,全量包推送模块具体用于执行:
获取待升级设备的IP地址和MAC地址;
若不正确,则根据待升级设备的IP地址和MAC地址,向待升级设备推送全量升级包。
本申请实施例还提供一种终端设备,终端设备包括:
升级包获取模块,用于选择性获取差分升级包或全量升级包,差分升级包或全量升级包的选择性获取,基于设备的待升级数据区域的程序数据是否正确而执行;
升级执行模块,用于基于获取的差分升级包或全量升级包对设备的待升级数据区域的程序数据进行升级。
可选地,终端设备还包括:
指令接收模块,用于执行:
接收管理设备发送的校验指令,校验指令包括目标待升级数据区域的定位索引信息和标准校验码数据表;
根据定位索引信息和标准校验码数据表生成校验结果,校验结果用于指示目标校验码和标准校验码是否相同,目标校验码是根据定位索引信息定位到程序数据,并基于程序数据计算得到的;
将校验结果发送给管理设备,以使得管理设备在校验结果指示目标校验码和标准校验码相同时,确定程序数据正确,当校验结果指示目标校验码和标准校验码不相同时,确定程序数据不正确。
指令接收模块,还用于执行:
接收管理设备发送的校验指令,校验指令包括目标待升级数据区域的定位索引信息;
根据定位索引信息定位到程序数据,并根据程序数据计算得到目标校验码;
将目标校验码发送给管理设备,以使得管理设备在目标校验码和标准校验码相同时,确定程序数据正确,当目标校验码和标准校验码不相同时,确定程序数据不正确。
指令接收模块,还用于执行:
接收管理设备发送的校验指令,校验指令包括目标待升级数据区域的定位索引信息;
根据定位索引信息从目标待升级数据区域获取程序数据;
将程序数据发送给管理设备,以使得管理设备根据程序数据确定目标校验码,并当目标校验码和标准校验码相同时,确定程序数据正确,当目标校验码和标准校验码不相同时,确定程序数据不正确。
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施方式以及对应的有益效果可参见前面的方法实施例,在此不再赘述。
图5示出了本申请实施例提供的系统软件升级设备的硬件结构示意图,该系统软件升级设备可以包括待升级设备和管理设备。
系统软件升级设备可以包括处理器301以及存储有计算机程序指令的存储器302。
具体地,上述处理器301可以包括中央处理器(Central Processing Unit,CPU),或者特定集成电路(Application Specific Integrated Circuit ,ASIC),或者可以被配置成实施本申请实施例的一个或多个集成电路。
存储器302可以包括用于数据或指令的大容量存储器。举例来说而非限制,存储器302可包括硬盘驱动器(Hard Disk Drive,HDD)、软盘驱动器、闪存、光盘、磁光盘、磁带或通用串行总线(Universal Serial Bus,USB)驱动器或者两个或更多个以上这些的组合。在一个实例中,存储器302可以包括可移除或不可移除(或固定)的介质,或者存储器302是非易失性固态存储器。存储器302可在综合网关容灾设备的内部或外部。
在一个实例中,存储器302可以是只读存储器(Read Only Memory,ROM)。在一个实例中,该ROM可以是掩模编程的ROM、可编程ROM(PROM)、可擦除PROM(EPROM)、电可擦除PROM(EEPROM)、电可改写ROM(EAROM)或闪存或者两个或更多个以上这些的组合。
处理器301通过读取并执行存储器302中存储的计算机程序指令,以实现图1所示实施例中的方法步骤N1-N3,并达到图1所示实例执行其方法步骤达到的相应技术效果,为简洁描述在此不再赘述。
在一个示例中,系统软件升级设备还可包括通信接口303和总线310。其中,如图3所示,处理器301、存储器302、通信接口303通过总线310连接并完成相互间的通信。
通信接口303,主要用于实现本申请实施例中各模块、装置、单元和/或设备之间的通信。
总线310包括硬件、软件或两者,将在线数据流量计费设备的部件彼此耦接在一起。举例来说而非限制,总线可包括加速图形端口(Accelerated Graphics Port,AGP)或其他图形总线、增强工业标准架构(Extended Industry Standard Architecture,EISA)总线、前端总线(Front Side Bus,FSB)、超传输(Hyper Transport,HT)互连、工业标准架构(Industry Standard Architecture,ISA)总线、无限带宽互连、低引脚数(LPC)总线、存储器总线、微信道架构(MCA)总线、外围组件互连(PCI)总线、PCI-Express(PCI-X)总线、串行高级技术附件(SATA)总线、视频电子标准协会局部(VLB)总线或其他合适的总线或者两个或更多个以上这些的组合。在合适的情况下,总线310可包括一个或多个总线。尽管本申请实施例描述和示出了特定的总线,但本申请考虑任何合适的总线或互连。
该系统软件升级设备可以根据待升级的待升级设备待升级数据区域的数据情况,自动选择进行差分数据包升级或全量包升级,执行本申请实施例中的系统软件升级方法,从而实现结合图1描述的系统软件升级方法。
另外,结合上述实施例中的系统软件升级方法,本申请实施例可提供一种计算机存储介质来实现。该计算机存储介质上存储有计算机程序指令;该计算机程序指令被处理器执行时实现上述实施例中的任意一种系统软件升级方法。
其中,该计算机可读存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
由于该计算机可读存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种系统软件升级方法中的步骤,因此,可以实现本申请实施例所提供的任一种系统软件升级方法所能实现的有益效果,详见前面的实施例,在此不再赘述。
需要明确的是,本申请并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上述实施例中,描述和示出了若干具体的步骤作为示例。但是,本申请的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本申请的精神后,作出各种改变、修改和添加,或者改变步骤之间的顺序。
以上所述的结构框图中所示的功能块可以实现为硬件、软件、固件或者它们的组合。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(Application Specific Integrated Circuit,ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本申请的元素是被用于执行所需任务的程序或者代码段。程序或者代码段可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。“机器可读介质”可以包括能够存储或传输信息的任何介质。机器可读介质的例子包括电子电路、半导体存储器设备、ROM、闪存、可擦除ROM(EROM)、软盘、CD-ROM、光盘、硬盘、光纤介质、射频(Radio Frequency,RF)链路,等等。代码段可以经由诸如因特网、内联网等的计算机网络被下载。
还需要说明的是,本申请中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或系统。但是,本申请不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。
上面参考根据本公开的实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各方面。应当理解,流程图和/或框图中的每个方框以及流程图和/或框图中各方框的组合可以由计算机程序指令实现。这些计算机程序指令可被提供给通用计算机、专用计算机、或其它可编程数据处理装置的处理器,以产生一种机器,使得经由计算机或其它可编程数据处理装置的处理器执行的这些指令使能对流程图和/或框图的一个或多个方框中指定的功能/动作的实现。这种处理器可以是但不限于是通用处理器、专用处理器、特殊应用处理器或者现场可编程逻辑电路。还可理解,框图和/或流程图中的每个方框以及框图和/或流程图中的方框的组合,也可以由执行指定的功能或动作的专用硬件来实现,或可由专用硬件和计算机指令的组合来实现。
以上所述,仅为本申请的具体实施方式,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。应理解,本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。

Claims (20)

  1. 一种系统软件升级方法,其中,包括:
    确定待升级设备的目标待升级数据区域的程序数据是否正确;
    若正确,则向所述待升级设备推送差分升级包;
    若不正确,则向所述待升级设备推送全量升级包。
  2. 根据权利要求1所述的系统软件升级方法,其中,所述确定待升级设备的目标待升级数据区域的程序数据是否正确,包括:
    向所述待升级设备发送校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息和标准校验码数据表;
    接收所述待升级设备发送的校验结果,所述校验结果用于指示目标校验码和所述标准校验码数据表中的标准校验码是否相同,所述目标校验码是所述待升级设备根据所述定位索引信息定位到所述程序数据,并基于所述程序数据计算得到的;
    当所述校验结果指示所述目标校验码和所述标准校验码相同时,确定所述程序数据正确;
    当所述校验结果指示所述目标校验码和所述标准校验码不相同时,确定所述程序数据不正确。
  3. 根据权利要求1所述的系统软件升级方法,其中,所述确定待升级设备的目标待升级数据区域的程序数据是否正确,包括:
    向所述待升级设备发送校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息;
    接收所述待升级设备发送的目标校验码,所述目标校验码是所述待升级设备根据所述定位索引信息定位到所述程序数据,并根据所述程序数据计算得到的;
    当所述目标校验码和标准校验码相同时,确定所述程序数据正确;
    当所述目标校验码和标准校验码不相同时,确定所述程序数据不正确。
  4. 根据权利要求1所述的系统软件升级方法,其中,所述确定待升级设备的目标待升级数据区域的程序数据是否正确,包括:
    向所述待升级设备发送校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息;
    接收所述待升级设备发送的所述程序数据,所述程序数据是所述待升级设备根据所述定位索引信息从所述目标待升级数据区域获取的;
    根据所述程序数据确定所述目标校验码;
    当所述目标校验码和标准校验码相同时,确定所述程序数据正确;
    当所述目标校验码和标准校验码不相同时,确定所述程序数据不正确。
  5. 根据权利要求1-4任一所述的系统软件升级方法,其中,所述确定待升级设备中的目标待升级数据区域的程序数据是否正确之前,还包括:
    读取所述系统软件当前版本的全量升级包;
    读取所述系统软件目标版本的全量升级包;
    读取所述系统软件的项目编译环境配置数据项;
    根据所述项目编译环境配置数据项,制作并生成差分升级包;其中,所述项目编译环境配置数据项包括所述当前版本的全量升级包和所述目标版本的全量升级包的差异信息。
  6. 根据权利要求5所述的系统软件升级方法,其中,制作并生成所述差分升级包后,还包括:
    生成定位索引信息;
    读取所述系统软件当前版本的全量升级包;
    根据所述定位索引信息计算所述系统软件当前版本的全量升级包需要校验的程序数据,并生成标准校验码数据表。
  7. 根据权利要求2所述的系统软件升级方法,其中,所述目标校验码和所述标准校验码配置为根据MD5信息摘要算法,对所述待升级数据区域的程序数据进行计算得到。
  8. 根据权利要求1所述的系统软件升级方法,其特征在于,所述若正确,则向所述待升级设备推送差分升级包,若不正确,则向所述待升级设备推送全量升级包,包括:
    获取所述待升级设备的IP地址和MAC地址;
    若正确,则根据所述待升级设备的IP地址和MAC地址,向所述待升级设备推送差分升级包;
    若不正确,则根据所述待升级设备的IP地址和MAC地址,向所述待升级设备推送全量升级包。
  9. 一种系统软件升级方法,其中,包括:
    当目标软件对应的目标待升级数据区域的程序数据正确时,接收管理设备发送的差分升级包;
    当所述目标待升级数据区域的程序数据不正确时,接收所述管理设备发送的全量升级包。
  10. 根据权利要求9所述的方法,其中,所述接收管理设备发送的差分升级包之前,还包括:
    接收所述管理设备发送的校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息和标准校验码数据表;
    根据所述定位索引信息和所述标准校验码数据表生成校验结果,所述校验结果用于指示目标校验码和标准校验码是否相同,所述目标校验码是根据所述定位索引信息定位到所述程序数据,并基于所述程序数据计算得到的;
    将所述校验结果发送给所述管理设备,以使得所述管理设备在所述校验结果指示所述目标校验码和所述标准校验码相同时,确定所述程序数据正确,当所述校验结果指示所述目标校验码和所述标准校验码不相同时,确定所述程序数据不正确。
  11. 根据权利要求9所述的方法,其中,所述接收管理设备发送的差分升级包之前,还包括:
    接收所述管理设备发送的校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息;
    根据所述定位索引信息定位到所述程序数据,并根据所述程序数据计算得到目标校验码;
    将所述目标校验码发送给所述管理设备,以使得所述管理设备在所述目标校验码和标准校验码相同时,确定所述程序数据正确,当所述目标校验码和所述标准校验码不相同时,确定所述程序数据不正确。
  12. 根据权利要求9所述的方法,其中,所述接收管理设备发送的差分升级包之前,还包括:
    接收所述管理设备发送的校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息;
    根据所述定位索引信息从所述目标待升级数据区域获取所述程序数据;
    将所述程序数据发送给所述管理设备,以使得所述管理设备根据所述程序数据确定所述目标校验码,并当所述目标校验码和标准校验码相同时,确定所述程序数据正确,当所述目标校验码和标准校验码不相同时,确定所述程序数据不正确。
  13. 一种系统软件升级装置,其中,所述装置包括:
    程序数据校验模块,用于确定待升级设备的待升级数据区域的程序数据是否正确;
    差分包推送模块,用于当所述待升级设备的待升级数据区域的程序数据正确时,向所述待升级设备推送差分包;
    全量包推送模块,用于当所述待升级设备的待升级数据区域的程序数据不正确时,向所述待升级设备推送全量包。
  14. 根据权利要求13所述的装置,其中,所述程序数据校验模块包括:
    校验码获取模块,用于获取待升级设备的待升级数据区域的校验码;
    校验码验证模块,用于确定校验码和预设校验码对照表中对应的标准校验码是否相同,若相同,则确定待升级设备的待升级数据区域的程序数据正确,若不相同,则确定待升级设备的待升级数据区域的程序数据不正确。
  15. 根据权利要求13所述的装置,其中,所述校验码获取模块包括:
    发送模块,用于向待升级设备发送校验码获取指令及待升级数据区域的定位索引信息;
    接收模块,用于接收待升级设备返回的校验码,校验码由待升级设备根据定位索引信息定位待升级数据区域的程序数据,并基于待升级数据区域的数据计算得出。
  16. 一种终端设备,其中,所述终端设备包括:
    升级包获取模块,用于选择性获取差分升级包或全量升级包,所述差分升级包或全量升级包的选择性获取,基于所述设备的待升级数据区域的程序数据是否正确而执行;
    升级执行模块,用于基于获取的所述差分升级包或全量升级包对所述设备的待升级数据区域的程序数据进行升级。
  17. 一种管理设备,其中,所述管理设备包括:处理器,以及存储有计算机程序指令的存储器;所述处理器读取并执行所述计算机程序指令,以实现:
    确定待升级设备的目标待升级数据区域的程序数据是否正确;
    若正确,则向所述待升级设备推送差分升级包;
    若不正确,则向所述待升级设备推送全量升级包。
  18. 如权利要求17所述的管理设备,其中,所述处理器具体用于实现:
    向所述待升级设备发送校验指令,所述校验指令包括所述目标待升级数据区域的定位索引信息和标准校验码数据表;
    接收所述待升级设备发送的校验结果,所述校验结果用于指示目标校验码和标准校验码是否相同,所述目标校验码是所述待升级设备根据所述定位索引信息定位到所述程序数据,并基于所述程序数据计算得到的;
    当所述校验结果指示所述目标校验码和所述标准校验码相同时,确定所述程序数据正确;
    当所述校验结果指示所述目标校验码和所述标准校验码不相同时,确定所述程序数据不正确。
  19. 一种待升级设备,其中,所述待升级设备包括:处理器,以及存储有计算机程序指令的存储器;所述处理器读取并执行所述计算机程序指令,以实现:
    当目标软件对应的目标待升级数据区域的程序数据正确时,接收管理设备发送的差分升级包;
    当所述目标待升级数据区域的程序数据不正确时,接收所述管理设备发送的全量升级包。
  20. 一种计算机存储介质,其中,所述计算机存储介质上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现如权利要求1-8任意一项所述的系统软件升级方法;或者,所述计算机程序指令被处理器执行时实现如权利要求9-12任意一项所述的系统软件升级方法。
PCT/CN2022/113471 2021-09-08 2022-08-19 系统软件升级方法、装置、设备和计算机存储介质 WO2023035901A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111049118.X 2021-09-08
CN202111049118.XA CN113900682A (zh) 2021-09-08 2021-09-08 一种系统软件升级方法、装置、设备和计算机存储介质

Publications (1)

Publication Number Publication Date
WO2023035901A1 true WO2023035901A1 (zh) 2023-03-16

Family

ID=79188850

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/113471 WO2023035901A1 (zh) 2021-09-08 2022-08-19 系统软件升级方法、装置、设备和计算机存储介质

Country Status (2)

Country Link
CN (1) CN113900682A (zh)
WO (1) WO2023035901A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116466986A (zh) * 2023-04-18 2023-07-21 惠州市乐亿通科技有限公司 储能系统的设备软件升级方法、装置、通讯模块以及介质
CN116521199A (zh) * 2023-04-14 2023-08-01 北京百度网讯科技有限公司 一种部件升级方法、装置、设备及存储介质
CN116954643A (zh) * 2023-06-02 2023-10-27 深圳市华芯控股有限公司 基于can总线自组网系统的点播及组播固件升级方法
CN116521199B (zh) * 2023-04-14 2024-05-17 北京百度网讯科技有限公司 一种部件升级方法、装置、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113900682A (zh) * 2021-09-08 2022-01-07 深圳Tcl新技术有限公司 一种系统软件升级方法、装置、设备和计算机存储介质
CN116360830B (zh) * 2023-05-31 2023-08-15 中汽智联技术有限公司 一种车载终端软件版本升级方法和系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790247A (zh) * 2017-01-23 2017-05-31 青岛海信移动通信技术股份有限公司 一种Android系统升级的方法和装置
CN108153540A (zh) * 2018-01-15 2018-06-12 北京小米移动软件有限公司 系统升级的方法、装置、终端及存储介质
CN108491214A (zh) * 2018-02-08 2018-09-04 北京中科江南信息技术股份有限公司 应用系统升级部署的管理方法和管理系统
WO2020010695A1 (zh) * 2018-07-13 2020-01-16 深圳市道通智能航空技术有限公司 无人机系统中的模块升级方法及待升级模块
CN113900682A (zh) * 2021-09-08 2022-01-07 深圳Tcl新技术有限公司 一种系统软件升级方法、装置、设备和计算机存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790247A (zh) * 2017-01-23 2017-05-31 青岛海信移动通信技术股份有限公司 一种Android系统升级的方法和装置
CN108153540A (zh) * 2018-01-15 2018-06-12 北京小米移动软件有限公司 系统升级的方法、装置、终端及存储介质
CN108491214A (zh) * 2018-02-08 2018-09-04 北京中科江南信息技术股份有限公司 应用系统升级部署的管理方法和管理系统
WO2020010695A1 (zh) * 2018-07-13 2020-01-16 深圳市道通智能航空技术有限公司 无人机系统中的模块升级方法及待升级模块
CN113900682A (zh) * 2021-09-08 2022-01-07 深圳Tcl新技术有限公司 一种系统软件升级方法、装置、设备和计算机存储介质

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116521199A (zh) * 2023-04-14 2023-08-01 北京百度网讯科技有限公司 一种部件升级方法、装置、设备及存储介质
CN116521199B (zh) * 2023-04-14 2024-05-17 北京百度网讯科技有限公司 一种部件升级方法、装置、设备及存储介质
CN116466986A (zh) * 2023-04-18 2023-07-21 惠州市乐亿通科技有限公司 储能系统的设备软件升级方法、装置、通讯模块以及介质
CN116466986B (zh) * 2023-04-18 2023-10-27 惠州市乐亿通科技有限公司 储能系统的设备软件升级方法、装置、通讯模块以及介质
CN116954643A (zh) * 2023-06-02 2023-10-27 深圳市华芯控股有限公司 基于can总线自组网系统的点播及组播固件升级方法
CN116954643B (zh) * 2023-06-02 2024-04-05 深圳市华芯控股有限公司 基于can总线自组网系统的点播及组播固件升级方法

Also Published As

Publication number Publication date
CN113900682A (zh) 2022-01-07

Similar Documents

Publication Publication Date Title
WO2023035901A1 (zh) 系统软件升级方法、装置、设备和计算机存储介质
US11093981B2 (en) Smart broadcasting device
CN107193612B (zh) 一种移动终端的版本升级方法及装置
US20130061222A1 (en) Apparatus and method for managing optimized virtualization module
CN106886436B (zh) 一种Android系统升级的方法和装置
JP6793667B2 (ja) アプリケーションダウンロード方法及び装置
CN107844306B (zh) 应用程序的修复方法、装置、存储介质及终端
CN104850427A (zh) 一种代码升级方法及装置
CN112995806A (zh) 一种升级光网络单元方法、装置、系统及存储介质
CN113330419A (zh) 一种设备应用安装方法和装置
CN111459524A (zh) 软件的升级方法、装置、系统
CN111176685A (zh) 一种升级方法及装置
CN108829495B (zh) 多数据库修改事务的验证方法、装置、设备及存储介质
CN106293814B (zh) 升级方法及装置
CN105549995A (zh) 一种音频设备升级方法及装置
CN113094064A (zh) 网关软件模块升级方法、装置、设备及存储介质
CN108881320B (zh) 一种用户登陆的认证处理方法、服务器及客户端
US10979287B2 (en) Method and apparatus for receiving a solution when configuration function verification fails in a terminal
CN105376646A (zh) 一种机顶盒升级程序配置方法及装置
CN113098975B (zh) 一种跨平台发布应用的方法和装置
CN110580172A (zh) 配置规则的验证方法及装置、存储介质、电子装置
CN113326055B (zh) 一种设备更新方法及相关装置
CN111142906B (zh) 一种设备固件升级方案迭代的方法、装置与设备
CN112134718B (zh) 固件升级方法、家电、固件升级系统及可读存储介质
CN114637523A (zh) 固件升级文件处理方法、装置、服务器及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22866374

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE